/**
 * Styles pour N'oubliez pas les paroles
 */

/* Variables */
:root {
    --npl-primary: #1DB954;
    --npl-primary-dark: #1aa34a;
    --npl-secondary: #282828;
    --npl-background: #121212;
    --npl-surface: #1e1e1e;
    --npl-text: #ffffff;
    --npl-text-muted: #b3b3b3;
    --npl-success: #1DB954;
    --npl-error: #e22134;
    --npl-warning: #ff9800;
    --npl-radius: 8px;
    --npl-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Container principal */
.npl-game-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--npl-text);
}

/* Écrans */
.npl-screen {
    display: none;
    background: var(--npl-surface);
    border-radius: var(--npl-radius);
    padding: 40px;
    box-shadow: var(--npl-shadow);
    animation: fadeIn 0.3s ease;
}

.npl-screen.active {
    display: block;
}

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

/* Écran d'authentification */
.npl-auth-content {
    text-align: center;
}

.npl-auth-content h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: var(--npl-text);
}

.npl-subtitle {
    font-size: 1.2em;
    color: var(--npl-text-muted);
    margin-bottom: 30px;
}

.npl-auth-box {
    max-width: 500px;
    margin: 0 auto;
}

.npl-spotify-info {
    margin-bottom: 30px;
}

.npl-spotify-logo {
    max-width: 120px;
    margin-bottom: 15px;
}

.npl-info-box {
    margin-top: 30px;
    padding: 20px;
    background: var(--npl-background);
    border-radius: var(--npl-radius);
    text-align: left;
}

.npl-info-box ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

.npl-info-box li {
    padding: 8px 0;
    color: var(--npl-text-muted);
}

/* Boutons */
.npl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.npl-btn-primary {
    background: var(--npl-primary);
    color: white;
}

.npl-btn-primary:hover {
    background: var(--npl-primary-dark);
    transform: scale(1.02);
}

.npl-btn-secondary {
    background: var(--npl-secondary);
    color: white;
}

.npl-btn-secondary:hover {
    background: #3a3a3a;
}

.npl-btn-warning {
    background: var(--npl-warning);
    color: white;
}

.npl-btn-warning:hover {
    background: #f57c00;
}

.npl-btn-large {
    padding: 16px 40px;
    font-size: 18px;
}

.npl-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading */
.npl-loading-content {
    text-align: center;
    padding: 60px 20px;
}

.npl-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 4px solid var(--npl-background);
    border-top-color: var(--npl-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Game Screen */
.npl-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--npl-background);
}

.npl-score-container {
    display: flex;
    gap: 30px;
}

.npl-score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.npl-score-label {
    font-size: 12px;
    color: var(--npl-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.npl-score-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--npl-primary);
    margin-top: 5px;
}

/* Song Info */
.npl-song-info {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--npl-background);
    border-radius: var(--npl-radius);
}

.npl-song-cover {
    flex-shrink: 0;
}

.npl-song-cover img {
    width: 100px;
    height: 100px;
    border-radius: var(--npl-radius);
    object-fit: cover;
}

.npl-song-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.npl-song-details h2 {
    margin: 0 0 5px;
    font-size: 1.5em;
}

.npl-song-details p {
    margin: 0;
    color: var(--npl-text-muted);
}

/* Playback */
.npl-playback-container {
    margin-bottom: 30px;
}

.npl-current-lyrics {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: var(--npl-background);
    border-radius: var(--npl-radius);
    margin-bottom: 20px;
}

.npl-current-lyrics p {
    font-size: 1.8em;
    font-weight: 600;
    text-align: center;
    margin: 0;
    line-height: 1.4;
}

/* Progress Bar */
.npl-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--npl-background);
    border-radius: 3px;
    overflow: hidden;
}

.npl-progress-fill {
    height: 100%;
    background: var(--npl-primary);
    width: 0%;
    transition: width 0.1s linear;
}

/* Input Container */
.npl-input-container {
    animation: slideUp 0.3s ease;
}

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

.npl-input-box {
    padding: 30px;
    background: var(--npl-background);
    border-radius: var(--npl-radius);
    text-align: center;
}

.npl-input-box h3 {
    margin-top: 0;
    font-size: 1.5em;
}

.npl-text-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 18px;
    border: 2px solid var(--npl-secondary);
    border-radius: var(--npl-radius);
    background: var(--npl-surface);
    color: var(--npl-text);
    margin: 20px 0;
    box-sizing: border-box;
}

.npl-text-input:focus {
    outline: none;
    border-color: var(--npl-primary);
}

.npl-input-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Result */
.npl-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: var(--npl-radius);
    font-size: 16px;
    font-weight: 600;
}

.npl-result.success {
    background: rgba(29, 185, 84, 0.2);
    color: var(--npl-success);
    border: 2px solid var(--npl-success);
}

.npl-result.error {
    background: rgba(226, 33, 52, 0.2);
    color: var(--npl-error);
    border: 2px solid var(--npl-error);
}

/* End Screen */
.npl-end-content {
    text-align: center;
}

.npl-end-content h1 {
    font-size: 2.5em;
    margin-bottom: 30px;
}

.npl-final-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 40px 0;
}

.npl-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    background: var(--npl-background);
    border-radius: var(--npl-radius);
    min-width: 150px;
}

.npl-stat-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.npl-stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--npl-primary);
    margin-bottom: 5px;
}

.npl-stat-label {
    font-size: 14px;
    color: var(--npl-text-muted);
    text-transform: uppercase;
}

.npl-username-form {
    margin: 30px 0;
}

.npl-username-form input {
    width: 100%;
    max-width: 400px;
    padding: 15px 20px;
    font-size: 18px;
    border: 2px solid var(--npl-secondary);
    border-radius: var(--npl-radius);
    background: var(--npl-surface);
    color: var(--npl-text);
    text-align: center;
}

.npl-end-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.npl-save-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: var(--npl-radius);
    font-weight: 600;
}

.npl-save-message.success {
    background: rgba(29, 185, 84, 0.2);
    color: var(--npl-success);
}

.npl-save-message.error {
    background: rgba(226, 33, 52, 0.2);
    color: var(--npl-error);
}

/* Responsive */
@media (max-width: 768px) {
    .npl-game-container {
        padding: 10px;
    }

    .npl-screen {
        padding: 20px;
    }

    .npl-auth-content h1,
    .npl-end-content h1 {
        font-size: 2em;
    }

    .npl-score-container {
        gap: 15px;
    }

    .npl-song-info {
        flex-direction: column;
        text-align: center;
    }

    .npl-song-cover {
        margin: 0 auto;
    }

    .npl-final-stats {
        flex-direction: column;
        gap: 15px;
    }

    .npl-stat-card {
        width: 100%;
    }

    .npl-input-actions,
    .npl-end-actions {
        flex-direction: column;
    }

    .npl-btn {
        width: 100%;
    }

    .npl-current-lyrics p {
        font-size: 1.3em;
    }
}
