:root {
    --hacker-green: #0f0;
    --hacker-dark: #001100;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: black;
    color: var(--hacker-green);
    font-family: 'Courier New', Courier, monospace;
    overflow-x: hidden;
}

.bg-faded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 255, 0, 0.15) 0%, rgba(0, 0, 0, 0.9) 60%);
    z-index: -1;
    pointer-events: none;
}

.scanline {
    width: 100%;
    height: 100px;
    background: linear-gradient(0deg, rgba(0,0,0,0) 0%, rgba(0,255,0,0.1) 50%, rgba(0,0,0,0) 100%);
    opacity: 0.1;
    position: absolute;
    bottom: 100%;
    animation: scanline 8s linear infinite;
    pointer-events: none;
    z-index: 10;
}

@keyframes scanline {
    0% { bottom: 100%; }
    100% { bottom: -100px; }
}

nav {
    padding: 15px;
    border-bottom: 1px solid var(--hacker-green);
    display: flex;
    justify-content: center;
    gap: 20px;
    text-shadow: 0 0 5px var(--hacker-green);
}

nav a {
    color: var(--hacker-green);
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

nav a:hover {
    color: white;
    text-shadow: 0 0 10px white;
}

.search-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 40vh;
    text-align: center;
}

.typing-text {
    font-size: 24px;
    margin-bottom: 20px;
    border-right: 2px solid var(--hacker-green);
    white-space: nowrap;
    overflow: hidden;
    animation: typing 2s steps(30, end), blink-caret .75s step-end infinite;
}

@keyframes typing { from { width: 0 } to { width: 350px } }
@keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: var(--hacker-green); } }

.search-box {
    background: transparent;
    border: 1px solid var(--hacker-green);
    color: var(--hacker-green);
    padding: 15px 20px;
    font-size: 20px;
    width: 50%;
    max-width: 600px;
    font-family: 'Courier New', Courier, monospace;
    outline: none;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
}

.search-box:focus {
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.6);
    background: rgba(0, 255, 0, 0.05);
}

.error-text {
    color: red;
    margin-top: 15px;
    text-shadow: 0 0 5px red;
}

.parchment-container {
    display: none;
    background-color: #f4e3c5;
    background-image: url('https://www.transparenttextures.com/patterns/aged-paper.png');
    color: #3b2b18;
    margin: 20px auto;
    width: 80%;
    max-width: 800px;
    padding: 40px;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0,0,0,0.8), inset 0 0 50px rgba(139, 69, 19, 0.3);
    border: 2px solid #8b4513;
    font-family: 'Georgia', serif;
    animation: unfold 0.5s ease-out;
}

@keyframes unfold {
    0% { transform: scaleY(0); opacity: 0; }
    100% { transform: scaleY(1); opacity: 1; }
}

.parchment-container h2 {
    text-align: center;
    border-bottom: 2px dashed #8b4513;
    padding-bottom: 10px;
    margin-top: 0;
}

.lore-description {
    line-height: 1.85;
    font-size: 1.08rem;
    max-width: 68ch;
    margin: 24px auto 0;
    text-align: left;
    color: #2f2315;
}

.lore-description p {
    margin: 0 0 14px;
}

.lore-description h3 {
    margin: 20px 0 10px;
    color: #5c2e0b;
    font-size: 1.1rem;
    letter-spacing: 0.4px;
    border-left: 4px solid #8b4513;
    padding-left: 10px;
}

.lore-description ul {
    margin: 0 0 16px;
    padding-left: 24px;
}

.lore-description li {
    margin-bottom: 8px;
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 5px;
}

.form-group input[type="text"], .form-group textarea {
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid #8b4513;
    font-family: 'Georgia', serif;
}

.btn-submit {
    background-color: #8b4513;
    color: #f4e3c5;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    font-family: 'Georgia', serif;
    font-weight: bold;
    transition: 0.3s;
    width: 100%;
    margin-top: 10px;
}

.btn-submit:hover {
    background-color: #5c2e0b;
}

.lore-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
    justify-content: center;
}

.lore-images img {
    max-width: 32%;
    border: 2px solid #8b4513;
    border-radius: 4px;
    object-fit: cover;
}
