/* Reset & Global Styles */
:root {
    --primary: #e6007e;
    --secondary: #662d91;
    --accent: #00f0ff; /* Cyberpunk cyan */
    --bg-dark: #050505;
    --sidebar-bg: #0a0a0a;
    --stage-bg: #000000;
    --text-glow: 0 0 10px rgba(230, 0, 126, 0.7);
    --nav-height: 70px;
}

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

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: #fff;
    line-height: 1.6;
    overflow: hidden; /* Prevent body scroll, handle in sidebar */
    height: 100vh;
}

/* Custom Cursor */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(230, 0, 126, 0.15), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
    mix-blend-mode: screen;
    will-change: transform, width, height;
}

/* Fixed Background */
.fixed-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #1a0b2e 0%, #000000 100%);
    z-index: -2;
}

/* Home Hero */
.hero {
    position: relative;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.brand-slogan {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(90deg, #fff, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 4px;
    margin-bottom: 12px;
}
.hero-content .glitch {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 4px;
    text-shadow: 0 0 20px var(--primary);
}
.glitch {
    position: relative;
    display: inline-block;
}
.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0.08;
}
.glitch::before {
    transform: translate(2px, -2px);
    color: var(--accent);
}
.glitch::after {
    transform: translate(-2px, 2px);
    color: var(--primary);
}
.hero .btn.btn-primary {
    margin-top: 20px;
    padding: 12px 20px;
    border: 1px solid var(--primary);
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(90deg, rgba(230,0,126,0.2), rgba(0,240,255,0.15));
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}
.glow-effect {
    position: relative;
    overflow: hidden;
}
.glow-effect .liquid {
    position: absolute;
    left: -50%;
    top: 0;
    width: 200%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(0,240,255,0.15), transparent 35%), radial-gradient(circle at 70% 50%, rgba(230,0,126,0.15), transparent 35%);
    transform: translateX(0);
    animation: flow 6s linear infinite;
    pointer-events: none;
}
@keyframes flow {
    0% { transform: translateX(0); }
    50% { transform: translateX(-10%); }
    100% { transform: translateX(0); }
}
.scroll-indicator {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.6;
}
.scroll-indicator .mouse {
    width: 24px; height: 36px; border: 2px solid #777; border-radius: 16px; margin: 0 auto 8px;
}
.scroll-indicator .wheel { width: 4px; height: 8px; background: #777; border-radius: 2px; margin: 6px auto; }
.scroll-indicator .arrow { width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid #777; margin: 0 auto; }

/* Sections */
.section { padding: 40px 20px; }
.section .container { max-width: 1100px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 20px; }
.section-header h2 { font-size: 1.8rem; }
.section-line { width: 80px; height: 3px; background: var(--primary); margin: 10px auto; border-radius: 2px; }
.subtitle { color: #bbb; font-size: 14px; letter-spacing: 2px; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.feature-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.4); }
.feature-icon { font-size: 30px; color: var(--accent); margin-bottom: 10px; }
.feature-card h3 { font-size: 16px; margin-bottom: 6px; }
.feature-card p { color: #aaa; font-size: 13px; }

/* Games Grid on Home */
.games-section .games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.games-section .game-card {
    display: block;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}
.games-section .game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}
.games-section .game-image {
    height: 180px;
    position: relative;
    background: #111;
}
.games-section .game-image img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.games-section .game-info { padding: 12px; text-align: center; }
.games-section .game-info h3 { font-size: 16px; margin-bottom: 4px; }
.games-section .game-info p { font-size: 12px; color: #aaa; }
.view-all-container { text-align: center; margin-top: 20px; }
.btn.btn-outline { padding: 10px 18px; border: 1px solid #777; border-radius: 24px; color: #ddd; }
.btn.btn-outline:hover { border-color: var(--primary); color: #fff; box-shadow: 0 0 12px rgba(230,0,126,0.3); }

/* Maintenance overlay */
.maintenance-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    letter-spacing: 2px;
}
.maintenance-tag {
    position: absolute;
    left: 10px;
    top: 10px;
    background: #f57f17;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.about-section .about-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    align-items: center;
}
.about-section .about-text h2 { font-size: 1.8rem; margin-bottom: 10px; }
.about-section .about-text p { color: #bbb; font-size: 14px; line-height: 1.8; }
.about-section .placeholder-image {
    height: 220px;
    background: linear-gradient(45deg, rgba(230,0,126,0.1), rgba(0,240,255,0.1));
    border: 1px dashed rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
}
.link-arrow { color: var(--accent); }
.link-arrow i { margin-left: 6px; }

.stats-section .stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.stat-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    text-align: center;
    padding: 20px 10px;
}
.stat-number { font-size: 1.8rem; font-weight: 800; color: #fff; text-shadow: 0 0 10px rgba(230,0,126,0.4); }
.stat-label { color: #aaa; font-size: 12px; }

.footer {
    background: rgba(10,10,10,0.95);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
}
.footer .container { max-width: 1100px; margin: 0 auto; }
.footer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.footer-logo { font-weight: 900; letter-spacing: 2px; color: var(--primary); }
.social-links a { color: #bbb; margin-left: 12px; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 15px 0; }
.footer-col h4 { font-size: 14px; margin-bottom: 10px; }
.footer-col a { display: block; color: #aaa; font-size: 12px; margin: 6px 0; }
.footer-bottom { text-align: center; color: #777; font-size: 12px; }

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(5, 5, 5, 0.95);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 100%;
    padding: 0 30px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
}

.pg-logo {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
}

.soft-logo {
    color: #fff;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    color: #ccc;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

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

.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #ccc;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Lobby Layout (Split View) */
.lobby-layout {
    display: flex;
    height: calc(100vh - var(--nav-height));
    margin-top: var(--nav-height);
    width: 100%;
    overflow: hidden;
}

/* Sidebar Styling */
.lobby-sidebar {
    width: 360px;
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 10;
}

.sidebar-header {
    padding: 20px;
    background: rgba(20, 20, 20, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-bar {
    position: relative;
    margin-bottom: 15px;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px;
    padding-right: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.search-bar input:focus {
    border-color: var(--primary);
}

.search-bar i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.game-filters.compact {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center; /* Center filters as requested */
}

.filter-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #aaa;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 10px rgba(230, 0, 126, 0.4);
}

.game-list-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary) var(--bg-dark);
}

.game-list-scroll::-webkit-scrollbar {
    width: 6px;
}

.game-list-scroll::-webkit-scrollbar-thumb {
    background-color: var(--secondary);
    border-radius: 3px;
}

.sidebar-games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 Columns in sidebar */
    gap: 15px;
}

/* Sidebar Game Card */
.game-card.sidebar-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.game-card.sidebar-card.active {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(230, 0, 126, 0.3);
}

.game-card.sidebar-card .game-image {
    height: 100px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.game-card.sidebar-card .game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.game-card.sidebar-card .game-info {
    padding: 10px;
    text-align: center;
}

.game-card.sidebar-card h3 {
    font-size: 14px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-card.sidebar-card p {
    font-size: 10px;
    color: #888;
}

.game-tag {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

/* Animation Classes */
.hidden {
    display: none !important;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stage Styling */
.lobby-stage {
    flex: 1;
    position: relative;
    background: var(--stage-bg);
    display: flex;
    flex-direction: column;
}

.stage-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.welcome-content {
    text-align: center;
    z-index: 2;
}

.welcome-content h1 {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 5px;
    text-shadow: 0 0 20px var(--primary);
    margin-bottom: 10px;
}

.brand-slogan {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, #fff, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 4px;
    margin-bottom: 20px;
    text-transform: uppercase;
    animation: fadeIn 1s ease-out forwards;
}

.welcome-content .subtitle {
    font-size: 1.2rem;
    color: var(--accent);
    letter-spacing: 3px;
    margin-bottom: 30px;
}

.tech-decoration .circle-spin {
    width: 100px;
    height: 100px;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary);
    border-right: 2px solid var(--accent);
    border-radius: 50%;
    animation: spin 2s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Game Container (Active Game View) */
#game-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #000;
}

.game-header {
    height: 60px;
    background: rgba(20, 20, 20, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.back-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    display: none; /* Hidden on desktop by default, shown on mobile */
}

.game-header h2 {
    font-size: 18px;
    color: #fff;
    text-shadow: 0 0 5px var(--accent);
}

.game-actions .action-btn {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 18px;
    margin-left: 15px;
    cursor: pointer;
    transition: color 0.3s;
}

.game-actions .action-btn:hover {
    color: #fff;
}

.game-frame-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #111;
    position: relative;
}

.placeholder-frame {
    text-align: center;
    color: #444;
}

.play-icon {
    font-size: 60px;
    margin-bottom: 20px;
    color: var(--primary);
    opacity: 0.5;
}

/* Contact Container */
#contact-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.9);
}

.contact-content {
    text-align: center;
    background: rgba(255,255,255,0.05);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.contact-item i {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 10px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .sidebar-games-grid {
        grid-template-columns: 1fr; /* 1 col on smaller tablets */
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        color: #fff;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: var(--nav-height);
        height: calc(100vh - var(--nav-height));
        width: 60%;
        background: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        transition: right 0.4s ease;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    /* Mobile: Sidebar becomes full width list */
    .lobby-layout {
        flex-direction: column;
    }

    .lobby-sidebar {
        width: 100%;
        height: 100%;
        border-right: none;
    }

    .sidebar-games-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cols on mobile */
    }

    /* Stage is hidden or overlays */
    .lobby-stage {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 20;
    }

    .lobby-stage.active {
        transform: translateX(0);
    }
    
    .back-btn {
        display: block;
    }
    
    .stage-welcome {
        display: none; /* Hide welcome screen on mobile to save space/logic */
    }
}
