:root {
    --bg-color: #e0f2fe; /* Light blue */
    --primary: #1e3a8a; /* Dark blue */
    --primary-hover: #1e40af;
    --secondary: #3b82f6; /* Medium blue */
    --text-main: #0f172a;
    --text-muted: #334155;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 8px 32px 0 rgba(30, 58, 138, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
    background-attachment: fixed;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-hover);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

/* Header */
.main-header {
    margin-bottom: 20px;
    border-top: none;
    border-left: none;
    border-right: none;
    border-radius: 0 0 16px 16px;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo {
    display: inline-block;
}

.logo .brand-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
}

.logo .highlight {
    color: var(--primary);
}

.main-nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

.main-nav a {
    color: var(--text-main);
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
    text-decoration: none;
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary);
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

/* Main content */
main {
    flex: 1;
    padding: 40px 0;
}

.hero {
    text-align: center;
    padding: 80px 20px;
    margin-bottom: 60px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.3);
}

.game-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.game-card:hover .game-icon {
    transform: scale(1.1);
}

.game-card h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.game-card p {
    color: var(--text-muted);
    margin-bottom: 25px;
    flex: 1;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 600;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
}

button.btn {
    font-family: inherit;
    font-size: 1rem;
}

.btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.seo-content {
    padding: 40px;
}

.seo-content h2 {
    margin-bottom: 20px;
    font-size: 2rem;
}

.seo-content p {
    margin-bottom: 15px;
    color: var(--text-muted);
}

/* Footer */
.main-footer {
    border-bottom: none;
    border-left: none;
    border-right: none;
    border-radius: 16px 16px 0 0;
    margin-top: auto;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding: 60px 20px;
}

.footer-col h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.footer-col p {
    color: var(--text-muted);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul a {
    color: var(--text-muted);
}

.footer-col ul a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
}

/* Game Layout */
.game-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.game-container h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.game-board {
    margin: 0 auto 30px auto;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 20px;
    display: inline-block;
    border: 1px solid var(--glass-border);
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 20px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
}

/* Header Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--glass-bg);
    min-width: 200px;
    box-shadow: var(--glass-shadow);
    z-index: 100;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    top: 100%;
    left: 0;
}
.dropdown-content a {
    color: var(--text-main);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid var(--glass-border);
    font-size: 1rem;
}
.dropdown-content a:last-child {
    border-bottom: none;
}
.dropdown-content a:hover {
    background-color: rgba(255,255,255,0.8);
    color: var(--primary);
}
.dropdown:hover .dropdown-content {
    display: block;
}

/* Chess Valid Move Highlight */
.highlight-move {
    box-shadow: inset 0 0 3px 3px rgba(59, 130, 246, 0.8);
    background: rgba(59, 130, 246, 0.3);
}
