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

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

html { background: #000; }

body {
    background: transparent;
    color: #00ff41;
    font-family: 'VT323', monospace;
    font-size: 1.4rem;
    line-height: 1.2;
    letter-spacing: 0.5px;
    min-height: 100vh;
}

/* CRT Scanlines */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 3px,
        rgba(0,0,0,0.1) 3px,
        rgba(0,0,0,0.1) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

/* Vignette */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.7) 100%);
    pointer-events: none;
    z-index: 9998;
}

/* Matrix canvas — z-index: -1 puts it behind all body content */
#matrix-canvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* Page wrap */
.page-wrap {
    min-height: 100vh;
    padding: 0 0 100px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Terminal window */
.terminal-window {
    background: rgba(0,0,0,0.88);
    border: 1px solid rgba(0,255,65,0.12);
    padding: 2rem;
}

/* ASCII Banner */
.ascii-banner {
    font-family: 'VT323', monospace;
    white-space: pre;
    line-height: 1.0;
    color: #00ff41;
    text-shadow: 0 0 8px rgba(0,255,65,0.6);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    display: inline-block;
}

/* HR */
hr {
    border: none;
    border-top: 1px solid rgba(0,255,65,0.25);
    margin: 1.5rem 0;
}

/* Typography */
h1, h2, h3 {
    text-transform: lowercase;
    font-weight: normal;
    margin: 1.5rem 0 1rem;
    text-shadow: 0 0 5px rgba(0,255,65,0.4);
}

/* Links */
a {
    color: #00ff41;
    text-decoration: none;
    border: 1px solid rgba(0,255,65,0.45);
    padding: 0 8px;
    display: inline-block;
    margin: 3px 0;
    transition: all 0.15s ease;
    text-shadow: 0 0 5px rgba(0,255,65,0.3);
}

a:hover {
    background: #00ff41;
    color: #000;
    text-shadow: none;
    box-shadow: 0 0 15px rgba(0,255,65,0.5);
}

/* Cursor */
.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background: #00ff41;
    margin-left: 4px;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
    box-shadow: 0 0 8px #00ff41;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Lists */
ul { list-style: none; padding: 0; }
li { margin: 0.4rem 0; }
li::before { content: "> "; color: #00aa33; }

/* Site content wrapper */
#site-content {
    position: relative;
    z-index: 1;
    padding: 1.5rem 3rem 0;
}

/* REBOOT nav */
.nav-reboot {
    display: inline-block;
    border: 2px solid rgba(0,255,65,0.5);
    padding: 2px 12px;
    background: rgba(0,0,0,0.75);
    color: #00ff41;
    text-decoration: none;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    margin: 0 0 1rem 0;
    transition: all 0.15s;
    box-shadow: 0 0 8px rgba(0,255,65,0.15);
}

.nav-reboot:hover {
    background: #00ff41;
    color: #000;
    border-color: #00ff41;
    box-shadow: 0 0 18px rgba(0,255,65,0.45);
}

/* Scene badge */
.scene-badge {
    position: fixed;
    top: 14px;
    right: 20px;
    border: 1px solid rgba(0,255,65,0.35);
    padding: 2px;
    background: rgba(0,0,0,0.92);
    z-index: 10000;
}

.scene-badge img {
    width: 56px;
    height: auto;
    display: block;
    opacity: 0.75;
}

/* ─── PLAYER BAR ─────────────────────────────────────────────────────────── */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: rgba(0,0,0,0.97);
    border-top: 1px solid rgba(0,255,65,0.35);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    z-index: 10001;
    box-shadow: 0 -4px 20px rgba(0,255,65,0.08);
    transition: transform 0.3s ease;
}

.player-bar.hidden { transform: translateY(100%); }

.player-buttons { display: flex; gap: 6px; flex-shrink: 0; }

.player-btn {
    background: transparent;
    border: 1px solid rgba(0,255,65,0.5);
    color: #00ff41;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    padding: 1px 10px;
    cursor: pointer;
    transition: all 0.1s;
    line-height: 1.4;
}

