/* ============================================
   TRAINER — Adversaire Virtuel
   Hérite de style.css, ajoute les overrides
   ============================================ */
@import url('./style.css');

/* ===== MASQUER LES ÉLÉMENTS ANALYSIS ===== */
.clock { display: none !important; }

/* ===== COLOR SELECTOR OVERLAY ===== */
#color-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(18, 18, 18, 0.95);
    z-index: 100;
    border-radius: 4px;
    gap: 20px;
}

#color-selector h3 {
    color: #ccc;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#engine-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

#engine-loading .loader {
    width: 28px;
    height: 28px;
    border: 3px solid #444;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.color-choices {
    display: flex;
    gap: 16px;
}

.color-choice {
    width: 80px;
    height: 80px;
    border: 3px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background: none;
    padding: 0;
    overflow: hidden;
}

.color-choice:hover {
    border-color: var(--accent);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.color-choice svg {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 5px;
}

/* ===== GAME OVER OVERLAY ===== */
#gameover-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(18, 18, 18, 0.92);
    z-index: 100;
    border-radius: 4px;
    gap: 16px;
}

#gameover-icon {
    font-size: 48px;
    line-height: 1;
}

#gameover-text {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    padding: 0 16px;
}

.gameover-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.gameover-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: var(--accent);
    color: #fff;
    transition: opacity 0.2s ease;
}

.gameover-btn:hover {
    opacity: 0.85;
}

.gameover-btn-secondary {
    background: #444;
    color: #ccc;
}

/* ===== SETTINGS PANELS ===== */
#difficulty-panel,
#movetime-panel,
#legalmoves-panel,
#hint-panel {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #333;
}

#difficulty-panel label,
#movetime-panel label,
#legalmoves-panel label,
#hint-panel label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

#difficulty-panel label,
#movetime-panel label {
    margin-bottom: 8px;
}

/* ===== TOGGLE BUTTON ===== */
.toggle-btn {
    width: 36px;
    height: 20px;
    border-radius: 10px;
    border: none;
    background: #444;
    cursor: pointer;
    position: relative;
    transition: background 0.2s ease;
    padding: 0;
}

.toggle-btn::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #aaa;
    transition: all 0.2s ease;
}

.toggle-btn.active {
    background: var(--accent);
}

.toggle-btn.active::after {
    left: 18px;
    background: #fff;
}

#difficulty-value,
#movetime-value {
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
    text-transform: none;
}

#difficulty-slider,
#movetime-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #333;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

#difficulty-slider::-webkit-slider-thumb,
#movetime-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

#difficulty-slider::-moz-range-thumb,
#movetime-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
}

/* ===== PLAYER INFO — alignement gauche + hauteur fixe (clock masquée) ===== */
.player-info {
    justify-content: flex-start !important;
    min-height: 32px;
}

/* ===== MOVE HISTORY (non-cliquable) ===== */
.move-item {
    cursor: default !important;
}
.move-item:hover {
    background: transparent !important;
}

/* ===== ENGINE LOG TOGGLE ===== */
#engine-log {
    display: none;
}

#engine-log.open {
    display: block;
}

.log-toggle {
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.log-toggle:hover {
    color: var(--accent);
}

#log-toggle-icon {
    font-size: 9px;
    display: inline-block;
    transition: transform 0.2s ease;
    vertical-align: middle;
}

#log-toggle-icon.open {
    transform: rotate(90deg);
}

/* ===== EXPORT BUTTONS ===== */
.export-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0 0;
}

.export-label {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 52px;
    flex-shrink: 0;
}

.export-buttons {
    display: flex;
    gap: 8px;
    flex: 1;
}

.export-btn {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #333;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: #aaa;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.export-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: var(--accent);
}

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 899px) {
    .color-choice {
        width: 70px;
        height: 70px;
    }
}
