:root {
    --primary: #8B1538;
    --primary-dark: #6B0F2A;
    --secondary: #4A0818;
    --accent: #A01C3F;
    --success: #16a34a;
    --warning: #f59e0b;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.18);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-2xl: 24px;
}

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

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #8B1538 0%, #4A0818 50%, #2A0410 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(139, 21, 56, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(107, 15, 42, 0.3) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 10px;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    border: 1px solid var(--glass-border);
}

/* ============================================
   NAVBAR STICKY
   ============================================ */

.navbar-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    margin: -20px -20px 0;
    padding: 0 20px;
    background: linear-gradient(180deg, #3b1a2e 0%, #2a1020 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.navbar-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 12px;
}

.navbar-left,
.navbar-right {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.navbar-title {
    color: white;
    font-size: 1.6em;
    font-family: "Luckiest Guy", cursive;
    font-weight: 350;
    font-style: normal;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.nav-icon-btn {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.nav-icon-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.25);
}

.nav-icon-btn svg {
    display: block;
}

/* Header info section */
.header-info {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px 10px 10px;
    border-radius: 0 0 24px 24px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid var(--glass-border);
    border-top: none;
}

h1 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 3.5em;
    font-family: "Luckiest Guy", cursive;
    font-weight: 350;
    font-style: normal;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.date {
    color: #666;
    font-size: 1.1em;
    margin: 10px 0;
}

.timer {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 10px 24px;
    border-radius: 16px;
    font-size: 1em;
    margin-top: 10px;
			margin-bottom: 15px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
}

.timer:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.timer.refresh {
    background: linear-gradient(135deg, var(--success), #15803d);
    animation: blink 1s infinite;	
}
		
		.description {
    display: block;
			color: #666;
    font-size: 1em;
    margin-bottom: 8px;
}

/* Boutons suivre réseaux sociaux */
.social-follow-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.social-follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95em;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.social-follow-btn.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d5bbb 100%);
    color: white;
}

.social-follow-btn.facebook:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.4);
}

.social-follow-btn.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
}

.social-follow-btn.whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Boutons de partage pour les classements */
.leaderboard-share-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.leaderboard-share-title {
    text-align: center;
    font-size: 0.95em;
    color: #666;
    margin-bottom: 12px;
    font-weight: 500;
}

.leaderboard-share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.leaderboard-share-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    flex: 1;
    max-width: 160px;
}

.leaderboard-share-btn.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d5bbb 100%);
    box-shadow: 0 3px 12px rgba(24, 119, 242, 0.3);
}

.leaderboard-share-btn.facebook:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(24, 119, 242, 0.4);
}

.leaderboard-share-btn.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    box-shadow: 0 3px 12px rgba(37, 211, 102, 0.3);
}

.leaderboard-share-btn.whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(37, 211, 102, 0.4);
}

.leaderboard-share-btn:active {
    transform: translateY(0);
}

.leaderboard-share-fixed {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}
			

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Old button styles removed - now using .nav-icon-btn in navbar */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

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

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
			width: 700px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    margin: 20px;
}

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

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #666;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-content h2 {
    color: var(--primary);
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 1.5em;
    text-align: center;
}

