/**
 * NIRD Clicker - Styles du jeu
 * Design attractif pour un jeu incrémental sur la souveraineté numérique
 * Licence MIT - GPT MEN'S - Nuit de l'Info 2025
 */

/* Variables CSS */
:root {
    --bg-main: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-card: #1a1a3a;
    --fg-main: #e0e0e0;
    --fg-secondary: #a0a0a0;
    --accent-primary: #00d4aa;
    --accent-secondary: #00a0ff;
    --accent-warning: #ffaa00;
    --accent-danger: #ff4444;
    --accent-success: #44ff44;
    --gradient-main: linear-gradient(135deg, #00d4aa 0%, #00a0ff 100%);
    --shadow-glow: 0 0 20px rgba(0, 212, 170, 0.3);
    --border-radius: 12px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Utility class - Hidden */
.hidden {
    display: none !important;
}

body {
    font-family: 'Roboto', sans-serif;
    background: var(--bg-main);
    color: var(--fg-main);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(0, 212, 170, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 160, 255, 0.1) 0%, transparent 50%);
}

/* App Container */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 180px;
}

/* Header */
#game-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--bg-secondary);
    border-bottom: 2px solid rgba(0, 212, 170, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.logo .subtitle {
    font-size: 0.85rem;
    color: var(--fg-secondary);
    margin-top: 0.3rem;
}

.score-display {
    text-align: right;
}

.main-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.main-score #score {
    font-family: 'Press Start 2P', cursive;
    font-size: 2rem;
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(0, 212, 170, 0.5);
}

.score-label {
    font-size: 0.75rem;
    color: var(--fg-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-per-sec {
    font-size: 1rem;
    color: var(--accent-secondary);
    margin-top: 0.3rem;
}

/* Main Game Container */
#game-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    flex: 1;
}

/* Click Zone */
#click-zone {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#click-area {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    border: 2px solid rgba(0, 212, 170, 0.2);
    position: relative;
    overflow: hidden;
}

#main-clicker {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    background: var(--gradient-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-glow);
    position: relative;
    user-select: none;
}

#main-clicker:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(0, 212, 170, 0.5);
}

#main-clicker:active,
#main-clicker.clicked {
    transform: scale(0.95);
}

.pc-icon {
    font-size: 5rem;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    animation: float 3s ease-in-out infinite;
}

.pc-icon .clicker-skin-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.5));
}

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

.click-instruction {
    margin-top: 1.5rem;
    font-size: 1.1rem;
    color: var(--fg-secondary);
}

#click-multiplier {
    margin-top: 0.5rem;
    font-size: 1.2rem;
    color: var(--accent-primary);
    font-weight: bold;
}

/* Stats Panel */
#stats-panel {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid rgba(0, 160, 255, 0.2);
}

#stats-panel h3 {
    margin-bottom: 1rem;
    color: var(--accent-secondary);
    font-size: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item:last-child {
    border-bottom: none;
}

/* Resistance Gauge */
#resistance-gauge {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid rgba(0, 212, 170, 0.2);
}

#resistance-gauge h3 {
    margin-bottom: 1rem;
    color: var(--accent-primary);
    font-size: 1rem;
}

.gauge-container {
    height: 24px;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

#gauge-fill {
    height: 100%;
    background: var(--gradient-main);
    border-radius: 12px;
    transition: width 0.4s ease-out;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

#gauge-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 25%,
        rgba(255, 255, 255, 0.4) 50%, 
        rgba(255, 255, 255, 0.2) 75%,
        transparent 100%
    );
    animation: gauge-shimmer 2s ease-in-out infinite;
}

@keyframes gauge-shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

#gauge-label {
    margin-top: 0.75rem;
    text-align: center;
    font-weight: bold;
    color: var(--accent-primary);
}

/* Upgrades Zone */
#upgrades-zone {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid rgba(0, 160, 255, 0.2);
    height: auto;
    min-height: 100vh;
    width: 100%;
    min-width: 450px;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.menu-content.active {
    flex: 1;
    overflow: visible;
}

/* Menu Tabs System */
.menu-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.menu-tab {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: none;
    border-radius: 8px 8px 0 0;
    color: var(--fg-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.85rem;
    font-weight: bold;
}

.menu-tab:hover {
    background: rgba(0, 212, 170, 0.2);
    color: var(--fg-main);
}

.menu-tab.active {
    background: var(--accent-primary);
    color: var(--bg-main);
}

.menu-content {
    display: none;
    flex: 1;
    overflow-y: auto;
}

.menu-content.active {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

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

/* Prestige Content */
#prestige-content .prestige-header {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.1));
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

#prestige-content .prestige-header h3 {
    color: #ffd700;
    margin-bottom: 0.5rem;
}

#prestige-upgrades-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.prestige-upgrade-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid rgba(255, 215, 0, 0.2);
    position: relative;
}

.prestige-upgrade-item:hover {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.prestige-upgrade-item.gamepad-selected {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.4);
}

/* Prestige acheté - style lumineux distinctif */
.prestige-upgrade-item.purchased {
    opacity: 1;
    border-color: #00d4aa;
    background: linear-gradient(145deg, rgba(0, 212, 170, 0.15), rgba(0, 100, 80, 0.2));
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.3), inset 0 0 15px rgba(0, 212, 170, 0.1);
    cursor: default;
}

/* Hover sur prestige acheté - effet subtil différent */
.prestige-upgrade-item.purchased:hover {
    border-color: #00ffcc;
    box-shadow: 0 0 25px rgba(0, 212, 170, 0.5), inset 0 0 20px rgba(0, 212, 170, 0.15);
}

/* Gamepad selection sur prestige acheté */
.prestige-upgrade-item.purchased.gamepad-selected {
    border-color: #00ffcc;
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.6), inset 0 0 20px rgba(0, 212, 170, 0.2);
}

.prestige-upgrade-item.purchased::before {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2rem;
    color: #00d4aa;
    text-shadow: 0 0 10px rgba(0, 212, 170, 0.8);
}

