:root {
    --primary-color: #4a90e2;
    --secondary-color: #f39c12;
    --accent-color: #e74c3c;
    --text-color: #333333;
    --bg-color: #f5f6fa;
    --light-bg: #f3f4f6;
    --prime-color: #4a90e2;
}

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    margin: 0;
}

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

.nav {
    background: var(--primary-color);
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 2rem;
}

.nav-logo {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--secondary-color);
}

.nav-cta a {
    padding: 0.5rem 1.25rem;
    background: var(--secondary-color);
    color: #111111;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.nav-cta a:hover,
.nav-cta a:focus {
    background: #ffffff;
    color: var(--primary-color);
    transform: translateY(-1px);
}

.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 100px 0 50px;
    text-align: center;
}

.section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero h1 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 3.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    color: var(--prime-color);
    margin-bottom: 3rem;
    text-align: center;
}

.feature-card h3 {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 1.2rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 30px;
}

.button {
    display: inline-block;
    padding: 15px 30px;
    background-color: #fff;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: transform 0.3s;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px);
    background: var(--secondary-color);
    color: #ffffff;
}

.announcement-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 0.75rem 1rem;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.announcement-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.announcement-text {
    font-size: 0.95rem;
    font-weight: 500;
}

.announcement-link {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.announcement-link:hover,
.announcement-link:focus-visible {
    background: rgba(255, 255, 255, 0.3);
}

.announcement-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.announcement-close:hover,
.announcement-close:focus-visible {
    background: rgba(255, 255, 255, 0.2);
}

.features {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.cta {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: #ffffff;
    text-align: center;
    padding: 3rem;
    border-radius: 10px;
    margin: 2rem auto;
    max-width: 900px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.game-container {
    background: var(--light-bg);
    padding: 40px 0;
    text-align: center;
}

.game-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.game-frame {
    width: 100%;
    max-width: 800px;
    height: 600px;
    border: none;
    border-radius: 8px;
    margin: 0 auto;
    display: block;
}

.hero-3d {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-3d::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('images/3d-grid.png') center/cover;
    opacity: 0.1;
    pointer-events: none;
}

.game-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 2rem;
    background: #ffffff;
}

.game-preview {
    padding: 4rem 2rem;
    text-align: center;
    background: var(--bg-color);
}

.cta-3d {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    padding: 4rem 2rem;
    text-align: center;
    color: #ffffff;
}

.button-3d {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--secondary-color);
    color: #ffffff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.button-3d:hover,
.button-3d:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 840px) {
    .game-frame {
        height: 450px;
    }
}

@media (max-width: 480px) {
    .game-frame {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .announcement-content {
        flex-direction: column;
    }

    .language-selector {
        position: static;
        align-items: flex-start;
        margin: 1rem;
        padding: 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}

.gameplay {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.section-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.section-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.customization {
    background-color: var(--light-bg);
    padding: 80px 0;
}

footer {
    background-color: var(--text-color);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.language-selector select {
    padding: 5px;
    border: 1px solid var(--primary-color);
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    min-width: 150px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.how-to-play, .community {
    margin: 40px 0; /* Adds more space above and below the sections for better separation */
    padding: 20px; /* Adds padding within the sections */
    background-color: var(--light-bg); /* Optional: Adds a background color for better visibility */
    border-radius: 10px; /* Optional: Rounds the corners of the sections */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Optional: Adds a subtle shadow for depth */
}

.how-to-play h2, .community h2 {
    font-size: 2.5rem; /* Consistent heading size */
    /*  color: var(--primary-color); Ensures headings are consistent with the theme */
    margin-bottom: 20px; /* Space below the headings */
    text-align: center; /* Center align headings */
}

.how-to-play .controls-card, .community .section-content {
    text-align: left; /* Align text to the left for better readability */
}

.how-to-play .controls-card p, .community .section-content p {
    margin-bottom: 1.5rem; /* Space below paragraphs */
    line-height: 1.8; /* Improved line height for readability */
}

footer {
    background-color: var(--text-color);
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h4 {
    color: var(--prime-color);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-section p {
    color: #e5e7eb;
    line-height: 1.6;
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: #e5e7eb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-copyright p {
    color: #9ca3af;
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: white;
}

@media (max-width: 768px) {
    .container {
        padding: 10px; /* Reduced padding on smaller screens */
    }

    .how-to-play, .community, .similar-games {
        font-size: 1em; /* Adjust font size for smaller screens */
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
    }
}
