:root {
    --bg-dark: #020617;
    --bg-card: rgba(15, 23, 42, 0.6);
    --primary: #a855f7;
    --primary-glow: rgba(168, 85, 247, 0.4);
    --secondary: #22d3ee;
    --secondary-glow: rgba(34, 211, 238, 0.4);
    --accent: #f472b6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --container-max: 1400px;
    --game-max: 1100px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(168, 85, 247, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(34, 211, 238, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4 {
    letter-spacing: -0.02em;
    font-weight: 800;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Navigation */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.nav-links a:hover {
    color: var(--text-main);
    text-shadow: 0 0 8px var(--primary-glow);
}

/* Hero Section */
.hero {
    padding: 4rem 0 2rem;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    margin-bottom: 1rem;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Game Grid */
.section-title {
    font-size: 1.75rem;
    margin: 3rem 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 1.5rem;
    background: var(--primary);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--primary-glow);
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(4px);
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 20px 40px -15px var(--primary-glow);
}

.game-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.game-card-info {
    padding: 1rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.game-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-card-meta {
    font-size: 0.8rem;
    color: var(--secondary);
    display: flex;
    justify-content: space-between;
    margin-top: 0.25rem;
}

/* Game Page Specific */
.game-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin-top: 2rem;
}

.game-main {
    min-width: 0;
}

.player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 100px -20px var(--primary-glow);
}

.player-wrapper iframe {
    width: 100%;
    height: 100%;
}

.fullscreen-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
}

.reload-btn {
    position: absolute;
    top: 1rem;
    right: 4rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
}

.player-wrapper:hover .fullscreen-btn, 
.player-wrapper:hover .reload-btn {
    opacity: 1;
}

.fullscreen-btn:hover,
.reload-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.game-content {
    margin-top: 2rem;
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid var(--glass-border);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.game-title-area h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border-radius: 2rem;
    border: 1px solid var(--glass-border);
    font-weight: 700;
}

.rating-badge span {
    color: #fbbf24;
}

.game-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.game-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 1.5rem;
    border: 1px solid var(--glass-border);
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.meta-list {
    list-style: none;
}

.meta-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.9rem;
}

.meta-list li:last-child {
    border-bottom: none;
}

.meta-label {
    color: var(--text-muted);
}

.meta-value {
    font-weight: 700;
    color: var(--secondary);
}

/* Game Cover */
.game-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cover-bg-img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110%;
    height: 110%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    filter: blur(10px);
    z-index: 1;
}

.cover-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

.play-btn-wrapper {
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-cover:hover .play-btn-wrapper {
    transform: scale(1.1);
}

.play-icon-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 0 30px var(--primary-glow);
    transition: box-shadow 0.3s ease;
}

.game-cover:hover .play-icon-btn {
    box-shadow: 0 0 50px var(--secondary-glow);
}

.play-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

/* Footer */
footer {
    padding: 6rem 0 3rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 6rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 1024px) {
    .game-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .game-content {
        padding: 1.5rem;
    }
    .game-title-area h1 {
        font-size: 2rem;
    }
}
