/* =========================================
   1. CORE VARIABLES & RESET
   ========================================= */
:root {
    --bg-color: #1a1a1a;        
    --text-color: #eeeeee;      
    --accent-color: #88C057;    
    --secondary-color: #333;    
    --font-retro: 'Press Start 2P', cursive;
    --font-body: 'Roboto', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
}

/* =========================================
   2. UTILITIES & NAVIGATION
   ========================================= */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

a { text-decoration: none; color: var(--accent-color); }

h1, h2, h3, .logo, .video-label {
    font-family: var(--font-retro);
    text-transform: uppercase;
}

nav {
    padding: 20px 0;
    border-bottom: 2px solid var(--accent-color);
    background: var(--bg-color); /* Ensures nav isn't transparent on overlay */
    z-index: 50;
    position: relative;
}

.logo {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: flex;         
    align-items: center;   
    justify-content: center;
    gap: 10px;             
}

.nav-img {
    height: 35px; 
    width: auto;
    border-radius: 4px; 
    object-fit: contain;
}

.menu { list-style: none; }
.menu li { display: inline-block; margin: 0 10px; }
.menu a { color: white; font-weight: bold; font-size: 0.8rem; }
.menu a:hover { color: var(--accent-color); }

/* =========================================
   3. HERO & MAIN SECTIONS
   ========================================= */
.hero { padding: 60px 0; }
.hero h1 { font-size: 1.5rem; margin-bottom: 15px; color: var(--accent-color); line-height: 1.4; }
.dino-art {
    font-family: monospace;
    white-space: pre;
    color: var(--accent-color);
    font-weight: bold;
    display: inline-block;
    text-align: left;
    margin-top: 20px;
    max-width: 100%;
    overflow-x: auto;
    font-size: 12px;
}

