        /* CORE PREMIUM THEME SYSTEM */
        :root {
            --bg-base: #06080d;
            --bg-surface: rgba(15, 18, 27, 0.68);
            --bg-surface-light: rgba(24, 28, 40, 0.55);
            --neon-cyan: #38bdf8;
            --neon-purple: #6366f1;
            --neon-accent: #6366f1;
            --neon-accent-rgb: 99, 102, 241;
            --text-main: #f1f5f9;
            --text-muted: #94a3b8;
            --glass-bg: rgba(8, 10, 16, 0.72);
            --glass-border: rgba(255, 255, 255, 0.08);
            --shadow-glow-cyan: 0 0 20px rgba(56, 189, 248, 0.22);
            --shadow-glow-purple: 0 0 20px rgba(99, 102, 241, 0.22);
            --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }

        body.theme-purple { --neon-cyan: #ffffff; --neon-purple: #e8dcc4; --neon-accent: #f0e4cc; --neon-accent-rgb: 240, 228, 204; }
        body.theme-blue { --neon-cyan: #38bdf8; --neon-purple: #2563eb; --neon-accent: #2563eb; --neon-accent-rgb: 37, 99, 235; }
        body.theme-emerald { --neon-cyan: #2dd4bf; --neon-purple: #10b981; --neon-accent: #059669; --neon-accent-rgb: 5, 150, 105; }
        body.theme-cyber { --neon-cyan: #fb7185; --neon-purple: #f59e0b; --neon-accent: #f59e0b; --neon-accent-rgb: 245, 158, 11; }

        * { margin: 0; padding: 0; box-sizing: border-box; }
        
        body {
            font-family: 'Inter', sans-serif;
            background: var(--bg-base);
            color: var(--text-main);
            min-height: 100vh;
            overflow-x: hidden;
            scroll-behavior: smooth;
        }

        #scroll-progress { position: fixed; top: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple)); z-index: 9999; width: 0%; transition: width 0.1s linear; }
        
        .aurora-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; overflow: hidden; pointer-events: none; background: #05070b; }
        .aurora-blob { position: absolute; border-radius: 50%; filter: blur(160px); opacity: 0.09; animation: floatBlob 20s infinite alternate ease-in-out; }
        .blob1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: var(--neon-cyan); }
        .blob2 { bottom: -10%; right: -10%; width: 60vw; height: 60vw; background: var(--neon-purple); animation-delay: -5s; }
        .blob3 { top: 40%; left: 50%; width: 35vw; height: 35vw; background: #334155; opacity: 0.08; animation-duration: 25s; }

        @keyframes floatBlob { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(8%, 12%) scale(1.15); } }

        body::before {
            content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background-image: linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
            background-size: 50px 50px; z-index: -1; pointer-events: none;
        }

        h1, h2, h3, .pixel-font { font-family: 'Space Grotesk', sans-serif; text-transform: none; letter-spacing: 0.2px; font-weight: 700; }
        .logo.pixel-font { font-family: 'Press Start 2P', cursive; letter-spacing: 1px; }
        a { text-decoration: none; color: inherit; }
        ul { list-style: none; }
        button, input, select, textarea { font-family: inherit; color: inherit; }
        button { cursor: pointer; border: none; outline: none; background: none; }

        ::-webkit-scrollbar { width: 10px; height: 10px; }
        ::-webkit-scrollbar-track { background: #06060c; }
        ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 20px; border: 2px solid #06060c; }
        ::-webkit-scrollbar-thumb:hover { background: var(--neon-accent); }

        #loader {
            position: fixed; inset: 0; background: #050508; z-index: 99999;
            display: flex; flex-direction: column; justify-content: center; align-items: center;
            transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* NEW CUSTOM PIXEL CONSTRUCTION ANIMATION FOR "P G" */
        .pixel-pg-container {
            position: relative;
            width: 104px;
            height: 56px;
            transform: scale(1.6);
            margin-bottom: 20px;
        }
        .pxl {
            position: absolute;
            width: 8px;
            height: 8px;
            background: var(--neon-cyan);
            box-shadow: 0 0 8px var(--neon-cyan);
            animation: pxlFly 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
            opacity: 0;
            border-radius: 1px;
        }
        .pxl.prp {
            background: var(--neon-purple);
            box-shadow: 0 0 8px var(--neon-purple);
        }
        @keyframes pxlFly {
            0% { transform: translate(var(--sx), var(--sy)) scale(0.2); opacity: 0; }
            70% { opacity: 1; transform: translate(calc(var(--sx)*0.1), calc(var(--sy)*0.1)) scale(1.2); }
            100% { transform: translate(0, 0) scale(1); opacity: 1; }
        }
        
        /* coordinates for P (step 12px) */
        .p-0-0 { left: 0px; top: 0px; --sx: -200px; --sy: -300px; }
        .p-1-0 { left: 12px; top: 0px; --sx: -100px; --sy: -400px; }
        .p-2-0 { left: 24px; top: 0px; --sx: 50px; --sy: -350px; }
        .p-0-1 { left: 0px; top: 12px; --sx: -300px; --sy: 100px; }
        .p-2-1 { left: 24px; top: 12px; --sx: 200px; --sy: 50px; }
        .p-0-2 { left: 0px; top: 24px; --sx: -150px; --sy: 200px; }
        .p-1-2 { left: 12px; top: 24px; --sx: -50px; --sy: 300px; }
        .p-2-2 { left: 24px; top: 24px; --sx: 150px; --sy: 250px; }
        .p-0-3 { left: 0px; top: 36px; --sx: -250px; --sy: 400px; }
        .p-0-4 { left: 0px; top: 48px; --sx: -100px; --sy: 450px; }

        /* coordinates for G (offset left 60px) */
        .g-0-0 { left: 60px; top: 0px; --sx: 200px; --sy: -300px; }
        .g-1-0 { left: 72px; top: 0px; --sx: 300px; --sy: -400px; }
        .g-2-0 { left: 84px; top: 0px; --sx: 400px; --sy: -250px; }
        .g-0-1 { left: 60px; top: 12px; --sx: 150px; --sy: -100px; }
        .g-0-2 { left: 60px; top: 24px; --sx: 250px; --sy: 100px; }
        .g-2-2 { left: 84px; top: 24px; --sx: 450px; --sy: 50px; }
        .g-3-2 { left: 96px; top: 24px; --sx: 350px; --sy: 150px; }
        .g-0-3 { left: 60px; top: 36px; --sx: 100px; --sy: 300px; }
        .g-3-3 { left: 96px; top: 36px; --sx: 400px; --sy: 350px; }
        .g-0-4 { left: 60px; top: 48px; --sx: 50px; --sy: 400px; }
        .g-1-4 { left: 72px; top: 48px; --sx: 200px; --sy: 450px; }
        .g-2-4 { left: 84px; top: 48px; --sx: 300px; --sy: 400px; }
        .g-3-4 { left: 96px; top: 48px; --sx: 450px; --sy: 250px; }

        header {
            position: sticky; top: 0; z-index: 1000;
            background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
            border-bottom: 1px solid var(--glass-border);
            padding: 16px 5%; display: flex; justify-content: space-between; align-items: center;
            flex-wrap: nowrap; gap: 10px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); transition: var(--transition-smooth);
        }
        header.scrolled { padding: 12px 5%; background: rgba(5, 5, 10, 0.95); border-bottom-color: rgba(255, 255, 255, 0.1); }
        
        .logo { font-size: 1.25rem; color: #fff; text-shadow: 0 0 15px rgba(56, 189, 248, 0.26); cursor: pointer; transition: var(--transition-smooth); }
        .logo span { color: var(--neon-purple); text-shadow: 0 0 15px rgba(99, 102, 241, 0.28); }
        .logo:hover { transform: scale(1.03); }
        
        .nav-links { display: flex; gap: 12px; align-items: center; }
        .nav-menu-links { display: flex; gap: 4px; align-items: center; margin-right: 8px; }
        .nav-menu-links a {
            color: var(--text-muted); font-weight: 500; font-size: 0.88rem;
            padding: 10px 14px; border-radius: 8px; transition: var(--transition-smooth); cursor: pointer;
        }
        .nav-menu-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.04); }
        .mobile-menu-toggle {
            display: none; background: none; border: none; color: var(--text-main);
            font-size: 1.3rem; cursor: pointer; padding: 6px 10px; border-radius: 8px;
        }
        .mobile-menu-toggle:hover { background: rgba(255, 255, 255, 0.05); }
        @media (max-width: 900px) {
            .mobile-menu-toggle { display: block; }
            .nav-links {
                position: absolute; top: 100%; left: 0; right: 0;
                flex-direction: column; align-items: stretch; gap: 0;
                background: rgba(5, 5, 10, 0.97); backdrop-filter: blur(20px);
                border-bottom: 1px solid var(--glass-border);
                max-height: 0; overflow: hidden; padding: 0 5%;
                transition: max-height 0.3s ease, padding 0.3s ease;
            }
            .nav-links.open { max-height: 400px; padding: 12px 5% 20px; }
            .nav-menu-links { flex-direction: column; align-items: stretch; margin-right: 0; gap: 2px; }
            .nav-menu-links a { padding: 14px 10px; text-align: center; }
            .theme-select-container { justify-content: center; margin: 10px 0; }
        }
        .nav-btn {
            color: var(--text-muted); font-weight: 500; padding: 10px 18px; border-radius: 8px;
            transition: var(--transition-smooth); font-size: 0.88rem; border: 1px solid transparent;
        }
        .nav-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.05); }
        
        .theme-select-container { display: flex; align-items: center; background: rgba(0,0,0,0.3); padding: 4px; border-radius: 30px; border: 1px solid var(--glass-border); margin-right: 8px; }
        .theme-dot { width: 16px; height: 16px; border-radius: 50%; margin: 0 4px; cursor: pointer; transition: var(--transition-smooth); border: 2px solid transparent; }
        .theme-dot.t-purple { background: linear-gradient(135deg, #ffffff 50%, #e8dcc4 50%); }
        .theme-dot.t-blue { background: #2563eb; }
        .theme-dot.t-emerald { background: #10b981; }
        .theme-dot.t-cyber { background: #f59e0b; }
        .theme-dot.active { border-color: #fff; transform: scale(1.2); }

        .nav-btn.primary { background: linear-gradient(135deg, var(--neon-purple), #4f46e5); color: #fff; font-weight: 600; box-shadow: 0 4px 15px rgba(99, 102, 241, 0.175); border: 1px solid rgba(255,255,255,0.1); }
        .nav-btn.primary:hover { box-shadow: 0 6px 25px rgba(99, 102, 241, 0.315); transform: translateY(-2px); }

        #hero-play-btn:hover { background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple)); color: #000; box-shadow: 0 6px 25px rgba(56, 189, 248, 0.358); }

        .premium-hero {
            width: 100%; max-width: 1400px; margin: 30px auto 10px auto; padding: 0 5%;
            display: grid; grid-template-columns: 1fr; gap: 30px; align-items: center;
        }
        
        .hero-info-panel {
            background: rgba(13, 13, 23, 0.45); border: 1px solid var(--glass-border);
            padding: 40px; border-radius: 20px; backdrop-filter: blur(15px);
            position: relative; overflow: hidden; box-shadow: 0 20px 45px rgba(0,0,0,0.3);
            transition: var(--transition-smooth); cursor: pointer;
            height: 100%; display: flex; flex-direction: column; justify-content: flex-end;
            min-height: 320px;
        }
        .hero-info-panel:hover { transform: translateY(-8px); border-color: var(--neon-cyan); box-shadow: 0 15px 35px rgba(56, 189, 248, 0.163); }
        .hero-info-panel::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: linear-gradient(to bottom, var(--neon-cyan), var(--neon-purple)); }
        
        .hero-tag { font-size: 0.75rem; color: var(--neon-cyan); letter-spacing: 2px; margin-bottom: 12px; font-weight: 700; display: inline-block; cursor: pointer; transition: var(--transition-smooth); }
        .hero-tag:hover { transform: scale(1.08); text-shadow: 0 0 16px var(--neon-cyan), 0 0 4px #fff; }
        .hero-title { font-size: 1.8rem; line-height: 1.4; color: #fff; margin-bottom: 16px; text-shadow: 0 0 20px rgba(255,255,255,0.05); }
        .hero-desc { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; margin-bottom: 24px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
        
        .hero-stats-row { display: flex; gap: 30px; border-top: 1px solid rgba(255, 255, 255, 0.05); padding-top: 20px; margin-top: auto; }
        .stat-item { display: flex; flex-direction: column; gap: 4px; }
        .stat-num { font-size: 1.3rem; font-weight: 800; color: #fff; }
        .stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
        
        .container { display: flex; flex-direction: column; align-items: center; padding: 10px 5% 60px 5%; max-width: 1400px; margin: 0 auto; width: 100%; }
        .main-content { width: 100%; display: flex; flex-direction: column; align-items: center; }
        
        .category-wrapper { display: flex; align-items: center; width: 100%; max-width: 1300px; margin-bottom: 30px; position: relative; gap: 12px; background: rgba(255,255,255,0.01); padding: 8px; border-radius: 40px; border: 1px solid rgba(255,255,255,0.03); backdrop-filter: blur(5px); }
        .scroll-btn { background: var(--bg-surface-light); border: 1px solid var(--glass-border); color: #fff; border-radius: 50%; width: 42px; height: 42px; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: var(--transition-smooth); flex-shrink: 0; z-index: 10; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
        .scroll-btn:hover { background: var(--neon-accent); border-color: transparent; box-shadow: 0 0 15px rgba(var(--neon-accent-rgb), 0.5); transform: scale(1.05); }
        
        .category-bar { display: flex; gap: 8px; overflow-x: auto; scroll-behavior: smooth; padding: 2px 0; scrollbar-width: none; flex-grow: 1; justify-content: flex-start; transition: opacity 0.35s ease; }
        .category-bar::-webkit-scrollbar { display: none; }
        
        .cat-btn { background: transparent; border: 1px solid transparent; color: var(--text-muted); padding: 10px 22px; border-radius: 30px; font-size: 0.86rem; font-weight: 600; white-space: nowrap; transition: var(--transition-smooth); }
        .cat-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.04); }
        .cat-btn.active { border-color: rgba(255,255,255,0.1); color: #fff; background: linear-gradient(135deg, rgba(var(--neon-accent-rgb), 0.25), rgba(var(--neon-accent-rgb), 0.05)); box-shadow: inset 0 0 12px rgba(var(--neon-accent-rgb), 0.2), 0 4px 15px rgba(0,0,0,0.2); }

        .game-grid { 
            display: grid; 
            grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); 
            gap: 25px; width: 100%; max-width: 1300px; justify-content: center; 
            transition: opacity 0.3s ease;
        }
        
        .game-card { 
            background: rgba(18, 18, 32, 0.45); 
            border-radius: 16px; overflow: hidden; 
            border: 1px solid var(--glass-border); position: relative; 
            transition: var(--transition-smooth); cursor: pointer; 
            display: flex; flex-direction: column; backdrop-filter: blur(10px); 
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
        }
        .game-card:hover { transform: translateY(-8px); border-color: var(--neon-cyan); box-shadow: 0 15px 35px rgba(56, 189, 248, 0.163); }
        .game-card.showcase-highlight { border-color: var(--neon-cyan); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.4), 0 15px 35px rgba(56, 189, 248, 0.25); transition: box-shadow 0.4s ease, border-color 0.4s ease; }
        
        .card-thumb { 
            width: 100%; 
            aspect-ratio: 4 / 3; 
            position: relative; 
            background-size: cover; 
            background-position: top center; 
            overflow: hidden; 
        }
        .card-thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; z-index: 0; }
        .gif-overlay { position: absolute; inset: 0; z-index: 1; background-size: cover; background-position: top center; opacity: 0; transition: opacity 0.4s ease; }
        .game-card:hover .gif-overlay { opacity: 1; }
        .card-thumb::before { content: ''; position: absolute; inset: 0; z-index: 2; background: linear-gradient(to bottom, transparent, rgba(12, 12, 22, 0.95)); }
        
        .play-overlay { position: absolute; inset: 0; z-index: 3; background: rgba(4, 4, 8, 0.5); display: flex; justify-content: center; align-items: center; opacity: 0; transition: var(--transition-smooth); }
        .game-card:hover .play-overlay { opacity: 1; backdrop-filter: blur(3px); }
        .play-btn-circle { width: 50px; height: 50px; background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple)); border-radius: 50%; display: flex; justify-content: center; align-items: center; box-shadow: 0 0 15px var(--neon-cyan); transform: scale(0.85); transition: var(--transition-smooth); }
        .game-card:hover .play-btn-circle { transform: scale(1); }
        .play-btn-circle::after { content: '▶'; color: #fff; font-size: 1.1rem; margin-left: 3px; }
        
        .card-info { 
            padding: 16px; 
            display: flex; flex-direction: column; justify-content: flex-end; 
            flex-grow: 1; position: relative; z-index: 4; 
            background: transparent; 
        }
        .card-genre { 
            font-size: 0.7rem; color: var(--neon-purple); 
            text-transform: uppercase; letter-spacing: 1.5px; 
            font-weight: 700; margin-bottom: 4px; 
        }
        .card-title { 
            font-size: 1.05rem; color: #fff; margin-bottom: 8px; 
            font-weight: 800; line-height: 1.3; transition: var(--transition-smooth); 
        }
        .game-card:hover .card-title { color: var(--neon-cyan); }
        .card-premium-meta { display: flex; align-items: center; justify-content: flex-start; width: 100%; }
        .card-stars-layer { color: #fbbf24; font-size: 0.8rem; letter-spacing: 2px; }

        /* ===== PORTFOLIO SECTIONS ===== */
        .portfolio-section { width: 100%; max-width: 1300px; margin: 70px auto 0 auto; padding: 0 5%; }
        .portfolio-section-header { margin-bottom: 28px; text-align: center; }
        .portfolio-section-title { font-size: 1.3rem; color: #fff; text-shadow: 0 0 15px rgba(56, 189, 248, 0.195); margin-bottom: 8px; }
        .portfolio-section-subtitle { color: var(--text-muted); font-size: 0.9rem; max-width: 560px; margin: 0 auto; line-height: 1.6; }

        .story-panel {
            background: var(--bg-surface); border: 1px solid var(--glass-border); border-radius: 20px;
            padding: 36px; backdrop-filter: blur(10px); box-shadow: 0 8px 20px rgba(0,0,0,0.3);
            display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 26px;
        }
        .story-milestone { position: relative; padding-left: 20px; border-left: 2px solid var(--neon-purple); }
        .story-milestone .milestone-year { font-size: 0.7rem; color: var(--neon-cyan); letter-spacing: 1.5px; font-weight: 800; text-transform: uppercase; margin-bottom: 6px; display: block; }
        .story-milestone p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }
        .story-intro { color: var(--text-main); font-size: 0.95rem; line-height: 1.75; max-width: 900px; margin: 0 auto 32px auto; text-align: center; }

        .past-projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
        .driller-gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
        .driller-gallery-item { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--glass-border); background: var(--bg-surface); box-shadow: 0 15px 35px rgba(0,0,0,0.35); transition: var(--transition-smooth); aspect-ratio: 16/9; }
        .driller-gallery-item:hover { transform: translateY(-6px); border-color: var(--neon-cyan); box-shadow: 0 15px 35px rgba(56, 189, 248, 0.163); }
        .driller-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
        .past-project-card { cursor: default; }
        .past-project-card .card-thumb { aspect-ratio: 16/10; }
        .past-project-card:hover { transform: translateY(-6px); border-color: var(--neon-purple); box-shadow: 0 15px 35px rgba(99, 102, 241, 0.14); }
        .prototype-tag {
            position: absolute; top: 10px; left: 10px; z-index: 4; background: rgba(4,4,8,0.75);
            color: var(--text-muted); font-size: 0.62rem; letter-spacing: 1px; font-weight: 700;
            text-transform: uppercase; padding: 4px 10px; border-radius: 20px; border: 1px solid var(--glass-border);
        }

        .coming-soon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
        .coming-soon-card {
            background: rgba(18, 18, 32, 0.35); border: 1px dashed var(--glass-border); border-radius: 16px;
            aspect-ratio: 4/3; display: flex; flex-direction: column; align-items: center; justify-content: center;
            gap: 10px; transition: var(--transition-smooth);
        }
        .coming-soon-card:hover { border-color: var(--neon-cyan); background: rgba(18, 18, 32, 0.55); }
        .coming-soon-card i { font-size: 1.6rem; color: var(--text-muted); }
        .coming-soon-card span { color: var(--text-muted); font-size: 0.75rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; }

        .viewport-page { display: none; padding: 20px 5% 60px 5%; max-width: 1300px; margin: 0 auto; animation: fadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
        .page-header { text-align: center; margin-bottom: 25px; }
        .page-title-large { font-size: 1.5rem; color: #fff; text-shadow: 0 0 15px rgba(56, 189, 248, 0.227); margin-top: 10px; }
        .page-controls-top { display: flex; justify-content: flex-start; align-items: center; max-width: 960px; margin: 0 auto 20px auto; width: 100%;}
        .back-btn { color: var(--text-muted); font-weight: 600; font-size: 0.9rem; transition: var(--transition-smooth); display: flex; align-items: center; gap: 8px; cursor: pointer; }
        .back-btn:hover { color: #fff; transform: translateX(-3px); }
        
        .gameplay-layout { display: flex; justify-content: center; align-items: flex-start; gap: 24px; width: 100%; }
        .game-container-wrapper { flex-grow: 1; width: 100%; display: flex; justify-content: center; }
        .game-container {
            background: #000; border-radius: 16px; border: 1px solid rgba(255,255,255,0.08);
            box-shadow: 0 30px 60px rgba(0,0,0,0.7); position: relative; overflow: hidden;
            width: 100%; margin: 0 auto;
        }
        /* Orientation-specific sizing - each game keeps its intended aspect ratio and is
           never stretched, never force-rotated. Only the container's proportions change. */
        .game-container.orientation-landscape { max-width: 960px; aspect-ratio: 16 / 9; height: auto; max-height: 75vh; }
        .game-container.orientation-portrait { max-width: 480px; aspect-ratio: 9 / 16; height: auto; max-height: 82vh; }
        /* Fallback for the rare browser without aspect-ratio support */
        @supports not (aspect-ratio: 1 / 1) {
            .game-container.orientation-landscape { height: 540px; }
            .game-container.orientation-portrait { height: 640px; }
        }
        .game-container iframe { width: 100%; height: 100%; border: none; display: block; }

        /* Fullscreen: let the game element expand to fill the whole screen with no chrome around it.
           Aspect ratio no longer applies here - the iframe fills 100% and the game's own
           internal layout takes over, exactly as it did before orientation support was added. */
        .game-container:fullscreen, .game-container:-webkit-full-screen, .game-container:-moz-full-screen, .game-container:-ms-fullscreen {
            width: 100vw; height: 100vh; max-width: none; max-height: none; aspect-ratio: unset; border-radius: 0; border: none; box-shadow: none;
        }
        .game-container:fullscreen iframe, .game-container:-webkit-full-screen iframe, .game-container:-moz-full-screen iframe, .game-container:-ms-fullscreen iframe {
            width: 100%; height: 100%;
        }

        /* Gentle nudge on phones held upright when the selected game wants landscape -
           informational only, never blocks or covers the game itself. */
        .rotate-hint { display: none; }
        @media (max-width: 768px) and (orientation: portrait) {
            .game-container.orientation-landscape .rotate-hint {
                display: flex; align-items: center; gap: 8px; position: absolute; top: 8px; left: 50%;
                transform: translateX(-50%); z-index: 5; background: rgba(5, 5, 10, 0.85); color: #fff;
                font-size: 0.75rem; padding: 6px 14px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.15);
                pointer-events: none; animation: rotateHintFade 5s ease forwards;
            }
        }
        @keyframes rotateHintFade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }

        /* Small transparent Exit Fullscreen control, shown only on mobile while fullscreen is active */
        .mobile-exit-fullscreen-btn {
            position: absolute; top: 12px; right: 64px; z-index: 30;
            width: 44px; height: 44px; border-radius: 50%;
            background: rgba(6, 8, 13, 0.32); color: #fff; border: 1px solid rgba(255,255,255,0.2);
            font-size: 1.15rem; align-items: center; justify-content: center;
            backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
            transition: var(--transition-smooth); cursor: pointer;
            display: none;
        }
        .mobile-exit-fullscreen-btn.visible { display: flex; }
        .mobile-exit-fullscreen-btn:active { background: rgba(6, 8, 13, 0.6); }

        /* Dedicated Fullscreen toggle shown below the game on PC/tablet */
        .game-fullscreen-controls { display: flex; justify-content: center; margin-top: 20px; }
        
        .game-action-bar { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; background: rgba(16, 16, 28, 0.7); backdrop-filter: blur(10px); padding: 14px 20px; border-radius: 14px; border: 1px solid var(--glass-border); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
        .action-btn { background: var(--bg-surface-light); border: 1px solid rgba(255, 255, 255, 0.06); color: #e2e8f0; padding: 11px 20px; border-radius: 10px; font-size: 0.86rem; font-weight: 600; transition: var(--transition-smooth); display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
        .action-btn:hover { color: #fff; border-color: var(--neon-cyan); background: rgba(56, 189, 248, 0.052); box-shadow: 0 0 15px rgba(56, 189, 248, 0.13); transform: translateY(-2px); }
        
        .game-details { max-width: 960px; margin: 30px auto 0 auto; background: rgba(15, 15, 26, 0.6); backdrop-filter: blur(15px); border-radius: 16px; padding: 32px; border: 1px solid var(--glass-border); }
        .details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 35px; }
        @media (max-width: 768px) { .details-grid { grid-template-columns: 1fr; gap: 25px; } }
        
        .detail-section h3 { font-size: 0.85rem; color: var(--neon-cyan); margin-bottom: 16px; border-left: 3px solid var(--neon-cyan); padding-left: 10px; }
        .detail-section p { color: var(--text-muted); font-size: 0.94rem; line-height: 1.6; margin-bottom: 12px; }
        .detail-section p strong { color: #fff; }
        .prompt-box { background: #07070c; padding: 18px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.05); font-size: 0.86rem; color: #a7f3d0; white-space: pre-wrap; font-family: monospace; overflow-x: auto; line-height: 1.6; margin-top: 10px; }

        /* STORE CSS ADDITIONS */
        .content-box { max-width: 1000px; margin: 0 auto; background: rgba(15, 15, 26, 0.5); backdrop-filter: blur(15px); border-radius: 16px; padding: 35px; border: 1px solid var(--glass-border); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
        .store-header-banner { background: linear-gradient(135deg, rgba(99, 102, 241, 0.07), rgba(56, 189, 248, 0.065)); border: 1px solid rgba(255,255,255,0.05); padding: 25px; border-radius: 12px; text-align: center; margin-bottom: 30px; }
        .store-grid-premium { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
        
        .product-card { background: rgba(8, 8, 15, 0.8); border: 1px solid rgba(255,255,255,0.05); border-radius: 14px; padding: 20px; text-align: center; transition: var(--transition-smooth); position: relative; overflow: hidden; }
        .product-card:hover { transform: translateY(-5px); border-color: var(--neon-purple); box-shadow: 0 10px 25px rgba(99, 102, 241, 0.105); }
        .product-badge { position: absolute; top: 12px; right: 12px; background: var(--neon-cyan); color: #000; font-size: 0.65rem; font-weight: bold; padding: 4px 8px; border-radius: 4px; z-index: 10; }
        
        .product-img-container { width: 100%; height: 190px; margin-bottom: 18px; border-radius: 10px; overflow: hidden; position: relative; display: flex; justify-content: center; align-items: center; background: rgba(255,255,255,0.02); }
        .product-img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); filter: drop-shadow(0 8px 16px rgba(0,0,0,0.5)); }
        
        .product-overlay { position: absolute; inset: 0; background: rgba(10, 10, 20, 0.85); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 15px; opacity: 0; transition: var(--transition-smooth); backdrop-filter: blur(4px); }
        .product-overlay-text { color: #e2e8f0; font-size: 0.88rem; text-align: center; line-height: 1.5; transform: translateY(15px); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); font-weight: 500; }
        
        .product-card:hover .product-img { transform: scale(1.18); }
        .product-card:hover .product-overlay { opacity: 1; }
        .product-card:hover .product-overlay-text { transform: translateY(0); }

        .product-card h4 { color: #fff; font-size: 1.1rem; margin-bottom: 8px; font-weight: 700; }
        .product-card p { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 15px; }
        .product-price { font-size: 1.4rem; color: #fbbf24; font-weight: 800; margin-bottom: 20px; text-shadow: 0 0 10px rgba(251, 191, 36, 0.2); }
        
        /* TOURNAMENT ENHANCED CSS & 300PX GRID AUTO-ADJUSTMENT */
        .tournament-hero { background: url('images/site/Gemini_Generated_Image_82y03w82y03w82y0.png') center/cover; border-radius: 14px; padding: 40px; text-align: center; position: relative; overflow: hidden; margin-bottom: 30px; border: 1px solid rgba(56, 189, 248, 0.195); }
        .tournament-hero::before { content: ''; position: absolute; inset: 0; background: rgba(10,10,20,0.85); backdrop-filter: blur(3px); }
        .tourney-content { position: relative; z-index: 2; }
        
        .tourney-300-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 25px;
            margin-top: 20px;
            margin-bottom: 40px;
            width: 100%;
        }

        .tourney-300-card {
            background: rgba(12, 12, 22, 0.75);
            border: 1px solid var(--glass-border);
            border-radius: 14px;
            overflow: hidden;
            transition: var(--transition-smooth);
            display: flex;
            flex-direction: column;
            backdrop-filter: blur(10px);
            position: relative;
            box-shadow: 0 8px 20px rgba(0,0,0,0.4);
        }

        .tourney-300-card:hover {
            transform: translateY(-8px);
            border-color: var(--neon-cyan);
            box-shadow: 0 15px 30px rgba(56, 189, 248, 0.195);
        }

        .tourney-img-box {
            width: 100%;
            height: 200px;
            max-width: 300px;
            margin: 0 auto;
            position: relative;
            overflow: hidden;
            background: #000;
        }

        .tourney-img-box img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s ease;
        }

        .tourney-300-card:hover .tourney-img-box img {
            transform: scale(1.25);
        }

        .tourney-badge-tag {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(56, 189, 248, 0.9);
            color: #000;
            font-size: 0.65rem;
            font-weight: 800;
            padding: 4px 8px;
            border-radius: 4px;
            text-transform: uppercase;
            z-index: 5;
            letter-spacing: 0.5px;
        }

        .tourney-card-body {
            padding: 18px;
            display: flex;
            flex-direction: column;
            flex-grow: 1;
        }

        .tourney-card-body h4 {
            color: #fff;
            font-size: 1.05rem;
            margin-bottom: 8px;
            line-height: 1.3;
        }

        .tourney-card-body p {
            color: var(--text-muted);
            font-size: 0.85rem;
            line-height: 1.5;
            margin-bottom: 15px;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .tourney-card-footer {
            margin-top: auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-top: 1px solid rgba(255,255,255,0.06);
            padding-top: 12px;
        }

        .tourney-coins {
            color: #fbbf24;
            font-weight: 800;
            font-size: 0.95rem;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        /* DYNAMIC BRACKET CHART SYSTEM */
        .bracket-section-container {
            background: rgba(13, 13, 23, 0.8);
            border: 1px solid var(--neon-purple);
            border-radius: 16px;
            padding: 25px;
            margin-top: 30px;
            box-shadow: var(--shadow-glow-purple);
        }

        .bracket-controls {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
            align-items: center;
            margin-bottom: 25px;
            background: rgba(0,0,0,0.3);
            padding: 15px;
            border-radius: 10px;
            border: 1px solid rgba(255,255,255,0.05);
        }

        .bracket-chart-grid {
            display: flex;
            gap: 20px;
            overflow-x: auto;
            padding: 15px 5px;
            justify-content: space-between;
        }

        .bracket-round-col {
            flex: 1;
            min-width: 220px;
            display: flex;
            flex-direction: column;
            gap: 20px;
            justify-content: center;
        }

        .bracket-match-node {
            background: rgba(20, 20, 35, 0.9);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 10px;
            padding: 12px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            position: relative;
            transition: var(--transition-smooth);
        }

        .bracket-match-node:hover {
            border-color: var(--neon-cyan);
            box-shadow: 0 0 15px rgba(56, 189, 248, 0.13);
        }

        .bracket-player-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: rgba(0, 0, 0, 0.5);
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 0.85rem;
            font-weight: 500;
        }

        .bracket-player-row.winner {
            background: rgba(16, 185, 129, 0.2);
            border: 1px solid #10b981;
            color: #a7f3d0;
            font-weight: bold;
        }

        .bracket-player-row.eliminated {
            opacity: 0.4;
            text-decoration: line-through;
            color: #ef4444;
        }

        .bracket-coin-badge {
            background: rgba(251, 191, 36, 0.15);
            color: #fbbf24;
            padding: 2px 6px;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: bold;
        }

        .subscription-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 20px;}
        .plan-card { background: rgba(8, 8, 15, 0.7); padding: 40px 30px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.08); display: flex; flex-direction: column; position: relative; transition: var(--transition-smooth); }
        .plan-card:hover { transform: translateY(-8px); border-color: rgba(255,255,255,0.2); box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
        .plan-card.popular-plan { border-color: var(--neon-cyan); background: linear-gradient(180deg, rgba(56, 189, 248, 0.04) 0%, rgba(8, 8, 15, 0.8) 100%); box-shadow: 0 0 30px rgba(56, 189, 248, 0.065); }
        .plan-features { margin: 25px 0; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; text-align: left; }
        .feature-item { display: flex; align-items: center; gap: 10px; color: #e2e8f0; font-size: 0.95rem; }
        .feature-item i { color: var(--neon-cyan); font-size: 0.9rem; }
        
        .modal-overlay { position: fixed; inset: 0; background: rgba(3, 3, 6, 0.85); backdrop-filter: blur(8px); display: none; justify-content: center; align-items: center; z-index: 99999; opacity: 0; transition: opacity 0.3s ease; }
        .modal-overlay.active { display: flex; opacity: 1; }
        .modal-content { background: #0c0c14; padding: 40px; border-radius: 20px; width: 92%; max-width: 440px; border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6); transform: scale(0.94); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); position: relative; }
        .modal-overlay.active .modal-content { transform: scale(1); border-color: var(--neon-purple); box-shadow: var(--shadow-glow-purple); }
        .close-modal { position: absolute; top: 20px; right: 22px; color: var(--text-muted); font-size: 1.5rem; font-weight: bold; transition: var(--transition-smooth); cursor: pointer; }
        .close-modal:hover { color: #fff; transform: rotate(90deg); }
        .modal-title { font-size: 0.95rem; color: #fff; margin-bottom: 26px; text-align: center; }
        .option-grid { display: flex; flex-direction: column; gap: 14px; }
        .opt-btn { background: rgba(255,255,255,0.03); border: 1px solid rgba(255, 255, 255, 0.06); padding: 15px 20px; border-radius: 12px; text-align: left; font-size: 0.95rem; font-weight: 600; display: flex; align-items: center; gap: 14px; transition: var(--transition-smooth); color: #e2e8f0; cursor: pointer; }
        .opt-btn:hover { border-color: var(--neon-cyan); background: rgba(56, 189, 248, 0.04); transform: translateX(6px); color: #fff; box-shadow: 0 0 15px rgba(56, 189, 248, 0.065); }

        #pg-info-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(3, 3, 5, 0.92); backdrop-filter: blur(10px); z-index: 999999; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s ease; }
        #pg-info-modal.active-modal { display: flex; opacity: 1; }
        .info-modal-wrapper { background: #0d0d15; padding: 45px; border-radius: 20px; width: 90%; max-width: 660px; max-height: 82vh; overflow-y: auto; border: 1px solid rgba(255,255,255,0.1); position: relative; box-shadow: 0 25px 60px rgba(0,0,0,0.5); transform: scale(0.95); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
        #pg-info-modal.active-modal .info-modal-wrapper { transform: scale(1); border-color: var(--neon-purple); box-shadow: var(--shadow-glow-purple); }

        footer { background: #050508; padding: 50px 5% 40px 5%; border-top: 1px solid rgba(255,255,255,0.03); color: #57657a; font-size: 0.88rem; text-align: center; margin-top: auto; }
        .footer-content { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; align-items: center; }
        .social-icons { display: flex; gap: 14px; justify-content: center; }
        .social-icons a { color: var(--text-muted); font-size: 1.15rem; transition: var(--transition-smooth); display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); }
        .social-icons a:hover { color: #fff; transform: translateY(-4px); border-color: var(--neon-cyan); box-shadow: 0 5px 15px rgba(56, 189, 248, 0.163); }
        .footer-links { display: flex; gap: 28px; color: var(--text-muted); font-weight: 500; font-size: 0.88rem; flex-wrap: wrap; justify-content: center; }
        .footer-links a { transition: var(--transition-smooth); cursor: pointer; }
        .footer-links a:hover { color: var(--neon-cyan); text-shadow: 0 0 8px rgba(56, 189, 248, 0.26); }
        .footer-copyright { font-size: 0.68rem; color: #475569; letter-spacing: 0.5px; }

        #scrollToTopBtn { position: fixed; bottom: 35px; right: 35px; width: 48px; height: 48px; background: linear-gradient(135deg, var(--neon-purple), #4f46e5); color: #fff; border: none; border-radius: 50%; font-size: 1.3rem; cursor: pointer; display: none; z-index: 999; box-shadow: 0 4px 20px rgba(99, 102, 241, 0.28); transition: var(--transition-smooth); }
        #scrollToTopBtn:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(99, 102, 241, 0.42); }

        @keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
        @media (max-width: 900px) {
            .premium-hero { grid-template-columns: 1fr; gap: 20px; margin-top: 15px; }
            .hero-info-panel { min-height: 280px; }
        }
        /* Mobile: shrink social icons so all remain visible on one line without horizontal overflow */
        @media (max-width: 768px) {
            .footer-content { max-width: 100%; }
            .social-icons { gap: clamp(6px, 1.8vw, 14px); flex-wrap: nowrap; max-width: 100%; }
            .social-icons a { width: clamp(30px, 8vw, 44px); height: clamp(30px, 8vw, 44px); font-size: clamp(0.8rem, 2.8vw, 1.15rem); flex-shrink: 0; }
        }

        /* Small phones (iPhone SE / small Android, ~360-400px wide) */
        @media (max-width: 420px) {
            .logo { font-size: 1rem; }
            .hero-title { font-size: 1.4rem; }
            .hero-info-panel { padding: 22px; min-height: unset; }
            .hero-stats-row { flex-wrap: wrap; gap: 14px; }
            .game-container.orientation-landscape { max-height: 260px; }
            .game-container.orientation-portrait { max-height: 70vh; }
            .portfolio-section-title { font-size: 1.1rem; }
        }

        /* Mobile landscape: short viewport height, so keep the game viewport and hero from
           forcing excessive vertical scrolling and keep on-screen controls reachable. */
        @media (max-height: 480px) and (orientation: landscape) {
            .premium-hero { margin-top: 8px; }
            .hero-info-panel { padding: 20px; min-height: unset; }
            .driller-gallery-grid { display: none; }
            .game-container.orientation-landscape { max-height: 88vh; }
            .game-container.orientation-portrait { max-height: 88vh; max-width: 320px; }
            header { padding: 10px 4%; }
        }
