:root {
    --bg: #0c0a1e;
    --card: rgba(18, 14, 40, 0.95);
    --border: rgba(139, 92, 246, 0.15);
    --purple: #a855f7;
    --purple-dim: #7c3aed;
    --text: #f5f3ff;
    --muted: #6b5fa0;
}

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

html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
}

/* Background */
.glow-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
}
.glow-1 { width: 500px; height: 500px; background: #4c1d95; top: -150px; right: -150px; opacity: 0.3; }
.glow-2 { width: 400px; height: 400px; background: #3b0764; bottom: -100px; left: -100px; opacity: 0.25; }

.cursor-glow {
    position: fixed;
    width: 220px; height: 220px;
    background: radial-gradient(circle, var(--purple), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.07;
    transform: translate(-50%, -50%);
}

/* Layout */
.container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 12px;
    width: 100%;
    height: 100vh;
    padding: 16px;
    max-width: 1000px;
    margin: 0 auto;
}

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.main-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    min-height: 0;
}

/* Card */
.glass-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

/* Hero — flex fills space, music card always visible */
#hero {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
#hero::-webkit-scrollbar { width: 2px; }
#hero::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

/* Music always anchored at bottom, never clipped */
#music {
    flex-shrink: 0;
}

.profile-pic {
    width: 60px; height: 60px;
    border-radius: 50%;
    border: 2px solid var(--purple);
    object-fit: cover;
    margin-bottom: 10px;
}

.brand-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 10px;
}

.listening-status {
    padding: 8px 10px;
    border-radius: 7px;
    background: rgba(168, 85, 247, 0.06);
    border: 1px solid var(--border);
    margin-bottom: 10px;
    overflow: visible;
}

.status-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--muted);
    display: block;
    margin-bottom: 2px;
}

#current-track-display {
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.hero-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.social-links { display: flex; gap: 6px; }

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 7px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
}
.social-btn:hover { color: var(--text); border-color: var(--purple); }

.view-count { font-size: 0.7rem; color: var(--muted); }

/* Spotify embed */
#music {
    flex-shrink: 0;
}

#spotify-embed-wrapper {
    min-height: 80px;
    overflow: hidden;
    margin-top: 8px;
}

#spotify-embed-wrapper iframe {
    width: 100%;
    min-width: 0;
}

#spotify-embed-wrapper .empty-msg {
    margin-top: 4px;
}

/* Message board */
#message-board {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#message-board h3 {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--muted);
    margin-bottom: 10px;
    flex-shrink: 0;
}

.message-feed {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    padding-right: 4px;
}

.message-feed::-webkit-scrollbar { width: 2px; }
.message-feed::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

.message-item {
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid transparent;
    transition: border-color 0.15s;
    flex-shrink: 0;
}
.message-item:hover { border-color: var(--border); }

.msg-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 3px;
}
.msg-name { font-size: 0.78rem; font-weight: 600; color: var(--purple); }
.msg-time { font-size: 0.65rem; color: var(--muted); }
.msg-text { font-size: 0.82rem; line-height: 1.45; color: rgba(245,243,255,0.75); }

.empty-msg {
    text-align: center;
    color: var(--muted);
    margin-top: 40px;
    font-size: 0.82rem;
}

/* Message form */
#messages { flex-shrink: 0; }

#messages h3 {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--muted);
    margin-bottom: 10px;
}

.input-row {
    display: flex;
    gap: 7px;
    margin-bottom: 7px;
}

input, textarea {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    padding: 9px 11px;
    border-radius: 7px;
    color: var(--text);
    outline: none;
    font-size: 0.82rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
}
input:focus, textarea:focus { border-color: rgba(168,85,247,0.5); }

textarea {
    height: 62px;
    resize: none;
    display: block;
}

.owls-pw-row { margin-bottom: 7px; }

.turnstile-wrapper {
    display: flex;
    justify-content: flex-start;
    margin-top: 10px;
    margin-bottom: 0px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}
.turnstile-wrapper:hover {
    opacity: 1;
}

#turnstile-widget {
    transform-origin: left top;
    transform: scale(0.85);
}

.submit-btn-minimal {
    background: var(--purple);
    border: none;
    padding: 0 16px;
    height: 38px;
    border-radius: 7px;
    color: white;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.submit-btn-minimal:hover { opacity: 0.85; }

.status-msg {
    margin-top: 6px;
    font-size: 0.75rem;
    min-height: 1em;
}

/* Mobile — stack columns, allow scroll */
@media (max-width: 700px) {
    html, body {
        height: auto;
        min-height: 100vh;
        overflow-x: hidden;
        overflow-y: auto;
    }
    .container {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
        padding: 12px;
    }
    .side-panel, .main-panel {
        height: auto;
        overflow: visible;
    }
    #hero {
        flex: none;
        height: auto;
        overflow: visible;
    }
    #message-board {
        flex: none;
        height: 350px;
    }
}
