@import url('https://fonts.googleapis.com/css2?family=VT323&family=IBM+Plex+Mono:wght@400;600&family=Orbitron:wght@400;700&display=swap');

:root {
    --primary-bg: #0d0d10;
    --container-bg: rgba(20, 22, 28, 0.7);
    --border-color: rgba(128, 128, 140, 0.3);
    --text-primary: #cdd6f4;
    --text-secondary: #7f849c;
    --accent-color: #d946ef; /* Unsettling Purple */
    --accent-glow: rgba(217, 70, 239, 0.4);
    --terminal-green: #00ff41;
    --error-red: #f38ba8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--primary-bg);
}
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--primary-bg); }
::-webkit-scrollbar-thumb { background-color: var(--accent-color); }

body {
    background-color: var(--primary-bg);
    background-image: 
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(to right, var(--border-color) 1px, transparent 1px);
    background-size: 30px 30px;
    color: var(--text-primary);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    cursor: none;
    animation: bg-pan 60s linear infinite;
}
body.lightbox-active {
    overflow: hidden;
    cursor: auto !important;
}

@keyframes bg-pan { from { background-position: 0 0; } to { background-position: -300px -300px; } }

@media (hover: none) {
    body { cursor: auto; }
    .cursor { display: none !important; }
}
body.lightbox-active .cursor { display: none !important; }

.cursor {
    position: fixed; width: 24px; height: 24px;
    border: 2px solid var(--accent-color);
    pointer-events: none; z-index: 9999;
    transition: transform 0.1s ease-out, background-color 0.2s ease;
    will-change: transform; display: flex;
    align-items: center; justify-content: center;
    mix-blend-mode: difference;
}
.cursor::before {
    content: '+'; font-size: 20px;
    color: var(--accent-color); transition: transform 0.2s ease;
}
.cursor.hover { transform: scale(1.5); background-color: var(--accent-glow); }
.cursor.hover::before { transform: rotate(225deg); }

.scanlines, .vignette { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.scanlines { background: linear-gradient(to bottom, rgba(180, 180, 180, 0.05) 50%, transparent 50%); background-size: 100% 4px; z-index: 9998; animation: scanline-move 10s linear infinite; }
.vignette { box-shadow: inset 0 0 200px rgba(0,0,0,0.7); z-index: 9997; }

@keyframes scanline-move { from { background-position: 0 0; } to { background-position: 0 -40px; } }

.loading-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--primary-bg); display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 10000; transition: opacity 0.8s ease-out; }
.loading-screen.hidden { opacity: 0; pointer-events: none; }
.loading-text { font-family: 'VT323', monospace; font-size: 24px; color: var(--text-secondary); margin-bottom: 20px; letter-spacing: 2px; }
.progress-bar { width: 300px; height: 4px; background: var(--border-color); }
.progress-fill { height: 100%; background: var(--accent-color); width: 0%; transition: width 0.1s linear; box-shadow: 0 0 10px var(--accent-glow); }

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
header { height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; text-align: center; margin-bottom: 100px; }
#mibz-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.header-content { position: relative; z-index: 2; background: rgba(13, 13, 16, 0.5); padding: 40px; backdrop-filter: blur(5px); }
.logo-img { width: 120px; margin-bottom: 20px; animation: logo-float 8s ease-in-out infinite; }
@keyframes logo-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.logo { font-family: 'Orbitron', sans-serif; font-size: 48px; color: var(--text-primary); text-transform: uppercase; letter-spacing: 4px; margin-bottom: 10px; }
.tagline { font-family: 'VT323', monospace; font-size: 24px; color: var(--accent-color); letter-spacing: 3px; text-shadow: 0 0 10px var(--accent-glow); }
nav ul { display: flex; justify-content: center; list-style: none; gap: 30px; margin-top: 40px; }
nav a { color: var(--text-secondary); text-decoration: none; text-transform: uppercase; font-size: 16px; font-family: 'VT323', monospace; letter-spacing: 2px; padding: 10px 15px; border: 1px solid transparent; transition: all 0.3s ease; }
nav a:hover { color: var(--text-primary); border-color: var(--accent-color); background: var(--accent-glow); text-shadow: 0 0 8px var(--accent-glow); }

