.auth-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.login-box, .error-box, .callback-container {
    position: relative;
    background: rgba(20, 20, 30, 0.3);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 1.8rem;
    padding: 3rem 2.5rem;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    text-align: center;
    transition: transform 0.3s, opacity 0.3s, box-shadow 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
    clip-path: inset(0 round 1.8rem);
    -webkit-clip-path: inset(0 round 1.8rem);
    z-index: 0;
}

.login-box::before, .error-box::before, .callback-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 180, 120, 0.08), transparent 70%);
    pointer-events: none;
    z-index: -1;
    transition: opacity 0.3s ease;
    border-radius: inherit;
    will-change: opacity;
}

.login-box:hover, .error-box:hover, .callback-container:hover {
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 180, 120, 0.2);
    border-color: rgba(255, 180, 120, 0.15);
}

.login-box.fade-out, .error-box.fade-out, .callback-container.fade-out {
    transform: translateY(-20px);
    opacity: 0;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 2rem;
}

.auth-logo img {
    height: 60px;
    width: auto;
}

.auth-logo h1 {
    font-size: 2.2rem;
    margin: 0;
    background: linear-gradient(135deg, #fff, #ffb27a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'DM Sans', sans-serif;
    letter-spacing: 2px;
}

.login-box h2, .error-box h2, .callback-container h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, #c0c0d0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-box p, .error-box p, .callback-container p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.btn-twitch, .btn-action {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 40px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-twitch:hover, .btn-action:hover {
    opacity: 0.85;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--accent-glow);
}

.btn-twitch i, .btn-action i {
    font-size: 1.2rem;
}

.login-loading {
    display: none;
    margin-top: 2rem;
}

.login-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-loading p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .login-box, .error-box, .callback-container {
        padding: 2rem 1.5rem;
    }
    .auth-logo h1 {
        font-size: 1.8rem;
    }
    .auth-logo img {
        height: 50px;
    }
    .login-box h2, .error-box h2, .callback-container h2 {
        font-size: 1.5rem;
    }
}

.disclaimer {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #707088;
    font-size: 0.8rem;
    opacity: 0.7;
}