/* Prestige qu'on ne peut pas acheter */
.prestige-upgrade-item.cannot-afford {
    opacity: 0.4;
    cursor: not-allowed;
}

.prestige-upgrade-item.cannot-afford:hover {
    border-color: rgba(255, 215, 0, 0.2);
    box-shadow: none;
}

/* Skins Content */
#skins-content h3 {
    color: var(--accent-secondary);
    margin-bottom: 1rem;
}

#skins-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.skin-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.skin-item:hover {
    transform: scale(1.05);
    border-color: var(--accent-primary);
}

.skin-item.gamepad-selected {
    transform: scale(1.05);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.4);
}

.skin-item.active {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 170, 0.1);
}

.skin-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.skin-item .skin-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.skin-item .skin-name {
    font-size: 0.85rem;
    color: var(--fg-main);
}

.skin-item .skin-cost {
    font-size: 0.75rem;
    color: var(--accent-warning);
    margin-top: 0.25rem;
}

.skin-item.secret-skin {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 2px solid gold;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.skin-item.secret-skin:hover {
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
}

.skin-item .skin-icon .skin-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 4px;
}

/* Missions Content */
#missions-content h3 {
    color: var(--accent-secondary);
    margin-bottom: 1rem;
}

#missions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mission-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--accent-warning);
}

.mission-item.completed {
    border-left-color: var(--accent-success);
    opacity: 0.7;
}

.mission-info {
    flex: 1;
}

.mission-info h4 {
    color: var(--fg-main);
    margin-bottom: 0.25rem;
}

.mission-progress {
    font-size: 0.85rem;
    color: var(--fg-secondary);
}

.mission-reward {
    text-align: right;
    color: var(--accent-warning);
    font-weight: bold;
}

/* Upgrades Header */
.upgrades-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    padding: 0.75rem 1rem;
    z-index: 10;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: none;
}

#upgrades-zone h2 {
    color: var(--accent-secondary);
    margin: 0;
}

.buy-mode-selector {
    display: flex;
    gap: 0.25rem;
}

.buy-mode-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-weight: bold;
    background: var(--bg-secondary);
    color: var(--fg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.buy-mode-btn:hover {
    background: rgba(0, 212, 170, 0.2);
    border-color: var(--accent-primary);
    color: var(--fg-main);
}

.buy-mode-btn.active {
    background: var(--gradient-main);
    color: #000;
    border-color: var(--accent-primary);
}

#upgrades-list,
#click-upgrades-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.upgrade-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.upgrade-item:hover {
    border-color: var(--accent-primary);
}

.upgrade-item.can-afford {
    border-color: rgba(0, 212, 170, 0.3);
}

.upgrade-item.can-afford:hover {
    background: rgba(0, 212, 170, 0.1);
    box-shadow: var(--shadow-glow);
}

.upgrade-item.cannot-afford {
    opacity: 0.6;
}

/* ============================================
   HOLD TO BUY - Système de maintien gamepad
   ============================================ */
.upgrade-item {
    position: relative;
    overflow: hidden;
}

.hold-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, 
        rgba(0, 212, 170, 0.3) 0%, 
        rgba(0, 212, 170, 0.5) 100%);
    transition: width 0.05s linear;
    pointer-events: none;
    z-index: 0;
}

.upgrade-item.hold-to-buy-active {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.4);
}

.upgrade-item.hold-to-buy-active .upgrade-icon,
.upgrade-item.hold-to-buy-active .upgrade-info,
.upgrade-item.hold-to-buy-active .upgrade-buy-btn {
    position: relative;
    z-index: 1;
}

.upgrade-item.hold-to-buy-success {
    animation: holdBuySuccess 0.3s ease-out;
}

@keyframes holdBuySuccess {
    0% {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(0, 212, 170, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(0, 212, 170, 0.8);
        background: rgba(0, 212, 170, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: none;
    }
}

.upgrade-item.hold-to-buy-cancel {
    animation: holdBuyCancel 0.2s ease-out;
}

@keyframes holdBuyCancel {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
    100% {
        transform: translateX(0);
    }
}

/* Hold to Buy pour Prestige et Skins */
.prestige-upgrade-item,
.skin-item {
    position: relative;
    overflow: hidden;
}

.prestige-upgrade-item .hold-progress-bar,
.skin-item .hold-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, 
        rgba(0, 212, 170, 0.3) 0%, 
        rgba(0, 212, 170, 0.5) 100%);
    transition: width 0.05s linear;
    pointer-events: none;
    z-index: 0;
}

.prestige-upgrade-item.hold-to-buy-active,
.skin-item.hold-to-buy-active {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.4);
}

.prestige-upgrade-item.hold-to-buy-success,
.skin-item.hold-to-buy-success {
    animation: holdBuySuccess 0.3s ease-out;
}

.prestige-upgrade-item.hold-to-buy-cancel,
.skin-item.hold-to-buy-cancel {
    animation: holdBuyCancel 0.2s ease-out;
}

/* ============================================
   POPUP DE CONFIRMATION PRESTIGE (Gamepad)
   ============================================ */
.prestige-confirm-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

.prestige-confirm-content {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 3px solid #9d4edd;
    border-radius: 16px;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 40px rgba(157, 78, 221, 0.5);
}

.prestige-confirm-content h2 {
    font-size: 1.8rem;
    color: #9d4edd;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px rgba(157, 78, 221, 0.5);
}

.prestige-info {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: none;
}

/* Prestige info dans le header - caché par défaut */
#prestige-info {
    display: none;
}

#prestige-info.visible {
    display: inline-block;
}

/* Prestige info dans la popup - toujours visible */
.prestige-confirm-popup .prestige-info {
    display: block;
}

.prestige-info p {
    margin: 0.5rem 0;
    color: #e0e0e0;
}

.prestige-points {
    font-size: 1.1rem;
}

.prestige-points strong {
    color: #00d4aa;
    font-size: 1.3rem;
}

.prestige-bonus .current {
    color: #888;
}

