:root {
    --bg-black: #000000;
    --card-bg: #050505;
    --border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #666;
    --accent: #ffffff;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-black);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

.auth-bg-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: authGlowPulse 6s ease-in-out infinite alternate;
}

.auth-bg-glow-secondary {
    position: fixed;
    bottom: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(88, 101, 242, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: authGlowSecondary 8s ease-in-out infinite alternate;
}

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

@keyframes authGlowSecondary {
    0% { transform: scale(1) rotate(0deg); opacity: 0.4; }
    100% { transform: scale(1.4) rotate(20deg); opacity: 0.8; }
}

.auth-stars-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    z-index: 0;
    background-image:
        radial-gradient(1px 1px at 5% 15%, rgba(255, 255, 255, 0.35) 1px, transparent 0),
        radial-gradient(1px 1px at 12% 45%, rgba(255, 255, 255, 0.25) 1px, transparent 0),
        radial-gradient(1.5px 1.5px at 20% 75%, rgba(255, 255, 255, 0.4) 1px, transparent 0),
        radial-gradient(1px 1px at 35% 25%, rgba(255, 255, 255, 0.3) 1px, transparent 0),
        radial-gradient(1px 1px at 42% 90%, rgba(255, 255, 255, 0.2) 1px, transparent 0),
        radial-gradient(2px 2px at 55% 8%, rgba(255, 255, 255, 0.15) 1px, transparent 0),
        radial-gradient(1px 1px at 62% 55%, rgba(255, 255, 255, 0.5) 1px, transparent 0),
        radial-gradient(1px 1px at 75% 35%, rgba(255, 255, 255, 0.3) 1px, transparent 0),
        radial-gradient(1.5px 1.5px at 82% 70%, rgba(255, 255, 255, 0.2) 1px, transparent 0),
        radial-gradient(1px 1px at 90% 20%, rgba(255, 255, 255, 0.45) 1px, transparent 0),
        radial-gradient(1px 1px at 95% 85%, rgba(255, 255, 255, 0.3) 1px, transparent 0);
    animation: authStarsDrift 120s linear infinite;
    pointer-events: none;
}

@keyframes authStarsDrift {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

.auth-grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 80px 80px;
    animation: authGridFade 10s ease-in-out infinite alternate;
}

@keyframes authGridFade {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

.auth-page-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid var(--border);
    border-radius: 28px;
    padding: 45px 38px;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    position: relative;
    overflow: hidden;
    animation: authCardIn 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: authCardScanline 4s linear infinite;
}

@keyframes authCardScanline {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes authCardIn {
    from { transform: translateY(40px) scale(0.92); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.auth-card-glow {
    position: absolute;
    top: -120px;
    left: -120px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
    filter: blur(50px);
    animation: authCornerGlow 5s ease-in-out infinite alternate;
}

@keyframes authCornerGlow {
    0% { opacity: 0.4; transform: translate(0, 0); }
    100% { opacity: 0.8; transform: translate(20px, 20px); }
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 35px;
    gap: 12px;
}

.auth-logo-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-logo {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
    animation: authLogoFloat 4s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.auth-logo-ring {
    position: absolute;
    width: 85px;
    height: 85px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.06);
    animation: authRingSpin 12s linear infinite;
    z-index: 1;
}

.auth-logo-ring::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}

.auth-logo-ring-outer {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.04);
    animation: authRingSpin 20s linear infinite reverse;
    z-index: 0;
}

@keyframes authRingSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

.auth-brand-name {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 5px;
    text-transform: uppercase;
    background: linear-gradient(180deg, #fff 0%, #777 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: authTitleShimmer 3s ease-in-out infinite alternate;
}

@keyframes authTitleShimmer {
    0% { filter: brightness(0.9); }
    100% { filter: brightness(1.2); }
}

.auth-brand-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0;
    animation: authSubFadeIn 0.8s 0.3s ease forwards;
}

@keyframes authSubFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 30px 0;
}

.auth-form-group {
    position: relative;
    margin-bottom: 22px;
    opacity: 0;
    animation: authFieldSlideIn 0.5s ease forwards;
}

.auth-form-group:nth-child(1) { animation-delay: 0.2s; }
.auth-form-group:nth-child(2) { animation-delay: 0.35s; }
.auth-form-group:nth-child(3) { animation-delay: 0.5s; }

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

.auth-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 45px 14px 16px;
    color: #fff;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    outline: none;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    box-sizing: border-box;
}

.auth-input::placeholder {
    color: #444;
    font-weight: 600;
    font-size: 0.85rem;
}

.auth-input:focus {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.04), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.auth-input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #333;
    font-size: 0.85rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

.auth-input:focus ~ .auth-input-icon {
    color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.auth-btn {
    width: 100%;
    padding: 15px;
    background: #fff;
    color: #000;
    border: 2px solid #fff;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.auth-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);
    transition: left 0.5s ease;
}

.auth-btn:hover::after {
    left: 100%;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
}

.auth-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.auth-or-separator {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 22px 0;
}

.auth-or-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
}

