:root {
    --bg-dark: #121212;
    --bg-card: rgba(30, 30, 30, 0.6);
    --primary: #00F0FF;
    --secondary: #7000FF;
    --text-main: #FFFFFF;
    --text-muted: #A0A0A0;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-main: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
}

/* Layout */
.app-container {
    max-width: 1440px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    margin: 1rem;
    padding: 0.8rem 1.5rem;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 800;
    font-size: 1.2rem;
}

.highlight {
    color: var(--primary);
}

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

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 0.3rem 1rem;
    border: 1px solid var(--glass-border);
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-main);
    outline: none;
    width: 150px;
    font-size: 0.9rem;
}

.search-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.mobile-menu-btn {
    display: none;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    width: 42px;
    height: 42px;
    padding: 0;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-direction: column;
}

.mobile-menu-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-main);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu-btn.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.is-open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Main Content */
.main-content {
    margin-top: 80px;
    padding: 2rem;
    flex: 1;
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 0;
    gap: 2rem;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta-btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-btn.primary {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.4);
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.6);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-card {
    padding: 1rem;
    width: 300px;
    transform: rotate(3deg);
    transition: transform 0.3s ease;
}

.hero-card:hover {
    transform: rotate(0) scale(1.05);
}

.hero-img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1rem;
}

/* Sections */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    margin-top: 4rem;
}

.section-header h2 {
    font-size: 2rem;
    position: relative;
    padding-left: 1rem;
}

.section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.view-all {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Categories */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.cat-pill {
    padding: 0.8rem 1.5rem;
    background: rgba(255,255,255,0.05);
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.cat-pill:hover, .cat-pill.active {
    background: rgba(112, 0, 255, 0.2);
    border-color: var(--secondary);
    color: var(--text-main);
}

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

.game-card {
    display: block;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-color: var(--primary);
}

.game-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    background: #2a2a2a;
}

.game-info {
    padding: 1rem;
}

.game-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-cat {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Game description snippet on cards */
.game-desc {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

/* Articles Preview */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    padding: 2rem;
    transition: transform 0.3s ease;
}

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

.article-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.article-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.read-more {
    color: var(--primary);
    font-weight: 600;
}

/* Footer */
.site-footer {
    margin-top: 4rem;
    padding: 4rem 2rem 2rem;
    background: rgba(0,0,0,0.3);
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 3rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.link-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.link-group h4 {
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

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

.link-group a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    html, body, .app-container {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .navbar {
        left: 0.5rem;
        right: 0.5rem;
        margin: 0.5rem 0;
        width: auto;
    }

    .main-content {
        padding: 1rem;
    }

    .section-header {
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .article-layout, .article-content, .rich-text, .footer-content, .footer-links {
        min-width: 0;
    }

    p, h1, h2, h3, h4, li, a {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 2rem 0;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .nav-links, .search-bar {
        display: none;
    }

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

    .nav-links.mobile-open {
        display: flex;
        position: absolute;
        top: calc(100% + 0.75rem);
        right: 0;
        left: 0;
        flex-direction: column;
        gap: 0.2rem;
        background: #1e1e1e;
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,0.12);
        padding: 0.65rem;
        z-index: 1001;
    }

    .nav-links.mobile-open a {
        padding: 0.65rem 0.8rem;
        border-radius: 8px;
    }

    .nav-links.mobile-open a:hover, .nav-links.mobile-open a.active {
        background: rgba(255,255,255,0.08);
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}