.prestige-bonus .new {
    color: #00d4aa;
    font-weight: bold;
}

/* Section des pertes lors du prestige */
.prestige-losses {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: left;
}

.prestige-losses .loss-title {
    color: #ff6b6b;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.prestige-losses ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.prestige-losses li {
    color: #ccc;
    padding: 0.3rem 0;
    font-size: 0.9rem;
}

.prestige-gains {
    margin-top: 0.5rem;
}

.prestige-warning {
    color: #ff6b6b;
    font-size: 0.9rem;
    margin: 1rem 0;
    padding: 0.5rem;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 6px;
}

.prestige-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.prestige-buttons button {
    padding: 1rem 2rem;
    font-size: 1rem;
    border: 2px solid;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
}

.prestige-cancel-btn {
    background: transparent;
    border-color: #666;
    color: #888;
}

.prestige-cancel-btn:hover,
.prestige-cancel-btn.gamepad-selected {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
    color: #ff6b6b;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.3);
    transform: scale(1.05);
}

.prestige-confirm-btn {
    background: transparent;
    border-color: #666;
    color: #888;
}

.prestige-confirm-btn:hover,
.prestige-confirm-btn.gamepad-selected {
    background: rgba(0, 212, 170, 0.2);
    border-color: #00d4aa;
    color: #00d4aa;
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.3);
    transform: scale(1.05);
}

.prestige-hint {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: #666;
    font-style: italic;
}

.upgrade-icon {
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
}

.upgrade-info {
    flex: 1;
}

.upgrade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.upgrade-name {
    font-weight: bold;
    color: var(--fg-main);
}

.upgrade-owned {
    color: var(--accent-primary);
    font-weight: bold;
}

.upgrade-desc {
    font-size: 0.85rem;
    color: var(--fg-secondary);
    margin-bottom: 0.5rem;
}

.upgrade-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.upgrade-footer.purchased-footer {
    justify-content: flex-end;
}

.upgrade-cost {
    color: var(--accent-warning);
    font-weight: bold;
}

.upgrade-production {
    color: var(--accent-success);
}

.upgrade-bonus {
    color: var(--accent-secondary);
    font-size: 0.85rem;
}

.upgrade-status {
    background: var(--accent-success);
    color: #000;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Upgrade achetée/activée */
.upgrade-item.purchased {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.15) 0%, rgba(0, 160, 255, 0.1) 100%);
    border: 2px solid var(--accent-success);
    cursor: default;
    opacity: 0.9;
}

.upgrade-item.purchased:hover {
    transform: none;
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.3);
}


.upgrade-item.purchased .upgrade-cost {
    color: var(--accent-success);
}

.upgrade-tip {
    font-size: 0.75rem;
    color: var(--accent-secondary);
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 160, 255, 0.1);
    border-radius: 4px;
    border-left: 3px solid var(--accent-secondary);
}

.upgrade-separator {
    margin: 1.5rem 0 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.upgrade-separator h3 {
    color: var(--accent-warning);
    font-size: 0.9rem;
}

.no-upgrades {
    text-align: center;
    padding: 2rem;
    color: var(--accent-primary);
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Event Banner */
#event-banner {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-main);
    color: #000;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-weight: bold;
    z-index: 200;
    animation: slideDown 0.3s ease;
    box-shadow: 0 5px 30px rgba(0, 212, 170, 0.5);
}

#event-banner.hidden {
    display: none;
}

/* Tip Banner */
#tip-banner {
    position: fixed;
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(0, 160, 255, 0.9), rgba(0, 100, 200, 0.9));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 150;
    animation: slideUp 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 160, 255, 0.3);
    max-width: 90%;
}

#tip-banner.hidden {
    display: none;
}

#tip-banner .tip-icon {
    font-size: 1.5rem;
}

#tip-banner .tip-text {
    flex: 1;
    font-size: 0.9rem;
}

#tip-banner .tip-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

#tip-banner .tip-close:hover {
    opacity: 1;
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Boss Modal */
#boss-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

#boss-modal.hidden {
    display: none;
}

.boss-content {
    background: linear-gradient(135deg, #0078d4 0%, #004578 100%);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    max-width: 400px;
    border: 3px solid #00a4ef;
    box-shadow: 0 0 50px rgba(0, 120, 212, 0.5);
    animation: shake 0.5s ease infinite;
}

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

.boss-header {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.windows-logo {
    font-size: 2rem;
}

.boss-body p {
    margin-bottom: 0.75rem;
}

.boss-instruction {
    color: #ffcc00;
    font-weight: bold;
}

.boss-progress {
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin: 1rem 0;
    overflow: hidden;
}

#boss-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff4444, #ff8800);
    border-radius: 10px;
    transition: width 0.1s ease;
}

#boss-click-btn {
    margin-top: 1rem;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

#boss-click-btn:hover {
    background: #ff6666;
    transform: scale(1.05);
}

#boss-click-btn:active {
    transform: scale(0.95);
}

/* Floating Numbers */
.floating-number {
    position: absolute;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-primary);
    pointer-events: none;
    animation: floatUp 1s ease forwards;
    text-shadow: 0 0 10px var(--accent-primary);
    z-index: 50;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-80px) scale(0.5);
    }
}

.floating-message {
    position: absolute;
    font-size: 0.9rem;
    color: var(--accent-secondary);
    pointer-events: none;
    animation: floatMessage 2s ease forwards;
    white-space: nowrap;
    z-index: 50;
}

@keyframes floatMessage {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px);
    }
}

/* Notifications */
#floating-notifications {
    position: fixed;
    top: 100px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 150;
}

.notification {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    max-width: 350px;
    pointer-events: none;
    user-select: none;
}

.notification-success {
    background: rgba(68, 255, 68, 0.2);
    border: 1px solid var(--accent-success);
    color: var(--accent-success);
}

.notification-error {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid var(--accent-danger);
    color: var(--accent-danger);
}

