/* ============================================================
   Flightline Radio -- Co-host Guest Page
   /var/www/z107/cohost/cohost.css
============================================================ */

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

:root {
    --bg:        #0a0c10;
    --bg-card:   #141416;
    --bg-input:  #1c1c20;
    --border:    rgba(255,255,255,0.08);
    --accent:    #e8402a;
    --accent-dim:rgba(232,64,42,0.15);
    --green:     #2ecc71;
    --amber:     #f39c12;
    --text:      #f0f2f5;
    --text-dim:  #6b7a8d;
    --radius:    10px;
}

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ── Join Screen ── */
.screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.subtitle {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 10px 14px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}

.field input:focus { border-color: var(--accent); }

.headphone-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(232,64,42,0.08);
    border: 1px solid rgba(232,64,42,0.2);
    border-radius: 7px;
    font-size: 12px;
    color: #ffaa99;
}

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 7px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    width: 100%;
}
.btn-primary:hover { background: #ff5540; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.error-msg {
    font-size: 12px;
    color: var(--accent);
    min-height: 18px;
    text-align: center;
}

/* ── Studio Screen ── */
#screenStudio {
    align-items: stretch;
    padding: 0;
    min-height: 100vh;
}

.studio-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 100vh;
    position: relative;
}

/* Status bar */
.status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: #111318;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.station-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.on-air-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-dim);
    transition: all 0.3s;
}

.on-air-badge.live {
    background: rgba(232,64,42,0.15);
    border-color: rgba(232,64,42,0.4);
    color: var(--accent);
}

.on-air-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.on-air-badge.live .on-air-dot {
    animation: blink 1.2s ease-in-out infinite;
}

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

.dj-label {
    font-size: 12px;
    color: var(--text-dim);
}

/* Main area */
.studio-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 20px;
    flex: 1;
}

@media (max-width: 600px) {
    .studio-main { grid-template-columns: 1fr; }
}

/* Panels */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.panel-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Mic panel */
.mic-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #0e0e10;
    border: 2px solid var(--border);
    color: var(--text-dim);
    margin: 0 auto;
    transition: all 0.3s;
}

.mic-visual.active {
    border-color: var(--green);
    color: var(--green);
    box-shadow: 0 0 20px rgba(46,204,113,0.2);
}

.mic-visual.muted {
    border-color: var(--accent);
    color: var(--accent);
}

/* VU meter */
.vu-wrap { padding: 0 4px; }

.vu-bar-h {
    height: 6px;
    background: #0a0a0c;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid #1e1e22;
}

.vu-fill-h {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--green) 0%, var(--green) 60%, var(--amber) 80%, var(--accent) 100%);
    transition: width 0.05s linear;
}

/* Mic button */
.btn-mic {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #0e0e10;
    color: var(--green);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-mic:hover { background: #1a1a1e; }

.btn-mic.muted {
    border-color: rgba(232,64,42,0.4);
    color: var(--accent);
    background: rgba(232,64,42,0.08);
}

/* Connection status */
.conn-status {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--text-dim);
}

.conn-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #333;
    flex-shrink: 0;
    transition: background 0.3s;
}

.conn-dot.connected { background: var(--green); box-shadow: 0 0 6px rgba(46,204,113,0.4); }
.conn-dot.connecting { background: var(--amber); animation: blink 1s infinite; }
.conn-dot.error      { background: var(--accent); }

/* Notes panel */
.notes-panel { min-height: 200px; }

.notes-feed {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 120px;
    max-height: 240px;
}

.notes-empty {
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
    padding: 20px 0;
    font-style: italic;
}

.note-bubble {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    max-width: 90%;
    word-break: break-word;
}

.note-bubble.from-dj {
    background: rgba(52,152,219,0.15);
    border: 1px solid rgba(52,152,219,0.25);
    color: #7ec8f5;
    align-self: flex-start;
}

.note-bubble.from-guest {
    background: rgba(46,204,113,0.1);
    border: 1px solid rgba(46,204,113,0.2);
    color: #81e0a8;
    align-self: flex-end;
}

.note-sender {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0.7;
    margin-bottom: 3px;
    text-transform: uppercase;
}

/* Notes compose */
.notes-compose {
    display: flex;
    gap: 8px;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: auto;
}

.note-input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text);
    font-size: 13px;
    outline: none;
}

.note-input:focus { border-color: rgba(46,204,113,0.4); }

.btn-send {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid rgba(46,204,113,0.3);
    background: rgba(46,204,113,0.1);
    color: var(--green);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}

.btn-send:hover { background: rgba(46,204,113,0.2); }

/* On air overlay */
.on-air-overlay {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(232,64,42,0.9);
    color: white;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 8px 20px;
    border-radius: 20px;
    z-index: 100;
    animation: slideDown 0.3s ease;
}

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

.on-air-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
    animation: blink 1s infinite;
}

/* Leave button */
.btn-leave {
    margin: 0 20px 20px;
    padding: 10px;
    border-radius: 7px;
    border: 1px solid rgba(232,64,42,0.3);
    background: transparent;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}

.btn-leave:hover { background: rgba(232,64,42,0.08); }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a2e; border-radius: 2px; }
