/* Aura Chess - Custom Board Styles - Fixed v2 */
.cm-chessboard .markers .marker.hint-marker { 
    fill: #ff3b30 !important; 
    opacity: 0.7 !important; 
}

.cm-chessboard .arrow.arrow-user-blue .arrow-head { fill: #007aff !important; }
.cm-chessboard .arrow.arrow-user-blue .arrow-line { stroke: #007aff !important; opacity: 0.7 !important; }

/* Themes */
.aura-theme-default .white-1e1d7, .aura-theme-default .white-b0267 { background-color: #DEE3E6 !important; }
.aura-theme-default .black-3c85d, .aura-theme-default .black-b0267 { background-color: #8CA2AD !important; }

/* ... Rest of the file content ... */
/* I will restore the full content properly now */

.chessboard-container {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    overflow: hidden;
}

/* --- Board Themes (Global Overrides) --- */
/* Note: These classes are applied to the body or container by theme-sync.js */

/* Default (Ice Blue) */
.aura-theme-default .white-1e1d7, .aura-theme-default .white-b0267 { background-color: #DEE3E6 !important; }
.aura-theme-default .black-3c85d, .aura-theme-default .black-b0267 { background-color: #8CA2AD !important; }

/* Green */
.aura-theme-green .white-1e1d7 { background-color: #EBECD0 !important; }
.aura-theme-green .black-3c85d { background-color: #779556 !important; }

/* Deep Blue */
.aura-theme-blue .white-1e1d7 { background-color: #DEE3E6 !important; }
.aura-theme-blue .black-3c85d { background-color: #5888B0 !important; }

/* Chess Club */
.aura-theme-chess-club .white-1e1d7 { background-color: #E6DDBB !important; }
.aura-theme-chess-club .black-3c85d { background-color: #AF8E65 !important; }

/* Wood (Chessboard.js default) */
.aura-theme-chessboard-js .white-1e1d7 { background-color: #f0d9b5 !important; }
.aura-theme-chessboard-js .black-3c85d { background-color: #b58863 !important; }

/* Black and White */
.aura-theme-black-and-white .white-1e1d7 { background-color: #ECECEC !important; }
.aura-theme-black-and-white .black-3c85d { background-color: #7D7D7D !important; }

/* Standard Fallback (If no theme class on body) */
.white-1e1d7 { background-color: #DEE3E6 !important; }
.black-3c85d { background-color: #8CA2AD !important; }

/* Legal move highlights */
.highlight-legal {
    position: relative;
}

.highlight-legal::before {
    content: '';
    position: absolute;
    width: 26%;
    height: 26%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(129, 182, 76, 0.7);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.highlight-legal.capture::before {
    width: 80%;
    height: 80%;
    background: transparent;
    border: 4px solid rgba(129, 182, 76, 0.8);
}

/* Selected square */
.highlight-selected {
    background: rgba(240, 214, 84, 0.6) !important;
    box-shadow: inset 0 0 3px 1px rgba(240, 214, 84, 0.9);
}

/* Last move highlight */
.highlight-lastmove {
    background: rgba(255, 183, 77, 0.4) !important;
}

/* Piece images - ensure proper sizing */
.piece-417db {
    width: 100% !important;
    height: 100% !important;
}

/* Board notation */
.notation-322f9 {
    color: rgba(0, 0, 0, 0.5);
    font-size: 11px;
    font-weight: 600;
}

/* Hot-reloading subtle transition */
#analyzerBoard, #trainingBoard, .cm-chessboard {
    transition: opacity 0.1s ease-in-out;
}
.hot-reloading {
    opacity: 0.85;
}

/* ── Standardized Drawing Tools (Shared) ── */

.cm-chessboard .arrow-line {
    stroke-linecap: round;
    stroke-width: 15px;
}

.cm-chessboard .arrow-success .arrow-head { fill: #00C8FF; transform: scale(3); transform-origin: center; }
.cm-chessboard .arrow-success .arrow-line { stroke: #00C8FF; opacity: 0.6; stroke-width: 14px; }

.cm-chessboard .arrow.arrow-user-green .arrow-head { fill: #81b64c; }
.cm-chessboard .arrow.arrow-user-green .arrow-line { stroke: #81b64c; opacity: 0.65; stroke-width: 14px; }

.cm-chessboard .arrow.arrow-user-red .arrow-head { fill: #f44336; }
.cm-chessboard .arrow.arrow-user-red .arrow-line { stroke: #f44336; opacity: 0.65; stroke-width: 14px; }

.cm-chessboard .arrow.arrow-user-blue .arrow-head { fill: #2196f3; }
.cm-chessboard .arrow.arrow-user-blue .arrow-line { stroke: #2196f3; opacity: 0.65; stroke-width: 14px; }

.cm-chessboard .arrow.arrow-user-orange .arrow-head { fill: #ff9800; }
.cm-chessboard .arrow.arrow-user-orange .arrow-line { stroke: #ff9800; opacity: 0.65; stroke-width: 14px; }

.cm-chessboard .arrow.arrow-user-purple .arrow-head { fill: #9c27b0; }
.cm-chessboard .arrow.arrow-user-purple .arrow-line { stroke: #9c27b0; opacity: 0.65; stroke-width: 14px; }

.cm-chessboard .arrow.arrow-user-cyan .arrow-head { fill: #00bcd4; }
.cm-chessboard .arrow.arrow-user-cyan .arrow-line { stroke: #00bcd4; opacity: 0.65; stroke-width: 14px; }

/* User Circles & Squares */
.cm-chessboard .markers .marker[class*="arrow-user-"] {
    stroke-width: 2px;
    opacity: 0.5;
}
.cm-chessboard .markers .marker.arrow-user-green { stroke: #81b64c; fill: #81b64c; }
.cm-chessboard .markers .marker.arrow-user-red { stroke: #f44336; fill: #f44336; }
.cm-chessboard .markers .marker.arrow-user-blue { stroke: #2196f3; fill: #2196f3; }
.cm-chessboard .markers .marker.arrow-user-orange { stroke: #ff9800; fill: #ff9800; }
.cm-chessboard .markers .marker.arrow-user-purple { stroke: #9c27b0; fill: #9c27b0; }
.cm-chessboard .markers .marker.arrow-user-cyan { stroke: #00bcd4; fill: #00bcd4; }

/* ── Legal Moves Markers (Solid Grey Dot & Captured Bevel) ── */
.cm-chessboard .markers .marker {
    pointer-events: none; /* Ensure markers do not intercept left clicks intended for the board! */
}
.cm-chessboard .markers .marker[data-marker-type="dot"],
.cm-chessboard .markers .marker-dot {
    fill: #000000 !important;
    opacity: 0.25 !important;
}
.cm-chessboard .markers .marker[data-marker-type="bevel"],
.cm-chessboard .markers .marker-bevel {
    fill: none !important;
    stroke: #000000 !important;
    stroke-width: 5px !important;
    opacity: 0.25 !important;
}

/* Evaluation Bar & Best Move Arrows are also standardized here */

/* ── Engine Best Move Arrow ── */
/* Uses the library's built-in .arrow-success class (already styled as Cyan #00C8FF above on L109-110) */


/* The Destination Glow (Pulsing Marker) */
.cm-chessboard .markers .marker.aura-best-move-glow {
    fill: none;
    stroke: #00BFFF !important;
    stroke-width: 4px;
    opacity: 0.8;
    animation: aura-bestmove-pulse 2s infinite;
}

@keyframes aura-bestmove-pulse {
    0% { opacity: 0.4; stroke-width: 3px; }
    50% { opacity: 0.8; stroke-width: 6px; }
    100% { opacity: 0.4; stroke-width: 3px; }
}