.notification-unlock {
    background: rgba(255, 170, 0, 0.2);
    border: 1px solid var(--accent-warning);
    color: var(--accent-warning);
}

.notification-achievement,
.notification-level-up {
    background: var(--gradient-main);
    color: #000;
    font-weight: bold;
}

.notification-combo {
    background: linear-gradient(135deg, #ff4444, #ff8800);
    color: white;
}

.notification-offline {
    background: rgba(100, 100, 255, 0.2);
    border: 1px solid #6666ff;
    color: #aaaaff;
}

.notification.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

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

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

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

/* Welcome & Milestone Modals */
.welcome-modal,
.milestone-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.5s ease;
}

.welcome-content,
.milestone-content {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    max-width: 500px;
    text-align: center;
    border: 2px solid var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.welcome-content h2,
.milestone-content h2 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.welcome-instructions {
    text-align: left;
    margin: 1.5rem 0;
}

.instruction {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.instruction-icon {
    font-size: 1.5rem;
}

.welcome-nird {
    color: var(--fg-secondary);
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(0, 212, 170, 0.1);
    border-radius: 8px;
}

.welcome-content button,
.milestone-content button {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    background: var(--gradient-main);
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.welcome-content button:hover,
.milestone-content button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.milestone-celebration {
    font-size: 3rem;
    margin: 1rem 0;
    animation: bounce 0.5s ease infinite alternate;
}

@keyframes bounce {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

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

.loader-icon {
    font-size: 5rem;
    animation: spin 2s linear infinite;
}

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

.loader-content h2 {
    color: var(--accent-primary);
    margin: 1rem 0;
}

.loader-bar {
    width: 200px;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    margin: 1rem auto;
    overflow: hidden;
}

.loader-progress {
    height: 100%;
    width: 30%;
    background: var(--gradient-main);
    animation: loading 1.5s ease infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

#loading-screen.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

/* Confetti */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    border-radius: 50%;
    animation: fall linear forwards;
    z-index: 1500;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Footer Sponsors */
#nos-sponsors {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    padding: 1rem 2%;
    border-top: 1px solid rgba(0, 212, 170, 0.2);
    text-align: center;
}

#nos-sponsors h2 {
    font-size: 0.9rem;
    color: var(--fg-secondary);
    margin-bottom: 0.25rem;
}

#nos-sponsors > span {
    font-size: 0.75rem;
    color: var(--fg-secondary);
}

#nos-sponsors ul {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.5rem 0 0;
    list-style: none;
}

#nos-sponsors li {
    aspect-ratio: 3 / 1;
    min-height: 2.5em;
    background-color: white;
    border-radius: 4px;
    padding: 6px;
}

#nos-sponsors a {
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    width: 100%;
    height: 100%;
    transition: transform var(--transition-fast);
}

#nos-sponsors a span {
    opacity: 0;
    font-size: 0;
}

#nos-sponsors a:hover {
    transform: scale(1.1);
}

/* Night Mode */
.night-mode {
    --bg-main: #000005;
    --bg-secondary: #080810;
    --bg-card: #101020;
}

/* Responsive */
@media screen and (max-width: 900px) {
    #game-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    #game-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        position: relative;
    }
    
    .logo {
        order: 1;
        width: 100%;
    }
    
    .quick-menu {
        order: 2;
        position: static !important;
        width: 100%;
        justify-content: center;
    }
    
    .score-display {
        order: 3;
        text-align: center;
        width: 100%;
    }
    
    .main-score {
        align-items: center;
    }
    
    #main-clicker {
        width: 150px;
        height: 150px;
    }
    
    .pc-icon {
        font-size: 4rem;
    }
    
    #upgrades-zone {
        max-height: none;
    }
    
    #app {
        padding-bottom: 200px;
    }
}

@media screen and (max-width: 500px) {
    .logo h1 {
        font-size: 1rem;
    }
    
    .main-score #score {
        font-size: 1.5rem;
    }
    
    #nos-sponsors li {
        min-width: 30%;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* ============================================
   NOUVEAUX STYLES - Version Complète
   ============================================ */

/* Quick Menu */
.quick-menu {
    display: flex;
    gap: 0.5rem;
    order: 1;
    width: 100%;
    justify-content: center;
}

.menu-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: var(--bg-card);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all var(--transition-fast);
}

.menu-btn:hover {
    background: var(--accent-primary);
    transform: scale(1.1);
}

/* Prestige Info */
.prestige-info {
    display: none;
    font-size: 0.8rem;
    color: var(--accent-warning);
    margin-top: 0.3rem;
}

.prestige-info.visible {
    display: block;
}

/* Buy Multiplier Buttons */
#buy-multiplier {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

#buy-multiplier span {
    color: var(--fg-secondary);
    font-size: 0.9rem;
}

.multiplier-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--accent-secondary);
    background: transparent;
    color: var(--accent-secondary);
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all var(--transition-fast);
}

.multiplier-btn:hover {
    background: rgba(0, 160, 255, 0.2);
}

.multiplier-btn.active {
    background: var(--accent-secondary);
    color: #000;
}

/* Combo Display */
#combo-display {
    min-height: 2rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-warning);
    text-shadow: 0 0 10px var(--accent-warning);
    margin-top: 0.5rem;
    animation: pulse 0.3s ease;
}

#combo-display.active {
    animation: comboPulse 0.5s ease infinite;
}

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

/* Daily Missions */
#daily-missions {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1rem;
    border: 1px solid rgba(255, 170, 0, 0.3);
}

#daily-missions h3 {
    color: var(--accent-warning);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.mission-item {
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.mission-item.completed {
    background: rgba(68, 255, 68, 0.1);
    border: 1px solid var(--accent-success);
}

.mission-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.mission-name {
    font-weight: bold;
}

.mission-reward {
    color: var(--accent-warning);
}

.mission-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.mission-progress-fill {
    height: 100%;
    background: var(--gradient-main);
    transition: width var(--transition-normal);
}

.mission-progress-text {
    font-size: 0.8rem;
    color: var(--fg-secondary);
}

/* Prestige Zone */
#prestige-zone {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.1), rgba(255, 100, 0, 0.1));
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    border: 1px solid rgba(255, 170, 0, 0.3);
}