/* Media & Shorts */
.media-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    align-items: flex-start; 
}
.video-label {
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 8px;
    letter-spacing: 1px;
}
.tv-style {
    flex: 2;
    min-width: 300px;
    max-width: 600px;
}
.iframe-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; 
    height: 0;
    background: black;
    border: 3px solid #444;
    border-radius: 4px;
    box-shadow: 0 4px 0 #222; 
}
.phone-style {
    width: 100%;
    max-width: 300px; 
    /* Centers the phone */
    margin: 0 auto; 
}
.iframe-wrapper-short {
    position: relative;
    width: 100%;
    padding-bottom: 177.7%; 
    height: 0;
    background: black;
    border: 8px solid #333; 
    border-radius: 20px;    
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    overflow: hidden;
}
iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* Games Grid */
.section { padding: 60px 0; }
.alt-bg { background-color: #252525; }
h2 { margin-bottom: 40px; color: white; font-size: 1.5rem; }

.game-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }
.game-card {
    background: var(--secondary-color);
    border: 2px solid #444;
    width: 300px;
    padding: 15px;
    border-radius: 8px;
    transition: transform 0.2s;
    display: flex; flex-direction: column; justify-content: space-between;
}
.game-card:hover { transform: translateY(-5px); border-color: var(--accent-color); }
.game-image {
    height: 150px; background: black; display: flex; align-items: center;
    justify-content: center; margin-bottom: 15px; color: #555;
    font-family: var(--font-retro); font-size: 0.6rem;
}
.game-card h3 { font-size: 0.8rem; line-height: 1.4; margin-bottom: 10px; min-height: 40px; }
.btn {
    display: inline-block; margin-top: 15px; background: var(--accent-color);
    color: #000; padding: 10px 15px; font-family: var(--font-retro);
    font-size: 0.7rem; border-radius: 4px;
}
.btn:hover { background: white; }
.tba-card { opacity: 0.7; border-style: dashed; }
.tba-card:hover { opacity: 1; border-style: solid; }
.btn.disabled { background: #555; color: #888; cursor: default; }
.btn.disabled:hover { background: #555; }

/* About Section */
.about-wrapper { display: flex; flex-wrap: wrap; gap: 30px; align-items: center; text-align: left; max-width: 800px; margin: 0 auto; }
.about-text { flex: 1; min-width: 300px; }
.about-text p { margin-bottom: 15px; font-size: 0.95rem; }
.mission-text { color: var(--accent-color); font-family: var(--font-retro); font-size: 0.7rem !important; }

/* Footer */
footer { padding: 50px 0; border-top: 4px solid var(--accent-color); background: #111; }
.social-grid { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-bottom: 20px; }
.social-btn {
    display: flex; align-items: center; justify-content: center;
    width: 50px; height: 50px; background: #333; color: var(--accent-color);
    font-size: 1.5rem; text-decoration: none;
    box-shadow: inset 2px 2px 0px 0px #555, inset -2px -2px 0px 0px #222, 2px 2px 0px 0px #000;
    transition: all 0.1s;
}
.social-btn:hover { background: var(--accent-color); color: #000; transform: translate(2px, 2px); box-shadow: none; }
.copyright { color: #666; font-size: 0.7rem; font-family: var(--font-retro); }


/* =========================================
   4. TEAM PAGE & CHARACTER SELECT STYLES
   ========================================= */

/* Fix navigation on team page */
.team-page-body {
    /* dvh fixes Android address bar issues */
    height: 100vh; 
    height: 100dvh; 
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Hide main window scrollbar */
}

/* The Container for the Character Select */
.char-select-container {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    background-image: 
        linear-gradient(rgba(0, 255, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 0, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    width: 100%;
}

/* The Horizontal Scrolling Track */
.team-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory; 
    width: 100%;
    height: 100%;
    scrollbar-width: none; 
}
.team-carousel::-webkit-scrollbar { display: none; }

/* Individual Member Slide */
.member-slide {
    flex: 0 0 100%; 
    width: 100%;
    height: 100%;
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-top: 60px; /* Space for the "Choose Character" title */
}

/* The Card Look */
.card-border {
    background: #1a1a1a;
    border: 4px solid var(--accent-color);
    padding: 30px;
    max-width: 450px;
    width: 100%;
    text-align: center;
    box-shadow: 10px 10px 0px #000; 
    position: relative;
}

/* Avatar Circle */
.avatar-box {
    width: 120px;
    height: 120px;
    background: var(--accent-color);
    border-radius: 50%; 
    border: 4px solid #fff;
    margin: 0 auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem; 
    color: #1a1a1a;
    overflow: hidden; 
    flex-shrink: 0;
}
.avatar-box img { width: 100%; height: 100%; object-fit: cover; }

.role {
    color: #888;
    margin-bottom: 20px;
    font-family: var(--font-retro);
    font-size: 0.7rem;
}

/* Stats inside the card */
.stats-box {
    background: #000;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px dashed #444;
    font-family: var(--font-retro);
    font-size: 0.6rem;
    text-align: left;
}
.stat-row { display: flex; align-items: center; margin-bottom: 8px; }
.stat-row span { width: 60px; }
.bar { flex-grow: 1; height: 8px; background: #333; }
.bar .fill { height: 100%; background: var(--accent-color); }

.bio { font-size: 0.9rem; margin-bottom: 20px; line-height: 1.5; }

.social-mini a {
    font-size: 1.5rem;
    margin: 0 10px;
    color: #555;
    transition: 0.2s;
}
.social-mini a:hover { color: var(--accent-color); }

/* Navigation Arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.8);
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    font-size: 2rem;
    padding: 10px 20px;
    cursor: pointer;
    z-index: 10;
    transition: 0.2s;
}
.nav-arrow:hover { background: var(--accent-color); color: black; }
.nav-arrow.left { left: 20px; }
.nav-arrow.right { right: 20px; }


/* =========================================
   5. ANIMATED HEADER & MOBILE OPTIMIZATIONS
   ========================================= */

/* The Animated Header */
.select-title {
    position: absolute;
    top: 5%; 
    left: 0;
    width: 100%;
    text-align: center;
    font-family: var(--font-retro);
    color: white;
    font-size: 1.8rem;
    z-index: 20; 
    pointer-events: none; 
    text-shadow: 4px 4px 0px #000;
    animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
    0% { transform: scale(1); text-shadow: 4px 4px 0px #000; }
    50% { transform: scale(1.05); text-shadow: 4px 4px 0px #000, 0 0 20px var(--accent-color); color: var(--accent-color); }
    100% { transform: scale(1); text-shadow: 4px 4px 0px #000; }
}

/* ANDROID / MOBILE TWEAKS */
@media (max-width: 768px) {
    /* 1. Make Title Smaller */
    .select-title {
        font-size: 0.8rem;
        top: 15px;
    }

    /* 2. Adjust Card Sizing */
    .card-border {
        padding: 15px; 
        width: 95%; /* Fits better on narrow screens */
        max-height: 80vh; /* Prevents card from being taller than screen */
        overflow-y: auto; /* Adds scroll inside card if bio is huge */
    }

    /* 3. Shrink the Avatar */
    .avatar-box {
        width: 80px;
        height: 80px;
        font-size: 2rem;
        margin-bottom: 10px;
    }

    /* 4. Compact the Stats and Bio */
    .stats-box {
        padding: 8px;
        margin-bottom: 10px;
        font-size: 0.5rem; 
    }
    
    .bio {
        font-size: 0.8rem; 
        margin-bottom: 10px;
    }
    .role { margin-bottom: 10px; }

    /* 5. Move Arrows */
    .nav-arrow {
        font-size: 1.2rem;
        padding: 8px 12px;
        background: rgba(0,0,0,0.6);
    }
    .nav-arrow.left { left: 5px; }
    .nav-arrow.right { right: 5px; }
}

/* --- UPDATES FOR ANIMATIONS --- */

/* 1. Stat Bars Animation (Smoother & Slower) */
.bar .fill {
    height: 100%;
    background: var(--accent-color);
    width: 0%; /* Start empty */
    /* Changed from linear 1s to a smooth 1.5s ease-out */
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1); 
    box-shadow: 0 0 5px var(--accent-color);
}

/* 2. Typewriter Text Styling */
.bio {
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
    /* Min-height ensures the card doesn't shrink while typing */
    min-height: 100px; 
    font-family: 'Roboto', sans-serif; /* Cleaner font for reading */
    color: #ccc;
}
/* =========================================
   DINO HATCHER (RETRO TERMINAL STYLE)
   ========================================= */

/* 1. Launcher Button */
#game-launcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #000;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    font-family: monospace;
    font-weight: bold;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 5px 5px 0px rgba(0,0,0,0.5); /* Retro Block Shadow */
    transition: transform 0.1s;
}

#game-launcher:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(0,0,0,0.5);
    background: #111;
}

/* 2. Modal/Window */
.game-hidden { display: none !important; }

#game-modal {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 999;
}

/* 3. The Terminal Frame */
.terminal-frame {
    width: 300px;
    background: #000;
    border: 2px solid var(--accent-color);
    padding: 10px;
    font-family: var(--font-retro);
    box-shadow: 10px 10px 0px rgba(0,0,0,0.8);
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: var(--accent-color);
    font-size: 0.6rem;
    border-bottom: 1px dashed var(--accent-color);
    padding-bottom: 5px;
}

.close-game {
    background: transparent;
    border: none;
    color: #ff5555;
    font-family: monospace;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
}

.close-game:hover { color: white; }

/* 4. The Screen */
.terminal-screen {
    color: var(--accent-color);
    text-align: center;
}

.score-line {
    font-size: 0.8rem;
    margin-bottom: 20px;
}

/* 5. The ASCII Egg */
.ascii-zone {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

#dino-egg {
    font-family: monospace;
    white-space: pre; /* Keeps ASCII art shape */
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1.1;
    cursor: pointer;
    user-select: none;
    color: var(--accent-color);
    transition: transform 0.05s;
}

#dino-egg:active {
    transform: scale(0.95); /* Little click squash */
}

/* 6. Buttons */
.upgrades-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.terminal-btn {
    background: #111;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 8px;
    font-family: monospace;
    font-size: 0.7rem;
    cursor: pointer;
    text-align: left;
    transition: 0.1s;
}

.terminal-btn:hover {
    background: var(--accent-color);
    color: black;
}

.console-log {
    margin-top: 15px;
    font-size: 0.55rem;
    font-family: monospace;
    color: #666;
    text-align: left;
    height: 15px;
    border-top: 1px solid #333;
    padding-top: 5px;
}

/* Mobile Tweak */
@media (max-width: 600px) {
    #game-modal {
        right: 50%;
        transform: translateX(50%);
        bottom: 90px;
        width: 90%;
    }
    .terminal-frame {
        width: 100%;
    }
}
/* =========================================
   COMM LINK (CHAT) STYLES
   ========================================= */

/* 1. Launcher Button (Bottom Left) */
#chat-launcher {
    position: fixed;
    bottom: 20px;
    left: 20px; /* LEFT side */
    width: 80px; /* Slightly wider for text */
    height: 60px;
    background: #000;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    font-family: monospace;
    font-weight: bold;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 5px 5px 0px rgba(0,0,0,0.5);
    transition: transform 0.1s;
}

#chat-launcher:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(0,0,0,0.5);
    background: #111;
}

/* 2. Modal/Window */
.chat-hidden { display: none !important; }

#chat-modal {
    position: fixed;
    bottom: 90px;
    left: 20px; /* Align with launcher */
    z-index: 999;
}

/* 3. Specific Size for Chat Window */
.chat-size {
    width: 300px;
    height: 400px; /* Taller than the game */
    display: flex;
    flex-direction: column;
}

/* 4. The Iframe itself */
.chat-iframe {
    width: 100%;
    flex-grow: 1; /* Fills remaining height */
    background: #000; /* Dark background while loading */
}

/* Mobile Tweak */
@media (max-width: 600px) {
    #chat-modal {
        left: 50%;
        transform: translateX(-50%); /* Center it on phone */
        bottom: 90px;
        width: 90%;
    }
    /* Hide the game launcher on mobile if it gets too crowded? 
       Or just move them closer together. */
    #chat-launcher {
        left: 10px;
        width: 60px;
        font-size: 0.6rem;
    }
}
/* Ensure the Chat Frame uses the Green Accent Color */
.terminal-frame.chat-size {
    border: 2px solid var(--accent-color); /* Forces Green Border */
    background: #000;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.8);
}

/* Remove default white background from iframe if it exists */
.chat-iframe {
    background: #000;
}