:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --border: #1a1a1a;
    --border-soft: #e0e0e0;
    --gray-soft: #f8f8f8;
    --font-main: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

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

body {
    background-color: #e5e5e5;
    background-image: radial-gradient(#d1d1d1 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--text);
    font-family: var(--font-main);
    line-height: 1.5;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.main-wrapper {
    width: 92vw;
    max-width: 600px;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 12px 12px 0px rgba(0,0,0,0.05);
}

/* Banner Area - Strict 2048:426 Proportions */
.banner-area {
    width: 100%;
    height: 0;
    padding-bottom: 20.8%; /* (426 / 2048) * 100 */
    background: #000;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.studio-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.studio-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Split Layout */
.middle-layout {
    display: flex;
    flex-direction: row;
    height: 420px;
    overflow: hidden;
}

/* Sidebar Navigation */
#side-bar {
    width: 100px;
    padding: 20px 10px;
    border-left: 1px solid var(--border-soft);
    background: var(--gray-soft);
}

#nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    font-family: var(--font-mono);
    font-size: 11px;
    cursor: pointer;
    padding: 6px 10px;
    color: #777;
    transition: all 0.2s ease;
    text-transform: lowercase;
    text-align: right;
    width: 100%;
    text-decoration: none;
    display: block;
}

.nav-btn:hover {
    color: var(--text);
    background: #f9f9f9;
}

.nav-btn.active {
    color: var(--text) !important;
    font-weight: 700 !important;
    border: 1px solid var(--border) !important;
    background: var(--bg) !important;
    box-shadow: 3px 3px 0px var(--border) !important;
    transform: translate(-1px, -1px);
    opacity: 1 !important;
}

/* Content Area */
.content-panel {
    flex: 1;
    overflow: hidden;
}

.tab-content {
    display: none;
    height: 100%;
}

.tab-content.active {
    display: block;
}

.scroll-container {
    height: 100%;
    overflow-y: auto;
    padding: 20px;
}

/* Games Grid */
.games-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.game-card {
    display: block;
    padding: 16px;
    border: 1px solid var(--border-soft);
    background: #fff;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.game-card:hover {
    border-color: var(--border);
    transform: translateY(-2px);
    box-shadow: 4px 4px 0px rgba(0,0,0,0.05);
}

.game-thumb {
    float: left;
    width: 140px;
    height: 88px;
    margin-right: 20px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    background: #000;
}

.retro-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
    opacity: 0.9;
    transition: all 0.4s ease;
}

.game-card:hover .retro-img {
    filter: grayscale(0.5) contrast(1);
    transform: scale(1.05);
}

.game-details {
    display: block;
}

.game-details h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.game-desc {
    font-size: 12px;
    line-height: 1.5;
    color: #444;
    margin: 0 0 12px 0;
    text-align: left;
}

.btn-simple {
    display: inline-block;
    font-size: 10px;
    font-family: var(--font-mono);
    text-decoration: none;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 3px 12px;
    text-transform: uppercase;
    font-weight: 700;
    transition: all 0.1s;
}

.btn-simple:hover {
    background: var(--text);
    color: var(--bg);
    box-shadow: 2px 2px 0px rgba(0,0,0,0.2);
}

/* Game Detail Page Styles */
.game-page-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.game-iframe-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--border);
    background: #000;
    overflow: hidden;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
    position: relative;
}

.btn-fullscreen {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 5px 10px;
    font-size: 9px;
    font-family: var(--font-mono);
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
    z-index: 10;
    text-transform: uppercase;
    opacity: 0.6;
}

.btn-fullscreen:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    opacity: 1;
}

.game-iframe-container:fullscreen {
    width: 100vw;
    height: 100vh;
    aspect-ratio: auto;
    border: none;
}

.game-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.game-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.gallery-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 1px solid var(--border-soft);
}

.game-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border);
    padding-bottom: 8px;
}

.game-header-row h2 {
    font-size: 20px;
    text-transform: uppercase;
}

.btn-back {
    font-family: var(--font-mono);
    font-size: 11px;
    text-decoration: none;
    color: #888;
}

.btn-back:hover {
    color: var(--text);
}

.game-full-desc {
    font-size: 13px;
    line-height: 1.6;
    color: #333;
}

.game-full-desc p {
    margin-bottom: 12px;
}

/* Download Section */
.download-section h3 {
    font-size: 14px;
    margin-bottom: 12px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 4px;
}

.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dl-link {
    display: block;
    width: 140px;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.dl-link:hover {
    transform: translateY(-3px);
    filter: brightness(1.05);
}

.dl-img-btn {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 4px;
}

/* Text Content */
.text-block h2 {
    font-size: 16px;
    margin-bottom: 15px;
}

.text-block p {
    font-size: 14px;
    margin-bottom: 10px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-links a {
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 14px;
}

/* Footer */
#footer {
    border-top: 1px solid #eee;
    padding: 10px;
    text-align: center;
    font-size: 10px;
    color: #999;
}

/* Scrollbar */
.scroll-container::-webkit-scrollbar {
    width: 4px;
}
.scroll-container::-webkit-scrollbar-thumb {
    background: #ccc;
}

@media (max-width: 600px) {
    .main-wrapper {
        width: 100vw;
        height: 100vh;
        border: none;
    }
    .middle-layout {
        flex-direction: column-reverse;
        height: auto;
        flex: 1;
    }
    #side-bar {
        width: 100%;
        border-left: none;
        border-bottom: 1px solid var(--border-soft);
        padding: 10px;
    }
    #nav {
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }
    .nav-btn {
        text-align: center;
        width: auto;
    }
    .content-panel {
        height: auto;
        flex: 1;
    }
    .game-thumb {
        width: 120px;
        height: 75px;
        margin-right: 12px;
        margin-bottom: 8px;
    }
}

