/* ===== RESET & VARIABLES ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #1c2333;
    --bg-card: #1c2333;
    --bg-card-hover: #242d3d;
    --bg-input: #0d1117;
    --border-primary: #30363d;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #484f58;
    --accent: #58a6ff;
    --accent-green: #3fb950;
    --accent-orange: #d29922;
    --accent-red: #f85149;
    --accent-purple: #bc8cff;
    --accent-glow: rgba(88, 166, 255, 0.15);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, Oxygen, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== LOGIN SCREEN ===== */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
}

.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.login-card h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.5;
}

.login-card .auth-loading {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.login-card #login-google-btn {
    display: inline-flex;
    justify-content: center;
    margin-bottom: 12px;
}

.login-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1520px;
    margin: 0 auto;
    padding: 20px 24px;
}

/* ===== HEADER ===== */
header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Auth section (header right) ── */
.auth-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-loading {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.auth-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border-primary);
}

.user-name {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-btn {
    background: transparent;
    border: 1px solid var(--border-primary);
    color: var(--text-muted);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition);
}

.logout-btn:hover {
    color: var(--accent-red);
    border-color: var(--accent-red);
}

.usage-badge {
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--accent-green);
    background: rgba(63, 185, 80, 0.1);
    border: 1px solid rgba(63, 185, 80, 0.25);
    padding: 3px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.usage-badge.usage-exhausted {
    color: var(--accent-red);
    background: rgba(248, 81, 73, 0.1);
    border-color: rgba(248, 81, 73, 0.25);
}

/* ===== INPUT SECTION ===== */
.input-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
}

.pgn-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

#pgn-input {
    flex: 1;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.85rem;
    resize: vertical;
    min-height: 44px;
    max-height: 120px;
    transition: border-color var(--transition);
    line-height: 1.5;
}

#pgn-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

#pgn-input::placeholder { color: var(--text-muted); }

.pgn-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pgn-actions button {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.pgn-actions button:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.pgn-actions button:disabled { opacity: 0.4; cursor: not-allowed; }

#load-btn {
    background: var(--accent) !important;
    color: #000 !important;
    border-color: var(--accent) !important;
    font-weight: 600;
    padding: 8px 20px !important;
}

#load-btn:hover {
    background: #79c0ff !important;
    box-shadow: 0 0 16px var(--accent-glow);
}

