* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: #0d0d0d;
    color: #e0e0e0;
    line-height: 1.6;
}

a {
    color: #F0333F;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #222;
}

header h1 {
    font-size: 2.4rem;
    font-weight: 700;
    color: #F0333F;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tagline {
    color: #888;
    font-size: 0.95rem;
    margin-top: 0.3rem;
}

/* Two-column layout */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}

/* Player */
.player-section {
    background: #161616;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.now-playing {
    margin-bottom: 1rem;
}

.now-playing-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #F0333F;
    margin-bottom: 0.3rem;
}

.now-playing h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.4rem;
}

.meta-detail {
    font-size: 0.85rem;
    color: #888;
}

audio {
    display: none;
}

/* Play / Volume controls */
.controls-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.play-btn {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F0333F;
    color: #0d0d0d;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s;
}

.play-btn:hover {
    background: #f45560;
}

.play-btn:active {
    transform: scale(0.95);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    max-width: 100px;
}

.volume-icon {
    color: #666;
    flex-shrink: 0;
}

#volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: #2a2a2a;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #F0333F;
    cursor: pointer;
    border: none;
    margin-top: -3px;
}

#volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #F0333F;
    cursor: pointer;
    border: none;
}

#volume-slider::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
}

#volume-slider::-moz-range-track {
    height: 4px;
    background: #2a2a2a;
    border-radius: 2px;
    border: none;
}

/* Episode time bar */
.time-bar {
    margin-top: 0.75rem;
}

.progress-track {
    width: 100%;
    height: 4px;
    background: #2a2a2a;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: #F0333F;
    border-radius: 2px;
    transition: width 1s linear;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.3rem;
    font-variant-numeric: tabular-nums;
}

/* Show Notes */
.show-notes {
    background: #161616;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.show-notes h3 {
    font-size: 1rem;
    color: #F0333F;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

#show-notes-content {
    font-size: 0.9rem;
    color: #bbb;
    line-height: 1.7;
    max-height: 300px;
    overflow-y: auto;
}

#show-notes-content a {
    color: #F0333F;
}

/* Sidebar — Up Next */
.up-next {
    background: #161616;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.up-next h3 {
    font-size: 0.8rem;
    color: #F0333F;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.up-next-card {
    font-size: 0.9rem;
}

.up-next-card .up-next-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.25rem;
}

.up-next-card .up-next-meta {
    font-size: 0.8rem;
    color: #666;
}

/* Sidebar — Episode list dropdown */
.episode-list {
    background: #161616;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.episode-list details summary {
    font-size: 0.8rem;
    color: #F0333F;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.episode-list details summary::-webkit-details-marker {
    display: none;
}

.episode-list details summary::before {
    content: "\25B6";
    font-size: 0.6rem;
    transition: transform 0.2s;
}

.episode-list details[open] summary::before {
    transform: rotate(90deg);
}

#episode-list {
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 0.6rem;
}

#episode-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #1a1a1a;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#episode-list li:last-child {
    border-bottom: none;
}

#episode-list li.active {
    color: #F0333F;
    font-weight: 600;
}

.ep-number {
    color: #555;
    font-size: 0.75rem;
    min-width: 2.5rem;
}

.ep-title {
    flex: 1;
    padding: 0 0.4rem;
}

.ep-duration {
    color: #555;
    font-size: 0.75rem;
}

footer {
    text-align: center;
    color: #444;
    font-size: 0.8rem;
    padding-top: 1rem;
    border-top: 1px solid #1a1a1a;
}

/* Chat Section */
.chat-section {
    background: #161616;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 1.25rem;
    height: 600px;
    display: flex;
    flex-direction: column;
}

.chat-section h3 {
    font-size: 0.8rem;
    color: #F0333F;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.chat-name-prompt {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.chat-name-prompt p {
    font-size: 0.9rem;
    color: #bbb;
}

.chat-name-prompt input,
.chat-input-container input {
    background: #0d0d0d;
    border: 1px solid #333;
    border-radius: 4px;
    color: #e0e0e0;
    padding: 0.6rem;
    font-size: 0.9rem;
    outline: none;
}

.chat-name-prompt input:focus,
.chat-input-container input:focus {
    border-color: #F0333F;
}

.chat-name-prompt button,
.chat-input-container button {
    background: #F0333F;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s;
}

.chat-name-prompt button:hover,
.chat-input-container button:hover {
    background: #f45560;
}

.chat-error {
    color: #ff6b6b;
    font-size: 0.85rem;
    min-height: 1.2rem;
}

.chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding-right: 0.5rem;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #0d0d0d;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #444;
}

.chat-message {
    margin-bottom: 0.6rem;
    line-height: 1.5;
    font-size: 0.9rem;
}

.chat-message-time {
    color: #666;
    font-size: 0.8rem;
}

.chat-message-separator {
    color: #444;
    margin: 0 0.3rem;
}

.chat-message-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.chat-message-text {
    color: #e0e0e0;
    font-size: 0.9rem;
    word-wrap: break-word;
}

.chat-system-message {
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 0.6rem;
}

.chat-input-container {
    display: flex;
    gap: 0.5rem;
}

.chat-input-container input {
    flex: 1;
}

.chat-disconnected {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    padding: 2rem 0;
}
