:root {
    /* Palette principale modernisée */
    --primary-color: #2563eb;    /* Bleu royal plus profond */
    --primary-light: #3b82f6;    /* Bleu vif */
    --secondary-color: #4f46e5;  /* Indigo */
    --accent-color: #e11d48;     /* Rouge vif pour accent */
    
    /* Couleurs fonctionnelles */
    --green-color: #22c55e;      /* Vert succès */
    --green-light: #4ade80;      /* Vert clair */
    --danger-color: #ef4444;     /* Rouge erreur */
    --warning-color: #f59e0b;    /* Orange avertissement */
    
    /* Interface */
    --background-color: #f8fafc;
    --text-color: #0f172a;
    --border-color: #cbd5e1;
    --card-background: #ffffff;
    
    /* Échiquier élégant */
    --light-square: #f0d9b5;     /* Beige clair classique */
    --dark-square: #b58863;      /* Marron classique */
    
    /* Indications visuelles */
    --highlight-square: rgba(252, 211, 77, 0.6);   /* Jaune ambre plus subtil */
    --last-move-square: rgba(96, 165, 250, 0.4);   /* Bleu clair subtil */
    --available-move: rgba(74, 222, 128, 0.45);    /* Vert subtil */
    --check-square: rgba(248, 113, 113, 0.5);      /* Rouge plus naturel */
    
    /* Effets */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
    --transition-speed: 0.3s;
}

[data-theme="dark"] {
    /* Palette principale version sombre */
    --primary-color: #3b82f6;    /* Bleu plus lumineux */
    --primary-light: #60a5fa;    /* Bleu clair */
    --secondary-color: #6366f1;  /* Indigo plus vif */
    --accent-color: #f43f5e;     /* Rose-rouge */
    
    /* Couleurs fonctionnelles */
    --green-color: #10b981;      /* Vert émeraude */
    --green-light: #34d399;      /* Vert menthe */
    --danger-color: #ef4444;     /* Rouge standard */
    --warning-color: #f59e0b;    /* Ambre */
    
    /* Interface */
    --background-color: #0f172a; /* Bleu très foncé */
    --text-color: #f1f5f9;       /* Blanc cassé */
    --border-color: #334155;     /* Gris ardoise */
    --card-background: #1e293b;  /* Bleu ardoise */
    
    /* Échiquier élégant (version sombre) - Amélioré pour contraste avec pièces blanches */
    --light-square: #94a3b8;     /* Bleu-gris moyen pour contraster avec les pièces blanches */
    --dark-square: #334155;      /* Bleu ardoise foncé */
    
    /* Indications visuelles ajustées pour le mode sombre */
    --highlight-square: rgba(251, 191, 36, 0.5);   /* Jaune plus visible */
    --last-move-square: rgba(96, 165, 250, 0.4);   /* Bleu lumineux */
    --available-move: rgba(52, 211, 153, 0.45);    /* Vert-turquoise */
    --check-square: rgba(239, 68, 68, 0.5);        /* Rouge vif */
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
    max-width: 1300px;
    margin: 0 auto;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 20px;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1.6rem;
    color: var(--primary-color);
    text-decoration: none;
}

.logo:hover {
    transform: scale(1.03);
}

.logo-icon {
    width: 36px;
    height: 36px;
    margin-right: 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
}

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

.logo-icon::before {
    content: '♞';
    font-size: 28px;
}

.nav-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn {
    padding: 10px 16px;
    border-radius: var(--border-radius);
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-family: 'Montserrat', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.4);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.btn:active::after {
    opacity: 1;
    transform: scale(50, 50) translate(-50%, -50%);
    transition: all 0.6s ease-out;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(67, 97, 238, 0.15);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(67, 97, 238, 0.2);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
    box-shadow: 0 4px 6px rgba(247, 37, 133, 0.15);
}

.btn-danger:hover {
    background-color: var(--danger-color);
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(247, 37, 133, 0.2);
}