#prestige-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: bold;
    background: linear-gradient(135deg, #ffaa00, #ff6600);
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

#prestige-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.5);
}

#prestige-btn:disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
}

.prestige-desc {
    font-size: 0.8rem;
    color: var(--fg-secondary);
    margin-top: 0.5rem;
}

/* Village Visual */
#village-visual {
    margin-top: 1rem;
    text-align: center;
}

.village-emoji {
    font-size: 3rem;
    display: block;
    animation: float 3s ease-in-out infinite;
}

.village-description {
    font-size: 0.85rem;
    color: var(--fg-secondary);
    margin-top: 0.5rem;
}

/* Skins */
.skin-item {
    border-left: 3px solid var(--accent-secondary);
}

.skin-item.equipped {
    border-left-color: var(--accent-success);
    background: rgba(68, 255, 68, 0.1) !important;
}

.equipped-badge {
    color: var(--accent-success);
    font-size: 0.8rem;
}

/* Particles */
.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFly 0.6s ease-out forwards;
}

@keyframes particleFly {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--dx), var(--dy)) scale(0);
    }
}

/* Quiz Modal */
.quiz-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    animation: fadeIn 0.3s ease;
}

.quiz-content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    text-align: center;
    border: 2px solid var(--accent-secondary);
    box-shadow: 0 0 30px rgba(0, 160, 255, 0.3);
}

.quiz-content h2 {
    color: var(--accent-secondary);
    margin-bottom: 1.5rem;
}

.quiz-question {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.quiz-answers {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-answer {
    padding: 1rem;
    background: var(--bg-secondary);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--fg-main);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.quiz-answer:hover {
    border-color: var(--accent-secondary);
    background: rgba(0, 160, 255, 0.1);
}

.quiz-answer.gamepad-selected {
    border-color: var(--accent-primary);
    background: rgba(0, 200, 100, 0.2);
    box-shadow: 0 0 15px rgba(0, 200, 100, 0.4);
    transform: scale(1.02);
}

.quiz-skip {
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--fg-secondary);
    color: var(--fg-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quiz-skip:hover {
    border-color: var(--fg-main);
    color: var(--fg-main);
}

/* Modal Overlay Générique */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 2px solid var(--accent-primary);
}

.modal-content h2 {
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--fg-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--fg-main);
}

.modal-content {
    position: relative;
}

.close-btn {
    display: block;
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--gradient-main);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.close-btn:hover {
    transform: scale(1.02);
}

/* Settings Modal */
.settings-content {
    max-width: 450px;
}

.settings-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-section h3 {
    color: var(--fg-main);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.theme-btn {
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--fg-main);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
}

.theme-btn:hover {
    border-color: var(--accent-primary);
}

.theme-btn.active {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 170, 0.2);
}

.toggle-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.toggle-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
}

.settings-btn {
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-secondary);
    border-radius: 6px;
    color: var(--accent-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.settings-btn:hover {
    background: var(--accent-secondary);
    color: var(--bg-main);
}

.settings-btn.danger {
    border-color: var(--accent-danger);
    color: var(--accent-danger);
}

.settings-btn.danger:hover {
    background: var(--accent-danger);
    color: white;
}

.settings-content .setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-content button:not(.close-btn) {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-secondary);
    color: var(--accent-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.settings-content button:not(.close-btn):hover {
    background: var(--accent-secondary);
    color: #000;
}

.settings-content button.active {
    background: var(--accent-success);
    border-color: var(--accent-success);
    color: #000;
}

.settings-content select {
    padding: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-secondary);
    color: var(--fg-main);
    border-radius: 6px;
}

.setting-item.danger {
    border-color: var(--accent-danger);
}

.danger-btn {
    background: var(--accent-danger) !important;
    border-color: var(--accent-danger) !important;
    color: white !important;
}

/* Gamepad Support in Settings */
.gamepad-hint {
    text-align: center;
    font-size: 0.8rem;
    color: var(--fg-secondary);
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(0, 160, 255, 0.1);
    border-radius: 6px;
    border: 1px dashed var(--accent-secondary);
}

.gamepad-selectable.setting-item {
    transition: all var(--transition-fast);
    border-radius: 8px;
    margin: 0.25rem 0;
    padding: 0.75rem 1rem !important;
    border: 2px solid transparent;
}

.gamepad-selectable.setting-item.gamepad-selected {
    background: rgba(0, 212, 170, 0.1);
    border-color: var(--accent-primary);
}

.gamepad-selectable.setting-item.gamepad-selected button,
.gamepad-selectable.setting-item.gamepad-selected select {
    box-shadow: 0 0 8px rgba(0, 212, 170, 0.5);
}

/* Bouton Fermer avec support gamepad */
.settings-content .close-btn.gamepad-selectable {
    margin-top: 1rem;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.settings-content .close-btn.gamepad-selectable.gamepad-selected {
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 212, 170, 0.4);
}

/* Theme selector pour gamepad */
.theme-selector-gamepad {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-selector-gamepad .theme-name {
    min-width: 100px;
    text-align: center;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-secondary);
    border-radius: 6px;
    color: var(--fg-main);
}

.theme-selector-gamepad .theme-arrow {
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-secondary);
    color: var(--accent-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.theme-selector-gamepad .theme-arrow:hover {
    background: var(--accent-secondary);
    color: #000;
}

/* Achievements Modal */
.achievements-count {
    text-align: center;
    color: var(--fg-secondary);
    margin-bottom: 1rem;
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.achievement-item.locked {
    opacity: 0.5;
}

.achievement-item.unlocked {
    border: 1px solid var(--accent-success);
}

.achievement-icon {
    font-size: 2rem;
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    font-weight: bold;
    display: block;
}

.achievement-desc {
    font-size: 0.85rem;
    color: var(--fg-secondary);
}

/* Encyclopedia Modal */
.encyclopedia-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.encyclopedia-entry {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1rem;
    border-left: 3px solid var(--accent-primary);
}

.entry-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.entry-icon {
    font-size: 2rem;
}

.entry-header h3 {
    margin: 0;
    color: var(--accent-primary);
}

.entry-subtitle {
    font-size: 0.85rem;
    color: var(--fg-secondary);
}

.entry-content {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--fg-main);
}

/* Stats Modal */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stats-content .stat-item {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--fg-secondary);
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-primary);
}

