/* Color Scheme from Loader Menu */
:root {
    --main-color: rgb(20, 20, 20);
    --menu-pattern-a: rgb(20, 20, 20);
    --menu-pattern-b: rgb(28, 28, 28);
    --element-outline: rgb(30, 30, 30);
    --tab-outline: rgb(52, 52, 52);
    --second-border: rgb(36, 36, 36);
    --third-border: rgb(28, 28, 28);
    --window-pane-bg: rgb(38, 38, 38);
    --subtle-gray: rgb(45, 45, 45);
    --medium-gray: rgb(78, 78, 78);
    --scrollbar-thumb: rgb(115, 115, 115);
    --scrollbar-hover: rgb(145, 145, 145);
    --accent-color: rgb(210, 226, 103);
    --text-primary: rgb(255, 255, 255);
    --text-secondary: rgb(180, 180, 180);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--main-color);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Particle Background */
.particles-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.particles-background canvas {
    display: block;
}

/* Auth Container */
.auth-container {
    position: relative;
    z-index: 10;
    width: 420px;
    background: var(--menu-pattern-b);
    border: 1px solid var(--tab-outline);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(210, 226, 103, 0.15), transparent);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.logo {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 6px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

.tagline {
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Form Container */
.form-container {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.form-container.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-title {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 30px;
    color: var(--text-primary);
    text-align: center;
}

/* Input Groups */
.input-group {
    position: relative;
    margin-bottom: 30px;
}

.auth-input {
    width: 100%;
    padding: 12px 0;
    font-size: 15px;
    color: var(--text-primary);
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--second-border);
    outline: none;
    transition: all 0.3s ease;
}

.auth-input:focus {
    border-bottom-color: var(--accent-color);
}

.auth-input:focus ~ .input-label,
.auth-input:not(:placeholder-shown) ~ .input-label {
    transform: translateY(-24px);
    font-size: 12px;
    color: var(--accent-color);
}

.input-label {
    position: absolute;
    left: 0;
    top: 12px;
    font-size: 15px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--scrollbar-hover));
    transition: width 0.3s ease;
}

.auth-input:focus ~ .input-underline {
    width: 100%;
}

/* Remember Me */
.remember-me {
    margin-bottom: 25px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--second-border);
    border-radius: 3px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container:hover .checkmark {
    border-color: var(--accent-color);
}

.checkbox-container input:checked ~ .checkmark {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.checkbox-container input:checked ~ .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid var(--main-color);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* hCaptcha Container */
.captcha-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.captcha-container .h-captcha {
    transform: scale(0.9);
    transform-origin: center;
}

/* Auth Button */
.auth-button {
    width: 100%;
    padding: 14px;
    margin-bottom: 20px;
    background: var(--medium-gray);
    border: 1px solid var(--tab-outline);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.5px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.auth-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(210, 226, 103, 0.2), transparent);
    transition: left 0.5s ease;
}

.auth-button:hover::before {
    left: 100%;
}

.auth-button:hover {
    background: var(--scrollbar-thumb);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(210, 226, 103, 0.2);
}

.auth-button:active {
    transform: translateY(0);
}

.button-text {
    position: relative;
    z-index: 1;
}

.button-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(210, 226, 103, 0.3), transparent);
    border-radius: 50%;
    transition: width 0.6s ease, height 0.6s ease;
}

.auth-button:hover .button-glow {
    width: 300px;
    height: 300px;
}

/* Form Switch */
.form-switch {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.switch-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
    transition: all 0.3s ease;
}

.switch-link:hover {
    color: var(--scrollbar-hover);
    text-decoration: underline;
}

/* Error Message */
.error-message {
    margin-top: 15px;
    padding: 12px;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 4px;
    color: #ff4444;
    font-size: 13px;
    text-align: center;
    display: none;
    animation: shake 0.5s ease;
}

.error-message.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Version Info */
.version-info {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 1px;
    z-index: 5;
}

/* Loading State */
.auth-button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.auth-button.loading .button-text::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border: 2px solid var(--text-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Responsive */
@media (max-width: 480px) {
    .auth-container {
        width: 90%;
        padding: 30px 25px;
    }

    .logo {
        font-size: 36px;
        letter-spacing: 4px;
    }

    .tagline {
        font-size: 10px;
    }
}

/* Success Message */
.success-message {
    margin-top: 15px;
    padding: 12px;
    background: rgba(210, 226, 103, 0.1);
    border: 1px solid rgba(210, 226, 103, 0.3);
    border-radius: 4px;
    color: var(--accent-color);
    font-size: 13px;
    text-align: center;
    display: none;
    animation: slideDown 0.4s ease;
}

.success-message.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
