* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #8b5cf6;
    --accent: #f59e0b;
    --chaos: #ef4444;
    --bg-dark: #0a0a0a;
    --bg-card: rgba(20, 20, 30, 0.8);
    --text: #ffffff;
    --text-muted: #9ca3af;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Animated Starfield Background */
.stars, .stars2, .stars3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.stars {
    background: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAE0lEQVQIW2NkYGD4z8DAwMgABQASAQIBZhLRWgAAAABJRU5ErkJggg==') repeat;
    animation: starsMove 200s linear infinite;
    opacity: 0.3;
}

.stars2 {
    background: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAE0lEQVQIW2NkYGD4z8DAwMgABQASAQIBZhLRWgAAAABJRU5ErkJggg==') repeat;
    animation: starsMove 150s linear infinite;
    opacity: 0.2;
}

.stars3 {
    background: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAE0lEQVQIW2NkYGD4z8DAwMgABQASAQIBZhLRWgAAAABJRU5ErkJggg==') repeat;
    animation: starsMove 100s linear infinite;
    opacity: 0.15;
}

@keyframes starsMove {
    from { transform: translateY(0); }
    to { transform: translateY(-2000px); }
}

/* Container */
.container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    margin-bottom: 60px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 20px;
}

.chess-piece {
    font-size: 64px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pieceFloat 3s ease-in-out infinite;
}

@keyframes pieceFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.title-group {
    display: flex;
    flex-direction: column;
}

.main-title {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 14px;
    letter-spacing: 4px;
    color: var(--accent);
    font-weight: 600;
}

.main-nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 120px;
    min-height: 500px;
}

.hero-title {
    font-size: 64px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 30px;
}

.chaos {
    background: linear-gradient(135deg, var(--chaos), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.btn-large {
    padding: 20px 48px;
    font-size: 20px;
}

.btn-icon {
    font-size: 24px;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hero-board {
    border: 3px solid rgba(59, 130, 246, 0.5);
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.3);
    background: rgba(10, 10, 10, 0.5);
}

/* Section Titles */
.section-title {
    font-size: 48px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 60px;
}

.highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Game Modes */
.game-modes {
    margin-bottom: 120px;
}

.modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.mode-card {
    background: var(--bg-card);
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.mode-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.3);
}

.mode-card.featured {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(59, 130, 246, 0.1));
}

.mode-card.disabled {
    opacity: 0.6;
}

.mode-card.disabled:hover {
    transform: none;
    box-shadow: none;
}

.mode-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent);
    color: var(--bg-dark);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.mode-badge.coming-soon {
    background: var(--text-muted);
}

.mode-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.mode-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.mode-description {
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.6;
}

.mode-features {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(59, 130, 246, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
}

.feature-icon {
    font-size: 16px;
}

.mode-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    display: block;
}

.mode-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.mode-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

/* About Section */
.about {
    margin-bottom: 120px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.about-item {
    text-align: center;
    padding: 30px;
}

.about-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.about-item h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.about-item p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* CTA Section */
.cta {
    text-align: center;
    padding: 80px 40px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 30px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    margin-bottom: 80px;
}

.cta-title {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 20px;
}

.cta-description {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* Footer */
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--primary);
}

.footer-section p {
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-visual {
        height: 400px;
    }

    .board-preview {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        gap: 20px;
    }

    .main-nav {
        width: 100%;
        justify-content: center;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .section-title {
        font-size: 36px;
    }

    .modes-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
}