.auth-or-text {
    font-size: 0.65rem;
    color: #444;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
}

.auth-btn-discord {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 30px;
    margin: 0 auto;
    background: transparent;
    color: #5865F2;
    border: 2px solid rgba(88, 101, 242, 0.2);
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.auth-btn-discord::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(88, 101, 242, 0.08), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.auth-btn-discord:hover::before {
    opacity: 1;
}

.auth-btn-discord:hover {
    border-color: rgba(88, 101, 242, 0.5);
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.12), 0 8px 25px rgba(88, 101, 242, 0.1);
    color: #7289da;
    transform: translateY(-2px);
}

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

.auth-btn-discord i {
    font-size: 1rem;
}

.auth-discord-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.auth-footer-link {
    text-align: center;
    margin-top: 25px;
    font-size: 0.8rem;
    color: #444;
    font-weight: 600;
}

.auth-footer-link a {
    color: #ccc;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
}

.auth-footer-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #fff;
    transition: width 0.3s ease;
}

.auth-footer-link a:hover {
    color: #fff;
}

.auth-footer-link a:hover::after {
    width: 100%;
}

.auth-error-msg {
    background: rgba(231, 76, 60, 0.08);
    border: 2px solid rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: authShake 0.4s ease;
}

@keyframes authShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

.auth-success-msg {
    background: rgba(46, 204, 113, 0.08);
    border: 2px solid rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: authSuccessPop 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes authSuccessPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.auth-password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #333;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: none;
    border: none;
    padding: 5px;
    z-index: 2;
}

.auth-password-toggle:hover {
    color: #aaa;
    transform: translateY(-50%) scale(1.1);
}

.auth-card-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.auth-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    animation: authParticleFloat 10s infinite ease-in-out;
}

.auth-particle:nth-child(1) { left: 8%; top: 15%; animation-delay: 0s; animation-duration: 9s; }
.auth-particle:nth-child(2) { left: 25%; top: 55%; animation-delay: 1.5s; animation-duration: 11s; }
.auth-particle:nth-child(3) { left: 65%; top: 25%; animation-delay: 3s; animation-duration: 8s; }
.auth-particle:nth-child(4) { left: 88%; top: 65%; animation-delay: 4.5s; animation-duration: 12s; }
.auth-particle:nth-child(5) { left: 45%; top: 85%; animation-delay: 6s; animation-duration: 10s; }
.auth-particle:nth-child(6) { left: 78%; top: 10%; animation-delay: 2s; animation-duration: 13s; }
.auth-particle:nth-child(7) { left: 15%; top: 78%; animation-delay: 7s; animation-duration: 9s; }
.auth-particle:nth-child(8) { left: 92%; top: 40%; animation-delay: 3.5s; animation-duration: 11s; }

@keyframes authParticleFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.2; }
    25% { transform: translateY(-20px) scale(1.3); opacity: 0.5; }
    50% { transform: translateY(-35px) scale(1.6); opacity: 0.8; }
    75% { transform: translateY(-15px) scale(1.2); opacity: 0.4; }
}

.auth-corner-accent {
    position: absolute;
    width: 60px;
    height: 60px;
    pointer-events: none;
}

.auth-corner-accent.top-left {
    top: 0;
    left: 0;
    border-top: 2px solid rgba(255, 255, 255, 0.06);
    border-left: 2px solid rgba(255, 255, 255, 0.06);
    border-radius: 28px 0 0 0;
}

.auth-corner-accent.bottom-right {
    bottom: 0;
    right: 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.06);
    border-right: 2px solid rgba(255, 255, 255, 0.06);
    border-radius: 0 0 28px 0;
}

.dashboard-discord-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 40px;
    min-height: 50vh;
}

.discord-gate-icon {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.08);
    margin-bottom: 30px;
    animation: gateIconPulse 3s ease-in-out infinite;
}

@keyframes gateIconPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
}

.discord-gate-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.discord-gate-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    max-width: 500px;
    line-height: 1.6;
    margin-bottom: 35px;
}

.discord-gate-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: #5865F2;
    color: #fff;
    border: 2px solid #5865F2;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.9rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.discord-gate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.3);
    background: #4752c4;
}

@media (max-width: 520px) {
    .auth-card {
        padding: 30px 22px;
        border-radius: 20px;
        max-width: 100%;
    }

    .auth-brand-name {
        font-size: 1.2rem;
        letter-spacing: 3px;
    }

    .auth-logo {
        width: 50px;
        height: 50px;
    }

    .auth-logo-ring {
        width: 70px;
        height: 70px;
    }

    .auth-logo-ring-outer {
        width: 85px;
        height: 85px;
    }

    .auth-btn-discord {
        padding: 12px 24px;
        font-size: 0.7rem;
    }
}