.input-options {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.input-options label { font-weight: 500; white-space: nowrap; }

#start-move-input,
.input-options input[type="number"] {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    width: 70px;
    font-size: 0.85rem;
    text-align: center;
    transition: border-color var(--transition);
}

#start-move-input:focus,
.input-options input[type="number"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ===== MAIN LAYOUT ===== */
.main-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* ===== SIDEBAR ===== */
.games-sidebar {
    width: 260px;
    min-width: 260px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
    max-height: 680px;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 14px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-search { display: flex; gap: 8px; }

#chesscom-username,
.sidebar-search input {
    flex: 1;
    min-width: 0;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    font-size: 0.82rem;
    transition: border-color var(--transition);
}

#chesscom-username:focus,
.sidebar-search input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

#chesscom-username::placeholder,
.sidebar-search input::placeholder { color: var(--text-muted); }

#chesscom-load-btn,
.sidebar-search button {
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

#chesscom-load-btn:hover,
.sidebar-search button:hover { background: #79c0ff; }

#chesscom-load-btn:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
}

.sidebar-status {
    font-size: 0.78rem;
    color: var(--text-muted);
    min-height: 0;
    text-align: center;
}

.sidebar-filters { display: flex; flex-direction: column; gap: 5px; }

.sidebar-filters select {
    width: 100%;
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    padding: 5px 8px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: border-color var(--transition);
}

.sidebar-filters select:focus { outline: none; border-color: var(--accent); }

.sidebar-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.sidebar-pagination button {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    padding: 3px 10px;
    cursor: pointer;
    font-size: 0.78rem;
    transition: all var(--transition);
}

.sidebar-pagination button:hover:not(:disabled) {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.sidebar-pagination button:disabled {
    background: var(--bg-secondary);
    color: var(--text-muted);
    border-color: var(--border-subtle);
    cursor: default;
}

#sidebar-page-label { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }

.games-list {
    overflow-y: auto;
    flex: 1;
    max-height: 520px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.game-item {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
    margin-bottom: 2px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.game-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-primary);
}

.game-item.active {
    background: var(--accent-glow);
    border-color: var(--accent);
}

.game-item-players {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
}

.game-item-format { font-size: 0.68rem; color: var(--text-muted); text-transform: capitalize; }

.game-result {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    letter-spacing: 0.03em;
}

.game-result.win  { background: rgba(63, 185, 80, 0.15); color: var(--accent-green); }
.game-result.loss { background: rgba(248, 81, 73, 0.15); color: var(--accent-red); }
.game-result.draw { background: rgba(210, 153, 34, 0.15); color: var(--accent-orange); }

.game-item-date { font-size: 0.68rem; color: var(--text-muted); }

/* ===== BOARD SECTION ===== */
.board-section {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.board-with-eval {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

/* ── Board square colours (chessboard.js overrides) ── */
#board .white-1e1d7 {
    background-color: #c8b07a !important;
    color: #6b4e2e !important;
}

#board .black-3c85d {
    background-color: #7a5430 !important;
    color: #c8b07a !important;
}

/* ── Last-move highlight on board squares ── */
#board .highlight-from.white-1e1d7,
#board .highlight-to.white-1e1d7 {
    background-color: #d4a84b !important;
    box-shadow: inset 0 0 0 2.5px rgba(180, 120, 20, 0.5);
}

#board .highlight-from.black-3c85d,
#board .highlight-to.black-3c85d {
    background-color: #a67628 !important;
    box-shadow: inset 0 0 0 2.5px rgba(180, 120, 20, 0.5);
}

/* Eval bar */
.eval-bar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 480px;
    width: 36px;
    min-width: 36px;
    flex-shrink: 0;
}

.eval-bar {
    width: 22px;
    flex: 1;
    background: linear-gradient(to top, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 11px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-primary);
    display: flex;
    flex-direction: column-reverse;
}

.eval-fill {
    width: 100%;
    height: 50%;
    background: #e8e8e8;
    border-radius: 0 0 9px 9px;
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#eval-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    font-family: 'SF Mono', 'Fira Code', monospace;
    min-width: 3.5em;
    text-align: center;
    white-space: nowrap;
}

/* Board overrides */
#board {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-primary);
}

/* Nav controls */
.nav-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.nav-controls button {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
}

.nav-controls button:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

#move-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 100px;
    text-align: center;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ===== ANALYSIS SECTION ===== */
.analysis-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fen-display {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    word-break: break-all;
    user-select: all;
    cursor: text;
}

/* Status bar */
.status-bar {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    font-style: italic;
}

.status-bar.loading {
    color: var(--accent-orange);
    border-color: var(--accent-orange);
    animation: pulse 1.5s ease-in-out infinite;
}

.status-bar.ok   { color: var(--accent-green); border-color: var(--accent-green); }
.status-bar.error { color: var(--accent-red);   border-color: var(--accent-red); }

/* Analyze button */
.analyze-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-green) 0%, #2ea043 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.01em;
    box-shadow: 0 2px 8px rgba(63, 185, 80, 0.25);
}

.analyze-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(63, 185, 80, 0.35);
}

.analyze-btn:active { transform: translateY(0); }

.analyze-btn:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 2px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 3px;
    border: 1px solid var(--border-primary);
}

