/* Design System Variables */
:root {
    --background: hsl(250, 60%, 8%);
    --foreground: hsl(210, 40%, 98%);
    --card: hsl(250, 50%, 12%);
    --accent: hsl(180, 80%, 50%);
    --accent-foreground: hsl(250, 60%, 8%);
    --muted-foreground: hsl(215, 20%, 65%);
    --border: hsl(250, 40%, 25%);
    --destructive: hsl(0, 84%, 60%);

    --gradient-cosmic: linear-gradient(
        135deg,
        hsl(280, 80%, 30%),
        hsl(250, 70%, 20%),
        hsl(220, 60%, 15%)
    );
    --gradient-accent: linear-gradient(
        90deg,
        hsl(180, 80%, 50%),
        hsl(200, 80%, 60%)
    );
    --gradient-card: linear-gradient(
        180deg,
        hsl(250, 50%, 12%),
        hsl(250, 50%, 8%)
    );
    --shadow-glow: 0 0 30px hsl(180, 80%, 50%, 0.3);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
        Ubuntu, Cantarell, sans-serif;
    background: var(--gradient-cosmic);
    background-attachment: fixed;
    color: var(--foreground);
    min-height: 100vh;
    line-height: 1.6;
}

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

/* Typography */
h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: bold;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: bold;
    margin-bottom: 1rem;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: bold;
    margin-bottom: 0.75rem;
}

.cosmic-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(20, 12, 30, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--foreground);
}

.logo svg {
    width: 2rem;
    height: 2rem;
    color: var(--accent);
}

.nav-links {
    display: none;
    gap: 1.5rem;
    align-items: center;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-links a {
    color: var(--foreground);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

.dropdown {
    position: relative;
}

.dropdown button {
    background: none;
    border: none;
    color: var(--foreground);
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
    font-family: inherit;
}

.dropdown button:hover,
.dropdown.active button {
    color: var(--accent);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    min-width: 12rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.dropdown:hover .dropdown-content,
.dropdown.active .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--foreground);
    text-decoration: none;
    transition: background 0.3s;
}

.dropdown-content a:hover {
    background: rgba(75, 209, 209, 0.1);
    color: var(--accent);
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-cosmic {
    background: var(--gradient-accent);
    color: var(--accent-foreground);
}

.btn-cosmic:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.menu-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--foreground);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    color: var(--foreground);
    text-decoration: none;
    padding: 0.5rem 0;
}

/* Footer */
footer {
    background: rgba(20, 12, 30, 0.6);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    margin-top: 5rem;
    padding: 3rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-section h4 {
    color: var(--accent);
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

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

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

.footer-section a,
.footer-section button {
    color: var(--foreground);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    padding: 0;
}

.footer-section a:hover,
.footer-section button:hover {
    color: var(--accent);
}

.footer-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-logos a {
    color: var(--foreground);
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-logos a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.age-notice {
    font-weight: bold;
    color: var(--destructive);
    font-size: 1.125rem;
}

/* Cards */
.card {
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.card-gradient {
    background: var(--gradient-card);
}

.glow-accent {
    box-shadow: var(--shadow-glow);
}

.game-card {
    background: var(--gradient-card);
    border: 2px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s;
    text-decoration: none;
    color: var(--foreground);
    display: block;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
    border-color: var(--accent);
}

.game-card img {
    width: 100%;
    height: auto;
    display: block;
}

.game-card-content {
    padding: 1.5rem;
}

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

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background: rgba(75, 209, 209, 0.1);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    border: 1px solid rgba(75, 209, 209, 0.3);
}

/* Grid */
.grid {
    display: grid;
    gap: 2rem;
}

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

@media (min-width: 768px) {
    .grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Sections */
section {
    padding: 5rem 0;
}

.hero {
    text-align: center;
    padding: 8rem 0;
}

.hero p {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    max-width: 42rem;
    margin: 0 auto 2rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Game Page */
.game-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.game-iframe-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
}

.game-iframe-container iframe {
    width: 100%;
    min-height: 600px;
    border: 0;
}

@media (min-width: 768px) {
    .game-iframe-container iframe {
        min-height: 700px;
    }
}

@media (min-width: 1024px) {
    .game-iframe-container iframe {
        min-height: 800px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-accent {
    color: var(--accent);
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-8 {
    margin-top: 2rem;
}

.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.gap-2 {
    gap: 0.5rem;
}

.hidden {
    display: none;
}