.theme-switch {
    width: 50px;
    height: 26px;
    background-color: var(--border-color);
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: background-color var(--transition-speed);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.theme-switch::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background-color: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform var(--transition-speed);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.theme-switch.dark::after {
    transform: translateX(24px);
}

.theme-switch.dark {
    background-color: var(--primary-color);
}

.theme-switch:hover::after {
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
}

h1 {
    color: var(--primary-color);
    text-align: center;
    margin: 30px 0;
    font-weight: 700;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.container {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 30px;
    margin-bottom: 30px;
    transition: all var(--transition-speed) ease;
    border: 1px solid var(--border-color);
}

.game-area {
    display: grid;
    grid-template-columns: minmax(320px, 600px) 1fr;
    gap: 40px;
}

@media (max-width: 992px) {
    .game-area {
        grid-template-columns: 1fr;
    }
}

.board-container {
    aspect-ratio: 1;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    user-select: none;
    perspective: 1000px;
}

.chessboard {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    width: 100%;
    height: 100%;
    border: 5px solid var(--dark-square);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.flipped {
    transform: rotateX(180deg);
}

.square {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 3vw; /* Responsive font size */
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    overflow: hidden;
}

.square:hover {
    transform: scale(1.02);
    z-index: 2;
}

@media (min-width: 600px) {
    .square {
        font-size: 42px;
    }
}

.light {
    background-color: var(--light-square);
}

.dark {
    background-color: var(--dark-square);
}

.square.highlight {
    background-color: var(--highlight-square);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { background-color: var(--highlight-square); }
    50% { background-color: rgba(255, 255, 100, 0.7); }
    100% { background-color: var(--highlight-square); }
}

.square.last-move {
    background-color: var(--last-move-square);
}

.square.check {
    background-color: var(--check-square);
    animation: check-pulse 1.5s infinite;
}

@keyframes check-pulse {
    0% { background-color: var(--check-square); }
    50% { background-color: rgba(255, 87, 87, 0.7); }
    100% { background-color: var(--check-square); }
}

.piece {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    z-index: 10;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backface-visibility: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.piece:active {
    cursor: grabbing;
}

.piece:hover {
    transform: scale(1.15);
}

.piece.captured {
    animation: capture 0.5s ease-out;
}

@keyframes capture {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.1); opacity: 0; }
}

.piece.move {
    animation: move 0.3s cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

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

.available-move {
    position: absolute;
    width: 30%;
    height: 30%;
    border-radius: 50%;
    background-color: var(--available-move);
    z-index: 5;
    animation: fadeIn 0.3s;
}

.capture-move {
    position: absolute;
    width: 90%;
    height: 90%;
    border-radius: 50%;
    border: 4px solid var(--available-move);
    z-index: 5;
    animation: fadeIn 0.3s;
}

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

.board-labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.rank-labels, .file-labels {
    position: absolute;
    display: flex;
    justify-content: space-around;
}

.rank-labels {
    flex-direction: column-reverse;
    left: -20px;
    top: 10px;
    height: calc(100% - 20px);
}

.file-labels {
    bottom: -20px;
    left: 10px;
    width: calc(100% - 20px);
}

.rank-label, .file-label {
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.7;
    font-weight: 500;
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 5px;
}

.game-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.color-selection {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
}

.color-selection .btn {
    flex: 1;
}

.player-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-radius: var(--border-radius);
    background: linear-gradient(145deg, var(--card-background), rgba(203, 213, 225, 0.05));
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-speed);
}

.player-info:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.player-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.player-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.michel-avatar {
    background: linear-gradient(145deg, var(--secondary-color), var(--primary-color));
}

.turn-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--green-color);
    margin-left: 10px;
    transition: opacity 0.3s;
}

.clock-display {
    margin-left: auto;
    font-family: 'Roboto', monospace;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 10px;
    background-color: rgba(203, 213, 225, 0.2);
    transition: all 0.3s;
}

.active-clock {
    box-shadow: 0 0 0 2px var(--green-color);
    animation: clock-pulse 2s infinite;
    background: rgba(74, 222, 128, 0.1);
}

@keyframes clock-pulse {
    0% { box-shadow: 0 0 0 2px var(--green-color); }
    50% { box-shadow: 0 0 0 2px var(--primary-color); }
    100% { box-shadow: 0 0 0 2px var(--green-color); }
}

.captured-pieces {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 22px;
    min-height: 40px;
    margin: 5px 0;
    padding: 12px;
    border-radius: 10px;
    background: rgba(203, 213, 225, 0.05);
    border: 1px dashed var(--border-color);
    transition: all 0.3s;
}

.captured-pieces:hover {
    background: rgba(203, 213, 225, 0.1);
    box-shadow: var(--shadow-sm);
}

.captured-piece {
    transition: all 0.3s;
}

.captured-piece:hover {
    transform: scale(1.3) translateY(-5px);
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.move-history {
    margin-top: 20px;
    overflow-y: auto;
    max-height: 400px;
    padding: 20px;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--card-background), rgba(203, 213, 225, 0.05));
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

.move-history:hover {
    box-shadow: var(--shadow-lg);
}