.content-section { padding: 80px 0; margin-bottom: 80px; background: var(--container-bg); border: 1px solid var(--border-color); backdrop-filter: blur(10px); position: relative; }
.section-header { font-family: 'VT323', monospace; font-size: 42px; text-transform: uppercase; letter-spacing: 3px; margin-bottom: 60px; padding-left: 2rem; position: relative; color: var(--text-primary); }
.section-header::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 1rem; height: 100%; background: var(--accent-color); box-shadow: 0 0 15px var(--accent-glow); }

.game-entry { padding: 2rem; margin-bottom: 60px; border-bottom: 1px solid var(--border-color); transition: background-color 0.4s ease; }
.game-entry:hover { background-color: rgba(255, 255, 255, 0.02); }
.game-entry:last-child { border-bottom: none; margin-bottom: 0; }
.game-header { display: grid; grid-template-columns: 250px 1fr; gap: 40px; align-items: start; }
.game-cover-container { perspective: 1000px; }
.game-cover-link { display: block; text-decoration: none; border: 1px solid var(--border-color); transition: all 0.3s ease; }
.game-cover-link:hover { border-color: var(--accent-color); box-shadow: 0 0 20px var(--accent-glow); }
.game-cover { transition: transform 0.2s ease-out; }
.game-cover img { width: 100%; display: block; image-rendering: pixelated; filter: saturate(0.8) contrast(1.1); }
.game-info h2 { font-family: 'Orbitron', sans-serif; font-size: 32px; color: var(--text-primary); margin-bottom: 10px; transition: text-shadow 0.3s ease; }
.game-entry:hover .game-info h2 { animation: title-glitch 0.5s infinite; }
@keyframes title-glitch { 0% { text-shadow: 1px 0 0 var(--error-red), -1px 0 0 var(--terminal-green); } 25% { text-shadow: -1px 0 0 var(--error-red), 1px 0 0 var(--terminal-green); } 50% { text-shadow: 1px 0 0 var(--error-red), -1px 0 0 var(--terminal-green); opacity: 0.8; } 100% { text-shadow: -1px 0 0 var(--error-red), 1px 0 0 var(--terminal-green); } }
.game-meta { display: flex; flex-wrap: wrap; gap: 15px; font-family: 'VT323', monospace; color: var(--text-secondary); margin-bottom: 15px; letter-spacing: 1px; }
.game-meta span { background: var(--primary-bg); padding: 2px 8px; border: 1px solid var(--border-color); }
.game-description { font-size: 16px; max-width: 80ch; margin-bottom: 30px; }
.game-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }

.cta-button { display: inline-block; padding: 12px 24px; background: var(--accent-color); color: var(--primary-bg); text-decoration: none; text-transform: uppercase; letter-spacing: 2px; font-weight: 600; font-family: 'VT323', monospace; font-size: 18px; border: 1px solid var(--accent-color); transition: all 0.3s ease; position: relative; overflow: hidden; }
.cta-button:hover { background: transparent; color: var(--accent-color); box-shadow: 0 0 25px var(--accent-glow); }
.cta-button::before { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; background: var(--accent-glow); border-radius: 50%; transform: translate(-50%, -50%); transition: width 0.4s, height 0.4s; z-index: -1; }
.cta-button:hover::before { width: 250%; height: 500%; }
.cta-button.secondary { background: transparent; color: var(--text-secondary); border-color: var(--text-secondary); }
.cta-button.secondary:hover { color: var(--text-primary); border-color: var(--accent-color); }
.trailer-btn::after { content: '▶'; display: inline-block; margin-left: 10px; font-size: 14px; transition: transform 0.3s ease; }
.trailer-btn:hover::after { transform: scale(1.2); }

.cta-tag { font-family: 'VT323', monospace; font-size: 18px; color: var(--terminal-green); letter-spacing: 1px; animation: blink 1.5s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.game-screenshots { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; margin-top: 30px; }
.screenshot { border: 1px solid var(--border-color); transition: all 0.3s ease; overflow: hidden; position: relative; cursor: pointer; }
.screenshot::before { content: 'ENLARGE'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.8); color: var(--text-primary); padding: 8px 12px; font-family: 'VT323', monospace; letter-spacing: 1px; opacity: 0; transition: opacity 0.3s ease; z-index: 1; }
.screenshot:hover::before { opacity: 1; }
.screenshot:hover { border-color: var(--accent-color); transform: scale(1.05); box-shadow: 0 0 20px var(--accent-glow); z-index: 2; }
.screenshot img { width: 100%; height: 120px; object-fit: cover; display: block; image-rendering: pixelated; transition: filter 0.3s ease; }
.screenshot:hover img { filter: brightness(1.2); }