.player-btn:hover { background: #00ff41; color: #000; }

.player-center { flex: 1; min-width: 0; }

.player-track-info {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.player-track-name { color: #00ff41; text-shadow: 0 0 5px rgba(0,255,65,0.4); }
.player-sep { color: #004411; margin: 0 5px; }
.player-track-artist { color: #009933; }

.player-progress-wrap {
    height: 3px;
    background: rgba(0,255,65,0.12);
    cursor: pointer;
}

.player-progress-fill {
    height: 100%;
    background: #00ff41;
    width: 0%;
    box-shadow: 0 0 6px #00ff41;
    transition: width 0.4s linear;
}

.player-time {
    font-size: 0.8rem;
    color: #006622;
    margin-top: 2px;
    white-space: nowrap;
}

#spectrum-canvas {
    flex-shrink: 0;
    border: 1px solid rgba(0,255,65,0.15);
    background: rgba(0,0,0,0.6);
}

/* ─── BOOT SEQUENCE ─────────────────────────────────────────────────────── */
#boot-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 99999;
    padding: 3rem;
    transition: opacity 0.6s ease;
    overflow: hidden;
}

#boot-output {
    font-family: 'VT323', monospace;
    font-size: 1.4rem;
    color: #00ff41;
    text-shadow: 0 0 5px rgba(0,255,65,0.4);
    line-height: 1.5;
}

.boot-line { animation: boot-in 0.05s ease; }

@keyframes boot-in {
    from { opacity: 0; transform: translateX(-4px); }
    to   { opacity: 1; transform: translateX(0); }
}

#boot-skip {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    background: transparent;
    border: 1px solid rgba(0,255,65,0.3);
    color: rgba(0,255,65,0.45);
    font-family: 'VT323', monospace;
    font-size: 1rem;
    padding: 4px 14px;
    cursor: pointer;
    transition: all 0.2s;
}

#boot-skip:hover { border-color: #00ff41; color: #00ff41; }

/* ─── RECORDINGS ─────────────────────────────────────────────────────────── */
.recording-list { list-style: none; padding: 0; }
.recording-list li::before { content: ''; }

.entry {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(0,255,65,0.05);
}

.play-btn {
    background: transparent;
    border: 1px solid rgba(0,255,65,0.4);
    color: #00ff41;
    font-family: 'VT323', monospace;
    font-size: 0.9rem;
    padding: 0 7px;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1.5;
    transition: all 0.1s;
}

.play-btn:hover, .play-btn.playing {
    background: #00ff41;
    color: #000;
    box-shadow: 0 0 10px rgba(0,255,65,0.4);
}

.entry-link {
    border: none;
    padding: 0;
    margin: 0;
    display: inline;
    box-shadow: none;
}

.entry-link { cursor: default; }

.file-name { color: #006622; font-size: 0.82em; }
.entry-title { color: #00ff41; }
.entry-artist { color: #009933; }
.entry-length { color: #005511; font-size: 0.82em; margin-left: auto; }

.sub-info {
    width: 100%;
    padding-left: 52px;
    font-size: 0.8em;
    color: #006622;
}

/* SEARCH */
.search-wrap {
    display: flex;
    align-items: center;
    margin: 1.2rem 0;
    gap: 10px;
}

.prompt { color: #00ff41; font-weight: bold; flex-shrink: 0; }

#catalog-search {
    flex: 1;
    max-width: 500px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0,255,65,0.4);
    color: #00ff41;
    padding: 4px 8px;
    font-family: 'VT323', monospace;
    font-size: 1.3rem;
}

#catalog-search:focus {
    outline: none;
    border-bottom-color: #00ff41;
    box-shadow: 0 2px 8px rgba(0,255,65,0.15);
}

#catalog-search::placeholder { color: #002a11; }
.hidden-entry { display: none !important; }

/* ─── TAGS ───────────────────────────────────────────────────────────────── */
.scatter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 0;
}

.tag-item {
    color: #00ff41;
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid rgba(0,255,65,0.28);
    font-family: 'VT323', monospace;
    background: rgba(0,255,65,0.025);
    transition: all 0.2s;
    display: inline-block;
    margin: 0;
}

.tag-item:nth-child(3n)   { transform: rotate(-2deg); font-size: 1.2rem; }
.tag-item:nth-child(2n)   { transform: rotate(1.5deg); font-size: 0.95rem; }
.tag-item:nth-child(5n)   { transform: rotate(2.5deg); color: #00cc33; }
.tag-item:nth-child(7n)   { transform: rotate(-1deg); color: #00aa22; }

.tag-item:hover {
    background: #00ff41;
    color: #000;
    transform: scale(1.08) rotate(0deg) !important;
    box-shadow: 0 0 12px rgba(0,255,65,0.45);
    text-shadow: none;
}

/* ─── UPLOAD ─────────────────────────────────────────────────────────────── */
.drop-zone {
    border: 2px dashed rgba(0,255,65,0.35);
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(0,255,65,0.015);
    margin-bottom: 1.5rem;
    user-select: none;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: #00ff41;
    background: rgba(0,255,65,0.05);
    box-shadow: inset 0 0 20px rgba(0,255,65,0.08), 0 0 20px rgba(0,255,65,0.1);
}

.drop-icon { font-size: 2.4rem; display: block; margin-bottom: 0.4rem; opacity: 0.5; }
.drop-label { color: #00aa33; }
.drop-hint { color: #005511; font-size: 0.88em; margin-top: 0.2rem; }
.drop-filename { color: #00ff41; margin-top: 0.6rem; font-size: 1rem; min-height: 1.4em; }

.upload-field { margin-bottom: 1.2rem; }

.upload-field label {
    display: block;
    margin-bottom: 6px;
    color: #009933;
    text-transform: uppercase;
    font-size: 0.9rem;
}

textarea {
    width: 100%;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(0,255,65,0.3);
    color: #00ff41;
    padding: 10px;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    resize: vertical;
}

textarea:focus { outline: none; border-color: #00ff41; box-shadow: 0 0 8px rgba(0,255,65,0.18); }
textarea::placeholder { color: #003311; }

.upload-progress-wrap {
    display: none;
    height: 5px;
    background: rgba(0,255,65,0.1);
    border: 1px solid rgba(0,255,65,0.15);
    margin: 1rem 0;
}

.upload-progress-fill {
    height: 100%;
    background: #00ff41;
    width: 0%;
    transition: width 0.1s;
    box-shadow: 0 0 8px #00ff41;
}

.upload-status { margin-top: 1rem; min-height: 1.5em; white-space: pre-line; }
.upload-status.ok  { color: #00ff41; text-shadow: 0 0 6px rgba(0,255,65,0.4); }
.upload-status.err { color: #ff4444; text-shadow: 0 0 6px rgba(255,0,0,0.4); }

.execute-btn {
    position: relative;
    background: rgba(0,255,65,0.08);
    color: #00ff41;
    border: 2px solid #00ff41;
    padding: 10px 32px;
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 3px;
    overflow: hidden;
    transition: all 0.2s;
    box-shadow: 0 0 10px rgba(0,255,65,0.18);
}

.execute-btn:hover {
    background: #00ff41;
    color: #000;
    box-shadow: 0 0 25px rgba(0,255,65,0.5);
    transform: translateY(-2px);
}

.execute-btn:active { transform: translateY(1px); }

.btn-flare {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
    transition: 0.4s;
    pointer-events: none;
}

.execute-btn:hover .btn-flare { left: 100%; }

/* ─── MISC ───────────────────────────────────────────────────────────────── */
small { color: #006622; font-size: 0.85em; }

.status-ok  { color: #00ff41; }
.status-warn { color: #ffaa00; }
.status-err { color: #ff4444; }

#eXTReMe-Free-mailboxd { position: absolute !important; left: -9999px !important; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .page-wrap { padding: 70px 1rem 80px; }
    .ascii-banner { font-size: 0.55rem; line-height: 0.95; }
    #spectrum-canvas { display: none; }
    .player-bar { height: 54px; }
}