/* Tutorial */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.tutorial-message {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 400px;
    text-align: center;
    border: 2px solid var(--accent-primary);
}

.tutorial-message p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.tutorial-message button {
    padding: 1rem 2rem;
    background: var(--gradient-main);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.tutorial-highlight {
    position: relative;
    z-index: 2001;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7), 0 0 30px var(--accent-primary);
    animation: none !important;
}

.tutorial-highlight .pc-icon {
    animation: none !important;
}

/* Tips notification */
.notification-tip {
    background: rgba(0, 160, 255, 0.2);
    border: 1px solid var(--accent-secondary);
    color: var(--fg-main);
    max-width: 400px;
}

.notification-mission {
    background: rgba(255, 170, 0, 0.2);
    border: 1px solid var(--accent-warning);
    color: var(--accent-warning);
}

.notification-prestige {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.3), rgba(255, 100, 0, 0.3));
    border: 1px solid #ff8800;
    color: white;
}

/* Boss amélioré */
.boss-header {
    padding: 1rem;
    border-radius: 8px 8px 0 0;
    margin: -2rem -2rem 1rem -2rem;
}

.boss-header h2 {
    margin: 0;
    color: white;
}

.boss-icon {
    font-size: 2.5rem;
}

.boss-message {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.boss-clicks {
    margin: 1rem 0;
}

.boss-btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.boss-btn:hover {
    filter: brightness(1.2);
    transform: scale(1.05);
}

.progress-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.1s ease;
}

/* ============================================
   THÈMES
   ============================================ */

/* Thème Sombre (par défaut) */
.theme-dark {
    --bg-main: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-card: #1a1a3a;
}

/* Thème Clair */
.theme-light {
    --bg-main: #f0f4f8;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --fg-main: #1a1a2e;
    --fg-secondary: #555555;
}

.theme-light #game-header {
    border-bottom-color: rgba(0, 160, 255, 0.3);
}

.theme-light .upgrade-item {
    background: #f5f5f5;
}

