@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --bg-dark: #0b0e14;
    --bg-card: #151a23;
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --accent: #8b5cf6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --board-light: #e2e8f0;
    --board-dark: #475569;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Glassmorphism */
.glass-effect {
    background: rgba(11, 14, 20, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card {
    background: rgba(21, 26, 35, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
}

.glass-modal {
    background: #151a23;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Gradient Text */
.text-primary-gradient {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn-glow {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    box-shadow: 0 0 15px var(--primary-glow);
    transition: all 0.3s ease;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--primary-glow);
    color: white;
}

/* Chessboard Responsive Fixes */
.board-container-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px; /* PC Size increased */
    margin: 0 auto;
    padding: 10px;
    background: linear-gradient(145deg, #1e2532, #11151c);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#myBoard {
    width: 100%;
}

/* IMPORTANT: Fix for Pieces size on mobile */
.chessboard-js-piece {
    width: 100% !important;
    height: 100% !important;
    cursor: grab;
}

.chessboard-js-piece:active {
    cursor: grabbing;
}

/* AI Thinking Animation */
.ai-thinking-border {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 8px;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 0 20px 5px rgba(139, 92, 246, 0.6);
    animation: pulse-border 1.5s infinite;
    display: none;
}

@keyframes pulse-border {
    0% { box-shadow: 0 0 10px 2px rgba(139, 92, 246, 0.3); }
    50% { box-shadow: 0 0 25px 8px rgba(139, 92, 246, 0.7); }
    100% { box-shadow: 0 0 10px 2px rgba(139, 92, 246, 0.3); }
}

/* Model Card Selection */
.model-card {
    background: #1e2532;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s, border-color 0.3s;
    cursor: pointer;
}

.model-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Stats Table */
.stats-table-container {
    max-height: 400px;
    overflow-y: auto;
}

.table-dark {
    background-color: transparent;
}

.table-dark th {
    background-color: #1e2532;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.table-dark td {
    background-color: transparent;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    vertical-align: middle;
}

/* Win Bars */
.win-bar-container {
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    background: #334155;
    display: flex;
    width: 100px;
}

/* Status Text */
#status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .board-container-wrapper {
        max-width: 100%;
        padding: 5px;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
}
