:root {
    --blue: #0866df;
    --blue-dark: #0754b7;
    --blue-soft: #eaf4ff;
    --green: #159b62;
    --green-soft: #e9f8f0;
    --red: #c63d3d;
    --text: #14203a;
    --muted: #68758c;
    --border: #d7e1ed;
    --background: #f4f7fb;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--background);
}

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 18px;
}

.card {
    width: 100%;
    max-width: 700px;
    padding: 40px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 18px 55px rgba(29,51,84,.12);
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.brand-icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue);
    color: #fff;
    font-size: 28px;
    font-weight: 700;
}

h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -.5px;
}

.brand p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 16px;
}

.notice {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 18px 22px;
    margin-bottom: 30px;
    background: var(--blue-soft);
    border: 1px solid #bddcff;
    border-radius: 12px;
    color: #145598;
    font-size: 15px;
}

.notice strong {
    font-size: 17px;
}

.stream-card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 15px;
}

.stream-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}

h2 {
    margin: 0;
    font-size: 24px;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    border-radius: 22px;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 650;
}

.status .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.status.ready,
.status.live {
    color: #08794a;
    background: var(--green-soft);
}

.status.ready .dot,
.status.live .dot {
    background: var(--green);
}

.status.connecting {
    color: #875d00;
    background: #fff5d8;
}

.status.connecting .dot { background: #d99a00; }

.status.failed {
    color: #9b3030;
    background: #fdecec;
}

.status.failed .dot { background: var(--red); }

.play-button {
    width: 100%;
    padding: 17px;
    border: 0;
    border-radius: 10px;
    background: var(--blue);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
}

.play-button:hover { background: var(--blue-dark); }
.play-button:disabled { opacity: .6; cursor: wait; }

.volume-row {
    display: grid;
    grid-template-columns: 32px 1fr 46px;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

.speaker { font-size: 20px; }

#volume {
    width: 100%;
    accent-color: var(--blue);
}

#volumeValue {
    text-align: right;
    color: var(--muted);
    font-size: 14px;
}

.playing-status {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 22px;
    color: var(--muted);
    font-size: 14px;
}

.playing-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #b3bfcd;
}

.playing-dot.live {
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(21,155,98,.12);
}

.remote-media {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: .01;
}

.back-link {
    display: block;
    width: max-content;
    margin: 34px auto 0;
    color: var(--blue);
    text-decoration: none;
    font-size: 16px;
    font-weight: 650;
}

.back-link:hover {
    text-decoration: underline;
}

footer {
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: #7e8ba0;
    font-size: 13px;
}

@media (max-width: 600px) {
    .page {
        padding: 14px;
        align-items: flex-start;
    }

    .card {
        padding: 25px 19px;
        border-radius: 15px;
    }

    .stream-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
}
