:root {
            --accent: #4db8e8;
            --accent-glow: rgba(77, 184, 232, 0.4);
            --bg-dark: #050505;
            --glass: rgba(12, 12, 14, 0.9);
            --glass-light: rgba(20, 20, 25, 0.6);
            --glass-border: rgba(255, 255, 255, 0.1);
            --text-main: #ffffff;
            --text-dim: #a0a0a0;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

        body {
            background-color: var(--bg-dark);
            color: var(--text-main);
            font-family: 'Inter', sans-serif;
            overflow: hidden; 
            height: 100vh;
            width: 100vw;
        }

        /* --- BACKGROUND --- */
        .cinematic-bg {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: radial-gradient(circle at center, rgba(0,0,0,0.3) 0%, #000 100%),
                        url('/img/background.jpg');
            background-size: cover;
            background-position: center;
            z-index: -1;
            transition: transform 10s ease;
        }

        /* --- UI CONTAINER --- */
        .ui-layer {
            height: 100%;
            width: 100%;
            display: flex;
            flex-direction: column;
            padding: 30px 50px;
            position: relative;
            z-index: 10;
            overflow-y: auto;
        }

        /* --- TOP BAR --- */
        .top-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-shrink: 0;
            margin-bottom: 20px;
            position: relative;
            z-index: 20;
        }

        .brand-wrapper {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .logo-img { height: 35px; width: auto; }
        
        .brand-text {
            font-family: 'Rajdhani', sans-serif;
            font-weight: 700;
            font-size: 1.4rem;
            letter-spacing: 2px;
            text-transform: uppercase;
        }

        .nav-menu {
            display: flex;
            gap: 5px;
            background: var(--glass);
            padding: 5px;
            border-radius: 50px;
            border: 1px solid var(--glass-border);
            backdrop-filter: blur(10px);
        }

        .nav-item {
            padding: 8px 18px;
            border-radius: 40px;
            text-decoration: none;
            color: var(--text-dim);
            font-size: 0.8rem;
            font-weight: 600;
            transition: 0.3s;
            cursor: pointer;
            font-family: 'Rajdhani', sans-serif;
            letter-spacing: 1px;
            text-transform: uppercase;
        }

        .nav-item.active, .nav-item:hover {
            background: rgba(255,255,255,0.1);
            color: #fff;
            box-shadow: 0 0 15px rgba(255,255,255,0.05);
        }

        .mobile-toggle {
            display: none;
            font-size: 1.5rem;
            color: #fff;
            cursor: pointer;
            background: var(--glass);
            padding: 10px;
            border-radius: 8px;
            border: 1px solid var(--glass-border);
        }

        /* --- CONTENT AREA --- */
        .content-area {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            position: relative;
        }

        .tab-content {
            display: none;
            flex-direction: column;
            height: 100%;
            justify-content: space-between; 
            animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
            padding-bottom: 10px;
        }

        .tab-content.active { display: flex; }

        @keyframes slideUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .hero-text { max-width: 800px; padding-left: 20px; }
        
        h1 {
            font-family: 'Rajdhani', sans-serif;
            font-size: 5rem;
            line-height: 0.9;
            font-weight: 700;
            text-transform: uppercase;
            margin-bottom: 25px;
            text-shadow: 0 10px 40px rgba(0,0,0,0.8);
        }

        p.lead {
            color: rgba(255,255,255,0.85);
            font-size: 1.1rem;
            max-width: 550px;
            line-height: 1.6;
            margin-bottom: 40px;
            border-left: 3px solid var(--accent);
            padding-left: 25px;
        }

        .engine-tag {
            font-family: 'Rajdhani', sans-serif;
            color: var(--accent);
            border: 1px solid var(--accent);
            padding: 6px 12px;
            font-size: 0.8rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 2px;
            display: inline-block;
            margin-bottom: 25px;
            background: rgba(77, 184, 232, 0.1);
        }

        .btn-main {
            background: #fff; 
            color: #000; 
            padding: 14px 35px; 
            text-decoration: none; 
            font-weight: 800; 
            text-transform: uppercase; 
            font-family: 'Rajdhani', sans-serif;
            letter-spacing: 1px;
            clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
            transition: 0.3s;
            display: inline-block;
            cursor: pointer;
        }
        .btn-main:hover {
            background: var(--accent);
            box-shadow: 0 0 20px var(--accent-glow);
            transform: translateY(-2px);
        }

        /* --- BOTTOM DOCK (Studio Tab) --- */
        .bottom-dock {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            margin-top: auto;
            gap: 40px;
            width: 100%;
        }

        .project-card {
            width: 320px;
            background: var(--glass);
            border: 1px solid var(--glass-border);
            border-radius: 4px;
            padding: 25px;
            backdrop-filter: blur(20px);
            transition: 0.3s;
            position: relative;
            overflow: hidden;
            flex-shrink: 0;
        }
        .project-card:hover { border-color: var(--accent); transform: translateY(-5px); }

        .card-header { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 0.75rem; text-transform: uppercase; color: var(--text-dim); font-weight: 700; letter-spacing: 1px; }
        .project-title { font-family: 'Rajdhani', sans-serif; font-size: 1.8rem; font-weight: 700; margin-bottom: 5px; color: #fff; }
        .status-indicator { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--accent); margin-top: 15px; font-weight: 600; text-transform: uppercase; }
        .pulse { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 10px var(--accent); animation: pulse 2s infinite; }

        /* News Section (Home) */
        .news-container-home {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            max-width: 800px;
        }

        .news-label {
            font-family: 'Rajdhani';
            font-weight: 700;
            color: var(--text-dim);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 10px;
            font-size: 0.9rem;
            width: 100%;
            text-align: right;
        }

        .mini-news-grid {
            display: flex;
            gap: 15px;
            width: 100%;
            justify-content: flex-end;
        }

        .mini-news-card {
            width: 220px;
            background: var(--glass);
            border: 1px solid var(--glass-border);
            border-radius: 4px;
            overflow: hidden;
            transition: 0.3s;
            cursor: pointer;
            display: flex;
            flex-direction: column;
        }

        .mini-news-card:hover {
            border-color: var(--accent);
            transform: translateY(-5px);
            background: rgba(20, 20, 25, 0.95);
        }

        .mini-news-img {
            width: 100%;
            height: 100px;
            object-fit: cover;
            border-bottom: 1px solid var(--glass-border);
        }

        .mini-news-content { padding: 12px; }
        .mini-news-date { font-size: 0.65rem; color: var(--accent); font-weight: 700; text-transform: uppercase; display: block; margin-bottom: 4px; }
        .mini-news-title { font-size: 0.8rem; font-weight: 600; color: #eee; line-height: 1.3; }

        .footer-info {
            margin-top: 15px;
            text-align: right;
            font-family: 'Rajdhani', sans-serif;
            color: var(--text-dim);
            font-size: 0.75rem;
            letter-spacing: 1px;
            opacity: 0.7;
        }

        /* --- TEAM GRID (Fixed Layout) --- */
        .about-wrapper { display: flex; gap: 50px; height: 100%; align-items: center; }
        .about-text { flex: 1; max-width: 600px; }
        
        .team-grid { 
            flex: 1; 
            display: grid; 
            /* ÄNDRING HÄR: auto-fill istället för auto-fit för att förhindra stretching */
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
            gap: 20px; 
            max-height: 70vh; 
            overflow-y: auto; 
            padding: 10px;
            align-content: start; /* Håller korten i toppen */
        }
        
        .team-card { 
            background: var(--glass); 
            border: 1px solid var(--glass-border); 
            padding: 20px; 
            border-radius: 8px; 
            text-align: center; 
            transition: 0.3s; 
        }
        
        .team-card:hover { 
            border-color: var(--accent); 
            transform: translateY(-5px); 
            background: rgba(10, 10, 12, 0.95); 
            box-shadow: 0 5px 15px rgba(0,0,0,0.5);
        }
        
        .team-avatar { width: 80px; height: 80px; background: #333; border-radius: 50%; margin: 0 auto 15px auto; border: 2px solid var(--accent); overflow: hidden; }
        .team-avatar img { width: 100%; height: 100%; object-fit: cover; }
        .team-name { font-family: 'Rajdhani'; font-weight: 700; font-size: 1.2rem; color: #fff; }
        .team-role { font-size: 0.8rem; color: var(--accent); text-transform: uppercase; margin-top: 5px; }

        /* --- CONTACT FORM --- */
        .contact-container { max-width: 600px; width: 100%; margin: 0 auto; background: var(--glass); padding: 40px; border: 1px solid var(--glass-border); border-radius: 8px; }
        .form-group { margin-bottom: 20px; }
        .form-label { display: block; font-family: 'Rajdhani'; text-transform: uppercase; font-size: 0.9rem; margin-bottom: 8px; color: var(--text-dim); }
        .form-input, .form-textarea { width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border); padding: 12px; color: #fff; font-family: 'Inter', sans-serif; border-radius: 4px; }
        .form-input:focus, .form-textarea:focus { outline: none; border-color: var(--accent); }

        /* --- NEWS TAB --- */
        .news-wrapper { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; max-height: 70vh; overflow-y: auto; padding-right: 10px; }
        .news-card-big { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; transition: 0.3s; cursor: pointer;}
        .news-card-big:hover { border-color: var(--accent); transform: translateY(-3px); background: rgba(10,10,12,0.95); }
        .news-img { height: 150px; background: #222; object-fit: cover; }
        .news-content { padding: 20px; }
        .news-meta { font-size: 0.75rem; color: var(--accent); text-transform: uppercase; margin-bottom: 5px; font-weight: 600; }
        .news-headline { font-family: 'Rajdhani'; font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; line-height: 1.2; }
        .news-excerpt { font-size: 0.9rem; color: var(--text-dim); line-height: 1.5; }

        /* --- GAMES & TECH --- */
        .games-wrapper { display: flex; gap: 30px; margin-top: 50px; flex-wrap: wrap; }
        .game-cover { width: 250px; height: 350px; background: #222; border: 1px solid var(--glass-border); position: relative; display: flex; align-items: flex-end; padding: 20px; overflow: hidden; transition: 0.3s; cursor: pointer; }
        .game-cover:hover { border-color: var(--accent); transform: scale(1.02); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
        .game-cover img { position: absolute; top:0; left:0; width:100%; height:100%; object-fit: cover; opacity: 0.6; z-index: 0; transition: 0.3s; }
        .game-cover:hover img { opacity: 0.3; transform: scale(1.1); }
        .game-info { position: relative; z-index: 2; pointer-events: none; }
        .open-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0); font-size: 2rem; color: var(--accent); transition: 0.3s; z-index: 5; }
        .game-cover:hover .open-icon { transform: translate(-50%, -50%) scale(1); }
        .tech-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
        .tech-box { background: var(--glass); border: 1px solid var(--glass-border); padding: 30px; border-radius: 8px; }
        .tech-box h3 { font-family: 'Rajdhani'; font-size: 1.5rem; margin-bottom: 10px; color: var(--accent); }

        /* MODAL */
        .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(15px); z-index: 999; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: 0.4s ease; }
        .modal-overlay.open { opacity: 1; pointer-events: all; }
        .modal-content { width: 90%; max-width: 1000px; background: var(--bg-dark); border: 1px solid var(--glass-border); border-radius: 8px; overflow: hidden; position: relative; transform: translateY(50px); transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1); max-height: 90vh; display: flex; flex-direction: column; }
        .modal-overlay.open .modal-content { transform: translateY(0); }
        .modal-header { height: 300px; background-size: cover; background-position: center; position: relative; }
        .modal-header::after { content: ''; position: absolute; top:0; left:0; width:100%; height:100%; background: linear-gradient(to bottom, transparent, var(--bg-dark)); }
        .modal-close { position: absolute; top: 20px; right: 20px; font-size: 2rem; color: #fff; cursor: pointer; z-index: 10; background: rgba(0,0,0,0.5); border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
        .modal-close:hover { background: var(--accent); color: #000; }
        .modal-body { padding: 40px; display: grid; grid-template-columns: 2fr 1fr; gap: 40px; overflow-y: auto; }
        .modal-stats { border-left: 1px solid var(--glass-border); padding-left: 30px; }
        .stat-row { margin-bottom: 20px; }
        .stat-label { font-family: 'Rajdhani'; color: var(--text-dim); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; }
        .stat-value { font-size: 1.1rem; color: #fff; font-weight: 600; }
        .feature-list { list-style: none; margin-top: 20px; }
        .feature-list li { margin-bottom: 10px; color: var(--text-dim); display: flex; align-items: center; gap: 10px; }
        .feature-list li i { color: var(--accent); }

        @media (max-width: 900px) {
            body { overflow-y: auto; height: auto; min-height: 100vh; }
            .ui-layer { padding: 20px; display: block; height: auto; }
            .nav-menu { display: none; flex-direction: column; position: absolute; top: 70px; left: 0; width: 100%; background: rgba(10, 10, 12, 0.95); border: none; border-bottom: 1px solid var(--glass-border); padding: 20px; z-index: 50; align-items: center; gap: 15px; }
            .nav-menu.mobile-open { display: flex; }
            .mobile-toggle { display: block; }
            h1 { font-size: 3rem; margin-top: 20px;}
            .content-area { display: block; margin-bottom: 40px; }
            .tab-content { height: auto; min-height: 50vh; justify-content: flex-start; gap: 40px; padding-bottom: 0; }
            
            /* Responsive Layouts */
            .bottom-dock { flex-direction: column; align-items: flex-start; gap: 30px; padding-top: 0; }
            .news-container-home { align-items: flex-start; width: 100%; }
            .mini-news-grid { flex-direction: column; width: 100%; }
            .mini-news-card { width: 100%; display: flex; flex-direction: row; height: 80px; }
            .mini-news-img { width: 80px; height: 100%; border-bottom: none; border-right: 1px solid var(--glass-border); }
            .footer-info { text-align: left; }

            .project-card, .contact-container, .news-wrapper { width: 100%; }
            .about-wrapper { flex-direction: column; }
            .team-grid { width: 100%; }
            .tech-readout { text-align: left; margin-top: 10px; }
            .games-wrapper { justify-content: center; }
            .game-cover { width: 100%; max-width: 300px; height: 400px; }
            .tech-grid { grid-template-columns: 1fr; }
            .socials-desktop { display: none !important; }
            .modal-body { grid-template-columns: 1fr; gap: 20px; }
            .modal-stats { border-left: none; border-top: 1px solid var(--glass-border); padding-left: 0; padding-top: 20px; }
        }