/**
 * Styles pour le modal de connexion Twitch
 */

.twitch-auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.twitch-auth-modal.active {
    opacity: 1;
}

.twitch-auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.twitch-auth-content {
    position: relative;
    background: #1a1a2e;
    border: 2px solid #2a2a3e;
    border-radius: 24px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.twitch-auth-header {
    padding: 2rem;
    border-bottom: 2px solid #2a2a3e;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(145, 70, 255, 0.1), rgba(236, 72, 153, 0.1));
}

.twitch-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.twitch-auth-header h2 {
    flex: 1;
    margin: 0;
    font-size: 1.5rem;
    color: #ffffff;
}

.close-modal {
    background: none;
    border: none;
    color: #a0a0b0;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.twitch-auth-body {
    padding: 2rem;
    text-align: center;
}

.auth-spinner {
    margin: 2rem auto;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border: 4px solid #2a2a3e;
    border-top-color: #9146ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.auth-message {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin: 1rem 0 0.5rem;
}

.auth-hint {
    color: #a0a0b0;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.auth-steps {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.4;
    transition: all 0.3s;
}

.step.active {
    opacity: 1;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2a2a3e;
    border: 2px solid #3a3a4e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #a0a0b0;
    transition: all 0.3s;
}

.step.active .step-icon {
    background: linear-gradient(135deg, #9146ff, #ec4899);
    border-color: #9146ff;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(145, 70, 255, 0.4);
}

.step-text {
    font-size: 0.75rem;
    color: #a0a0b0;
    text-align: center;
}

.step.active .step-text {
    color: #ffffff;
}

.twitch-auth-footer {
    padding: 1.5rem 2rem;
    border-top: 2px solid #2a2a3e;
    display: flex;
    justify-content: center;
}

.btn-cancel {
    padding: 0.75rem 2rem;
    background: #2a2a3e;
    border: 2px solid #3a3a4e;
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: #3a3a4e;
    border-color: #9146ff;
}

/* Success State */
.auth-success {
    padding: 2rem 0;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: scaleIn 0.5s ease-out;
}

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

.auth-success h3 {
    font-size: 1.5rem;
    color: #10b981;
    margin-bottom: 0.5rem;
}

.auth-success p {
    color: #a0a0b0;
    margin-bottom: 1.5rem;
}

.auth-success strong {
    color: #ffffff;
}

.user-avatar {
    /*margin-top: 1.5rem;*
}

.user-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #9146ff;
    box-shadow: 0 4px 12px rgba(145, 70, 255, 0.4);
}

/* Error State */
.auth-error {
    padding: 2rem 0;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.auth-error h3 {
    font-size: 1.5rem;
    color: #ef4444;
    margin-bottom: 0.5rem;
}

.auth-error p {
    color: #a0a0b0;
    margin-bottom: 1.5rem;
}

.btn-retry {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #9146ff, #ec4899);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(145, 70, 255, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .twitch-auth-content {
        width: 95%;
        margin: 1rem;
    }

    .twitch-auth-header,
    .twitch-auth-body,
    .twitch-auth-footer {
        padding: 1.5rem;
    }

    .auth-steps {
        flex-direction: column;
        gap: 1rem;
    }

    .step {
        flex-direction: row;
        justify-content: flex-start;
    }

    .step-text {
        text-align: left;
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.auth-spinner {
    animation: pulse 2s ease-in-out infinite;
}
