:root {
    --bg: #050505;
    --surface: #0a0a0a;
    --text: #e0e0e0;
    --accent: #ff3333;
    --accent-glow: #ff3366;
    --dim: #666;
    --font-body: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* SCANLINES & NOISE */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.4) 2px,
        rgba(0,0,0,0.4) 4px
    );
    pointer-events: none;
    z-index: 999;
    opacity: 0.3;
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 998;
}

.container {
    width: 100%;
    max-width: 720px;
    padding: 2rem 1.5rem 4rem;
    position: relative;
    z-index: 10;
}

/* HEADER */
header {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 1rem;
}

.logo-box {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.2rem;
}

.logo {
    font-family: var(--font-mono);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.1em;
    text-shadow: 0 0 10px rgba(255,51,51,0.6);
}

.logo-sub {
    color: var(--accent);
}

.domain {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--dim);
}

.tagline {
    font-family: var(--font-mono);
    color: #555;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    letter-spacing: 0.1em;
}

/* SEARCH */
.search-area {
    margin-bottom: 3rem;
}

.input-wrapper {
    display: flex;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid #222;
    border-radius: 4px;
    padding: 0.3rem;
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(255,51,51,0.2);
}

#questionInput {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.8rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
    outline: none;
}

#questionInput::placeholder {
    color: #444;
}

#askBtn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0 1.5rem;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    border-radius: 2px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s, box-shadow 0.2s;
}

#askBtn:hover {
    background: #ff4d4d;
    box-shadow: 0 0 20px rgba(255,51,51,0.5);
}

.btn-icon {
    font-size: 1.2rem;
}

/* ANSWER CARD */
#currentAnswer {
    margin-top: 1.5rem;
    background: #0c0c0c;
    border-left: 3px solid var(--accent);
    padding: 1.5rem;
    animation: slideDown 0.3s ease-out;
}

.hidden {
    display: none;
}

.response-header {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    margin-bottom: 0.8rem;
}

.response-content {
    font-family: var(--font-body);
    font-size: 1.2rem;
    line-height: 1.5;
    font-weight: 500;
    word-break: break-word;
}

/* ARCHIVE */
.archive-area {
    border-top: 1px solid #1a1a1a;
    padding-top: 2rem;
}

.archive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.archive-header h2 {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #0f0f0f;
    padding: 0.4rem 0.8rem;
    border-radius: 2px;
    border: 1px solid #222;
}

.filter-label {
    font-size: 0.9rem;
}

select {
    background: transparent;
    border: none;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
}

/* QUESTION ITEMS */
.q-item {
    background: #0a0a0a;
    border: 1px solid #151515;
    margin-bottom: 0.5rem;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
}

.q-item:hover {
    border-color: #333;
}

.q-question {
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.q-question::before {
    content: "Q:";
    color: var(--accent);
    font-weight: 700;
    font-size: 0.8rem;
}

.q-answer {
    padding: 0 1rem 1rem 2rem;
    font-family: var(--font-body);
    color: #999;
    font-size: 0.95rem;
    line-height: 1.4;
    display: none;
    position: relative;
}

.q-item.open .q-answer {
    display: block;
}

.q-item.read .q-question {
    opacity: 0.5;
}

.q-answer::before {
    content: "A:";
    position: absolute;
    left: 0.8rem;
    color: var(--accent-glow);
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

/* FOOTER */
footer {
    text-align: center;
    margin-top: 3rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #333;
}

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

/* RESPONSIVE */
@media (max-width: 500px) {
    .logo {
        font-size: 2.5rem;
    }
    .domain {
        font-size: 1.4rem;
    }
    .input-wrapper {
        flex-direction: column;
        background: transparent;
        border: none;
        padding: 0;
        gap: 0.5rem;
    }
    #questionInput {
        background: var(--surface);
        border: 1px solid #222;
        border-radius: 2px;
    }
    #askBtn {
        justify-content: center;
        padding: 1rem;
    }
}

.powered-by {
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
}

.powered-by a {
    color: #6f4e2e;
    text-decoration: none;
    font-weight: 500;
}

.powered-by a:hover {
    text-decoration: underline;
    color: #8b5a3c;
}
