/* =================================================================
   HEXCHESS BASE STYLES (DESKTOP)
   This file contains NO mobile media queries
   Mobile styles are handled entirely by mobile.css
   ================================================================= */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 100vh;
}

/* HEADER */
.header {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.header h1 {
    font-size: 18px;
    background: linear-gradient(45deg, #fff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
h1 img {
    vertical-align: bottom;
    margin-bottom: 5px;  /* Adjust this value to fine-tune */
}

.header-title-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.room-name-display {
    color: white;
    font-size: 16px;
    font-weight: 400;
    margin-top: 4px;
    opacity: 0.9;
    font-style: italic;
}

.user-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* BUTTONS */
.btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
}

.btn-reset {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.5);
    color: #ffc107;
    font-size: 12px;
    padding: 4px 8px;
    margin-left: 8px;
}

.btn-reset:hover {
    background: rgba(255, 193, 7, 0.3);
    color: #fff;
}

/* CONTAINERS */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.auth-container {
    max-width: 400px;
    margin: 4rem auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* FORMS */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus,
.form-group select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

.form-group input:focus,
.form-group select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

.form-helper {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* TIMER SETTINGS */
.timer-settings {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.timer-settings.active {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

.timer-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-bottom: 10px;
    text-align: center;
}

/* VALIDATION ERRORS */
.validation-error {
    background: rgba(231, 76, 60, 0.2);
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
    color: #fff;
    font-size: 14px;
    text-align: center;
    animation: errorShake 0.5s ease-in-out;
}

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

/* LOBBY */
.lobby {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.panel h2 {
    margin-bottom: 1rem;
    font-size: 18px;
}

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

.game-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-item.your-turn {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.game-info h3 {
    font-size: 16px;
    margin-bottom: 0.25rem;
}

.game-info p {
    font-size: 12px;
    opacity: 0.8;
}

/* GAME AREA (DESKTOP) */
.game-area {
    display: flex;
    height: calc(100vh - 120px);
}

.game-sidebar {
    width: 300px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.game-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.game-status {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.check-warning {
    background: rgba(231, 76, 60, 0.2);
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 8px;
    margin: 8px 0;
    font-size: 12px;
    text-align: center;
    animation: warningPulse 2s infinite;
}

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

.player-list {
    margin-bottom: 1rem;
}

.player-list h3 {
    margin-bottom: 15px;
}

.player-item {
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
}

.player-item.current {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid #2ecc71;
}

.game-controls {
    margin-top: auto;
}

.game-controls .btn {
    width: 100%;
    margin-bottom: 10px;
}

/* HEX BOARD STYLING (DESKTOP) */
.hex-board {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.8);
    margin: 20px auto;
    transform-origin: center center;
}

.hex-row {
    display: flex;
    margin: -6px 0;
    position: relative;
    justify-content: center;
}

.hex-row:nth-child(even) {
    margin-left: 2px;
}

.hex-cell {
    width: 52px;
    height: 60px;
    margin: 0 2px;
    position: relative;
    cursor: pointer;
    transition: all 0.15s ease;
}

.hex-content {
    width: 100%;
    height: 100%;
    position: relative;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* HEX CELL COLORS */
.hex-cell.pastel-red .hex-content {
    background: linear-gradient(135deg, #ffb3ba, #ff9999);
}

.hex-cell.pastel-blue .hex-content {
    background: linear-gradient(135deg, #bae1ff, #87ceeb);
}

.hex-cell.pastel-green .hex-content {
    background: linear-gradient(135deg, #baffc9, #90ee90);
}

/* HEX CELL STATES */
.hex-cell:hover {
    transform: scale(1.05);
    z-index: 10;
}

.hex-cell.selected {
    transform: scale(1.1);
    z-index: 20;
}

.hex-cell.selected .hex-content {
    border: 3px solid #2ecc71;
    background: rgba(46, 204, 113, 0.2) !important;
}

.hex-cell.king-in-check {
    animation: checkPulse 1.5s infinite;
    z-index: 25;
}

.hex-cell.king-in-check .hex-content {
    border: 4px solid #e74c3c !important;
    background: rgba(231, 76, 60, 0.3) !important;
}

@keyframes checkPulse {
    0%, 100% {
        transform: scale(1.1);
        opacity: 1;
    }
    50% {
        transform: scale(1.25);
        opacity: 0.7;
    }
}

.hex-cell.valid-move {
    animation: pulseMove 1.2s infinite;
    z-index: 15;
    position: relative;
}

.hex-cell.valid-move::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    border: 4px solid #2ecc71;
    background: rgba(46, 204, 113, 0.4);
    pointer-events: none;
    z-index: 1;
}

.hex-cell.valid-move .hex-content {
    background: rgba(46, 204, 113, 0.4) !important;
}

@keyframes pulseMove {
    0%, 100% {
        transform: scale(1.0);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
}

.hex-cell.capture-square {
    z-index: 16;
}

.hex-cell.capture-square .hex-content {
    border: 4px solid #e74c3c !important;
    background: rgba(231, 76, 60, 0.4) !important;
    animation: pulseCapture 1.2s infinite;
}

@keyframes pulseCapture {
    0%, 100% {
        transform: scale(1.0);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
}

/* CHESS PIECES (DESKTOP) */
.piece {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 5;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: all 0.2s ease;
    user-select: none;
}

/* RED PIECES - Crimson like 🔴 */
.piece.red-piece[data-piece="king"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23dc143c" stroke="%23000" stroke-width="1.5"><path d="M22.5 11.63V6M20 8h5M22.5 25s4.5-7.5 3-10.5c0 0-1-2.5-3-2.5s-3 2.5-3 2.5c-1.5 3 3 10.5 3 10.5"/><path d="M11.5 37c5.5 3.5 15.5 3.5 21 0v-7s9-4.5 6-10.5c-4-6.5-13.5-3.5-16 4V23.5c0-2.5-2.5-4-2.5-4s-2.5 1.5-2.5 4v.5c-2.5-7.5-12-10.5-16-4-3 6 5 10 5 10V37z"/></g></svg>'); }
.piece.red-piece[data-piece="queen"]  { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23dc143c" stroke="%23000" stroke-width="1.5"><path d="M8 12a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM24.5 7.5a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM41 12a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM16 8.5a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM33 9a2 2 0 1 1-4 0 2 2 0 1 1 4 0z"/><path d="M9 26c8.5-1.5 21-1.5 27 0l2-12-7 11V11l-5.5 13.5-3-15-3 15-5.5-13.5V25L7 14l2 12z"/><path d="M9 26c0 2 1.5 2 2.5 4 1 1.5 1 1 .5 3.5-1.5 1-1.5 2.5-1.5 2.5-1.5 1.5.5 2.5.5 2.5 6.5 1 16.5 1 23 0 0 0 1.5-1 0-2.5 0 0 .5-1.5-1-2.5-.5-2.5-.5-2 .5-3.5 1-2 2.5-2 2.5-4-8.5-1.5-18.5-1.5-27 0z"/></g></svg>'); }
.piece.red-piece[data-piece="rook"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23dc143c" stroke="%23000" stroke-width="1.5"><path d="M9 39h27v-3H9v3zM12 36v-4h21v4H12zM11 14V9h4v2h5V9h5v2h5V9h4v5"/><path d="M34 14l-3 3H14l-3-3"/><path d="M31 17v12.5H14V17"/></g></svg>'); }
.piece.red-piece[data-piece="bishop"] { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23dc143c" stroke="%23000" stroke-width="1.5"><path d="M20 8h5V6h-5v2zM11 39h23v-4H11v4z"/><path d="M22.5 8.5c0-3-3-3-3-3s-3 0-3 3 3 3 3 3 3 0 3-3zM22.5 36c8-2.5 8-11.5 3-18.5 0 0-1.5-3-3-3s-3 3-3 3c-5 7-5 16 3 18.5z"/><circle cx="22.5" cy="15" r="2.5"/></g></svg>'); }
.piece.red-piece[data-piece="knight"] { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23dc143c" stroke="%23000" stroke-width="1.5"><path d="M11 39h23v-4H11v4z"/><path d="M22 10c10.5 1 16.5 8 16 29H15c0-9 10-6.5 8-21"/><path d="M24 18c.38 2.91-5.55 7.37-8 9-3 2-2.82 4.34-5 4-1.042-.94 1.41-3.04 0-3-1 0 .19 1.23-1 2-1 0-4.003 1-4-4 0-2 6-12 6-12s1.89-1.9 2-3.5c-.73-.994-.5-2-.5-3 1-1 3 2.5 3 2.5h2s.78-1.992 2.5-3c1 0 1 3 1 3"/></g></svg>'); }
.piece.red-piece[data-piece="pawn"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23dc143c" stroke="%23000" stroke-width="1.5"><path d="M22.5 9c-2.21 0-4 1.79-4 4 0 .89.29 1.71.78 2.38C17.33 16.5 16 18.59 16 21c0 2.03.94 3.84 2.41 5.03-3 1.06-7.41 5.55-7.41 13.47h23c0-7.92-4.41-12.41-7.41-13.47 1.47-1.19 2.41-3 2.41-5.03 0-2.41-1.33-4.5-3.28-5.62.49-.67.78-1.49.78-2.38 0-2.21-1.79-4-4-4z"/></g></svg>'); }

/* BLUE PIECES - Bright Blue like 🔵 */
.piece.blue-piece[data-piece="king"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%233498db" stroke="%23000" stroke-width="1.5"><path d="M22.5 11.63V6M20 8h5M22.5 25s4.5-7.5 3-10.5c0 0-1-2.5-3-2.5s-3 2.5-3 2.5c-1.5 3 3 10.5 3 10.5"/><path d="M11.5 37c5.5 3.5 15.5 3.5 21 0v-7s9-4.5 6-10.5c-4-6.5-13.5-3.5-16 4V23.5c0-2.5-2.5-4-2.5-4s-2.5 1.5-2.5 4v.5c-2.5-7.5-12-10.5-16-4-3 6 5 10 5 10V37z"/></g></svg>'); }
.piece.blue-piece[data-piece="queen"]  { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%233498db" stroke="%23000" stroke-width="1.5"><path d="M8 12a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM24.5 7.5a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM41 12a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM16 8.5a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM33 9a2 2 0 1 1-4 0 2 2 0 1 1 4 0z"/><path d="M9 26c8.5-1.5 21-1.5 27 0l2-12-7 11V11l-5.5 13.5-3-15-3 15-5.5-13.5V25L7 14l2 12z"/><path d="M9 26c0 2 1.5 2 2.5 4 1 1.5 1 1 .5 3.5-1.5 1-1.5 2.5-1.5 2.5-1.5 1.5.5 2.5.5 2.5 6.5 1 16.5 1 23 0 0 0 1.5-1 0-2.5 0 0 .5-1.5-1-2.5-.5-2.5-.5-2 .5-3.5 1-2 2.5-2 2.5-4-8.5-1.5-18.5-1.5-27 0z"/></g></svg>'); }
.piece.blue-piece[data-piece="rook"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%233498db" stroke="%23000" stroke-width="1.5"><path d="M9 39h27v-3H9v3zM12 36v-4h21v4H12zM11 14V9h4v2h5V9h5v2h5V9h4v5"/><path d="M34 14l-3 3H14l-3-3"/><path d="M31 17v12.5H14V17"/></g></svg>'); }
.piece.blue-piece[data-piece="bishop"] { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%233498db" stroke="%23000" stroke-width="1.5"><path d="M20 8h5V6h-5v2zM11 39h23v-4H11v4z"/><path d="M22.5 8.5c0-3-3-3-3-3s-3 0-3 3 3 3 3 3 3 0 3-3zM22.5 36c8-2.5 8-11.5 3-18.5 0 0-1.5-3-3-3s-3 3-3 3c-5 7-5 16 3 18.5z"/><circle cx="22.5" cy="15" r="2.5"/></g></svg>'); }
.piece.blue-piece[data-piece="knight"] { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%233498db" stroke="%23000" stroke-width="1.5"><path d="M11 39h23v-4H11v4z"/><path d="M22 10c10.5 1 16.5 8 16 29H15c0-9 10-6.5 8-21"/><path d="M24 18c.38 2.91-5.55 7.37-8 9-3 2-2.82 4.34-5 4-1.042-.94 1.41-3.04 0-3-1 0 .19 1.23-1 2-1 0-4.003 1-4-4 0-2 6-12 6-12s1.89-1.9 2-3.5c-.73-.994-.5-2-.5-3 1-1 3 2.5 3 2.5h2s.78-1.992 2.5-3c1 0 1 3 1 3"/></g></svg>'); }
.piece.blue-piece[data-piece="pawn"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%233498db" stroke="%23000" stroke-width="1.5"><path d="M22.5 9c-2.21 0-4 1.79-4 4 0 .89.29 1.71.78 2.38C17.33 16.5 16 18.59 16 21c0 2.03.94 3.84 2.41 5.03-3 1.06-7.41 5.55-7.41 13.47h23c0-7.92-4.41-12.41-7.41-13.47 1.47-1.19 2.41-3 2.41-5.03 0-2.41-1.33-4.5-3.28-5.62.49-.67.78-1.49.78-2.38 0-2.21-1.79-4-4-4z"/></g></svg>'); }

/* GREEN PIECES - Bright Green like 🟢 */
.piece.green-piece[data-piece="king"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%2327ae60" stroke="%23000" stroke-width="1.5"><path d="M22.5 11.63V6M20 8h5M22.5 25s4.5-7.5 3-10.5c0 0-1-2.5-3-2.5s-3 2.5-3 2.5c-1.5 3 3 10.5 3 10.5"/><path d="M11.5 37c5.5 3.5 15.5 3.5 21 0v-7s9-4.5 6-10.5c-4-6.5-13.5-3.5-16 4V23.5c0-2.5-2.5-4-2.5-4s-2.5 1.5-2.5 4v.5c-2.5-7.5-12-10.5-16-4-3 6 5 10 5 10V37z"/></g></svg>'); }
.piece.green-piece[data-piece="queen"]  { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%2327ae60" stroke="%23000" stroke-width="1.5"><path d="M8 12a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM24.5 7.5a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM41 12a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM16 8.5a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM33 9a2 2 0 1 1-4 0 2 2 0 1 1 4 0z"/><path d="M9 26c8.5-1.5 21-1.5 27 0l2-12-7 11V11l-5.5 13.5-3-15-3 15-5.5-13.5V25L7 14l2 12z"/><path d="M9 26c0 2 1.5 2 2.5 4 1 1.5 1 1 .5 3.5-1.5 1-1.5 2.5-1.5 2.5-1.5 1.5.5 2.5.5 2.5 6.5 1 16.5 1 23 0 0 0 1.5-1 0-2.5 0 0 .5-1.5-1-2.5-.5-2.5-.5-2 .5-3.5 1-2 2.5-2 2.5-4-8.5-1.5-18.5-1.5-27 0z"/></g></svg>'); }
.piece.green-piece[data-piece="rook"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%2327ae60" stroke="%23000" stroke-width="1.5"><path d="M9 39h27v-3H9v3zM12 36v-4h21v4H12zM11 14V9h4v2h5V9h5v2h5V9h4v5"/><path d="M34 14l-3 3H14l-3-3"/><path d="M31 17v12.5H14V17"/></g></svg>'); }
.piece.green-piece[data-piece="bishop"] { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%2327ae60" stroke="%23000" stroke-width="1.5"><path d="M20 8h5V6h-5v2zM11 39h23v-4H11v4z"/><path d="M22.5 8.5c0-3-3-3-3-3s-3 0-3 3 3 3 3 3 3 0 3-3zM22.5 36c8-2.5 8-11.5 3-18.5 0 0-1.5-3-3-3s-3 3-3 3c-5 7-5 16 3 18.5z"/><circle cx="22.5" cy="15" r="2.5"/></g></svg>'); }
.piece.green-piece[data-piece="knight"] { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%2327ae60" stroke="%23000" stroke-width="1.5"><path d="M11 39h23v-4H11v4z"/><path d="M22 10c10.5 1 16.5 8 16 29H15c0-9 10-6.5 8-21"/><path d="M24 18c.38 2.91-5.55 7.37-8 9-3 2-2.82 4.34-5 4-1.042-.94 1.41-3.04 0-3-1 0 .19 1.23-1 2-1 0-4.003 1-4-4 0-2 6-12 6-12s1.89-1.9 2-3.5c-.73-.994-.5-2-.5-3 1-1 3 2.5 3 2.5h2s.78-1.992 2.5-3c1 0 1 3 1 3"/></g></svg>'); }
.piece.green-piece[data-piece="pawn"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%2327ae60" stroke="%23000" stroke-width="1.5"><path d="M22.5 9c-2.21 0-4 1.79-4 4 0 .89.29 1.71.78 2.38C17.33 16.5 16 18.59 16 21c0 2.03.94 3.84 2.41 5.03-3 1.06-7.41 5.55-7.41 13.47h23c0-7.92-4.41-12.41-7.41-13.47 1.47-1.19 2.41-3 2.41-5.03 0-2.41-1.33-4.5-3.28-5.62.49-.67.78-1.49.78-2.38 0-2.21-1.79-4-4-4z"/></g></svg>'); }

/* YELLOW PIECES - Lemony Yellow like 🟡 */
.piece.yellow-piece[data-piece="king"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23ffe135" stroke="%23000" stroke-width="1.5"><path d="M22.5 11.63V6M20 8h5M22.5 25s4.5-7.5 3-10.5c0 0-1-2.5-3-2.5s-3 2.5-3 2.5c-1.5 3 3 10.5 3 10.5"/><path d="M11.5 37c5.5 3.5 15.5 3.5 21 0v-7s9-4.5 6-10.5c-4-6.5-13.5-3.5-16 4V23.5c0-2.5-2.5-4-2.5-4s-2.5 1.5-2.5 4v.5c-2.5-7.5-12-10.5-16-4-3 6 5 10 5 10V37z"/></g></svg>'); }
.piece.yellow-piece[data-piece="queen"]  { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23ffe135" stroke="%23000" stroke-width="1.5"><path d="M8 12a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM24.5 7.5a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM41 12a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM16 8.5a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM33 9a2 2 0 1 1-4 0 2 2 0 1 1 4 0z"/><path d="M9 26c8.5-1.5 21-1.5 27 0l2-12-7 11V11l-5.5 13.5-3-15-3 15-5.5-13.5V25L7 14l2 12z"/><path d="M9 26c0 2 1.5 2 2.5 4 1 1.5 1 1 .5 3.5-1.5 1-1.5 2.5-1.5 2.5-1.5 1.5.5 2.5.5 2.5 6.5 1 16.5 1 23 0 0 0 1.5-1 0-2.5 0 0 .5-1.5-1-2.5-.5-2.5-.5-2 .5-3.5 1-2 2.5-2 2.5-4-8.5-1.5-18.5-1.5-27 0z"/></g></svg>'); }
.piece.yellow-piece[data-piece="rook"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23ffe135" stroke="%23000" stroke-width="1.5"><path d="M9 39h27v-3H9v3zM12 36v-4h21v4H12zM11 14V9h4v2h5V9h5v2h5V9h4v5"/><path d="M34 14l-3 3H14l-3-3"/><path d="M31 17v12.5H14V17"/></g></svg>'); }
.piece.yellow-piece[data-piece="bishop"] { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23ffe135" stroke="%23000" stroke-width="1.5"><path d="M20 8h5V6h-5v2zM11 39h23v-4H11v4z"/><path d="M22.5 8.5c0-3-3-3-3-3s-3 0-3 3 3 3 3 3 3 0 3-3zM22.5 36c8-2.5 8-11.5 3-18.5 0 0-1.5-3-3-3s-3 3-3 3c-5 7-5 16 3 18.5z"/><circle cx="22.5" cy="15" r="2.5"/></g></svg>'); }
.piece.yellow-piece[data-piece="knight"] { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23ffe135" stroke="%23000" stroke-width="1.5"><path d="M11 39h23v-4H11v4z"/><path d="M22 10c10.5 1 16.5 8 16 29H15c0-9 10-6.5 8-21"/><path d="M24 18c.38 2.91-5.55 7.37-8 9-3 2-2.82 4.34-5 4-1.042-.94 1.41-3.04 0-3-1 0 .19 1.23-1 2-1 0-4.003 1-4-4 0-2 6-12 6-12s1.89-1.9 2-3.5c-.73-.994-.5-2-.5-3 1-1 3 2.5 3 2.5h2s.78-1.992 2.5-3c1 0 1 3 1 3"/></g></svg>'); }
.piece.yellow-piece[data-piece="pawn"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23ffe135" stroke="%23000" stroke-width="1.5"><path d="M22.5 9c-2.21 0-4 1.79-4 4 0 .89.29 1.71.78 2.38C17.33 16.5 16 18.59 16 21c0 2.03.94 3.84 2.41 5.03-3 1.06-7.41 5.55-7.41 13.47h23c0-7.92-4.41-12.41-7.41-13.47 1.47-1.19 2.41-3 2.41-5.03 0-2.41-1.33-4.5-3.28-5.62.49-.67.78-1.49.78-2.38 0-2.21-1.79-4-4-4z"/></g></svg>'); }

/* PURPLE PIECES - Purple like 🟣 */
.piece.purple-piece[data-piece="king"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%239b59b6" stroke="%23000" stroke-width="1.5"><path d="M22.5 11.63V6M20 8h5M22.5 25s4.5-7.5 3-10.5c0 0-1-2.5-3-2.5s-3 2.5-3 2.5c-1.5 3 3 10.5 3 10.5"/><path d="M11.5 37c5.5 3.5 15.5 3.5 21 0v-7s9-4.5 6-10.5c-4-6.5-13.5-3.5-16 4V23.5c0-2.5-2.5-4-2.5-4s-2.5 1.5-2.5 4v.5c-2.5-7.5-12-10.5-16-4-3 6 5 10 5 10V37z"/></g></svg>'); }
.piece.purple-piece[data-piece="queen"]  { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%239b59b6" stroke="%23000" stroke-width="1.5"><path d="M8 12a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM24.5 7.5a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM41 12a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM16 8.5a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM33 9a2 2 0 1 1-4 0 2 2 0 1 1 4 0z"/><path d="M9 26c8.5-1.5 21-1.5 27 0l2-12-7 11V11l-5.5 13.5-3-15-3 15-5.5-13.5V25L7 14l2 12z"/><path d="M9 26c0 2 1.5 2 2.5 4 1 1.5 1 1 .5 3.5-1.5 1-1.5 2.5-1.5 2.5-1.5 1.5.5 2.5.5 2.5 6.5 1 16.5 1 23 0 0 0 1.5-1 0-2.5 0 0 .5-1.5-1-2.5-.5-2.5-.5-2 .5-3.5 1-2 2.5-2 2.5-4-8.5-1.5-18.5-1.5-27 0z"/></g></svg>'); }
.piece.purple-piece[data-piece="rook"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%239b59b6" stroke="%23000" stroke-width="1.5"><path d="M9 39h27v-3H9v3zM12 36v-4h21v4H12zM11 14V9h4v2h5V9h5v2h5V9h4v5"/><path d="M34 14l-3 3H14l-3-3"/><path d="M31 17v12.5H14V17"/></g></svg>'); }
.piece.purple-piece[data-piece="bishop"] { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%239b59b6" stroke="%23000" stroke-width="1.5"><path d="M20 8h5V6h-5v2zM11 39h23v-4H11v4z"/><path d="M22.5 8.5c0-3-3-3-3-3s-3 0-3 3 3 3 3 3 3 0 3-3zM22.5 36c8-2.5 8-11.5 3-18.5 0 0-1.5-3-3-3s-3 3-3 3c-5 7-5 16 3 18.5z"/><circle cx="22.5" cy="15" r="2.5"/></g></svg>'); }
.piece.purple-piece[data-piece="knight"] { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%239b59b6" stroke="%23000" stroke-width="1.5"><path d="M11 39h23v-4H11v4z"/><path d="M22 10c10.5 1 16.5 8 16 29H15c0-9 10-6.5 8-21"/><path d="M24 18c.38 2.91-5.55 7.37-8 9-3 2-2.82 4.34-5 4-1.042-.94 1.41-3.04 0-3-1 0 .19 1.23-1 2-1 0-4.003 1-4-4 0-2 6-12 6-12s1.89-1.9 2-3.5c-.73-.994-.5-2-.5-3 1-1 3 2.5 3 2.5h2s.78-1.992 2.5-3c1 0 1 3 1 3"/></g></svg>'); }
.piece.purple-piece[data-piece="pawn"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%239b59b6" stroke="%23000" stroke-width="1.5"><path d="M22.5 9c-2.21 0-4 1.79-4 4 0 .89.29 1.71.78 2.38C17.33 16.5 16 18.59 16 21c0 2.03.94 3.84 2.41 5.03-3 1.06-7.41 5.55-7.41 13.47h23c0-7.92-4.41-12.41-7.41-13.47 1.47-1.19 2.41-3 2.41-5.03 0-2.41-1.33-4.5-3.28-5.62.49-.67.78-1.49.78-2.38 0-2.21-1.79-4-4-4z"/></g></svg>'); }

/* ORANGE/BRONZE PIECES - Dark Bronze like 🟠 */
.piece.orange-piece[data-piece="king"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23794633" stroke="%23000" stroke-width="1.5"><path d="M22.5 11.63V6M20 8h5M22.5 25s4.5-7.5 3-10.5c0 0-1-2.5-3-2.5s-3 2.5-3 2.5c-1.5 3 3 10.5 3 10.5"/><path d="M11.5 37c5.5 3.5 15.5 3.5 21 0v-7s9-4.5 6-10.5c-4-6.5-13.5-3.5-16 4V23.5c0-2.5-2.5-4-2.5-4s-2.5 1.5-2.5 4v.5c-2.5-7.5-12-10.5-16-4-3 6 5 10 5 10V37z"/></g></svg>'); }
.piece.orange-piece[data-piece="queen"]  { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23794633" stroke="%23000" stroke-width="1.5"><path d="M8 12a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM24.5 7.5a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM41 12a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM16 8.5a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM33 9a2 2 0 1 1-4 0 2 2 0 1 1 4 0z"/><path d="M9 26c8.5-1.5 21-1.5 27 0l2-12-7 11V11l-5.5 13.5-3-15-3 15-5.5-13.5V25L7 14l2 12z"/><path d="M9 26c0 2 1.5 2 2.5 4 1 1.5 1 1 .5 3.5-1.5 1-1.5 2.5-1.5 2.5-1.5 1.5.5 2.5.5 2.5 6.5 1 16.5 1 23 0 0 0 1.5-1 0-2.5 0 0 .5-1.5-1-2.5-.5-2.5-.5-2 .5-3.5 1-2 2.5-2 2.5-4-8.5-1.5-18.5-1.5-27 0z"/></g></svg>'); }
.piece.orange-piece[data-piece="rook"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23794633" stroke="%23000" stroke-width="1.5"><path d="M9 39h27v-3H9v3zM12 36v-4h21v4H12zM11 14V9h4v2h5V9h5v2h5V9h4v5"/><path d="M34 14l-3 3H14l-3-3"/><path d="M31 17v12.5H14V17"/></g></svg>'); }
.piece.orange-piece[data-piece="bishop"] { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23794633" stroke="%23000" stroke-width="1.5"><path d="M20 8h5V6h-5v2zM11 39h23v-4H11v4z"/><path d="M22.5 8.5c0-3-3-3-3-3s-3 0-3 3 3 3 3 3 3 0 3-3zM22.5 36c8-2.5 8-11.5 3-18.5 0 0-1.5-3-3-3s-3 3-3 3c-5 7-5 16 3 18.5z"/><circle cx="22.5" cy="15" r="2.5"/></g></svg>'); }
.piece.orange-piece[data-piece="knight"] { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23794633" stroke="%23000" stroke-width="1.5"><path d="M11 39h23v-4H11v4z"/><path d="M22 10c10.5 1 16.5 8 16 29H15c0-9 10-6.5 8-21"/><path d="M24 18c.38 2.91-5.55 7.37-8 9-3 2-2.82 4.34-5 4-1.042-.94 1.41-3.04 0-3-1 0 .19 1.23-1 2-1 0-4.003 1-4-4 0-2 6-12 6-12s1.89-1.9 2-3.5c-.73-.994-.5-2-.5-3 1-1 3 2.5 3 2.5h2s.78-1.992 2.5-3c1 0 1 3 1 3"/></g></svg>'); }
.piece.orange-piece[data-piece="pawn"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23794633" stroke="%23000" stroke-width="1.5"><path d="M22.5 9c-2.21 0-4 1.79-4 4 0 .89.29 1.71.78 2.38C17.33 16.5 16 18.59 16 21c0 2.03.94 3.84 2.41 5.03-3 1.06-7.41 5.55-7.41 13.47h23c0-7.92-4.41-12.41-7.41-13.47 1.47-1.19 2.41-3 2.41-5.03 0-2.41-1.33-4.5-3.28-5.62.49-.67.78-1.49.78-2.38 0-2.21-1.79-4-4-4z"/></g></svg>'); }

/* BRONZE PIECES (alias for orange - same as orange-piece) */
.piece.bronze-piece[data-piece="king"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23794633" stroke="%23000" stroke-width="1.5"><path d="M22.5 11.63V6M20 8h5M22.5 25s4.5-7.5 3-10.5c0 0-1-2.5-3-2.5s-3 2.5-3 2.5c-1.5 3 3 10.5 3 10.5"/><path d="M11.5 37c5.5 3.5 15.5 3.5 21 0v-7s9-4.5 6-10.5c-4-6.5-13.5-3.5-16 4V23.5c0-2.5-2.5-4-2.5-4s-2.5 1.5-2.5 4v.5c-2.5-7.5-12-10.5-16-4-3 6 5 10 5 10V37z"/></g></svg>'); }
.piece.bronze-piece[data-piece="queen"]  { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23794633" stroke="%23000" stroke-width="1.5"><path d="M8 12a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM24.5 7.5a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM41 12a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM16 8.5a2 2 0 1 1-4 0 2 2 0 1 1 4 0zM33 9a2 2 0 1 1-4 0 2 2 0 1 1 4 0z"/><path d="M9 26c8.5-1.5 21-1.5 27 0l2-12-7 11V11l-5.5 13.5-3-15-3 15-5.5-13.5V25L7 14l2 12z"/><path d="M9 26c0 2 1.5 2 2.5 4 1 1.5 1 1 .5 3.5-1.5 1-1.5 2.5-1.5 2.5-1.5 1.5.5 2.5.5 2.5 6.5 1 16.5 1 23 0 0 0 1.5-1 0-2.5 0 0 .5-1.5-1-2.5-.5-2.5-.5-2 .5-3.5 1-2 2.5-2 2.5-4-8.5-1.5-18.5-1.5-27 0z"/></g></svg>'); }
.piece.bronze-piece[data-piece="rook"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23794633" stroke="%23000" stroke-width="1.5"><path d="M9 39h27v-3H9v3zM12 36v-4h21v4H12zM11 14V9h4v2h5V9h5v2h5V9h4v5"/><path d="M34 14l-3 3H14l-3-3"/><path d="M31 17v12.5H14V17"/></g></svg>'); }
.piece.bronze-piece[data-piece="bishop"] { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23794633" stroke="%23000" stroke-width="1.5"><path d="M20 8h5V6h-5v2zM11 39h23v-4H11v4z"/><path d="M22.5 8.5c0-3-3-3-3-3s-3 0-3 3 3 3 3 3 3 0 3-3zM22.5 36c8-2.5 8-11.5 3-18.5 0 0-1.5-3-3-3s-3 3-3 3c-5 7-5 16 3 18.5z"/><circle cx="22.5" cy="15" r="2.5"/></g></svg>'); }
.piece.bronze-piece[data-piece="knight"] { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23794633" stroke="%23000" stroke-width="1.5"><path d="M11 39h23v-4H11v4z"/><path d="M22 10c10.5 1 16.5 8 16 29H15c0-9 10-6.5 8-21"/><path d="M24 18c.38 2.91-5.55 7.37-8 9-3 2-2.82 4.34-5 4-1.042-.94 1.41-3.04 0-3-1 0 .19 1.23-1 2-1 0-4.003 1-4-4 0-2 6-12 6-12s1.89-1.9 2-3.5c-.73-.994-.5-2-.5-3 1-1 3 2.5 3 2.5h2s.78-1.992 2.5-3c1 0 1 3 1 3"/></g></svg>'); }
.piece.bronze-piece[data-piece="pawn"]   { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45"><g fill="%23794633" stroke="%23000" stroke-width="1.5"><path d="M22.5 9c-2.21 0-4 1.79-4 4 0 .89.29 1.71.78 2.38C17.33 16.5 16 18.59 16 21c0 2.03.94 3.84 2.41 5.03-3 1.06-7.41 5.55-7.41 13.47h23c0-7.92-4.41-12.41-7.41-13.47 1.47-1.19 2.41-3 2.41-5.03 0-2.41-1.33-4.5-3.28-5.62.49-.67.78-1.49.78-2.38 0-2.21-1.79-4-4-4z"/></g></svg>'); }

/* =================================================================
   FOG OF WAR FEATURE
   ================================================================= */

/* Hidden tiles - medium desaturation of original colors */
.hex-cell.fog-hidden .hex-content {
    filter: grayscale(50%) brightness(0.6);
}

/* Prevent interaction with fog-hidden cells */
.hex-cell.fog-hidden {
    pointer-events: none;
    cursor: not-allowed;
}

.hex-cell.fog-hidden * {
    pointer-events: none !important;
}

/* Hide pieces in fogged areas */
.hex-cell.fog-hidden .piece {
    display: none;
}

/* Game over states - remove fog effects completely */
.game-over .hex-cell.fog-hidden .hex-content,
.game-ended .hex-cell.fog-hidden .hex-content,
body.game-over .hex-cell.fog-hidden .hex-content {
    filter: none !important;
}

.game-over .hex-cell.fog-hidden,
.game-ended .hex-cell.fog-hidden,
body.game-over .hex-cell.fog-hidden {
    pointer-events: auto !important;
}

/* Debug mode - show hidden tiles with border */
.fog-debug-mode .hex-cell.fog-hidden .hex-content {
    border: 2px dashed #666 !important;
    opacity: 0.4;
}

/* Enhanced move highlighting for fog games */
.fog-of-war-enabled .hex-cell.valid-move {
    box-shadow: inset 0 0 0 3px rgba(76, 175, 80, 0.8) !important;
    background-color: rgba(76, 175, 80, 0.2) !important;
}

.fog-of-war-enabled .hex-cell.capture-square {
    box-shadow: inset 0 0 0 3px rgba(244, 67, 54, 0.8) !important;
    background-color: rgba(244, 67, 54, 0.2) !important;
}

/* Fog game indicator */
.fog-of-war-indicator {
    background: linear-gradient(45deg, #444, #666);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    display: inline-block;
    margin: 5px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    border: 1px solid #555;
}

.fog-of-war-indicator::before {
    content: "🌫️ ";
}

/* Game options display */
.game-options {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.game-option-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    border: 1px solid #bbdefb;
}

.game-option-badge.fog-of-war {
    background: #f3e5f5;
    color: #7b1fa2;
    border-color: #ce93d8;
}

.game-option-badge.shogi-drops {
    background: #e8f5e8;
    color: #388e3c;
    border-color: #a5d6a7;
}

/* Debug mode toggle */
.fog-debug-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    z-index: 999;
}

.fog-debug-toggle:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Enhanced fog debug interface */
.fog-debug-panel {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 12px;
    z-index: 1000;
    min-width: 200px;
    backdrop-filter: blur(5px);
}

.fog-debug-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    margin-left: auto;
    display: block;
    margin-bottom: 8px;
}

.fog-debug-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.fog-debug {
    margin-top: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.4;
    color: #bbb;
}

.fog-debug-stat {
    margin: 2px 0;
}

.fog-hidden-piece {
    color: #999999;
    font-weight: bold;
}

/* NOTIFICATIONS */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left-color: #2ecc71;
}

.notification.info {
    border-left-color: #3498db;
}

.notification.warning {
    border-left-color: #f39c12;
}

.notification.error {
    border-left-color: #e74c3c;
}

.notification-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.notification-message {
    font-size: 12px;
    opacity: 0.9;
}

/* DEMO PAGE STYLING */
.piece-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    margin-bottom: 8px;
}

.piece-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.piece-nav-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    transform: translateY(-1px);
}

.piece-desc {
    display: none;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.piece-desc.active {
    display: block;
    background: rgba(102, 126, 234, 0.1);
    border-left-color: #2ecc71;
}

.piece-desc h4 {
    color: #2ecc71;
    margin-bottom: 8px;
    font-size: 16px;
}

/* DROPS OPTION */
.drops-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.drops-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.drops-option input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.drops-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin-top: 8px;
    font-style: italic;
}

/* =================================================================
   GAME VARIANTS UI
   ================================================================= */

.game-variants {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    margin-top: 5px;
}

.variant-option {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.variant-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.variant-option:last-child {
    margin-bottom: 0;
}

.variant-option input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #667eea;
}

.variant-label {
    flex: 1;
    cursor: pointer;
    line-height: 1.3;
    font-size: 14px;
    font-weight: 500;
}

.variant-description {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 3px;
    line-height: 1.2;
}

/* =================================================================
   GAME END STATES
   ================================================================= */

.checkmate-display {
    font-size: 18px;
    font-weight: 600;
    color: #f8f9fa;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 16px 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    margin: 8px 0;
}

/* =================================================================
   ANIMATIONS
   ================================================================= */

/* Piece reveal animation for fog of war */
@keyframes piece-reveal {
    from {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.piece.newly-visible {
    animation: piece-reveal 0.3s ease-out;
}

/* Loading states for fog updates */
.board-updating {
    opacity: 0.7;
    transition: opacity 0.2s;
}

.piece.updating {
    opacity: 0.5;
    transition: opacity 0.1s;
}

/* =================================================================
   ACCESSIBILITY & PERFORMANCE
   ================================================================= */

/* High DPI rendering optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .piece {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .piece.newly-visible {
        animation: none;
    }
    
    .piece, .hex-cell {
        transition: none;
    }
    
    .hex-cell.valid-move,
    .hex-cell.king-in-check,
    .hex-cell.capture-square {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hex-cell.valid-move .hex-content {
        border-width: 4px;
    }

    .piece {
        filter: contrast(1.3) brightness(1.1);
    }
    
    .fog-debug-mode .hex-cell.fog-hidden {
        border: 3px solid #000 !important;
        background-color: #111 !important;
    }
}
/* =================================================================
   DEMO PAGE CENTERED LAYOUT
   ================================================================= */

/* Desktop demo centering */
body[data-page="demo"] .game-area {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
  gap: 40px;
}

body[data-page="demo"] .game-sidebar {
  max-width: 320px;
}

body[data-page="demo"] .game-main {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Mobile demo - small board, no need for extra space */
@media (max-width: 768px) {
  /* Prevent page from being wider than viewport */
  body[data-page="demo"] {
    overflow-x: hidden;
    max-width: 100vw;
  }
  
  /* Center both child elements with no gap */
  body[data-page="demo"] .game-area {
    flex-direction: column;
//    align-items: center; /* Center children horizontally */
    align-items: flex-start;
    padding: 0;
    gap: 0; /* No gap between control box and board */
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  body[data-page="demo"] .game-sidebar {
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: none;
    order: 1;
    box-sizing: border-box;
  }
  
  body[data-page="demo"] .game-main {
    width: 100%;
    max-width: 100vw;
    padding: 10px 0; /* Small vertical padding only */
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    order: 2;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    min-height: auto;
    overflow: hidden;
    box-sizing: border-box;
  }
  
  /* Remove any margin from the hex-board itself on demo page */
  body[data-page="demo"] .hex-board {
    margin: 0 auto !important; /* Override any other margins */
  }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
  body[data-page="demo"] .game-area {
    flex-direction: row;
    justify-content: stretch;
    align-items: stretch;
    gap: 0;
    padding: 0; /* Remove padding here too */
  }
  
  body[data-page="demo"] .game-sidebar {
    width: 200px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  body[data-page="demo"] .game-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
  }
}