/* Thème Hacker */
.theme-hacker {
    --bg-main: #0d0d0d;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --accent-primary: #00ff00;
    --accent-secondary: #00cc00;
    --gradient-main: linear-gradient(135deg, #00ff00 0%, #00aa00 100%);
}

.theme-hacker body {
    background-image: none;
}

/* Thème Océan */
.theme-ocean {
    --bg-main: #0a1628;
    --bg-secondary: #0f2042;
    --bg-card: #152850;
    --accent-primary: #00bcd4;
    --accent-secondary: #26c6da;
    --gradient-main: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
}

/* Thème Coucher de soleil */
.theme-sunset {
    --bg-main: #1a0a1a;
    --bg-secondary: #2a0a2a;
    --bg-card: #3a1a3a;
    --accent-primary: #ff6b6b;
    --accent-secondary: #ffa07a;
    --gradient-main: linear-gradient(135deg, #ff6b6b 0%, #ffa07a 100%);
}

/* Responsive pour les nouveaux éléments */
@media screen and (max-width: 900px) {
    /* quick-menu est maintenant géré dans le premier bloc @media 900px */
    
    #buy-multiplier {
        flex-wrap: wrap;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 1rem;
        max-height: 90vh;
    }
}

@media screen and (max-width: 500px) {
    .quiz-answer {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .multiplier-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* ============================================
   THÈMES ADDITIONNELS
   ============================================ */

/* Thème Rétro */
.theme-retro {
    --bg-main: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: #0f3460;
    --accent-primary: #e94560;
    --accent-secondary: #ff6b6b;
    --gradient-main: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
}

.theme-retro body {
    font-family: 'Press Start 2P', cursive !important;
}

.theme-retro .upgrade-item,
.theme-retro .modal-content,
.theme-retro .menu-tab {
    border-radius: 0 !important;
    border: 2px solid var(--accent-primary);
}

/* Thème Nature */
.theme-nature {
    --bg-main: #1a2f1a;
    --bg-secondary: #2d4a2d;
    --bg-card: #3d5c3d;
    --accent-primary: #8bc34a;
    --accent-secondary: #4caf50;
    --gradient-main: linear-gradient(135deg, #8bc34a 0%, #4caf50 100%);
}

.theme-nature body {
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(139, 195, 74, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(76, 175, 80, 0.1) 0%, transparent 50%);
}

/* ============================================
   LEADERBOARD
   ============================================ */
.leaderboard-content {
    max-width: 600px;
}

.leaderboard-submit {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.leaderboard-submit input {
    flex: 1;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-secondary);
    border-radius: 8px;
    color: var(--fg-main);
    font-size: 1rem;
}

.leaderboard-submit input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.leaderboard-submit button {
    padding: 0.75rem 1.5rem;
    background: var(--gradient-main);
    border: none;
    border-radius: 8px;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.leaderboard-submit button:hover {
    transform: scale(1.05);
}

.leaderboard-stats {
    text-align: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.leaderboard-list {
    max-height: 400px;
    overflow-y: auto;
}

.leaderboard-list .loading,
.leaderboard-list .empty-leaderboard {
    text-align: center;
    padding: 2rem;
    color: var(--fg-secondary);
}

.leaderboard-table {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.leaderboard-header,
.leaderboard-row {
    display: grid;
    grid-template-columns: 50px 1fr 100px 70px;
    padding: 0.75rem;
    border-radius: 6px;
    align-items: center;
}

.leaderboard-header {
    background: var(--bg-secondary);
    font-weight: bold;
    color: var(--fg-secondary);
    font-size: 0.85rem;
}

.leaderboard-row {
    background: rgba(255, 255, 255, 0.03);
    transition: background var(--transition-fast);
}

.leaderboard-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

.leaderboard-row.top-3 {
    background: rgba(255, 215, 0, 0.1);
}

.leaderboard-row.is-me {
    background: rgba(0, 212, 170, 0.2);
    border: 1px solid var(--accent-primary);
}

.leaderboard-row .rank {
    font-weight: bold;
    text-align: center;
}

.leaderboard-row .pseudo {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard-row .score {
    color: var(--accent-primary);
    font-weight: bold;
    text-align: right;
}

.leaderboard-row .prestige {
    text-align: center;
    color: var(--accent-warning);
}

/* ============================================
   ATTAQUE FACEBOOK NUCLÉAIRE
   ============================================ */

#facebook-attack-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: facebookAttackFadeIn 0.5s ease;
}

#facebook-attack-modal.hidden {
    display: none;
}

.facebook-attack-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    animation: overlayPulse 2s ease-in-out infinite;
}

@keyframes overlayPulse {
    0%, 100% { background: rgba(0, 0, 0, 0.95); }
    50% { background: rgba(24, 119, 242, 0.15); }
}

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

.facebook-attack-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    max-height: 90vh;
    width: 95%;
    background: linear-gradient(145deg, #0a0a1a 0%, #1a0a2e 50%, #0a1a3a 100%);
    border-radius: 20px;
    overflow: hidden;
    border: 4px solid #ff4444;
    box-shadow: 
        0 0 50px rgba(255, 68, 68, 0.6),
        0 0 100px rgba(255, 68, 68, 0.3),
        inset 0 0 50px rgba(255, 68, 68, 0.1);
    animation: contentPulse 1.5s ease-in-out infinite, shake 0.3s ease-in-out infinite;
}

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

@keyframes contentPulse {
    0%, 100% { 
        box-shadow: 
            0 0 50px rgba(255, 68, 68, 0.6),
            0 0 100px rgba(255, 68, 68, 0.3),
            inset 0 0 50px rgba(255, 68, 68, 0.1);
    }
    50% { 
        box-shadow: 
            0 0 80px rgba(255, 68, 68, 0.8),
            0 0 150px rgba(255, 68, 68, 0.4),
            inset 0 0 80px rgba(255, 68, 68, 0.2);
        border-color: #ff6666;
    }
}

.facebook-attack-video-container {
    position: relative;
    padding: 1rem;
    background: #000;
}

#facebook-attack-video {
    width: 100%;
    border-radius: 12px;
    border: 3px solid #333;
    box-shadow: 
        0 0 30px rgba(255, 68, 68, 0.5),
        inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.video-glitch-effect {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    bottom: 1.5rem;
    border-radius: 12px;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.03) 2px,
        rgba(255, 255, 255, 0.03) 4px
    );
    animation: scanlines 0.1s linear infinite;
}

@keyframes scanlines {
    from { background-position: 0 0; }
    to { background-position: 0 4px; }
}

.facebook-attack-footer {
    padding: 1rem;
    text-align: center;
    background: linear-gradient(135deg, #1a0a2e 0%, #0a1a3a 100%);
    border-top: 2px solid rgba(255, 68, 68, 0.5);
}

.attack-warning {
    font-size: 1rem;
    font-weight: bold;
    color: #ff4444;
    animation: warningPulse 0.5s ease infinite;
    margin-bottom: 0.5rem;
}

@keyframes warningPulse {
    0%, 100% { 
        color: #ff4444;
        text-shadow: 0 0 10px #ff4444;
    }
    50% { 
        color: #ffcc00;
        text-shadow: 0 0 20px #ffcc00;
    }
}

.attack-progress {
    height: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    overflow: hidden;
    border: 2px solid #333;
    margin-bottom: 0.5rem;
}

#facebook-attack-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #1877f2, #ff4444, #ffcc00, #00ff00);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: progressGradient 1s linear infinite;
    transition: width 0.1s linear;
}

@keyframes progressGradient {
    from { background-position: 0% 50%; }
    to { background-position: 200% 50%; }
}

#facebook-attack-close-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    background: linear-gradient(135deg, #00d4aa 0%, #00a0ff 100%);
    color: #000;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 212, 170, 0.4);
}

#facebook-attack-close-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 212, 170, 0.6);
}

#facebook-attack-close-btn.hidden {
    display: none;
}