.personnel-content, .collaborate-content, .contact-content { padding: 0 2rem; }
.studio-info, .collaborate-content, .join-info { max-width: 80ch; }
.studio-info { margin-bottom: 60px; }
.studio-info h3, .collaborate-content h3, .join-info h3 { font-family: 'Orbitron', sans-serif; font-size: 24px; margin-bottom: 15px; color: var(--text-primary); }
.join-info a { color: var(--accent-color); text-decoration: none; }
.join-info a:hover { text-decoration: underline; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.team-member { background: var(--primary-bg); border: 1px solid var(--border-color); padding: 30px; text-align: center; transition: all 0.3s ease; }
.team-member:hover { border-color: var(--accent-color); transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.4); }
.pixel-avatar { width: 100px; height: 100px; margin: 0 auto 20px; border: 1px solid var(--border-color); overflow: hidden; }
.pixel-avatar img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; filter: grayscale(1); transition: filter 0.3s ease; }
.team-member:hover .pixel-avatar img { filter: grayscale(0); }
.member-name { font-family: 'Orbitron', sans-serif; font-size: 20px; color: var(--text-primary); margin-bottom: 5px; }
.member-role { font-family: 'IBM Plex Mono', monospace; color: var(--text-secondary); font-size: 14px; }
.collaborate-content p { margin-bottom: 20px; }
.collaborate-content .cta-button { margin-top: 20px; }

.contact-content { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: start; }
.retro-form { background: var(--primary-bg); border: 1px solid var(--border-color); padding: 30px; }
.form-toggle { display: flex; gap: 15px; margin-bottom: 25px; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; }
.toggle-btn { background: none; border: none; color: var(--text-secondary); font-family: 'VT323', monospace; font-size: 18px; cursor: pointer; transition: all 0.3s ease; padding: 5px; }
.toggle-btn:hover { color: var(--text-primary); }
.toggle-btn.active { color: var(--accent-color); text-shadow: 0 0 8px var(--accent-glow); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-secondary); font-size: 14px; letter-spacing: 1px; font-family: 'VT323', monospace; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; background: var(--primary-bg); border: 1px solid var(--border-color); color: var(--text-primary); font-family: 'IBM Plex Mono', monospace; font-size: 16px; transition: all 0.3s ease; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 10px var(--accent-glow); }
.form-group textarea { min-height: 140px; resize: vertical; }
.submit-btn { width: 100%; padding: 15px; font-size: 18px; }
.submit-btn:disabled { background: var(--text-secondary); border-color: var(--text-secondary); color: var(--primary-bg); cursor: wait; }
.submit-btn.error { background: var(--error-red); border-color: var(--error-red); animation: shake 0.5s ease; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.discord-cta { padding: 80px 0; text-align: center; background: var(--container-bg); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); margin-bottom: 80px; }
.discord-cta-content { width: 90%; max-width: 700px; margin: 0 auto; }
.discord-cta h2 { font-family: 'Orbitron', sans-serif; font-size: 32px; margin-bottom: 15px; }
.discord-cta p { color: var(--text-secondary); margin-bottom: 30px; font-size: 18px; line-height: 1.6; }

footer { padding: 40px 0; text-align: center; }
.social-links { display: flex; justify-content: center; gap: 30px; margin-bottom: 20px; }
.social-links a { color: var(--text-secondary); text-decoration: none; font-family: 'VT323', monospace; font-size: 18px; letter-spacing: 1px; transition: all 0.3s ease; }
.social-links a:hover { color: var(--accent-color); text-shadow: 0 0 10px var(--accent-glow); }
.copyright { color: var(--text-secondary); font-size: 14px; max-width: 600px; margin: 0 auto; }

.hidden-message { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.9); color: var(--error-red); padding: 30px; border: 1px solid var(--error-red); font-family: 'VT323', monospace; font-size: 20px; z-index: 10001; text-align: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; backdrop-filter: blur(10px); box-shadow: 0 0 30px rgba(243, 139, 168, 0.5); }
.hidden-message.show { opacity: 1; }
.glitch-effect { font-size: 32px; animation: glitch 1s linear infinite; }
@keyframes glitch { 2%,64%{ transform: translate(2px,0) skew(0deg); } 4%,60%{ transform: translate(-2px,0) skew(0deg); } 62%{ transform: translate(0,0) skew(5deg); } }