.tab {
    flex: 1;
    background: transparent;
    color: var(--text-muted);
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.tab:hover {
    color: var(--text-secondary);
    background: var(--bg-tertiary);
}

.tab.active {
    background: var(--accent);
    color: #000;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.tab.tab-feedback { margin-left: auto; flex: unset; }
.tab.tab-feedback.active { background: var(--accent-purple); }

/* Tab content */
.tab-content {
    display: none;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: 16px;
    min-height: 180px;
    max-height: 400px;
    overflow-y: auto;
}

.tab-content.active { display: block; }

/* Info blocks */
.info-block {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.gpt-block {
    background: transparent;
    border: none;
    line-height: 1.7;
    color: var(--text-secondary);
    display: none;
}

/* Analysis text */
.analysis-text {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

#gpt-text { line-height: 1.7; font-size: 0.88rem; }

h3 {
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin: 12px 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.muted { color: var(--text-muted); font-style: italic; }

/* GPT controls */
.gpt-controls { margin-bottom: 12px; }

#api-key-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: monospace;
    font-size: 0.85rem;
}

/* ===== MOVE CLASSIFICATION BADGES ===== */
.move-classification-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    background: var(--bg-tertiary);
    border-left: 4px solid var(--cls-color, #666);
    position: relative;
}

.move-classification-badge .cls-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--cls-color, var(--text-primary));
}

.move-classification-badge .cls-symbol {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--cls-color, var(--text-primary));
    opacity: 0.8;
}

.move-classification-badge .cls-details {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-left: auto;
}

.move-classification-badge .cls-move {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.move-classification-badge .cls-best {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.move-classification-badge .cls-best strong { color: var(--accent-green); }

.move-classification-badge .cls-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: 3px;
    white-space: nowrap;
}

/* ── "Last move" badge (prev) — primary, prominent ── */
#prev-move-classification-badge {
    background: linear-gradient(135deg, var(--bg-tertiary), rgba(88, 166, 255, 0.06));
    border-left-width: 4px;
}

#prev-move-classification-badge .cls-tag {
    color: var(--accent);
    background: rgba(88, 166, 255, 0.12);
    border: 1px solid rgba(88, 166, 255, 0.25);
}

/* ── "Next move" badge — secondary, distinct ── */
#next-move-classification-badge {
    background: linear-gradient(135deg, var(--bg-tertiary), rgba(188, 140, 255, 0.06));
    border-left-width: 4px;
    padding: 8px 12px;
    margin-bottom: 6px;
}

#next-move-classification-badge .cls-tag {
    color: var(--accent-purple);
    background: rgba(188, 140, 255, 0.12);
    border: 1px solid rgba(188, 140, 255, 0.25);
}

#next-move-classification-badge .cls-move  { font-size: 0.85rem; }
#next-move-classification-badge .cls-label { font-size: 0.88rem; }
#next-move-classification-badge .cls-details { font-size: 0.72rem; }

/* ===== FEEDBACK ===== */
.feedback-section { padding: 16px 0 0 0; }

.feedback-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feedback-hint {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-style: italic;
    margin-top: 8px;
}

.feedback-form { display: flex; flex-direction: column; gap: 10px; }

.feedback-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    flex-wrap: wrap;
}

.feedback-row label { color: var(--text-secondary); font-weight: 500; white-space: nowrap; }

.feedback-row select,
.feedback-row input[type="number"],
.feedback-row input {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    font-size: 0.82rem;
    transition: border-color var(--transition);
}

.feedback-row select:focus,
.feedback-row input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

#feedback-text {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 0.85rem;
    font-family: inherit;
    resize: vertical;
    line-height: 1.5;
    transition: border-color var(--transition);
}

#feedback-text:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

#feedback-text::placeholder { color: var(--text-muted); }

.feedback-actions { display: flex; align-items: center; gap: 12px; }

#feedback-submit-btn {
    background: var(--accent-purple);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

#feedback-submit-btn:hover { opacity: 0.85; transform: translateY(-1px); }

#feedback-submit-btn:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.feedback-status { font-size: 0.78rem; color: var(--accent-green); }
.feedback-status.error { color: var(--accent-red); }

/* ===== MOVE LIST ===== */
.move-list-section {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-primary);
}

.move-list-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.move-list {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 4px;
    max-height: 140px;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.82rem;
}

.move-number {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 4px;
}

.move-san {
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition);
    border: 1px solid transparent;
}

.move-san:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-primary);
}

.move-san.active {
    background: var(--accent);
    color: #000;
    font-weight: 600;
    border-color: var(--accent);
}

.move-san.analyzed { color: var(--accent-green); }
.move-san.analyzed.active { color: #000; }

/* Alias for move-btn */
.move-list .move-btn {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.78rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    cursor: pointer;
    transition: all var(--transition);
}

.move-list .move-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-primary);
}

.move-list .move-btn.active {
    background: var(--accent);
    color: #000;
    font-weight: 600;
    border-color: var(--accent);
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading { animation: pulse 1.5s ease-in-out infinite; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .main-layout { flex-wrap: wrap; }
    .games-sidebar { width: 100%; min-width: unset; max-height: 300px; }
}

@media (max-width: 768px) {
    .container { padding: 12px; }
    #board { width: 320px !important; }
    .eval-bar, .eval-bar-container { height: 320px; }
    .pgn-row { flex-direction: column; }
    .pgn-actions { justify-content: flex-end; }
}
