/* VINTAGE CRT TERMINAL THEME */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
    --crt-phosphor: #33ff00; /* Green phosphor, classic vintage terminal */
    --crt-bg: #111;
    --crt-darker: #050505;
    --crt-highlight: #aaffaa;
    --border-style: 2px solid var(--crt-phosphor);
}

body {
    background-color: var(--crt-darker);
    color: var(--crt-phosphor);
    font-family: 'VT323', 'Fira Code', monospace;
    font-size: 1.2rem;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* CRT Scanline and Flicker Effects */
body::before {
    content: " ";
    display: block;
    position: fixed;
    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;
}
body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.02);
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.02; }
    50% { opacity: 0.05; }
    100% { opacity: 0.02; }
}

* {
    text-shadow: 0 0 2px rgba(51, 255, 0, 0.4);
    box-sizing: border-box;
}

/* Layout */
.container {
    width: 100%;
    max-width: 900px;
    padding: 20px;
    z-index: 10;
    position: relative;
}

/* Header */
header {
    border-bottom: var(--border-style);
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.status-bar {
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    text-align: right;
}

/* Terminal Input Section */
.terminal-window {
    background: var(--crt-bg);
    border: var(--border-style);
    padding: 15px;
    margin-bottom: 30px;
}
.terminal-header {
    border-bottom: 1px dashed var(--crt-phosphor);
    padding-bottom: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}
.terminal-header .title {
    background: var(--crt-phosphor);
    color: var(--crt-darker);
    padding: 2px 10px;
    text-shadow: none;
    font-weight: bold;
}
.prompt-line {
    display: flex;
    align-items: center;
    gap: 10px;
}
.prompt {
    font-weight: bold;
    font-size: 1.5rem;
}
input#domainInput {
    background: transparent;
    border: none;
    color: var(--crt-highlight);
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    flex-grow: 1;
    outline: none;
    text-shadow: 0 0 2px var(--crt-highlight);
}
input#domainInput::placeholder {
    color: rgba(51, 255, 0, 0.5);
    text-shadow: none;
}
button {
    background: transparent;
    border: var(--border-style);
    color: var(--crt-phosphor);
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    padding: 5px 15px;
    cursor: pointer;
    text-shadow: 0 0 2px var(--crt-phosphor);
    transition: all 0.2s;
}
button:hover {
    background: var(--crt-phosphor);
    color: var(--crt-darker);
    text-shadow: none;
}

/* Results Grid */
.results-section {
    transition: opacity 0.3s;
}
.results-section.hidden {
    opacity: 0;
    pointer-events: none;
    display: none;
}
.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 600px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
}
.card {
    background: var(--crt-bg);
    border: 1px solid var(--crt-phosphor);
    padding: 15px;
    position: relative;
}
.card::before {
    content: '+';
    position: absolute; top: -10px; left: -5px; background: var(--crt-darker);
}
.card::after {
    content: '+';
    position: absolute; bottom: -10px; right: -5px; background: var(--crt-darker);
}
.card h3 {
    margin-top: 0;
    text-transform: uppercase;
    border-bottom: 1px dotted var(--crt-phosphor);
    padding-bottom: 5px;
}

/* Score Container */
.score-container {
    text-align: center;
}
#scoreText {
    font-size: 4rem;
}

/* Analysis List */
.analysis-list {
    list-style: square;
    padding-left: 20px;
    margin-top: 15px;
}
.analysis-list li {
    margin-bottom: 8px;
}

/* Sales Table */
.sales-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}
.sales-table th {
    border-bottom: 1px solid var(--crt-phosphor);
    padding: 5px 0;
}
.sales-table td {
    padding: 5px 0;
}

/* Loader */
.loader-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(5,5,5,0.9);
    display: flex; justify-content: center; align-items: center;
    z-index: 100;
}
.loader-overlay.hidden { display: none; }
.spinner {
    width: 50px; height: 50px;
    border: 5px solid rgba(51, 255, 0, 0.2);
    border-top-color: var(--crt-phosphor);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Footer */
footer {
    margin-top: 40px;
    text-align: center;
    border-top: 1px dashed var(--crt-phosphor);
    padding-top: 15px;
}

/* Chips and Highlights */
.suggestions-chips {
    display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 15px;
}
.chip {
    border: 1px solid var(--crt-phosphor);
    padding: 2px 8px;
    cursor: pointer;
}
.chip:hover {
    background: var(--crt-phosphor);
    color: var(--crt-darker);
}