@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&display=swap');

:root {
    --terminal-bg: #0a0a0a;
    --terminal-text: #4af626;
    --terminal-dim: #2e8b57;
    --terminal-highlight: #fdf6e3;
    --font-stack: 'Fira Code', 'Courier New', monospace;
    --glow: 0 0 10px rgba(74, 246, 38, 0.5), 0 0 2px rgba(74, 246, 38, 0.3);
}

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

@keyframes glitch-anim {
    0% {
        transform: translate(0)
    }

    20% {
        transform: translate(-2px, 2px)
    }

    40% {
        transform: translate(-2px, -2px)
    }

    60% {
        transform: translate(2px, 2px)
    }

    80% {
        transform: translate(2px, -2px)
    }

    100% {
        transform: translate(0)
    }
}

@keyframes glitch-text {
    0% {
        text-shadow: 2px 0 #ff00c1, -2px 0 #01ffff;
    }

    25% {
        text-shadow: -2px 0 #ff00c1, 2px 0 #01ffff;
    }

    50% {
        text-shadow: 2px 0 #ff00c1, -2px 0 #01ffff;
    }

    75% {
        text-shadow: -2px 0 #ff00c1, 2px 0 #01ffff;
    }

    100% {
        text-shadow: 2px 0 #ff00c1, -2px 0 #01ffff;
    }
}

.glitch-active {
    animation: glitch-anim 0.3s infinite;
}

.glitch-active * {
    animation: glitch-text 0.3s infinite;
}

body {
    background-color: var(--terminal-bg);
    color: var(--terminal-text);
    font-family: var(--font-stack);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem;
    overflow-x: hidden;
    text-shadow: 0 0 2px rgba(74, 246, 38, 0.2);
    cursor: none;
}

::selection {
    background: var(--terminal-text);
    color: var(--terminal-bg);
}

body::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    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));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

.terminal-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

header {
    margin-bottom: 2rem;
}

section {
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

h1,
h2,
h3 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--terminal-text);
}

h2 {
    border-bottom: 1px solid var(--terminal-dim);
    padding-bottom: 0.5rem;
    display: inline-block;
    margin-top: 1rem;
}

a {
    color: var(--terminal-text);
    text-decoration: none;
    border-bottom: 1px dashed var(--terminal-dim);
    transition: all 0.2s ease;
}

a:hover {
    background-color: var(--terminal-text);
    color: var(--terminal-bg);
    box-shadow: var(--glow);
}

.prompt {
    color: #ff79c6;
    margin-right: 0.5rem;
}

.directory {
    color: #8be9fd;
}

.command {
    color: var(--terminal-text);
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background-color: var(--terminal-text);
    animation: blink 1s step-end infinite;
    vertical-align: middle;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.hidden {
    display: none;
}

.typing-text::after {
    content: '█';
    animation: blink 1s step-end infinite;
}

.typing-done::after {
    content: '';
    animation: none;
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 1px solid var(--terminal-text);
    background-color: rgba(74, 246, 38, 0.2);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
    mix-blend-mode: difference;
}

.custom-cursor.active {
    width: 30px;
    height: 30px;
    background-color: rgba(74, 246, 38, 0.5);
    border-style: dashed;
}

#game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(10, 10, 10, 0.95);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#game-overlay.hidden {
    display: none;
}

#game-screen {
    width: 800px;
    height: 400px;
    border: 2px solid var(--terminal-text);
    position: relative;
    overflow: hidden;
    background-color: #000;
}

#score-board {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 20px;
    font-weight: bold;
    z-index: 10;
}

#game-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    background-color: #000;
    padding: 10px;
    border: 1px dashed var(--terminal-text);
    display: none;
}

.bird {
    position: absolute;
    width: 40px;
    height: 20px;
    color: var(--terminal-text);
    font-weight: bold;
    white-space: nowrap;
}

.pipe {
    position: absolute;
    width: 50px;
    background-color: var(--terminal-text);
}