/* Bird Game 3 - Retro 2005 Style */

:root {
    --xbox-green: #107C10;
    --neon-green: #39FF14;
    --crt-green: #00FF41;
    --bg-color: #0d0d0d;
    --panel-bg: #000000;
    --scanline-color: rgba(0, 0, 0, 0.5);
    --text-glow: 0 0 5px var(--crt-green);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--crt-green);
    font-family: 'VT323', monospace;
    font-size: 20px;
    overflow-x: hidden;
    line-height: 1.4;
}

/* --- CRT Effect Overlay --- */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%
    ), linear-gradient(
        90deg,
        rgba(255, 0, 0, 0.06),
        rgba(0, 255, 0, 0.02),
        rgba(0, 0, 255, 0.06)
    );
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 999;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.95; }
    50% { opacity: 1.0; }
    100% { opacity: 0.98; }
}

/* --- Layout --- */
.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--xbox-green);
    padding-bottom: 20px;
}

h1 {
    font-family: 'Press Start 2P', cursive;
    color: var(--neon-green);
    text-shadow: var(--text-glow);
    font-size: 32px;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

h2 {
    font-family: 'Press Start 2P', cursive;
    color: #fff;
    font-size: 18px;
}

h3 {
    font-family: 'Press Start 2P', cursive;
    color: var(--xbox-green);
    font-size: 14px;
}

.subtitle {
    color: #888;
    font-size: 18px;
    text-transform: uppercase;
}

/* --- Navigation --- */
nav {
    margin-top: 20px;
    background: #000;
    border: 1px solid var(--xbox-green);
    padding: 10px;
    display: flex;
    justify-content: center;
    gap: 20px;
    box-shadow: 0 0 10px rgba(16, 124, 16, 0.3);
    flex-wrap: wrap;
}

nav button {
    background: transparent;
    border: none;
    color: var(--xbox-green);
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    cursor: pointer;
    padding: 10px 15px;
    text-transform: uppercase;
    transition: all 0.2s;
}

nav button:hover, nav button.active {
    color: var(--neon-green);
    text-shadow: 0 0 8px var(--neon-green);
    transform: scale(1.05);
}

/* --- Content Sections --- */
.section {
    display: none;
    animation: fadeIn 0.5s;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Game Area --- */
.game-wrapper {
    background: #000;
    border: 4px solid var(--xbox-green);
    border-radius: 4px;
    padding: 5px;
    margin: 20px auto;
    max-width: 600px;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
    position: relative;
}

.game-container {
    width: 100%;
    height: 500px;
    position: relative;
    overflow: hidden;
}

.game-placeholder {
    width: 100%;
    height: 400px;
    background: #111;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #444;
    font-family: 'Press Start 2P', cursive;
    text-align: center;
    border: 1px solid #222;
}

.btn-play {
    margin-top: 20px;
    background: var(--xbox-green);
    color: #fff;
    border: 2px solid #fff;
    padding: 15px 30px;
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    cursor: pointer;
    text-shadow: 2px 2px #000;
    box-shadow: 4px 4px 0 #000;
    transition: transform 0.1s;
}

.btn-play:hover {
    background: var(--neon-green);
    color: #000;
}

.btn-play:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
}

.btn-secondary {
    background: #333;
    color: var(--crt-green);
    border: 1px solid var(--xbox-green);
    padding: 10px 20px;
    font-family: 'VT323', monospace;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #444;
    border-color: var(--neon-green);
}

/* --- Panels & Grid --- */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.panel {
    background: rgba(0, 20, 0, 0.8);
    border: 1px solid var(--xbox-green);
    padding: 20px;
    position: relative;
}

.panel::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--neon-green);
    border-left: 2px solid var(--neon-green);
}

.panel h2 {
    margin-top: 0;
    border-bottom: 1px dashed var(--xbox-green);
    padding-bottom: 10px;
    color: #fff;
}

/* --- Timeline --- */
.timeline-item {
    border-left: 2px solid var(--xbox-green);
    padding-left: 20px;
    margin-bottom: 20px;
    position: relative;
}

.timeline-item::before {
    content: "•";
    position: absolute;
    left: -6px;
    top: 0;
    color: var(--neon-green);
    font-size: 20px;
}

.year {
    color: var(--neon-green);
    font-weight: bold;
    font-size: 24px;
    font-family: 'Press Start 2P', cursive;
}

/* --- Character Cards --- */
.char-card {
    border: 1px solid #444;
    padding: 15px;
    text-align: center;
    background: #000;
    transition: all 0.3s;
    cursor: pointer;
}

.char-card:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
    transform: translateY(-5px);
}

.char-card.selected {
    border-color: var(--neon-green);
    border-width: 2px;
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.5);
}

.char-img {
    width: 120px;
    height: 120px;
    background: #222;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 12px;
    border: 1px solid #333;
}

.char-stats {
    margin-top: 10px;
    text-align: left;
}

.stat-bar {
    margin: 5px 0;
    font-size: 14px;
}

/* --- Quiz/Form Elements --- */
.quiz-container {
    max-width: 700px;
    margin: 0 auto;
}

.quiz-question {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 20, 0, 0.5);
    border: 1px solid #333;
}

.quiz-options {
    margin-top: 15px;
}

.quiz-option {
    display: block;
    padding: 12px;
    margin: 10px 0;
    background: #000;
    border: 1px solid var(--xbox-green);
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-option:hover {
    background: #111;
    border-color: var(--neon-green);
}

.quiz-option.selected {
    background: var(--xbox-green);
    color: #fff;
}

input[type="text"],
input[type="email"],
textarea {
    background: #000;
    border: 1px solid var(--xbox-green);
    color: var(--neon-green);
    padding: 10px;
    font-family: 'VT323', monospace;
    font-size: 18px;
    width: 100%;
    margin-bottom: 10px;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.result-box {
    margin-top: 15px;
    padding: 20px;
    background: #112211;
    border: 2px dashed var(--neon-green);
    display: none;
    text-align: center;
}

.result-box.show {
    display: block;
    animation: fadeIn 0.5s;
}

/* --- Tables --- */
table {
    width: 100%;
    border-collapse: collapse;
}

table td {
    padding: 8px 5px;
    border-bottom: 1px solid #222;
}

table tr:hover {
    background: rgba(16, 124, 16, 0.1);
}

/* --- Footer --- */
footer {
    margin-top: 50px;
    text-align: center;
    font-size: 16px;
    color: #666;
    border-top: 1px solid #333;
    padding-top: 20px;
    margin-bottom: 20px;
}

.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }

/* --- Loading Animation --- */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--xbox-green);
    border-radius: 50%;
    border-top-color: var(--neon-green);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    nav {
        flex-wrap: wrap;
        gap: 10px;
    }

    nav button {
        font-size: 10px;
        padding: 8px 12px;
    }

    h1 {
        font-size: 20px;
    }

    h2 {
        font-size: 14px;
    }

    .game-container {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 16px;
    }

    .subtitle {
        font-size: 14px;
    }

    .game-container {
        height: 350px;
    }
}
