body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: #121212;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
}

.radio-layout {
    display: grid;
    grid-template-columns: minmax(0, 400px);
    align-items: start;
    justify-content: center;
    gap: 24px;
    width: calc(100% - 40px);
    max-width: 400px;
    position: relative;
    margin: 32px auto;
}
.radio-layout-with-feedback > .feedback-section {
    position: absolute;
    top: 0;
    left: calc(100% + 24px);
    width: min(480px, calc(50vw - 244px));
}

.player-card {
    background: #1e1e1e;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 400px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

h1 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

p {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.now-playing {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: #292929;
    border-radius: 8px;
}

.now-playing-label {
    color: #888;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.song-title {
    color: #fff;
    font-size: 0.95rem;
    word-break: break-word;
}

.radio-player {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

#play-button {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

#play-button:hover {
    background-color: #444;
}

#volume {
    width: 100px;
    cursor: pointer;
}

/* Keep feedback inside its panel, including long titles and mobile screens. */
.feedback-section {
    margin-top: 0;
    text-align: left;
    min-width: 0;
}
.feedback-panel {
    background: #181c23;
    border: 1px solid #343c49;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.feedback-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 16px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 650;
    list-style: none;
}
.feedback-panel summary::-webkit-details-marker { display: none; }
.feedback-chevron { color: #9ca3af; transition: transform 0.2s; }
.feedback-panel[open] .feedback-chevron { transform: rotate(180deg); }
.feedback-panel p { margin: 0 16px 14px; font-size: 0.8rem; line-height: 1.5; }
.feedback-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    padding: 0 14px;
}
.feedback-controls label { min-width: 0; font-size: 0.72rem; color: #b7c0cf; }
.feedback-search { grid-column: 1 / -1; }
.feedback-controls input, .feedback-controls select {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    margin-top: 6px;
    padding: 8px;
    border: 1px solid #424c5c;
    border-radius: 8px;
    background: #242c38;
    color: #f3f4f6;
    font: inherit;
    font-size: 0.78rem;
    color-scheme: dark;
}
.feedback-section :focus-visible { outline: 2px solid #86b7ff; outline-offset: 2px; }
.feedback-count { padding: 12px 16px; color: #9ca3af; font-size: 0.72rem; }
.feedback-table-wrapper { max-height: 320px; overflow: auto; }
.feedback-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 0.78rem; }
.feedback-table th, .feedback-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #303846;
    overflow-wrap: anywhere;
    vertical-align: middle;
}
.feedback-table th { position: sticky; top: 0; background: #242c38; color: #b7c0cf; font-weight: 600; z-index: 1; }
.feedback-table th:nth-child(n+3), .feedback-table td:nth-child(n+3) { text-align: center; font-variant-numeric: tabular-nums; }
.feedback-table tbody tr:nth-child(even) { background: #1d232d; }
.feedback-table tbody tr:hover { background: #293240; }
.feedback-table tbody tr:last-child td { border-bottom: 0; }
.feedback-likes { color: #6ee7a0; font-weight: 650; }
.feedback-dislikes { color: #fda4a4; font-weight: 650; }
.feedback-empty { text-align: center; color: #b7c0cf; }
#feedback-error { margin-top: 12px; color: #fda4a4; }
@media (max-width: 1120px) {
    .radio-layout-with-feedback > .feedback-section {
        position: static;
        width: 100%;
    }
}
@media (max-width: 380px) {
    .player-card { padding: 1rem; }
    .feedback-controls { grid-template-columns: minmax(0, 1fr); }
}
