/* ===== CSS Variables ===== */
:root {
    --bg-primary: #0a0f1a;
    --bg-secondary: #141b2d;
    --bg-tertiary: #1e2942;
    --board-green: #1a5a1a;
    --board-green-light: #2d7a2d;
    --accent-gold: #ffd700;
    --accent-blue: #4da6ff;
    --accent-purple: #9b59b6;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --stone-black: #1a1a1a;
    --stone-white: #f0f0f0;
    --valid-move: rgba(77, 166, 255, 0.4);
    --hint-color: rgba(255, 215, 0, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(77, 166, 255, 0.3);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, #0d1929 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(77, 166, 255, 0.1) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.logo-icon {
    font-size: 48px;
    background: linear-gradient(135deg, var(--stone-white), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.3));
}

.logo h1 {
    font-size: 72px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
}

.tagline {
    font-size: 24px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 48px;
}

.nav-pills {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-pill {
    padding: 12px 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-pill:hover,
.nav-pill.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(77, 166, 255, 0.3);
}

/* Floating stones animation */
.hero-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.floating-stone {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.floating-stone.black {
    background: radial-gradient(circle at 30% 30%, #444, var(--stone-black));
    top: 20%;
    left: 10%;
    box-shadow: inset -5px -5px 15px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.5);
}

.floating-stone.white {
    background: radial-gradient(circle at 30% 30%, #fff, #ccc);
    top: 30%;
    right: 15%;
    animation-delay: -2s;
    box-shadow: inset -5px -5px 15px rgba(0, 0, 0, 0.2), 0 10px 30px rgba(0, 0, 0, 0.3);
}

.floating-stone.delay {
    top: 60%;
    left: 20%;
    width: 40px;
    height: 40px;
    animation-delay: -4s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(10deg);
    }
}

/* ===== Sections ===== */
.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--bg-secondary);
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Rules Section ===== */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.rule-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.rule-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-glow);
}

