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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Navigation */
header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.navbar {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-menu a {
    color: #555;
}

.nav-menu a:hover {
    color: #0066cc;
}

/* Main content */
main {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

.hero {
    text-align: center;
    padding: 2rem 0 3rem;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero p {
    color: #666;
    font-size: 1.1rem;
}

.content h2 {
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.content p {
    margin-bottom: 1.5rem;
    color: #444;
}

/* Page-specific styles */
.page-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.page-content h2 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.75rem;
}

.page-content p,
.page-content ul {
    margin-bottom: 1rem;
    color: #444;
}

.page-content ul {
    padding-left: 1.5rem;
}

.page-content li {
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 1.5rem 1rem;
    text-align: center;
}

.footer-links {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #666;
    margin: 0 0.75rem;
    font-size: 0.9rem;
}

footer > p {
    color: #999;
    font-size: 0.85rem;
}

/* Consent Banner */
.consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #333;
    color: #fff;
    padding: 1rem;
    display: none;
    z-index: 1000;
}

.consent-banner.show {
    display: block;
}

.consent-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.consent-content p {
    margin: 0;
    flex: 1;
    min-width: 200px;
    font-size: 0.9rem;
    color: #fff;
}

.consent-content a {
    color: #6db3f2;
}

.consent-buttons {
    display: flex;
    gap: 0.5rem;
}

.consent-buttons button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.consent-buttons .accept {
    background: #0066cc;
    color: #fff;
}

.consent-buttons .accept:hover {
    background: #0055aa;
}

.consent-buttons .decline {
    background: #666;
    color: #fff;
}

.consent-buttons .decline:hover {
    background: #555;
}

/* Game Cards Grid */
.game-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.game-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.2s, transform 0.2s;
}

.game-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.game-card h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.game-card .game-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.game-card p {
    color: #444;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.game-card .btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #0066cc;
    color: #fff;
    border-radius: 4px;
    font-size: 0.9rem;
    text-decoration: none;
}

.game-card .btn:hover {
    background: #0055aa;
    text-decoration: none;
}

/* Tables */
.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.95rem;
}

.page-content th,
.page-content td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.page-content th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.page-content tr:hover {
    background: #fafafa;
}

/* Info Boxes */
.info-box {
    background: #e8f4fd;
    border-left: 4px solid #0066cc;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    border-radius: 0 4px 4px 0;
}

.info-box.tip {
    background: #e8f5e9;
    border-left-color: #4caf50;
}

.info-box.warning {
    background: #fff3e0;
    border-left-color: #ff9800;
}

.info-box p {
    margin: 0;
    color: #333;
}

/* Section spacing */
.page-content section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.page-content section:last-child {
    border-bottom: none;
}

.page-content h3 {
    font-size: 1.1rem;
    margin: 1.25rem 0 0.5rem;
    color: #333;
}

.page-content h4 {
    font-size: 1rem;
    margin: 1rem 0 0.5rem;
    color: #444;
}

/* Code blocks */
.page-content code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.9em;
}

.page-content pre {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1rem 0;
    color: #333;
}

.page-content pre code {
    padding: 0;
    background: none;
    color: #333;
}

/* Architecture diagrams - override default pre styling */
.page-content pre.architecture-diagram {
    background: #2d2d2d;
    color: #ffffff;
    padding: 1.5rem;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Definition lists */
.page-content dl {
    margin: 1rem 0;
}

.page-content dt {
    font-weight: 600;
    color: #333;
    margin-top: 0.75rem;
}

.page-content dd {
    margin-left: 1rem;
    color: #444;
    margin-bottom: 0.5rem;
}

/* Ordered lists with custom styling */
.page-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.page-content ol li {
    margin-bottom: 0.5rem;
}

/* Nested lists */
.page-content ul ul,
.page-content ol ol,
.page-content ul ol,
.page-content ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Two-column layout for features */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.feature-item {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 4px;
}

.feature-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #333;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: #666;
}

.breadcrumb span {
    margin: 0 0.5rem;
}

/* Tag/badge styling */
.tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: #e0e0e0;
    border-radius: 3px;
    font-size: 0.8rem;
    color: #555;
    margin-right: 0.25rem;
}

.tag.players {
    background: #e3f2fd;
    color: #1565c0;
}

.tag.ai {
    background: #f3e5f5;
    color: #7b1fa2;
}

.tag.multiplayer {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Back link */
.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Contact email */
.contact-email {
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    margin: 1rem 0;
}

.contact-email a {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0066cc;
}

/* Last updated date */
.last-updated {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-bottom: 1rem;
}

/* Screenshots and images */
.screenshot-container {
    margin: 1.5rem 0;
    max-width: 100%;
    overflow: hidden;
}

.screenshot {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
}

.screenshot-container figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
}


/* Responsive */
@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .game-cards {
        grid-template-columns: 1fr;
    }

    .page-content table {
        font-size: 0.85rem;
    }

    .page-content th,
    .page-content td {
        padding: 0.5rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}
