/*
    Radio Ambience Console - Stylesheet
    ==================================

    This file controls the visual design for the tool page.
    It follows the same Sith + Windows 98 style as the sithOS homepage.

    Beginner guide:
    - Main site colors are near the top in :root
    - Layout rules are in the "LAYOUT" section
    - Button and panel styling is in the "WINDOW / CONTROL STYLES" section
*/

/* =========================
   GLOBAL STYLES / COLORS
   ========================= */

:root {
    --bg-main: #10070d;
    --bg-secondary: #1c1018;
    --bg-panel: #2b222a;
    --bg-panel-light: #3a3037;
    --bg-header: #4d0f18;
    --bg-header-light: #7a2532;
    --border-dark: #14090d;
    --border-light: #9d7d87;
    --text-main: #f2e8ec;
    --text-soft: #d2bcc6;
    --accent-main: #d31f3f;
    --accent-alt: #8f3bc4;
    --accent-glow: rgba(211, 31, 63, 0.35);
    --link-color: #ff9aac;
    --shadow-color: rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Trebuchet MS", Verdana, sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at top, rgba(160, 28, 53, 0.18), transparent 30%),
        linear-gradient(180deg, #14070d 0%, #120911 45%, #090609 100%);
}

a {
    color: var(--link-color);
}

a:hover,
a:focus {
    color: #ffffff;
}

code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
}

.small-label {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-soft);
}

/* =========================
   LAYOUT
   ========================= */

.site-shell {
    width: min(1200px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1rem 0 2rem;
}

.desktop-header {
    margin-bottom: 1rem;
}

.header-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    padding: 1rem;
    align-items: start;
}

.header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: start;
}

.tagline {
    max-width: 48rem;
}

.page-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}

.page-grid > .window-panel:nth-child(1),
.page-grid > .window-panel:nth-child(2) {
    grid-column: span 6;
}

.page-grid > .window-panel:nth-child(3) {
    grid-column: span 4;
}

.page-grid > .player-panel {
    grid-column: span 8;
}

.page-grid > .window-panel:nth-child(5) {
    grid-column: span 12;
}

/* =========================
   WINDOW / CONTROL STYLES
   ========================= */

.window-panel {
    background: var(--bg-panel);
    border-top: 2px solid var(--border-light);
    border-left: 2px solid var(--border-light);
    border-right: 2px solid var(--border-dark);
    border-bottom: 2px solid var(--border-dark);
    box-shadow: 5px 5px 0 var(--shadow-color);
    overflow: hidden;
}

.window-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0.55rem;
    background: linear-gradient(90deg, var(--bg-header), var(--bg-header-light));
    border-bottom: 2px solid var(--border-dark);
}

.window-title {
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 0.05em;
}

.window-buttons {
    display: flex;
    gap: 0.25rem;
}

.window-buttons span {
    width: 14px;
    height: 14px;
    background: #c7c7c7;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #4d4d4d;
    border-bottom: 1px solid #4d4d4d;
}

.panel-content {
    padding: 1rem;
}

.panel-content h1,
.panel-content h2 {
    margin-top: 0;
}

.form-label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: bold;
}

.text-input,
input[type="range"] {
    width: 100%;
}

.text-input {
    padding: 0.7rem;
    color: var(--text-main);
    background: #130d13;
    border-top: 2px solid var(--border-dark);
    border-left: 2px solid var(--border-dark);
    border-right: 2px solid var(--border-light);
    border-bottom: 2px solid var(--border-light);
}

.helper-text,
.note-box {
    color: var(--text-soft);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1rem 0;
}

.console-button,
.nav-button {
    display: inline-block;
    padding: 0.6rem 0.9rem;
    text-decoration: none;
    color: var(--text-main);
    background: var(--bg-panel-light);
    border-top: 2px solid #d4c4cb;
    border-left: 2px solid #d4c4cb;
    border-right: 2px solid #22151c;
    border-bottom: 2px solid #22151c;
    cursor: pointer;
}

.console-button:hover,
.console-button:focus,
.nav-button:hover,
.nav-button:focus {
    background: var(--accent-main);
    color: #ffffff;
}

.control-block {
    margin-top: 1rem;
}

.slider-stack {
    display: grid;
    gap: 0.75rem;
}

.toggle-row {
    margin-top: 1rem;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.status-box,
.note-box {
    margin-top: 1rem;
    padding: 0.85rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
}

.status-label {
    display: inline-block;
    margin-right: 0.65rem;
    font-weight: bold;
    color: #ffffff;
}

.player-frame {
    margin-top: 1rem;
    padding: 0.9rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
}

.player-placeholder {
    min-height: 120px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background:
        linear-gradient(180deg, rgba(211, 31, 63, 0.16), rgba(12, 12, 12, 0.6)),
        #050505;
    border: 1px solid var(--accent-main);
    color: #ffd5dd;
    font-family: "Courier New", monospace;
}

#player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

#player iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.plain-list {
    margin: 0.75rem 0 0;
    padding-left: 1.2rem;
}

/* =========================
   RESPONSIVE STYLES
   ========================= */

@media (max-width: 900px) {
    .header-content {
        grid-template-columns: 1fr;
    }

    .header-actions {
        justify-content: flex-start;
    }

    .page-grid > .window-panel:nth-child(1),
    .page-grid > .window-panel:nth-child(2),
    .page-grid > .window-panel:nth-child(3),
    .page-grid > .player-panel,
    .page-grid > .window-panel:nth-child(5) {
        grid-column: span 12;
    }
}

@media (max-width: 640px) {
    .site-shell {
        width: min(100% - 1rem, 100%);
    }

    .button-row {
        flex-direction: column;
    }
}