.move-history h3 {
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.move-history h3 .btn {
    background: rgba(67, 97, 238, 0.1);
    border: 1px solid var(--primary-color);
    transition: all 0.3s;
}

.move-history h3 .btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.move-list {
    width: 100%;
    border-collapse: collapse;
}

.move-list th, .move-list td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.move-list th {
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(67, 97, 238, 0.05);
    position: sticky;
    top: 0;
    box-shadow: 0 1px 0 var(--border-color);
}

.move-list tr:hover {
    background-color: rgba(67, 97, 238, 0.08);
}

.move-white, .move-black {
    font-family: 'Roboto Mono', monospace;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    padding: 3px 6px;
    border-radius: 4px;
}

.move-white:hover, .move-black:hover {
    color: var(--primary-color);
    font-weight: 600;
    background: rgba(67, 97, 238, 0.1);
}

.move-list tr.current-move {
    background-color: rgba(67, 97, 238, 0.15);
}

.move-list tr.current-move td {
    border-left: 3px solid var(--primary-color);
    padding-left: 8px;
}

.game-status {
    padding: 18px;
    border-radius: 12px;
    background-color: var(--card-background);
    border-left: 5px solid var(--primary-color);
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    font-weight: 500;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.game-status:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
}

.game-status.check {
    border-left-color: var(--warning-color);
    background-color: rgba(255, 161, 22, 0.08);
    animation: status-pulse 2s infinite;
}

.game-status.checkmate, .game-status.stalemate {
    border-left-color: var(--danger-color);
    background-color: rgba(247, 37, 133, 0.08);
    animation: status-pulse 2s infinite;
}

@keyframes status-pulse {
    0% { box-shadow: var(--shadow-md); }
    50% { box-shadow: 0 0 20px rgba(247, 37, 133, 0.3); }
    100% { box-shadow: var(--shadow-md); }
}

.thinking {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    opacity: 0;
    transition: all 0.5s;
    padding: 15px;
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(203, 213, 225, 0.05), rgba(67, 97, 238, 0.05));
    border: 1px solid var(--border-color);
    transform: translateY(10px);
}

.thinking.active {
    opacity: 1;
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.thinking-text {
    font-weight: 500;
    letter-spacing: 0.5px;
    animation: thinking-text 2.5s infinite;
}

@keyframes thinking-text {
    0% { color: var(--primary-color); }
    50% { color: var(--secondary-color); }
    100% { color: var(--primary-color); }
}

.thinking-dots {
    display: flex;
    gap: 5px;
}

.thinking-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary-color), var(--secondary-color));
    animation: thinking 1.4s infinite ease-in-out both;
    box-shadow: 0 2px 5px rgba(67, 97, 238, 0.3);
}

.thinking-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.thinking-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes thinking {
    0%, 80%, 100% { 
        transform: scale(0);
        opacity: 0.5;
    } 
    40% { 
        transform: scale(1.0);
        opacity: 1;
        box-shadow: 0 0 8px var(--primary-light);
    }
}

.difficulty-selector {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 20px 0;
}

.difficulty-option {
    padding: 10px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    cursor: pointer;
    flex: 1;
    text-align: center;
    transition: all 0.2s;
    font-weight: 500;
}

.difficulty-option:hover {
    background-color: rgba(67, 97, 238, 0.08);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.difficulty-option.selected {
    background: linear-gradient(145deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
    transform: translateY(-2px) scale(1.03);
}

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.toast {
    background-color: var(--card-background);
    color: var(--text-color);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    border-left: 4px solid var(--primary-color);
    transform: translateX(120%);
    animation: slideIn 0.5s forwards, fadeOut 0.5s forwards 4.5s;
    max-width: 300px;
    font-weight: 500;
}

.toast.toast-danger {
    border-left-color: var(--danger-color);
}

.toast.toast-warning {
    border-left-color: var(--warning-color);
}

.toast.toast-success {
    border-left-color: var(--green-color);
}

@keyframes slideIn {
    to { transform: translateX(0); }
}

@keyframes fadeOut {
    to { opacity: 0; }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    padding: 30px;
    transform: translateY(-20px) scale(0.95);
    transition: transform var(--transition-speed) ease;
    border: 1px solid var(--border-color);
}

.modal-overlay.show .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.2s;
}

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

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* Promotion modal */
.promotion-pieces {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
}

.promotion-piece {
    font-size: 48px;
    cursor: pointer;
    padding: 15px;
    border-radius: var(--border-radius);
    transition: all 0.2s;
}

.promotion-piece:hover {
    background-color: rgba(67, 97, 238, 0.1);
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

footer {
    text-align: center;
    margin-top: 50px;
    padding: 30px 0;
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.95rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s;
}

footer a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.coffee-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 250px;
    background-color: #ffdd00;
    color: #000000;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.coffee-button:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none !important;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .game-controls {
        flex-direction: column;
    }

    .player-info {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .clock-display {
        margin: 5px 0;
        width: 100%;
    }
    
    .difficulty-selector {
        flex-direction: column;
    }
    
    .difficulty-option {
        padding: 10px;
    }
}

.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    z-index: 1001;
    transition: width 0.3s ease;
}