/* Écran d'alerte Facebook */
.facebook-alert-screen {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.facebook-alert-screen.hidden {
    display: none;
}

.alert-content {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(145deg, #1a0a2e 0%, #2d1b4e 50%, #1a0a3a 100%);
    border-radius: 20px;
    border: 4px solid #ff4444;
    box-shadow: 
        0 0 50px rgba(255, 68, 68, 0.6),
        0 0 100px rgba(255, 68, 68, 0.3),
        inset 0 0 50px rgba(255, 68, 68, 0.1);
    animation: alertPulse 0.5s ease-in-out infinite alternate;
    max-width: 500px;
}

@keyframes alertPulse {
    from { 
        transform: scale(1);
        box-shadow: 
            0 0 50px rgba(255, 68, 68, 0.6),
            0 0 100px rgba(255, 68, 68, 0.3);
    }
    to { 
        transform: scale(1.02);
        box-shadow: 
            0 0 80px rgba(255, 68, 68, 0.8),
            0 0 150px rgba(255, 68, 68, 0.5);
    }
}

.alert-icon-container {
    font-size: 5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.alert-icon {
    animation: alertIconShake 0.2s ease infinite;
}

.alert-danger {
    position: absolute;
    top: -10px;
    right: -20px;
    font-size: 2.5rem;
    animation: dangerBlink 0.3s ease infinite;
}

@keyframes alertIconShake {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

@keyframes dangerBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.alert-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    color: #ff4444;
    text-shadow: 
        0 0 10px #ff4444,
        0 0 20px #ff4444,
        0 0 40px #ff4444;
    margin-bottom: 1rem;
    animation: titleFlash 0.3s ease infinite alternate;
}

@keyframes titleFlash {
    from { color: #ff4444; }
    to { color: #ff8888; }
}

.alert-message {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.alert-submessage {
    font-size: 1rem;
    color: #ffcc00;
    margin-bottom: 2rem;
    animation: submessagePulse 0.5s ease infinite;
}

@keyframes submessagePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.alert-launch-btn {
    padding: 1.2rem 2.5rem;
    font-size: 1.3rem;
    font-weight: bold;
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: #fff;
    border: 3px solid #ff6666;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 5px 20px rgba(255, 68, 68, 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    animation: btnPulse 0.8s ease infinite;
}

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

.alert-launch-btn:hover {
    background: linear-gradient(135deg, #ff6666 0%, #ff4444 100%);
    transform: scale(1.1);
    box-shadow: 
        0 8px 30px rgba(255, 68, 68, 0.7),
        inset 0 0 30px rgba(255, 255, 255, 0.2);
}

/* Bouton croix pour fermer */
.facebook-close-x {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 68, 68, 0.8);
    color: #fff;
    border: 2px solid #ff6666;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.facebook-close-x:hover {
    background: #ff4444;
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.8);
}

/* Ajustement du contenu vidéo */
#facebook-video-screen {
    position: relative;
}

#facebook-video-screen.hidden {
    display: none;
}

/* ============================================
   EASTER EGG - SNAKE GAME
   ============================================ */
   
.easter-egg-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.easter-egg-btn:hover {
    opacity: 1;
    background: var(--accent-primary);
    color: white;
    transform: rotate(360deg) scale(1.2);
    box-shadow: 0 0 15px var(--accent-primary);
}

.snake-content {
    max-width: 400px;
    text-align: center;
}

.snake-subtitle {
    color: var(--fg-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.snake-game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#snake-canvas {
    background: #111;
    border: 3px solid var(--accent-primary);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.3);
}

.snake-controls {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 1rem;
}

.snake-score, .snake-high-score {
    font-size: 1rem;
    color: var(--fg-primary);
}

.snake-score span {
    color: var(--accent-primary);
    font-weight: bold;
}

.snake-high-score span {
    color: var(--accent-warning);
    font-weight: bold;
}

.snake-mobile-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.snake-btn-row {
    display: flex;
    gap: 0.5rem;
}

.snake-btn {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}

.snake-btn:hover, .snake-btn:active {
    background: var(--accent-primary);
    transform: scale(1.1);
    color: white;
}

.snake-start-btn {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.snake-start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--accent-primary);
}

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

.snake-hint {
    font-size: 0.8rem;
    color: var(--fg-secondary);
    opacity: 0.7;
}

.snake-game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--accent-danger);
}

.snake-game-over h3 {
    color: var(--accent-danger);
    margin-bottom: 0.5rem;
}

.snake-reward {
    color: var(--accent-primary);
    font-size: 1.2rem;
    margin: 1rem 0;
}

@media screen and (max-width: 500px) {
    #snake-canvas {
        width: 250px;
        height: 250px;
    }
    
    .snake-btn {
        width: 45px;
        height: 45px;
    }
}

/* ============================================
   GAMEPAD SUPPORT
   ============================================ */

/* Indicateur de connexion gamepad */
#gamepad-indicator {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
    border: 2px solid var(--accent-primary);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.3);
}

#gamepad-indicator.visible {
    opacity: 1;
    transform: translateY(0);
}

#gamepad-indicator .gamepad-icon {
    font-size: 1.5rem;
    animation: gamepadPulse 1s ease-in-out infinite;
}

#gamepad-indicator .gamepad-text {
    font-size: 0.9rem;
    color: var(--accent-primary);
    font-weight: bold;
}

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

/* Sélection d'upgrade avec gamepad */
.upgrade-item.gamepad-selected {
    border: 2px solid var(--accent-primary) !important;
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.5), inset 0 0 20px rgba(0, 212, 170, 0.1);
    transform: scale(1.02);
    background: linear-gradient(135deg, var(--bg-card), rgba(0, 212, 170, 0.1));
}

.upgrade-item.gamepad-selected::before {
    content: '🎮';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    animation: gamepadBounce 0.5s ease infinite;
}

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

/* Aide gamepad */
.gamepad-help {
    text-align: left;
    max-width: 400px;
}

.gamepad-help h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.gamepad-help-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.gamepad-help-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 0.85rem;
}

.gamepad-help-item .btn-icon {
    font-size: 1.1rem;
    min-width: 35px;
    text-align: center;
}

/* Bouton d'aide gamepad dans les settings */
#gamepad-help-btn {
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

#gamepad-help-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
}

/* Status gamepad dans settings */
.gamepad-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.gamepad-status-icon {
    font-size: 1.5rem;
}

.gamepad-status-text {
    flex: 1;
}

.gamepad-status-text .status-label {
    font-size: 0.85rem;
    color: var(--fg-secondary);
}

.gamepad-status-text .status-value {
    font-weight: bold;
}

.gamepad-status-text .status-value.connected {
    color: var(--accent-success);
}

.gamepad-status-text .status-value.disconnected {
    color: var(--fg-secondary);
}

/* Vibration toggle */
.gamepad-vibration-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

/* Animation de clic gamepad sur le clicker */
#main-clicker.gamepad-active {
    animation: gamepadClick 0.1s ease;
}

@keyframes gamepadClick {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Responsive gamepad */
@media screen and (max-width: 768px) {
    #gamepad-indicator {
        bottom: 10px;
        left: 10px;
        padding: 0.5rem 1rem;
    }
    
    #gamepad-indicator .gamepad-text {
        display: none;
    }
    
    .gamepad-help-grid {
        grid-template-columns: 1fr;
    }
    
    .upgrade-item.gamepad-selected::before {
        left: -25px;
        font-size: 1rem;
    }
}
