/* Base Styles - Global Reset, Typography, and Layout */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a1a;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    position: relative;
}

/* Typography */
h1, .hero-title {
    text-align: center;
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #8B5CF6 0%, #F59E0B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    text-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
}

@media (max-width: 720px) {
  .hero-title { font-size: 2.4rem; }
}

/* Game description */
.game-description {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.game-description h2 {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.description-content p {
    color: #e2e8f0;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.description-section {
    margin-bottom: 1.5rem;
}

.description-section h3 {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.description-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.description-section li {
    color: #e2e8f0;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    padding-left: 0;
}

.description-section li:before {
    content: "• ";
    color: #8B5CF6;
    font-weight: bold;
}

.ability-explanations {
    display: grid;
    gap: 1rem;
}

.ability-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
}

.ability-item h4 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.ability-item p {
    color: #e2e8f0;
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0;
}

/* Game section layout */
.game-section {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    width: 100%;
    justify-content: center;
}

.game-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    min-width: 300px;
}

/* Game board */
.game-board {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: none;
    max-width: 800px; /* match move history width */
    width: 100%; /* fill available width to remove side gaps */
    margin-left: auto;
    margin-right: auto;
}

.game-board:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Loading animation */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Smooth transitions for all interactive elements */
* {
    transition: all 0.2s ease;
}

/* Focus states for accessibility */
.btn:focus,
.cell:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
} 