.modal-content h3 {
    color: var(--primary-dark);
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.modal-content p {
    color: #333;
    line-height: 1.6;
    margin-bottom: 15px;
}

.modal-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.modal-content li {
    color: #333;
    line-height: 1.8;
    margin-bottom: 8px;
}

.modal-content strong {
    color: var(--primary);
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Encart de scoring récapitulatif */

/* Notification de points après action */
.points-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    z-index: 2000;
    text-align: center;
    animation: popIn 0.3s ease;
    min-width: 300px;
}

@keyframes popIn {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.points-notification.success {
    border: 4px solid #28a745;
}

.points-notification.failure {
    border: 4px solid #dc3545;
}

.points-notification-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.points-notification-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.points-notification-word {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 10px;
}

.points-notification-points {
    font-size: 2em;
    font-weight: bold;
    margin-top: 10px;
}

.points-notification-points.positive {
    color: #28a745;
}

.points-notification-points.negative {
    color: #dc3545;
}

.points-notification-points.neutral {
    color: #666;
}

.trophies-section {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.trophies-section h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 2em;
}

.trophies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.trophy-card {
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 3px solid #ccc;
    position: relative;
    overflow: hidden;
}

.trophy-card.unlocked {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-color: #ffd700;
    animation: shine 2s infinite;
}

@keyframes shine {
    0%, 100% { box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 5px 30px rgba(255, 215, 0, 0.6); }
}

.trophy-card:hover {
    transform: translateY(-5px);
}

.trophy-icon {
    font-size: 3em;
    margin-bottom: 10px;
    display: block;
}

.trophy-card.locked .trophy-icon {
    filter: grayscale(100%);
    opacity: 0.3;
}

.trophy-name {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
    color: #333;
}

.trophy-card.locked .trophy-name {
    color: #999;
}

.trophy-description {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 10px;
}

.trophy-card.locked .trophy-description {
    color: #aaa;
}

.trophy-progress {
    font-size: 0.9em;
    font-weight: bold;
    color: var(--primary);
    margin-top: 10px;
}

.trophy-card.unlocked .trophy-progress {
    color: #2e7d32;
}

.trophy-date {
    font-size: 0.75em;
    color: #999;
    margin-top: 5px;
    font-style: italic;
}

.new-trophy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 1000;
    animation: slideInRight 0.5s ease, shake 0.5s ease 0.5s;
    max-width: 300px;
}

@keyframes slideInRight {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

.new-trophy-notification h3 {
    margin-bottom: 10px;
    font-size: 1.3em;
}

.new-trophy-notification .trophy-icon {
    font-size: 2.5em;
    margin: 10px 0;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: var(--primary);
    display: block;
}

.stat-label {
    color: #666;
    font-size: 1em;
    margin-top: 5px;
}

.word-display {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 20px;
    border: 1px solid var(--glass-border);
}

.found-hints {
    background: #f0f7ff;
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary);
}

.found-hints h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.1em;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.found-hints h3:hover {
    opacity: 0.8;
}

.hints-toggle-icon {
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.hints-toggle-icon.collapsed {
    transform: rotate(-90deg);
}

.hints-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.hints-grid.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.hint-badge {
    background: var(--primary);
    color: white;
    padding: 10px 12px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hint-badge.locked {
    background: #e0e0e0;
    color: #999;
}

.word-letters {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.letter-box {
    width: 40px;
    min-width: 40px;
    height: 40px;
    background: #f0f0f0;
    border: 3px solid var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
    flex-shrink: 0;
}

/* Ajustement automatique pour les mots longs */
@media (max-width: 900px) {
    .letter-box {
        width: 40px;
        min-width: 40px;
        height: 40px;
        font-size: 1.4em;
    }
}

@media (max-width: 700px) {
    .letter-box {
        width: 32px;
        min-width: 32px;
        height: 32px;
        font-size: 1.4em;
    }
    .word-letters {
        gap: 6px;
    }
}

@media (max-width: 500px) {
    .letter-box {
        width: 25px;
        min-width: 25px;
        height: 25px;
        font-size: 1.2em;
    }
    .word-letters {
        gap: 5px;
    }
}

@media (max-width: 400px) {
    .letter-box {
        width: 20px;
        min-width: 20px;
        height: 22px;
        font-size: 1em;
    }
    .word-letters {
        gap: 4px;
    }
}

.letter-box.revealed {
    background: var(--primary);
    color: white;
    animation: reveal 0.5s ease;
}

@keyframes reveal {
    0% { transform: rotateY(90deg); }
    100% { transform: rotateY(0deg); }
}

.reveal-section {
    background: #fff3cd;
    padding: 15px 20px;
    border-radius: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #ffc107;
}

.reveal-section h3 {
    color: #856404;
    margin-bottom: 15px;
}

.reveal-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.guess-input {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--primary);
    border-radius: 10px;
    font-size: 1.2em;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.guess-section {
    margin-bottom: 25px;
}

.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn.warning {
    background: #ffc107;
    color: #333;
}

.btn.warning:hover {
    background: #ffb300;
}

.btn.small {
    padding: 10px 20px;
    font-size: 0.95em;
    width: auto;
}

.challenges {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.challenge-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
			margin-top: 10px;
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.challenge-time {
    font-weight: bold;
    color: var(--primary);
    font-size: 1.1em;
}

.challenge-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

.status-locked {
    background: #ffebee;
    color: #c62828;
}

.status-available {
    background: #e8f5e9;
    color: #2e7d32;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.status-completed {
    background: #e3f2fd;
    color: #1565c0;
}

/* ENCARTS PUBLICITAIRES (CSS commenté pour l'instant)
.ad-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-top: 10px;
    text-align: center;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px dashed var(--primary);
    position: relative;
    overflow: hidden;
}

.ad-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(102, 126, 234, 0.05) 10px,
        rgba(102, 126, 234, 0.05) 20px
    );
    pointer-events: none;
}

.ad-content {
    position: relative;
    z-index: 1;
}

.ad-label {
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-placeholder {
    font-size: 4em;
    margin: 20px 0;
    opacity: 0.3;
}

.ad-text {
    font-size: 1.1em;
    color: #666;
    font-weight: 500;
    margin: 10px 0;
}

.ad-dimensions {
    font-size: 0.9em;
    color: #999;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .ad-card {
        padding: 20px 15px;
        min-height: 200px;
    }

    .ad-placeholder {
        font-size: 3em;
    }

    .ad-text {
        font-size: 1em;
    }
}
*/

.mini-game {
    padding: 20px;
    background: #f5f5f5;
    border-radius: 10px;
    margin-top: 15px;
}

.mini-game h4 {
    margin-bottom: 15px;
    color: #333;
}

.game-timer {
    background: #ff5722;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    flex: 1;
}

.game-timer-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.game-timer-row .game-timer {
    margin-bottom: 0;
}

.abandon-btn {
    background: rgba(0, 0, 0, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    width: 48px;
    height: 48px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.abandon-btn:hover {
    background: rgba(244, 67, 54, 0.8);
    border-color: #f44336;
}

.anagram-letters {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.anagram-letter {
    width: 45px;
    min-width: 45px;
    height: 45px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    font-weight: bold;
}

/* Ajustement automatique pour les anagrammes longs */
@media (max-width: 900px) {
    .anagram-letter {
        width: 40px;
        min-width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
}

@media (max-width: 700px) {
    .anagram-letter {
        width: 35px;
        min-width: 35px;
        height: 35px;
        font-size: 1.1em;
    }
    .anagram-letters {
        gap: 4px;
    }
}

@media (max-width: 500px) {
    .anagram-letter {
        width: 30px;
        min-width: 30px;
        height: 30px;
        font-size: 1em;
    }
    .anagram-letters {
        gap: 3px;
    }
}

@media (max-width: 400px) {
    .anagram-letter {
        width: 25px;
        min-width: 25px;
        height: 25px;
        font-size: 0.8em;
    }
    .anagram-letters {
        gap: 2px;
    }
}

.hangman-display {
    text-align: center;
    margin: 20px 0;
}

.hangman-word {
    font-size: 1.8em;
    letter-spacing: 8px;
    margin: 20px 0;
    font-weight: bold;
    color: #333;
}

/* Ajustement automatique pour les mots longs du pendu */
@media (max-width: 900px) {
    .hangman-word {
        font-size: 1.5em;
        letter-spacing: 6px;
    }
}

@media (max-width: 700px) {
    .hangman-word {
        font-size: 1.3em;
        letter-spacing: 5px;
    }
}

@media (max-width: 500px) {
    .hangman-word {
        font-size: 1.2em;
        letter-spacing: 3px;
    }
}

@media (max-width: 400px) {
    .hangman-word {
        font-size: 1em;
        letter-spacing: 2px;
    }
}

.hangman-lives {
    font-size: 1.2em;
    color: #ff5722;
    margin-bottom: 15px;
}

.keyboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: 5px;
    margin-top: 15px;
}

.key-btn {
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
}

.key-btn:hover {
    background: var(--primary-dark);
}

.key-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.key-btn.wrong {
    background: #f44336;
}

.success-message {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-top: 25px;
    margin-bottom: 25px;
    animation: slideIn 0.5s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.success-message h2 {
    font-size: 2em;
    margin-bottom: 15px;
}

.success-message p {
    font-size: 1.2em;
    margin: 10px 0;
}

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

/* Media Queries pour Mobile */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        max-width: 100%;
    }

    .header {
        padding: 20px 15px;
        margin-bottom: 10px;
    }

    h1 {
        font-size: 2.5em;
        margin-bottom: 8px;
    }

    .date {
        font-size: 0.95em;
        margin: 8px 0;
    }

    .timer {
        font-size: 0.9em;
        padding: 6px 30px;
    }

    .navbar-sticky {
        margin: -10px -10px 0;
        padding: 0 10px;
    }

    .navbar-title {
        font-size: 1.3em;
    }

    .nav-icon-btn {
        width: 38px;
        height: 38px;
    }

    .nav-icon-btn svg {
        width: 18px;
        height: 18px;
    }

    .header-info {
        padding: 15px 10px 10px;
        margin-bottom: 10px;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 10px;
    }

    .stat-card {
        padding: 5px 5px;
    }

    .stat-value {
        font-size: 1.3em;
    }

    .stat-label {
        font-size: 0.75em;
    }

    .word-display, .challenge-card, .trophies-section {
        padding: 20px 15px;
        margin-bottom: 10px;
    }

    .word-display h2 {
        font-size: 1.5em;
        margin-bottom: 10px;
    }

    .found-hints {
        padding: 15px;
        margin-bottom: 10px;
    }

    .found-hints h3 {
        font-size: 1em;
        margin-bottom: 10px;
    }

    .hints-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }

    .hint-badge {
        padding: 8px 10px;
        font-size: 1em;
    }

    .reveal-section {
        padding: 12px 15px;
        margin-bottom: 10px;
    }

    .reveal-section h3 {
        font-size: 1em;
        margin-bottom: 12px;
    }

    .reveal-info {
        flex-direction: column;
        gap: 10px;
    }

    .reveal-info span {
        text-align: center;
        width: 100%;
    }

    .guess-input {
        padding: 12px;
        font-size: 1.1em;
        margin-bottom: 10px;
    }

    .btn {
        padding: 12px 30px;
        font-size: 1em;
    }

    .btn.small {
        padding: 10px 20px;
        font-size: 0.9em;
        width: 100%;
    }

    .challenge-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .challenge-time {
        font-size: 1em;
    }

    .challenge-status {
        font-size: 0.85em;
        padding: 4px 12px;
    }

    .mini-game {
        padding: 15px;
    }

    .mini-game h4 {
        font-size: 1em;
        margin-bottom: 10px;
    }

    .game-timer {
        font-size: 1.3em;
        padding: 8px 15px;
        margin-bottom: 12px;
    }

    .game-timer-row .game-timer {
        margin-bottom: 0;
    }

    .abandon-btn {
        width: 42px;
        height: 42px;
        font-size: 1em;
    }

    .hangman-word {
        font-size: 1.5em;
        letter-spacing: 5px;
        margin: 10px 0;
    }

    .hangman-lives {
        font-size: 1.1em;
    }

    .keyboard {
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
        margin-top: 12px;
    }

    .key-btn {
        padding: 10px 5px;
        font-size: 0.9em;
    }

    .trophies-section h2 {
        font-size: 1.6em;
        margin-bottom: 20px;
    }

    .trophies-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .trophy-card {
        padding: 15px;
    }

    .trophy-icon {
        font-size: 2.5em;
        margin-bottom: 8px;
    }

    .trophy-name {
        font-size: 1em;
    }

    .trophy-description {
        font-size: 0.8em;
    }

    .modal-content {
        padding: 30px 20px;
        margin: 15px;
        max-width: 95%;
    }

    .modal-content h2 {
        font-size: 1.2em;
        margin-bottom: 15px;
    }

    .modal-content h3 {
        font-size: 1.2em;
        margin-top: 20px;
        margin-bottom: 12px;
    }

    .modal-content p, .modal-content li {
        font-size: 0.95em;
        line-height: 1.5;
    }

    .modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.8em;
    }

    .leaderboard-item {
        margin-bottom: 8px;
    }

    .leaderboard-rank {
        font-size: 1em;
        min-width: 35px;
    }

    .leaderboard-name {
        font-size: 0.8em;
        margin-left: 2px;
    }

    .leaderboard-score {
        font-size: 1em;
    }

    .success-message {
        padding: 20px 15px;
    }

    .success-message h2 {
        font-size: 1.5em;
        margin-bottom: 12px;
    }

    .success-message p {
        font-size: 1em;
        margin: 8px 0;
    }

    .new-trophy-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
        padding: 15px 20px;
    }

    .new-trophy-notification h3 {
        font-size: 1.1em;
        margin-bottom: 8px;
    }

    .new-trophy-notification .trophy-icon {
        font-size: 2em;
        margin: 8px 0;
    }

    .login-container {
        padding: 30px 20px;
        max-width: 95%;
    }

    .login-container h1 {
        font-size: 2.5em;
        margin-bottom: 12px;
        font-family: "Luckiest Guy", cursive;
        font-weight: 250;
        font-style: normal;
    }

    .login-container p {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .username-input {
        padding: 12px 20px;
        font-size: 1.1em;
        margin-bottom: 15px;
    }

    .start-button {
        padding: 12px 30px;
        font-size: 1.2em;
    }
}

/* Petits mobiles (< 400px) */
@media (max-width: 400px) {
    h1 {
        font-size: 2em;
    }

    .header {
        padding: 15px 10px;
    }

    .navbar-title {
        font-size: 1.1em;
        letter-spacing: 1px;
    }

    .nav-icon-btn {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .nav-icon-btn svg {
        width: 16px;
        height: 16px;
    }

    .navbar-left,
    .navbar-right {
        gap: 6px;
    }

    .stats {
        gap: 8px;
    }

    .stat-card {
        padding: 12px 8px;
    }

    .stat-value {
        font-size: 1.4em;
    }

    .stat-label {
        font-size: 0.8em;
    }

    .hints-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 6px;
    }

    .hint-badge {
        padding: 6px 8px;
        font-size: 0.6em;
    }

    .trophies-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .keyboard {
        grid-template-columns: repeat(6, 1fr);
        gap: 3px;
    }

    .key-btn {
        padding: 8px 3px;
        font-size: 0.85em;
    }

    .modal-content {
        padding: 25px 15px;
        margin: 10px;
        max-height: 90vh;
    }

    .login-container h1 {
        font-size: 2em;
    }

    .new-trophy-notification {
        padding: 12px 15px;
    }
}

/* Mode paysage mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .header {
        padding: 15px;
    }

    .stats {
        grid-template-columns: repeat(4, 1fr);
    }

    .word-display, .challenge-card, .trophies-section {
        padding: 20px;
    }

    .modal-content {
        max-height: 90vh;
    }
}

/* Améliorations tactiles pour tous les mobiles */
@media (max-width: 768px) {
    .btn, .key-btn, .nav-icon-btn,
    .modal-close, .start-button {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .guess-input, .username-input {
        font-size: 16px !important; /* Évite le zoom automatique sur iOS */
    }
}

/* Styles pour l'écran de connexion */
/* Loader initial pour éviter le flash */
#gameScreen {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#gameScreen.loaded {
    opacity: 1;
}

.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 500px;
    width: 100%;
    animation: slideUp 0.5s ease;
}

.login-container h1 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 3em;
}

.login-container p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.username-input {
    width: 100%;
    padding: 15px 25px;
    font-size: 1.2em;
    border: 3px solid var(--primary);
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.username-input:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.3);
}

.start-button {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.3em;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    position: relative;
}

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.start-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loader dans le bouton */
.button-loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* Old leaderboard-btn removed - now using .nav-icon-btn in navbar */

.leaderboard-container {
    max-height: 60vh;
    overflow-y: auto;
			overflow-x: hidden;
    padding: 0 10px 0 0;
    margin: 0 auto;
    width: 100%;
}

/* Onglets du classement */
.leaderboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.leaderboard-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    font-family: 'Poppins', sans-serif;
}

.leaderboard-tab:hover {
    color: var(--primary);
}

.leaderboard-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Section d'ajout d'amis */
.add-friend-section {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.add-friend-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    cursor: pointer;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.add-friend-trigger:hover {
    background: rgba(139, 21, 56, 0.1);
}

.add-friend-icon {
    font-size: 1.1em;
}

.add-friend-title {
    font-size: 1em;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-friend-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.add-friend-input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95em;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.add-friend-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.1);
}

.add-friend-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.add-friend-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 21, 56, 0.4);
}