.rule-number {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.rule-card h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.rule-demo {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.rule-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

.demo-btn {
    margin-top: 12px;
    padding: 8px 16px;
    background: var(--accent-blue);
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.demo-btn:hover {
    background: var(--accent-gold);
    color: var(--bg-primary);
}

/* Mini board for demos */
.mini-board {
    display: grid;
    grid-template-columns: repeat(4, 28px);
    grid-template-rows: repeat(4, 28px);
    gap: 2px;
    background: var(--board-green);
    padding: 4px;
    border-radius: 8px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.mini-cell {
    background: var(--board-green-light);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-stone {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.mini-stone.black {
    background: radial-gradient(circle at 30% 30%, #444, var(--stone-black));
    box-shadow: inset -2px -2px 5px rgba(0, 0, 0, 0.8);
}

.mini-stone.white {
    background: radial-gradient(circle at 30% 30%, #fff, #ccc);
    box-shadow: inset -2px -2px 5px rgba(0, 0, 0, 0.2);
}

/* Score display */
.score-display {
    display: flex;
    align-items: center;
    gap: 20px;
}

.score {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--glass-bg);
    border-radius: 12px;
}

.stone-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.stone-icon.black {
    background: radial-gradient(circle at 30% 30%, #444, var(--stone-black));
}

.stone-icon.white {
    background: radial-gradient(circle at 30% 30%, #fff, #ccc);
}

.score-num {
    font-size: 24px;
    font-weight: 700;
}

.vs {
    font-weight: 600;
    color: var(--text-muted);
}

/* ===== Strategy Section ===== */
.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.strategy-card {
    background: var(--bg-tertiary);
    border-radius: 20px;
    padding: 28px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.strategy-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.strategy-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.strategy-card h3 {
    font-size: 20px;
    margin-bottom: 16px;
}

.strategy-visual {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.strategy-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

.tip-badge {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 12px;
    background: var(--accent-gold);
    color: var(--bg-primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.tip-badge.warning {
    background: #e74c3c;
    color: white;
}

/* Corner demo */
.corner-demo {
    width: 80px;
    height: 80px;
    background: var(--board-green);
    border-radius: 8px;
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

.corner-demo::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 30% 30%, #444, var(--stone-black));
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent-gold);
    animation: cornerGlow 2s ease-in-out infinite;
}

@keyframes cornerGlow {

    0%,
    100% {
        box-shadow: 0 0 15px var(--accent-gold);
    }

    50% {
        box-shadow: 0 0 30px var(--accent-gold), 0 0 50px rgba(255, 215, 0, 0.5);
    }
}

/* X-square demo */
.x-demo {
    width: 80px;
    height: 80px;
    background: var(--board-green);
    border-radius: 8px;
    position: relative;
}

.x-demo::before {
    content: '✕';
    position: absolute;
    top: 24px;
    left: 24px;
    font-size: 24px;
    color: #e74c3c;
    animation: xPulse 1.5s ease-in-out infinite;
}

@keyframes xPulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Edge demo */
.edge-demo {
    width: 100px;
    height: 40px;
    background: var(--board-green);
    border-radius: 4px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 4px;
}

.edge-demo::before,
.edge-demo::after {
    content: '';
    width: 24px;
    height: 24px;
    background: radial-gradient(circle at 30% 30%, #444, var(--stone-black));
    border-radius: 50%;
}

/* Mobility demo */
.mobility-demo {
    display: flex;
    gap: 8px;
    align-items: center;
}

.mobility-demo::before {
    content: '3';
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-blue);
}

.mobility-demo::after {
    content: '→ 8 nước!';
    font-size: 14px;
    color: var(--accent-gold);
}

/* ===== Practice Section ===== */
.game-layout {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.game-container {
    max-width: 500px;
    flex-shrink: 0;
}

/* ===== AI Analysis Panel ===== */
.ai-panel {
    width: 320px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
}

.ai-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
}

.ai-panel-icon {
    font-size: 24px;
}

.ai-panel-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.ai-panel-content {
    padding: 16px;
    max-height: 500px;
    overflow-y: auto;
}

.ai-waiting {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.ai-avatar {
    font-size: 48px;
    margin-bottom: 16px;
}

.ai-waiting p {
    margin-bottom: 8px;
}

.ai-hint {
    font-size: 12px;
    color: var(--text-muted);
}

/* AI Thinking Animation */
.ai-thinking {
    text-align: center;
    padding: 20px;
}

.ai-thinking .ai-avatar {
    animation: thinking 1s ease-in-out infinite;
}

@keyframes thinking {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.ai-thinking p {
    color: var(--accent-blue);
    font-weight: 500;
}

/* AI Analysis Results */
.ai-result {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-chosen-move {
    background: linear-gradient(135deg, rgba(77, 166, 255, 0.15), rgba(155, 89, 182, 0.15));
    border: 1px solid var(--accent-blue);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    text-align: center;
}

.ai-chosen-move .move-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.ai-chosen-move .move-position {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-gold);
}

.ai-chosen-move .move-score {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.ai-moves-list {
    margin-top: 12px;
}

.ai-moves-title {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-moves-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.ai-move-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--glass-bg);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.ai-move-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.ai-move-item.best {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.ai-move-pos {
    font-weight: 600;
    font-size: 14px;
    min-width: 36px;
}

.ai-move-details {
    flex: 1;
    margin-left: 12px;
    font-size: 11px;
    color: var(--text-secondary);
}

.ai-move-detail-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ai-detail-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 10px;
}

.ai-detail-tag.positive {
    color: #2ecc71;
}

.ai-detail-tag.negative {
    color: #e74c3c;
}

.ai-detail-tag.neutral {
    color: var(--accent-blue);
}

.ai-move-score {
    font-weight: 700;
    font-size: 14px;
    min-width: 50px;
    text-align: right;
}

.ai-move-score.positive {
    color: #2ecc71;
}

.ai-move-score.negative {
    color: #e74c3c;
}

.ai-move-score.neutral {
    color: var(--accent-gold);
}

.ai-move-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-primary);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.ai-move-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.ai-move-bar-fill.positive {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
}

.ai-move-bar-fill.negative {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.ai-move-bar-fill.neutral {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-gold));
}

/* AI Explanation in panel */
.ai-explain {
    margin-top: 16px;
    padding: 12px;
    background: var(--glass-bg);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.ai-explain strong {
    color: var(--text-primary);
}

/* AI Legend */
.ai-legend {
    background: var(--bg-primary);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.ai-legend-title {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
}

.legend-toggle {
    font-size: 10px;
    color: var(--text-muted);
}

.ai-legend-content {
    padding: 8px 12px 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.legend-item:hover {
    background: rgba(77, 166, 255, 0.1);
}

.legend-icon {
    font-size: 16px;
    width: 24px;
    text-align: center;
}

.legend-label {
    font-weight: 600;
    font-size: 12px;
    min-width: 60px;
}

.legend-desc {
    font-size: 11px;
    color: var(--text-muted);
}

/* Clickable AI move items */
.ai-move-item {
    cursor: pointer;
}

.ai-move-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

/* Clickable detail tags */
.ai-detail-tag {
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-detail-tag:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(77, 166, 255, 0.3);
}

/* AI moves title small text */
.ai-moves-title small {
    color: var(--text-muted);
    font-weight: 400;
}

/* Board Highlights */
.cell.highlight-move {
    box-shadow: inset 0 0 0 3px var(--accent-gold), 0 0 15px var(--accent-gold);
    z-index: 10;
}

.cell.highlight-corner {
    box-shadow: inset 0 0 0 3px #2ecc71, 0 0 10px rgba(46, 204, 113, 0.5);
}

.cell.highlight-edge {
    box-shadow: inset 0 0 0 2px var(--accent-blue);
}

.cell.highlight-x {
    box-shadow: inset 0 0 0 3px #e74c3c, 0 0 10px rgba(231, 76, 60, 0.5);
}

.cell.highlight-flips {
    box-shadow: inset 0 0 0 2px #f39c12, 0 0 10px rgba(243, 156, 18, 0.5);
}

@keyframes highlightFlash {

    0%,
    100% {
        box-shadow: inset 0 0 0 3px var(--accent-gold);
    }

    50% {
        box-shadow: inset 0 0 0 4px var(--accent-gold), 0 0 25px var(--accent-gold);
    }
}

/* Weight Overlay */
.weight-overlay {
    position: absolute;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.8);
    z-index: 5;
}

.weight-overlay.positive {
    color: #2ecc71;
}

.weight-overlay.negative {
    color: #e74c3c;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--glass-bg);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-name {
    font-weight: 500;
    font-size: 14px;
}

.stone-count {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-gold);
}

.turn-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--accent-blue);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.turn-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.board-wrapper {
    position: relative;
    padding: 24px 0 0 24px;
}

.board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    background: var(--board-green);
    padding: 8px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg), inset 0 2px 20px rgba(0, 0, 0, 0.4);
    aspect-ratio: 1;
}

.cell {
    background: var(--board-green-light);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.cell:hover {
    background: #3d8a3d;
}

.cell.valid-move::after {
    content: '';
    width: 30%;
    height: 30%;
    background: var(--valid-move);
    border-radius: 50%;
    animation: validPulse 1.5s ease-in-out infinite;
}

@keyframes validPulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.cell.hint::after {
    background: var(--hint-color);
}

.stone {
    width: 80%;
    height: 80%;
    border-radius: 50%;
    transition: all 0.3s ease;
    animation: placeStone 0.3s ease-out;
}

@keyframes placeStone {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.stone.black {
    background: radial-gradient(circle at 30% 30%, #555, var(--stone-black));
    box-shadow: inset -3px -3px 8px rgba(0, 0, 0, 0.8), 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.stone.white {
    background: radial-gradient(circle at 30% 30%, #fff, #ddd);
    box-shadow: inset -3px -3px 8px rgba(0, 0, 0, 0.15), 2px 2px 5px rgba(0, 0, 0, 0.3);
}

.stone.flipping {
    animation: flipStone 0.5s ease-in-out;
}

@keyframes flipStone {
    0% {
        transform: rotateY(0deg);
    }

    50% {
        transform: rotateY(90deg);
    }

    100% {
        transform: rotateY(180deg);
    }
}

.board-labels-top,
.board-labels-left {
    display: flex;
    position: absolute;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.board-labels-top {
    top: 0;
    left: 32px;
    right: 8px;
    justify-content: space-around;
}

.board-labels-left {
    flex-direction: column;
    top: 32px;
    left: 0;
    bottom: 8px;
    justify-content: space-around;
    align-items: center;
    width: 20px;
}

.game-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.control-btn {
    padding: 12px 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

.difficulty-select {
    padding: 12px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
}

.game-message {
    text-align: center;
    margin-top: 20px;
    min-height: 50px;
    padding: 12px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.game-message.win {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.2), rgba(39, 174, 96, 0.2));
    color: #2ecc71;
}

.game-message.lose {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2), rgba(192, 57, 43, 0.2));
    color: #e74c3c;
}

.game-message.draw {
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.2), rgba(243, 156, 18, 0.2));
    color: #f1c40f;
}

/* ===== AI Section ===== */
.ai-explanation {
    max-width: 800px;
    margin: 0 auto;
}

.ai-step {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
    padding: 32px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.ai-step:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.ai-step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.ai-step-content {
    flex: 1;
}

.ai-step-content h3 {
    font-size: 20px;
    margin-bottom: 16px;
}

.ai-visual {
    height: 80px;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.ai-step-content p {
    color: var(--text-secondary);
}

/* Tree visualization */
.tree-demo {
    width: 150px;
    height: 60px;
    position: relative;
}

.tree-demo::before {
    content: '🔵';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.tree-demo::after {
    content: '🟢 🟢 🟢';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    letter-spacing: 10px;
}

/* Eval bar */
.eval-demo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.eval-bar {
    width: 200px;
    height: 20px;
    background: var(--bg-primary);
    border-radius: 10px;
    overflow: hidden;
}

.eval-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-gold));
    border-radius: 10px;
    transition: width 1s ease;
}

.eval-score {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-gold);
}

/* Prune visualization */
.prune-demo {
    display: flex;
    gap: 8px;
    align-items: center;
}

.prune-demo::before {
    content: '✓ ✓ ✗ ✗ ✗';
    font-size: 20px;
    letter-spacing: 5px;
}

/* Choice visualization */
.choice-demo {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.choice-option {
    padding: 8px 16px;
    background: var(--bg-primary);
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    opacity: 0.6;
}

.choice-option.best {
    opacity: 1;
    background: linear-gradient(135deg, rgba(77, 166, 255, 0.2), rgba(155, 89, 182, 0.2));
    border: 1px solid var(--accent-blue);
}

.choice-score {
    color: var(--accent-gold);
    font-weight: 600;
}

.ai-footer {
    text-align: center;
    padding: 32px;
    background: var(--glass-bg);
    border-radius: 20px;
    margin-top: 40px;
}

.ai-footer p {
    color: var(--text-secondary);
}

/* ===== Footer ===== */
.footer {
    padding: 60px 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-logo .logo-icon {
    font-size: 24px;
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.footer-credit {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 48px;
    }

    .tagline {
        font-size: 18px;
    }

    .nav-pills {
        flex-direction: column;
        align-items: center;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 28px;
    }

    .ai-step {
        flex-direction: column;
        text-align: center;
    }

    .ai-step:hover {
        transform: translateY(-5px);
    }

    .game-info {
        flex-direction: column;
        gap: 12px;
    }

    .game-controls {
        flex-direction: column;
    }

    .board-wrapper {
        padding: 20px 0 0 20px;
    }
}