.lightbox { display: none; align-items: center; justify-content: center; position: fixed; z-index: 10002; left: 0; top: 0; width: 100%; height: 100%; background: rgba(13, 13, 16, 0.95); backdrop-filter: blur(8px); opacity: 0; transition: opacity 0.3s ease; cursor: auto; }
.lightbox.show { display: flex; opacity: 1; }
.lightbox-content { position: relative; width: 90%; height: 90%; display: flex; align-items: center; justify-content: center; }
.lightbox-image-container, .lightbox-video-container { display: none; width: 100%; height: 100%; align-items: center; justify-content: center; }
.lightbox-image-container { position: relative; }
.lightbox-video-container { width: 90%; max-width: 1280px; aspect-ratio: 16 / 9; }
.lightbox.show .lightbox-image-container.active, .lightbox.show .lightbox-video-container.active { display: flex; }
#lightboxVideo { width: 100%; height: 100%; }
.lightbox-image { max-width: 100%; max-height: 100%; border: 2px solid var(--border-color); image-rendering: pixelated; }
.lightbox-close, .lightbox-nav { position: absolute; background: var(--container-bg); border: 1px solid var(--border-color); color: var(--text-primary); cursor: pointer; transition: all 0.3s ease; font-family: 'VT323', monospace; z-index: 10003; }
.lightbox-close:hover, .lightbox-nav:hover { background: var(--accent-glow); border-color: var(--accent-color); color: var(--text-primary); }
.lightbox-close { top: -40px; right: -40px; font-size: 24px; width: 35px; height: 35px; line-height: 35px; text-align: center; }
.lightbox-nav { top: 50%; transform: translateY(-50%); font-size: 24px; padding: 10px 15px; }
.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }
.lightbox-counter { position: absolute; bottom: -40px; left: 50%; transform: translateX(-50%); color: var(--text-secondary); font-family: 'VT323', monospace; font-size: 18px; background: var(--primary-bg); padding: 5px 10px; border: 1px solid var(--border-color); }

.animate-ready { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.animate-in { opacity: 1; transform: translateY(0); }

@media (max-width: 1024px) {
    .game-header { grid-template-columns: 1fr; }
    .game-cover-container { max-width: 300px; margin: 0 auto 30px; }
    .game-info { text-align: center; }
    .game-meta, .game-actions { justify-content: center; }
    .contact-content { grid-template-columns: 1fr; }
    .join-info { margin-bottom: 40px; }
    .lightbox-close { top: -5px; right: -5px; }
    .lightbox-video-container { width: 95%; }
}
@media (max-width: 768px) {
    body { font-size: 14px; }
    .container { width: 95%; }
    .logo { font-size: 36px; }
    .tagline { font-size: 20px; }
    header { margin-bottom: 60px; }
    .header-content { padding: 20px; }
    .section-header { font-size: 32px; padding-left: 1rem; }
    .content-section, .game-entry { padding: 40px 1rem; }
    .game-info h2 { font-size: 28px; }
    nav ul { gap: 10px; flex-wrap: wrap; }
    nav a { padding: 8px; }
    .lightbox-nav { display: none; }
    .lightbox-close { top: 10px; right: 10px; background: var(--primary-bg); }
}
#soundToggle { position: fixed; bottom: 20px; right: 20px; background: var(--container-bg); border: 1px solid var(--border-color); color: var(--text-secondary); padding: 10px 15px; cursor: pointer; font-family: 'VT323', monospace; font-size: 16px; z-index: 1001; transition: all 0.3s ease; backdrop-filter: blur(5px); }
#soundToggle:hover { border-color: var(--accent-color); color: var(--text-primary); box-shadow: 0 0 10px var(--accent-glow); }
/* Final Polishing Styles */

/* New Sub-tagline style */
.sub-tagline {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 16px;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-top: 15px;
}

/* Style for the "Transmit Message" button */
.cta-button.full-width {
    width: 100%;
}

/* Remove old submit button styles if they exist */
.submit-btn {
    /* This class is no longer used, but this prevents conflicts. */
    display: none;
}

/* New Direct Email Link style */
.direct-email-link {
    margin-top: 25px;
    font-family: 'VT323', monospace;
    font-size: 18px;
    letter-spacing: 1px;
}
.direct-email-link .prompt-text {
    color: var(--terminal-green);
}
.direct-email-link a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}
.direct-email-link a:hover {
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--accent-glow);
}