.add-friend-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.add-friend-cancel {
    padding: 10px;
    background: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-friend-cancel:hover {
    background: #e0e0e0;
    color: #333;
}

/* Liste des amis */
.friends-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 5px;
}

.friends-count {
    color: #666;
    font-size: 0.9em;
}

.remove-friend-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.6em;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.remove-friend-btn:hover {
    background: #ff5252;
    transform: scale(1.05);
}

.empty-friends {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-friends-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.empty-friends-text {
    font-size: 1.1em;
    margin-bottom: 5px;
}

.empty-friends-hint {
    font-size: 0.9em;
    color: #bbb;
}

/* Responsive pour le système d'amis */
@media (max-width: 600px) {
    .add-friend-section {
        padding: 15px;
    }

    .add-friend-form {
        flex-direction: column;
        gap: 10px;
    }

    .add-friend-input {
        width: 100%;
    }

    .add-friend-btn {
        width: 100%;
        padding: 12px 20px;
    }

    .add-friend-title {
        font-size: 1em;
    }
}

@media (max-width: 400px) {
    .add-friend-section {
        padding: 12px;
    }

    .add-friend-input {
        font-size: 0.95em;
        padding: 10px 12px;
    }

    .add-friend-btn {
        font-size: 0.95em;
    }
}

.leaderboard-list {
    list-style: none;
}

.leaderboard-item {
    display: flex;
    align-items: left;
    gap: 5px;
    padding: 10px 15px;
    background: white;
    border-radius: 10px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    animation: slideInLeaderboard 0.5s ease-out backwards;
}

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

.leaderboard-item:nth-child(1) { animation-delay: 0.05s; }
.leaderboard-item:nth-child(2) { animation-delay: 0.1s; }
.leaderboard-item:nth-child(3) { animation-delay: 0.15s; }
.leaderboard-item:nth-child(4) { animation-delay: 0.2s; }
.leaderboard-item:nth-child(5) { animation-delay: 0.25s; }
.leaderboard-item:nth-child(6) { animation-delay: 0.3s; }
.leaderboard-item:nth-child(7) { animation-delay: 0.35s; }
.leaderboard-item:nth-child(8) { animation-delay: 0.4s; }
.leaderboard-item:nth-child(9) { animation-delay: 0.45s; }
.leaderboard-item:nth-child(10) { animation-delay: 0.5s; }

.leaderboard-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

/* Podium - 1er place (Or) */
.leaderboard-item:nth-child(1) {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: 3px solid #ffd700;
}

.leaderboard-item:nth-child(1) .leaderboard-rank {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.leaderboard-item:nth-child(1) .leaderboard-name {
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.leaderboard-item:nth-child(1) .leaderboard-player-stats {
    color: rgba(255, 255, 255, 0.95);
}

.leaderboard-item:nth-child(1) .leaderboard-score {
    color: #fff;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.7);
}

/* Podium - 2ème place (Argent) */
.leaderboard-item:nth-child(2) {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    border: 3px solid #c0c0c0;
}

.leaderboard-item:nth-child(2) .leaderboard-rank {
    color: #fff;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
}

.leaderboard-item:nth-child(2) .leaderboard-name {
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.leaderboard-item:nth-child(2) .leaderboard-player-stats {
    color: rgba(255, 255, 255, 0.95);
}

.leaderboard-item:nth-child(2) .leaderboard-score {
    color: #fff;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.7);
}

/* Podium - 3ème place (Bronze) */
.leaderboard-item:nth-child(3) {
    background: linear-gradient(135deg, #cd7f32 0%, #e8a87c 100%);
    border: 3px solid #cd7f32;
}

.leaderboard-item:nth-child(3) .leaderboard-rank {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.leaderboard-item:nth-child(3) .leaderboard-name {
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.leaderboard-item:nth-child(3) .leaderboard-player-stats {
    color: rgba(255, 255, 255, 0.95);
}

.leaderboard-item:nth-child(3) .leaderboard-score {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.leaderboard-item.current-user {
    border: 3px solid var(--primary-dark);
    box-shadow: 0 4px 10px rgba(118, 75, 162, 0.3);
}

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

.leaderboard-rank {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--primary);
    min-width: 25px;
    text-align: left;
    flex-shrink: 0;
}

.leaderboard-rank.top3 {
    font-size: 1.2em;
    padding-right: 2px;
}

.leaderboard-player-info {
    flex: 1;
    min-width: 0;
}

.leaderboard-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 1em;
    word-wrap: break-word;
			margin-bottom: 0px;
}

.leaderboard-player-stats {
    display: flex;
    gap: 12px;
    font-size: 0.8em;
    color: #4a5568;
    flex-wrap: wrap;
    margin-top: 5px;
}

.leaderboard-stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.leaderboard-score {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--primary);
    text-align: right;
			margin-right: 5px;
    min-width: 90px;
    flex-shrink: 0;
}

.loading-spinner {
    text-align: center;
    padding: 40px 20px;
    color: var(--primary);
    font-size: 1.2em;
    font-weight: 600;
}

.loading-spinner::after {
    content: '...';
    animation: loadingDots 1.5s steps(4, end) infinite;
}

@keyframes loadingDots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Styles pour le vainqueur de la week */
/* Compact weekly winner banner */
.weekly-winner-banner {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    padding: 15px 25px;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
}

.weekly-winner-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

/* Modal du podium */
.podium-modal-content {
    max-width: 700px;
}

.podium-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    min-height: 280px;
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.podium-place:hover {
    transform: translateY(-5px);
}

.podium-rank {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.podium-player {
    background: white;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    min-width: 140px;
}

.podium-player-name {
    font-weight: bold;
    font-size: 1.1em;
    color: var(--primary);
    margin-bottom: 8px;
    word-wrap: break-word;
}

.podium-player-score {
    font-size: 1.2em;
    color: #4caf50;
    font-weight: bold;
}

.podium-player-wins {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.podium-stand {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.5em;
    margin-top: 10px;
    width: 100%;
}

/* Hauteurs différentes pour les podiums */
.podium-place.first .podium-stand {
    height: 120px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
}

.podium-place.second .podium-stand {
    height: 90px;
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    color: #333;
}

.podium-place.third .podium-stand {
    height: 70px;
    background: linear-gradient(135deg, #cd7f32 0%, #d4a574 100%);
    color: #333;
}

.podium-place.first {
    order: 2;
}

.podium-place.second {
    order: 1;
}

.podium-place.third {
    order: 3;
}

.podium-history-section {
    margin-top: 20px;
}

.winners-history {
    background: #f5f7fa;
    padding: 15px;
    border-radius: 15px;
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.winners-history h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.2em;
    text-align: center;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 10px;
    margin-bottom: 8px;
}

.history-week {
    color: #666;
    font-size: 0.9em;
}

.history-winner {
    font-weight: bold;
    color: #333;
}

.history-score {
    color: var(--primary);
    font-weight: bold;
}

/* Responsive pour le podium */
@media (max-width: 600px) {
    .podium-container {
        gap: 10px;
    }

    .podium-player {
        min-width: 100px;
        padding: 10px;
    }

    .podium-player-name {
        font-size: 0.9em;
    }

    .podium-rank {
        font-size: 2em;
    }

    .podium-place.first .podium-stand {
        height: 100px;
    }

    .podium-place.second .podium-stand {
        height: 75px;
    }

    .podium-place.third .podium-stand {
        height: 60px;
    }
}

/* Styles pour la fonctionnalité de partage */
.share-container {
    margin-top: 20px;
    text-align: center;
}

.share-button {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

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

/* Modal de partage */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

.share-modal.active {
    display: flex;
}

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

.share-modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s;
}

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

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.share-modal-header h3 {
    margin: 0;
    color: var(--primary);
    font-size: 24px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #333;
}

.share-text-box {
    background: #f7f9fc;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    white-space: pre-line;
    text-align: center;
}

.copy-button {
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-bottom: 15px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.copy-button:hover {
    background: #059669;
}

.copy-button.copied {
    background: #6366f1;
}

.social-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.social-button {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
}

.social-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.social-button.twitter {
    background: #1da1f2;
}

.social-button.facebook {
    background: #4267B2;
}

.social-button.whatsapp {
    background: #25D366;
}

.social-button.telegram {
    background: #0088cc;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: bottom 0.3s;
    z-index: 2000;
}

.toast.show {
    bottom: 30px;
}

/* Loader global */
#globalLoader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#globalLoader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-logo {
    font-size: 4em;
    font-family: 'Luckiest Guy', cursive;
    margin-bottom: 30px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    animation: pulse-logo 2s ease-in-out infinite;
}

@keyframes pulse-logo {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top: 6px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loader-text {
    font-size: 1.2em;
    font-weight: 500;
    opacity: 0.9;
}


/* ============================================
   MODAL D'INSCRIPTION
   ============================================ */

.register-modal-content {
    max-width: 420px;
    text-align: center;
}

.register-modal-body {
    padding: 10px 0;
}

.register-modal-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.register-modal-body h2 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.6em;
}

.register-modal-body p {
    color: #666;
    margin-bottom: 25px;
    font-size: 0.95em;
    line-height: 1.5;
}

.register-username-input {
    width: 100%;
    padding: 14px 20px;
    font-size: 1.1em;
    border: 3px solid var(--primary);
    border-radius: 10px;
    text-align: center;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.register-username-input:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 15px rgba(139, 21, 56, 0.2);
}

.register-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 14px 30px;
    font-size: 1.15em;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 21, 56, 0.3);
    position: relative;
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 21, 56, 0.4);
}

.register-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.register-skip-btn {
    width: 100%;
    background: none;
    border: none;
    color: #999;
    padding: 12px;
    font-size: 0.9em;
    cursor: pointer;
    margin-top: 5px;
    transition: color 0.2s;
}

.register-skip-btn:hover {
    color: #666;
}

/* ============================================
   CTA INSCRIPTION DANS LE CLASSEMENT
   ============================================ */

.leaderboard-register-cta {
    text-align: center;
    padding: 20px 15px;
    background: linear-gradient(135deg, rgba(139, 21, 56, 0.05) 0%, rgba(139, 21, 56, 0.1) 100%);
    border-radius: 12px;
    border: 2px dashed rgba(139, 21, 56, 0.3);
}

.register-cta-icon {
    font-size: 2em;
    margin-bottom: 8px;
}

.register-cta-text {
    color: #555;
    font-size: 0.9em;
    margin-bottom: 12px;
    line-height: 1.4;
}

.register-cta-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    font-size: 0.95em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(139, 21, 56, 0.3);
}

.register-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 21, 56, 0.4);
}

/* ============================================
   CTA INSCRIPTION DANS LE MESSAGE DE VICTOIRE
   ============================================ */

.success-register-cta {
    margin-top: 20px;
    padding-top: 0;
}

.success-register-divider {
    width: 60%;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 auto 15px;
}

.success-register-text {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
    line-height: 1.4;
}

.success-register-btn {
    background: white;
    color: var(--primary);
    border: none;
    padding: 10px 24px;
    font-size: 0.95em;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.success-register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    background: #f0f0f0;
}

/* Responsive pour la modal d'inscription */
@media (max-width: 480px) {
    .register-modal-content {
        margin: 10px;
        padding: 25px 20px;
    }
    
    .register-modal-body h2 {
        font-size: 1.3em;
    }
    
    .register-username-input {
        font-size: 1em;
        padding: 12px 15px;
    }
    
    .register-btn {
        font-size: 1em;
        padding: 12px 20px;
    }
}

/* Old .stats-btn removed - now using .nav-icon-btn in navbar */

/* ============================================
   MODAL STATISTIQUES
   ============================================ */

.stats-modal-content {
    max-width: 480px;
}

.stats-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}

.stats-section-title {
    font-size: 0.95em;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

/* Overview grid */
.stats-overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stats-overview-item {
    background: white;
    border-radius: 10px;
    padding: 14px 10px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.stats-overview-value {
    font-size: 1.8em;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.1;
}

.stats-overview-label {
    font-size: 0.75em;
    color: #94a3b8;
    margin-top: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Distribution bars */
.stats-distribution {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stats-dist-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-dist-label {
    font-size: 0.95em;
    font-weight: 700;
    color: #475569;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.stats-dist-bar-bg {
    flex: 1;
    height: 22px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.stats-dist-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
    min-width: 0;
}

.stats-dist-count {
    font-size: 0.85em;
    font-weight: 600;
    color: #64748b;
    width: 28px;
    text-align: right;
    flex-shrink: 0;
}

/* Mini-games performance */
.stats-minigames {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.stats-minigame-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: white;
    border-radius: 10px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.stats-minigame-row:last-child {
    margin-bottom: 0;
}

.stats-minigame-icon {
    font-size: 1.6em;
    width: 38px;
    text-align: center;
    flex-shrink: 0;
}

.stats-minigame-info {
    flex: 1;
}

.stats-minigame-name {
    font-weight: 700;
    font-size: 0.95em;
    color: #1e293b;
}

.stats-minigame-detail {
    font-size: 0.8em;
    color: #94a3b8;
    margin-top: 1px;
}

.stats-minigame-pct {
    font-size: 1.3em;
    font-weight: 800;
    flex-shrink: 0;
}

/* Share button */
.stats-share-section {
    text-align: center;
    padding-top: 5px;
}

.stats-share-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 12px 28px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(139, 21, 56, 0.3);
}

.stats-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(139, 21, 56, 0.4);
}

.stats-share-hint {
    display: block;
    margin-top: 8px;
    font-size: 0.85em;
    color: #4caf50;
    font-weight: 600;
    min-height: 20px;
}

/* Responsive stats */
@media (max-width: 480px) {
    .stats-modal-content {
        margin: 10px;
        padding: 20px 15px;
    }

    .stats-section {
        padding: 14px 12px;
    }

    .stats-overview-value {
        font-size: 1.5em;
    }
}

/* Old .archive-btn removed - now using .nav-icon-btn in navbar */

/* ============================================
   MODAL ARCHIVES
   ============================================ */

.archive-modal-content {
    max-width: 500px;
}

.archive-intro {
    background: #f0f7ff;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 18px;
    text-align: center;
    font-size: 0.9em;
    color: #475569;
    line-height: 1.5;
    border: 1px solid #dbeafe;
}

.archive-intro strong {
    color: var(--primary);
}

/* Items */
.archive-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.archive-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.archive-item.expanded {
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}

.archive-item-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
}

/* Date badge (calendrier) */
.archive-date-badge {
    width: 50px;
    height: 54px;
    background: linear-gradient(135deg, #3b6cb5 0%, #2a4d8e 100%);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(59, 108, 181, 0.35);
}

.archive-date-weekday {
    font-size: 0.6em;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
}

.archive-date-num {
    font-size: 1.5em;
    font-weight: 800;
    color: white;
    line-height: 1.1;
}

/* Info du mot */
.archive-item-info {
    flex: 1;
    min-width: 0;
}

.archive-item-word {
    font-size: 1.15em;
    font-weight: 800;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.archive-item-date {
    font-size: 0.78em;
    color: #94a3b8;
    margin-top: 2px;
}

.archive-item-date em {
    color: #64748b;
}

/* Chevron */
.archive-chevron {
    font-size: 1.2em;
    color: #94a3b8;
    flex-shrink: 0;
    transition: transform 0.2s;
    width: 24px;
    text-align: center;
}

/* Détails (accordéon) */
.archive-item-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 16px;
}

.archive-item-details.open {
    max-height: 600px;
    padding: 0 16px 16px;
}

.archive-hints-title {
    font-size: 0.8em;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-top: 4px;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}

/* Hint rows */
.archive-hint-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 6px;
    border: 1px solid #f1f5f9;
}

.archive-hint-row:last-child {
    margin-bottom: 0;
}

.archive-hint-num {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #3b6cb5 0%, #2a4d8e 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: 700;
    flex-shrink: 0;
}

.archive-hint-word {
    flex: 1;
    font-weight: 700;
    font-size: 0.95em;
    color: #1e293b;
    text-transform: uppercase;
}

.archive-hint-badge {
    font-size: 0.65em;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.archive-badge-anagram {
    background: #ede9fe;
    color: #7c3aed;
}

.archive-badge-hangman {
    background: #fce7f3;
    color: #db2777;
}

.archive-badge-motus {
    background: #d1fae5;
    color: #059669;
}

/* Responsive archives */
@media (max-width: 480px) {
    .archive-modal-content {
        margin: 10px;
        padding: 20px 12px;
    }
    
    .archive-item-header {
        gap: 10px;
        padding: 12px 12px;
    }
    
    .archive-date-badge {
        width: 44px;
        height: 48px;
    }
    
    .archive-date-num {
        font-size: 1.3em;
    }
    
    .archive-item-word {
        font-size: 1em;
    }
    
    .archive-hint-row {
        padding: 8px 10px;
        gap: 8px;
    }
    
    .archive-hint-word {
        font-size: 0.85em;
    }
}



/* ============================================
   NEW LAYOUT CLASSES (ported from Septimot)
   ============================================ */

/* sticky-header + topbar-btn + header-topbar-buttons */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary) 0%, #1a0510 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.sticky-header-inner {
    width: 100%;
    max-width: 500px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.sticky-header-title {
    color: white;
    -webkit-text-fill-color: white;
    background: none;
    margin: 0;
    font-size: 1.6rem;
    font-family: "Luckiest Guy", cursive;
    font-weight: 400;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: none;
}

/* Effet Glass - remplace 15+ occurrences de backdrop-filter */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Texte gradient - remplace 20+ occurrences */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Gradient de fond principal */
.gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

/* Hover lift effect */
.hover-lift {
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.hover-lift:hover {
    transform: translateY(-2px);
}

/* Card de base */
.card-base {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ============================================
   3. RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* duplicate body rule removed */

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(30, 58, 138, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(51, 65, 85, 0.4) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   4. LAYOUT & CONTAINERS
   ============================================ */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding-top: 60px;
    position: relative;
    z-index: 1;
}

.login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 50px 45px;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    text-align: center;
    max-width: 500px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-container h1 {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    font-size: 3.5em;
    font-family: "Luckiest Guy", cursive;
    font-weight: 350;
    letter-spacing: 2px;
}

.login-container p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 1.1em;
    line-height: 1.6;
}

/* ============================================
   5. HEADER & NAVIGATION
   ============================================ */
.header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px 20px;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl), 0 0 0 1px var(--glass-border) inset;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-smooth);
    overflow: hidden;
}

.header:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), 0 0 0 1px var(--glass-border) inset, 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Bandeau supérieur semi-transparent */
.header-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 -25px 35px -20px;
    padding: 12px 16px;
}

.header-topbar-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-topbar-buttons.left {
    justify-content: flex-start;
    min-width: 90px;
}

.header-topbar-buttons.right {
    justify-content: flex-end;
    min-width: 90px;
}

/* Titre dans le bandeau */
.topbar-title {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    font-size: 2.5em;
    font-family: "Luckiest Guy", cursive;
    font-weight: 350;
    font-style: normal;
    letter-spacing: 2px;
    text-shadow: none;
    animation: titleGlow 3s ease-in-out infinite alternate;
    flex-shrink: 0;
}

/* Boutons du bandeau */
.topbar-btn {
    width: 40px;
    height: 40px;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-smooth);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 0 3px 10px rgba(76, 158, 225, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.topbar-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(139, 21, 56, 0.5);
}

.topbar-btn:active {
    transform: scale(0.95);
}

.topbar-btn-icon {
    width: 20px;
    height: 20px;
    stroke: white;
}

/* Ancien h1 pour rétrocompatibilité si utilisé ailleurs */

/* stats-inline + word-display-compact + timeline-section */
.stats-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 14px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 10px 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-inline-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
}

.stat-inline-value {
    font-size: 1.4em;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-inline-label {
    font-size: 0.78em;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-inline-sep {
    width: 1px;
    height: 24px;
    background: rgba(0, 0, 0, 0.1);
}

/* --- Word display compact --- */
.word-display-compact {
    padding: 22px 20px 18px !important;
    margin-bottom: 14px !important;
}

.word-display-title {
    text-align: center;
    margin-bottom: 12px !important;
    font-size: 1.1em;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}

/* --- Guess section inline --- */
.guess-section-inline {
    display: flex;
    gap: 10px;
    align-items: center;
}

.guess-input-compact {
    margin-bottom: 0 !important;
    padding: 12px 16px !important;
    font-size: 1em !important;
    flex: 1;
}

.btn-validate-compact {
    width: auto !important;
    padding: 12px 24px !important;
    font-size: 1em !important;
    white-space: nowrap;
    flex-shrink: 0;
}

/* --- Reveal compact --- */
.reveal-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.reveal-compact-btn {
    background: linear-gradient(135deg, var(--warning) 0%, #f59e0b 100%);
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75em;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-smooth);
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
}

.reveal-compact-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.reveal-compact-btn:disabled {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.reveal-cost {
    opacity: 0.85;
    font-weight: 500;
}

.reveal-remaining {
    font-size: 0.72em;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

/* --- Timeline Section --- */
.timeline-section {
    margin-bottom: 20px;
}

.timeline-header {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.75em;
    text-align: center;
    letter-spacing: 2.5px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 10px;
    padding-left: 4px;
}

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

/* Vertical connector line */

/* responsive stats-inline / word-display-compact */
    .stats-inline {
        padding: 8px 12px;
    }
    .stat-inline-item {
        padding: 0 10px;
    }
    .stat-inline-value {
        font-size: 1.2em;
    }
    .word-display-compact {
        padding: 18px 16px 14px !important;
    }
    .word-letters {
        gap: 4px;
    }
    .letter-box {
        width: 24px;
        min-width: 24px;
        height: 24px;
        font-size: 1em;
    }
    .guess-section-inline {
        flex-direction: column;
    }
    .btn-validate-compact {
        width: 100% !important;
    }
    .guess-input-compact {
        width: 100%;
    }
    .tl-item {
        padding: 10px 12px;
        gap: 10px;
    }
}

/* ========== INDICATEUR DE SCROLL ========== */
.scroll-indicator {
    /* styles managed elsewhere */
}

/* ============================================
   TIMELINE MINI-GAMES (tl-* classes)
   ============================================ */

.tl-wrapper {
    position: relative;
    z-index: 1;
}

.tl-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    cursor: default;
}

.tl-item.tl-available {
    border-color: rgba(205, 92, 92, 0.4);
    box-shadow: 0 2px 12px rgba(0,0,0,0.2), 0 0 0 1px rgba(205, 92, 92, 0.15);
    cursor: pointer;
}

.tl-item.tl-available:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 0 0 1px rgba(205, 92, 92, 0.2);
}

.tl-item.tl-available:active {
    transform: scale(0.98);
}

.tl-item.tl-done  { opacity: 1; }
.tl-item.tl-failed { opacity: 1; }
.tl-item.tl-locked { opacity: 0.38; }

/* Number circle */
.tl-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8em;
    flex-shrink: 0;
}

.tl-num-done      { background: rgba(76, 175, 80, 0.2); color: #4caf50; }
.tl-num-available { background: rgba(205, 92, 92, 0.2); color: #cd5c5c; }
.tl-num-locked    { background: rgba(0,0,0,0.1); color: rgba(255,255,255,0.4); }
.tl-num-failed    { background: rgba(244, 67, 54, 0.15); color: #f44336; }

/* Info block */
.tl-info { flex: 1; min-width: 0; }

.tl-name {
    font-weight: 700;
    font-size: 0.92em;
    color: #fff;
    line-height: 1.2;
}

.tl-sub {
    font-size: 0.78em;
    color: rgba(255,255,255,0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Right-side badge */
.tl-right { flex-shrink: 0; text-align: right; }

.tl-badge {
    font-size: 0.7em;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

.tl-badge-done {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
}

.tl-badge-play {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    animation: pulse 2s infinite;
}

.tl-badge-lock {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255,255,255,0.45);
}

.tl-badge-fail {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

/* Chevron */
.tl-chevron {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    position: relative;
    margin-left: 4px;
}

.tl-chevron::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 7px; height: 7px;
    border-right: 2px solid #cd5c5c;
    border-bottom: 2px solid #cd5c5c;
    transform: translate(-50%, -65%) rotate(45deg);
    transition: transform 0.25s ease;
}

.tl-chevron.open::before {
    transform: translate(-50%, -35%) rotate(-135deg);
}

/* Expanded panel */
.tl-expanded {
    margin-top: 4px;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 20px 24px 24px;
    border: 2px solid rgba(205, 92, 92, 0.25);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    overflow: hidden;
    max-height: 2000px;
    opacity: 1;
    transition: max-height 0.4s ease, opacity 0.25s ease, padding 0.35s ease, margin 0.35s ease;
}

.tl-expanded.tl-collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    border-width: 0;
}

/* Play button */
.tl-play-btn {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    border: none;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 0.75em;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-right: 2px;
}

.tl-play-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.4);
}

.tl-play-btn:active { transform: scale(0.95); }

/* Completed clue subtitle */
.tl-sub-done {
    font-size: 0.88em;
    color: rgba(255,255,255,0.9);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tl-sub-done .tl-hint-word {
    color: #f6a623;
    font-weight: 700;
    font-size: 1.05em;
}

.tl-sub-done .tl-hint-pts {
    color: #4caf50;
    font-weight: 600;
}

@media (max-width: 480px) {
    .tl-item { padding: 10px 12px; gap: 10px; }
}

/* ============================================
   HAMBURGER MENU
   ============================================ */
.header-topbar-buttons.right {
    position: relative;
}

.hamburger-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border, #333);
    border-radius: 12px;
    padding: 6px 0;
    min-width: 210px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 1000;
    animation: hamburgerFadeIn 0.15s ease;
}

.hamburger-menu.active {
    display: block;
}

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

.hamburger-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 18px;
    background: none;
    border: none;
    color: var(--text, #fff);
    font-family: 'Poppins', sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
    touch-action: manipulation;
}

.hamburger-btn {
    touch-action: manipulation;
}

.hamburger-item:hover {
    background: rgba(255,255,255,0.08);
}

.hamburger-item:active {
    background: rgba(255,255,255,0.14);
}

.hamburger-separator {
    height: 1px;
    background: var(--border, #333);
    margin: 4px 12px;
}
