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

:root {

    --accent-color: #0097BD;
    --bg-color: #f2f2f2;
    --card-bg: #ffffff;
    --text-color: #111111;
    --text-sub: rgba(0, 0, 0, 0.65);
    --border-color: rgba(0, 0, 0, 0.12);
    --item-bg: rgba(0, 0, 0, 0.04);
    --input-bg: rgba(255, 255, 255, 0.5);

    --blur-overlay-start: rgba(242, 242, 242, 0.90);
    --blur-overlay-mid: rgba(242, 242, 242, 0.90);
    --blur-overlay-end: rgba(242, 242, 242, 0.60);
}

body.dark-mode {

    --bg-color: #0f0f10;
    --card-bg: #18181a;
    --text-color: #ffffff;
    --text-sub: rgba(255, 255, 255, 0.65);
    --border-color: rgba(255, 255, 255, 0.12);
    --item-bg: rgba(255, 255, 255, 0.04);
    --input-bg: rgba(0, 0, 0, 0.5);

    --blur-overlay-start: rgba(15, 15, 16, 0.90);
    --blur-overlay-mid: rgba(15, 15, 16, 0.90);
    --blur-overlay-end: rgba(15, 15, 16, 0.60);
}

.lock-body {
    margin: 0; padding: 0; width: 100vw; height: 100vh;
    background: #0f0f10; color: #ffffff;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--custom-font-family), sans-serif;
}
.lock-message {
    text-align: center; font-size: 18px; color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 40px 30px; border-radius: 20px; max-width: 400px; width: 90%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    font-family: var(--custom-font-family), sans-serif;
}

html, body {
    width: 100vw; height: 100vh; height: 100dvh;
    overflow: hidden; background: var(--bg-color); color: var(--text-color);
    position: relative; transition: background 0.3s ease, color 0.3s ease;
    font-family: var(--custom-font-family), sans-serif;
}

button, input, textarea, select {
    font-family: var(--custom-font-family), sans-serif;
}

.app-blur-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; height: 100dvh;
    background-size: cover; background-position: center;
    filter: brightness(0.95); opacity: 0.85; transform: scale(1.15); z-index: 0;
    transition: background-image 0.8s ease-in-out;
}

.app-blur-bg::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        to bottom,
        var(--blur-overlay-start) 0%,
                                var(--blur-overlay-mid) 28%,
                                var(--blur-overlay-end) 100%
    );
    pointer-events: none;
    transition: background 0.3s ease;
}

body.dark-mode .app-blur-bg {
    filter: brightness(0.8); opacity: 1;
}

.app-container {
    width: 100%; height: 100vh; height: 100dvh;
    display: flex; flex-direction: column; justify-content: space-between; align-items: center;
    padding: 0 16px 0 16px; position: relative; z-index: 1;
}

/* HEADER */
.header-station {
    position: relative;
    width: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 50px;
}

.header-main-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.header-identity-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-width: 0;
}

.station-logo { max-width: 180px; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15)); }

.station-name {
    font-weight: 600; font-style: italic;
    text-transform: uppercase; line-height: 1.1; color: var(--accent-color); letter-spacing: 1px;
    font-family: var(--custom-font-family), sans-serif;
}
.station-slogan {
    font-weight: 600; font-style: italic;
    text-transform: uppercase; line-height: 1.1; color: var(--accent-color); margin-top: 2px; margin-bottom: 0;
    font-family: var(--custom-font-family), sans-serif;
    text-align: center;
}

.header-buttons-bar {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.social-btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    background: var(--item-bg);
    padding: 7px 7px;
    border-radius: 100%;
    border: 1px solid var(--border-color);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
    font-family: var(--custom-font-family), sans-serif;
}

.social-btn-link:hover, .social-btn-link.active {
    background: color-mix(in srgb, var(--accent-color) 15%, transparent);
    border-color: var(--accent-color);
    transform: scale(1.02);
    color: var(--text-color);
}

.social-btn-link svg { width: 16px; height: 16px; fill: currentColor; }

.main-content { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; max-width: 500px; margin: auto 0; position: relative; }

.status-badge {
    display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--text-color);
    text-transform: uppercase; font-weight: 700; letter-spacing: 1px; margin-bottom: 12px;
    background: var(--item-bg); padding: 7px 16px; border-radius: 16px;
    border: 1px solid var(--border-color); transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    font-family: var(--custom-font-family), sans-serif;
}
.status-badge:hover {
    background: color-mix(in srgb, var(--accent-color) 15%, transparent);
    border-color: var(--accent-color);
    transform: scale(1.02);
}
.status-badge.is-preview {
    background: color-mix(in srgb, var(--accent-color) 20%, transparent);
    border-color: var(--accent-color);
}
.status-dot { width: 9px; height: 9px; background-color: #ff3b30; border-radius: 50%; animation: pulse 1.8s infinite; }

.presenter-name {
    font-weight: 600; font-style: italic; font-size: 15px; color: var(--text-color);
    text-transform: uppercase; margin-bottom: 12px; letter-spacing: 0.5px; text-align: center;
    font-family: var(--custom-font-family), sans-serif;
}

.player-middle-row { display: flex; align-items: center; justify-content: center; position: relative; width: 100%; }
.player-middle-row.single-stream-mode .controls-floating-bar {
    gap: 16px;
}

.cover-wrapper {
    position: relative; width: min(65vw, 320px); height: min(65vw, 320px);
    border-radius: 20px; overflow: hidden; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color); cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.cover-art { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out; }
.cover-art.fade-change { opacity: 0.3; transform: scale(0.96); }

.cover-wrapper .play-overlay {
    display: flex !important; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.45); align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.25s ease; z-index: 3;
}
.cover-wrapper:hover .play-overlay { opacity: 1; }

.play-overlay .play-btn-icon { width: 64px; height: 64px; fill: #ffffff; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3)); display: none; }
.cover-wrapper.is-preview-playing:hover .play-overlay .icon-live-main { display: block; }
.cover-wrapper.paused:not(.is-preview-playing):hover .play-overlay .icon-play-main { display: block; }
.cover-wrapper:not(.paused):not(.is-preview-playing):hover .play-overlay .icon-pause-main { display: block; }

.controls-floating-bar { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; align-items: center; gap: 14px; }
.volume-floating-container { position: relative; display: flex; flex-direction: column; align-items: center; }

.control-btn {
    background: var(--card-bg); border: 1px solid var(--border-color); color: var(--text-color);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%; backdrop-filter: none; -webkit-backdrop-filter: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    font-weight: 700; font-style: italic; font-size: 13px; text-decoration: none;
    font-family: var(--custom-font-family), sans-serif;
    transform: none !important;
}
.control-btn:hover, .control-btn.active {
    background: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
    transform: none !important;
}
.control-btn svg { width: 18px; height: 18px; fill: currentColor; }

.btn-stream { position: relative; }
.btn-stream .icon-play, .btn-stream .icon-pause { display: none; }
.btn-stream.playing.active:hover .btn-text { display: none; }
.btn-stream.playing.active:hover .icon-pause { display: block; }
.btn-stream.playing:not(.active):hover .btn-text { display: none; }
.btn-stream.playing:not(.active):hover .icon-play { display: block; }

/* Container atualizado para margens e overflow dinâmico */
.track-info {
    width: 100%;
    text-align: center;
    margin-top: 10px;
    padding: 0 16px; /* Margem de 16px nas bordas direita e esquerda */
    box-sizing: border-box;
    overflow: hidden;
}

.scroll-wrapper { width: 100%; overflow: hidden; white-space: nowrap; position: relative; }
.scroll-content { display: inline-block; white-space: nowrap; will-change: transform; }
.song-title { font-weight: 600; font-style: italic; text-transform: uppercase; font-size: 23px; color: var(--text-color); font-family: var(--custom-font-family), sans-serif; }
.song-artist { font-weight: 500; font-style: italic; text-transform: uppercase; font-size: 17px; color: var(--text-sub); margin-top: 2px; font-family: var(--custom-font-family), sans-serif; }

.footer-info {
    width: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 12px;
}

.footer-actions-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.action-buttons-group {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--item-bg);
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    box-shadow: none;
}

.footer-icon-btn:hover, .footer-icon-btn.active, .footer-icon-btn:active {
    background: var(--accent-color);
    color: #ffffff;
    transform: translateY(-2px) scale(1.08);
}

.footer-icon-btn svg { width: 20px; height: 20px; fill: currentColor; }

.lightbox-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; height: 100dvh;
    background: rgba(0, 0, 0, 0.75); backdrop-filter: none; -webkit-backdrop-filter: none;
    z-index: 9999; justify-content: center; align-items: center; padding: 20px; opacity: 0; transition: opacity 0.3s ease;
    font-family: var(--custom-font-family), sans-serif;
}
.lightbox-overlay.active { display: flex; opacity: 1; }
.lightbox-card {
    background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 20px;
    width: 100%; max-width: 850px; max-height: 90vh; display: flex; flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6); overflow: hidden; position: relative; color: var(--text-color);
    font-family: var(--custom-font-family), sans-serif;
}
.lightbox-header {
    padding: 12px 16px; border-bottom: 1px solid var(--border-color);
    position: relative; background: var(--item-bg); display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 10px;
}
.lightbox-title-container { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.lightbox-title { font-weight: 500; font-style: italic; font-size: 22px; color: var(--text-color); text-transform: uppercase; font-family: var(--custom-font-family), sans-serif; }

.header-actions-right { display: flex; align-items: center; gap: 8px; margin-left: auto; z-index: 2; flex-wrap: wrap; justify-content: flex-end; }
.lightbox-close-btn {
    width: 18px; height: 18px; border-radius: 50%; background: #ff5f56; border: none; cursor: pointer; flex-shrink: 0; margin-left: 6px;
    transition: transform 0.2s ease;
}
.lightbox-close-btn:hover { transform: scale(1.15); }
.lightbox-body { padding: 20px 24px; overflow-y: auto; font-size: 18px; line-height: 1.6; color: var(--text-color); flex: 1; font-family: var(--custom-font-family), sans-serif; }

.bible-select, .bible-input {
    background: var(--input-bg); border: 1px solid var(--border-color); color: var(--text-color);
    padding: 6px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; outline: none;
    font-family: var(--custom-font-family), sans-serif;
}
.bible-select option { background: var(--card-bg); color: var(--text-color); }
.bible-nav-container { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.bible-verse-item { margin-bottom: 14px; font-size: 18px; line-height: 1.7; text-align: justify; font-family: var(--custom-font-family), sans-serif; }
.bible-verse-num { font-weight: 700; color: var(--accent-color); margin-right: 8px; font-size: 15px; vertical-align: super; }

.bible-inline-search { display: none; flex: 1; align-items: center; gap: 8px; animation: fadeIn 0.3s ease; }
.bible-inline-search.active { display: flex; }
.bible-inline-search input {
    flex: 1; background: var(--input-bg); border: 1px solid var(--border-color); color: var(--text-color);
    padding: 6px 12px; border-radius: 8px; font-size: 14px; outline: none;
    font-family: var(--custom-font-family), sans-serif;
}

.testament-title {
    width: 100%; font-weight: 700; font-style: italic; font-size: 16px;
    text-transform: uppercase; color: var(--accent-color); margin: 16px 0 10px 0; border-bottom: 1px solid var(--border-color); padding-bottom: 4px;
    font-family: var(--custom-font-family), sans-serif;
}
.testament-title:first-child { margin-top: 0; }
.bible-books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(65px, 1fr)); gap: 10px; margin-bottom: 10px; }
.bible-book-card {
    background: var(--item-bg); border: 1px solid var(--border-color);
    padding: 12px 4px; border-radius: 12px; text-align: center; cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.bible-book-card:hover { background: color-mix(in srgb, var(--accent-color) 30%, transparent); border-color: var(--accent-color); }
.bible-book-abbrev { font-weight: 700; font-size: 15px; text-transform: uppercase; color: var(--text-color); font-family: var(--custom-font-family), sans-serif; }

.schedule-tabs { display: flex; gap: 6px; margin-bottom: 16px; background: var(--item-bg); padding: 4px; border-radius: 14px; overflow-x: auto; justify-content: center; flex-wrap: wrap; }
.schedule-tab {
    flex: 0 0 auto; background: transparent; border: none; color: var(--text-sub); padding: 8px 12px;
    border-radius: 10px; font-weight: 600; font-style: italic; font-size: 15px; cursor: pointer; text-transform: uppercase;
    transition: all 0.2s ease;
    font-family: var(--custom-font-family), sans-serif;
}
.schedule-tab .tab-full { display: inline; }
.schedule-tab .tab-short { display: none; }
.schedule-tab.active { background: var(--accent-color); color: #ffffff; }
.schedule-list { display: flex; flex-direction: column; gap: 10px; }
.schedule-item {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: var(--item-bg); padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border-color);
}
.schedule-item.active { background: color-mix(in srgb, var(--accent-color) 20%, transparent); border-color: var(--accent-color); }
.schedule-item-details { display: flex; align-items: center; gap: 12px; flex: 1; }
.schedule-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border-color); flex-shrink: 0; }
.schedule-text-group { display: flex; flex-direction: column; }
.schedule-name { font-weight: 600; font-style: italic; font-size: 18px; color: var(--text-color); text-transform: uppercase; font-family: var(--custom-font-family), sans-serif; }
.schedule-locutor-modal { font-size: 13px; color: var(--text-sub); font-weight: 500; margin-top: 2px; font-family: var(--custom-font-family), sans-serif; }
.schedule-time { font-weight: 600; font-style: italic; font-size: 14px; color: var(--accent-color); flex-shrink: 0; font-family: var(--custom-font-family), sans-serif; }

.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--item-bg); padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border-color);
}
.history-cover-wrapper { position: relative; width: 48px; height: 48px; border-radius: 8px; overflow: hidden; flex-shrink: 0; cursor: pointer; }
.history-thumb { width: 100%; height: 100%; object-fit: cover; }
.history-play-overlay {
    position: absolute; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s;
}
.history-cover-wrapper:hover .history-play-overlay { opacity: 1; }
.history-play-overlay svg { width: 20px; height: 20px; fill: #ffffff; }
.history-track-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.history-song { font-weight: 600; font-style: italic; font-size: 16px; color: var(--text-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; font-family: var(--custom-font-family), sans-serif; }
.history-artist { font-weight: 500; font-style: italic; font-size: 14px; color: var(--text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; font-family: var(--custom-font-family), sans-serif; }
.history-time { font-weight: 600; font-size: 13px; color: var(--text-sub); flex-shrink: 0; font-family: var(--custom-font-family), sans-serif; }

@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Animação dinâmica para o efeito de letreiro */
@keyframes scrollText {
    0%, 15% { transform: translateX(0); }
    85%, 100% { transform: translateX(var(--scroll-dist)); }
}

.ads-banner-wrapper {
    margin: 6px 0;
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}
.ad-banner-item { width: 100%; display: flex; justify-content: center; }
.ad-banner-item img {
    height: 80px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

.ads-rodape {
    width: 100% !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
}

@media (max-width: 480px) {
    .header-main-row {
        justify-content: flex-start;
    }

    .header-identity-container {
        justify-content: flex-start;
    }

    /* Visibilidade do slogan controlada pelo config.json. */

    .header-buttons-bar {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    .schedule-tab .tab-full { display: none; }
    .schedule-tab .tab-short { display: inline; }
    .lightbox-overlay { padding: 0; }
    .lightbox-card {
        width: 100vw; height: 100vh; height: 100dvh;
        max-width: 100%; max-height: 100%; border-radius: 0; border: none;
    }
    .cover-wrapper { width: min(72vw, 240px); height: min(72vw, 240px); }

    .app-container {
        padding-bottom: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .header-station {
        padding-left: 16px;
        padding-right: 16px;
    }

    .footer-info {
        width: 100vw;
        margin: 0;
    }

    .action-buttons-group {
        width: 100vw;
        border-radius: 0;
        border: none !important;
        margin-bottom: 0;
        justify-content: space-around;
        padding: 10px 12px;
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: none !important;
    }

    .ads-topo {
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 5px 0 0 0 !important;
        padding: 0 !important;
    }

    .ads-topo .ad-banner-item img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    .ads-rodape {
        margin: 0 !important;
    }

    .ads-rodape .ad-banner-item img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto;
        border-radius: 0 !important;
        margin: 0 !important;
    }
}

.custom-submit-lyric-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 100%; max-width: 340px;
    background: linear-gradient(135deg, var(--accent-color), color-mix(in srgb, var(--accent-color) 75%, #000));
    color: #ffffff; border: none; padding: 12px 20px; border-radius: 14px;
    font-weight: 600; font-style: italic; font-size: 15px; text-transform: uppercase; cursor: pointer;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--accent-color) 35%, transparent);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    font-family: var(--custom-font-family), sans-serif;
}
.custom-submit-lyric-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px color-mix(in srgb, var(--accent-color) 50%, transparent);
    filter: brightness(1.05);
}
.custom-submit-lyric-btn:active { transform: translateY(0); }

.custom-form-card { border-radius: 24px; border: 1px solid var(--border-color); box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5); }
.custom-form-body { display: flex; flex-direction: column; gap: 14px; padding: 24px; }
.custom-form-subtitle { font-size: 14px; color: var(--text-sub); margin-bottom: 4px; line-height: 1.4; font-family: var(--custom-font-family), sans-serif; }

.custom-lyric-form-elements .form-group { display: flex; flex-direction: column; gap: 6px; }
.custom-lyric-form-elements .form-label {
    font-weight: 600; font-size: 13px; text-transform: uppercase; color: var(--text-sub); letter-spacing: 0.5px;
    font-family: var(--custom-font-family), sans-serif;
}
.custom-lyric-form-elements .form-input,
.custom-lyric-form-elements .custom-textarea {
    background: var(--input-bg); border: 1.5px solid var(--border-color); color: var(--text-color);
    padding: 10px 14px; border-radius: 12px; font-size: 15px; outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: var(--custom-font-family), sans-serif;
}
.custom-lyric-form-elements .form-input:focus,
.custom-lyric-form-elements .custom-textarea:focus {
    border-color: var(--accent-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 20%, transparent);
}
.custom-textarea { resize: vertical; min-height: 120px; }

.custom-action-submit-btn {
    width: 100%; background: var(--accent-color); color: #ffffff; border: none; padding: 14px;
    border-radius: 12px; font-weight: 700; font-style: italic; font-size: 16px;
    text-transform: uppercase; cursor: pointer; letter-spacing: 0.5px;
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease; box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    font-family: var(--custom-font-family), sans-serif;
}
.custom-action-submit-btn:not(:disabled):hover { filter: brightness(1.1); transform: scale(1.01); }
.custom-action-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; background: var(--border-color); color: var(--text-sub); box-shadow: none; }

/* =========================================================
 *  ESTILOS DO LETREIRO ROTATIVO DE POSTS (TICKER)
 * = *======================================================== */

.post-ticker-wrapper {
    white-space: nowrap;
    padding-top: 6px;
    padding-bottom: 6px;
    margin-bottom: 10px;
    border-bottom: 1px solid color-mix(in srgb, var(--border-color) 100%, transparent);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.post-ticker-scroll {
    display: inline-flex;
    align-items: center;
    /* Velocidade do letreiro - altere os 25s para mais rápido/lento */
    animation: scrollTicker 160s linear infinite;
    will-change: transform;
}

/* Opcional: Pausar o letreiro quando o mouse estiver em cima */
.post-ticker-scroll:hover {
    animation-play-state: paused;
}

.post-ticker-item {
    display: inline-flex;
    align-items: center;
    margin-right: 30px;
}

.ticker-badge {
    font-size: 11px !important;
    padding: 2px 8px !important;
    margin-right: 8px;
}

.ticker-date {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-sub);
    font-family: var(--custom-font-family), sans-serif;
    margin-right: 8px;
}

.ticker-text {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-color);
    font-family: var(--custom-font-family), sans-serif;
    margin-right: 8px;
    text-transform: uppercase;
}

.ticker-dot {
    font-size: 14px;
    color: var(--accent-color);
    font-weight: 800;
}

/* Efeito de rotação infinita contínua */
@keyframes scrollTicker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}


/* Controles SD, volume e HD integrados à barra social do cabeçalho */
.header-buttons-bar { gap: 8px; }
.header-buttons-bar .social-btn-link {
    width: 30px; height: 30px; min-width: 30px; padding: 7px;
    flex: 0 0 30px; font-size: 11px; line-height: 1;
}
.header-buttons-bar .social-btn-link svg { width: 16px; height: 16px; }
.header-buttons-bar .stream-quality-btn { font-weight: 700; font-style: italic; }
.volume-floating-container { position: relative; display: flex; align-items: center; width: 30px; height: 30px; z-index: 20; }
.volume-floating-container:has(.volume-slider-panel:not([hidden])) { z-index: 110; }
/* Quando aberto, a borda personalizada envolve todo o controle vertical. */
.volume-floating-container:has(.volume-slider-panel:not([hidden])) .volume-social-btn {
    position: absolute; top: 1px; left: 1px;
    width: 28px; height: 29px; min-width: 28px; padding: 6px;
    border: 0; border-radius: 14px 14px 0 0;
    background: transparent; box-shadow: none; transform: none;
}
.volume-floating-container:has(.volume-slider-panel:not([hidden])) .volume-social-btn:hover,
.volume-floating-container:has(.volume-slider-panel:not([hidden])) .volume-social-btn.active {
    border-color: transparent; background: transparent; transform: none;
}
.volume-floating-container .volume-social-btn { position: relative; z-index: 2; flex-shrink: 0; }
.volume-slider-panel {
    position: absolute; top: 0; left: 0; z-index: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    gap: 8px; width: 30px; height: 132px; box-sizing: border-box;
    padding: 38px 5px 9px; border-radius: 16px; border: 1px solid var(--accent-color);
    background: var(--item-bg); color: var(--text-color); box-shadow: 0 6px 18px rgba(0,0,0,.22);
    animation: volumeSliderOpen .16s ease-out;
}
.volume-slider-panel[hidden] { display: none; }
.volume-slider-panel input[type="range"] {
    writing-mode: vertical-lr; direction: rtl;
    width: 16px; height: 62px; min-height: 62px; min-width: 0;
    accent-color: var(--accent-color); cursor: pointer; margin: 0;
}
.volume-slider-panel span { font-size: 9px; line-height: 1; font-weight: 600; min-width: 0; text-align: center; white-space: nowrap; }
@keyframes volumeSliderOpen { from { opacity: 0; transform: translateY(-4px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Ícones de play/pause ao passar o mouse ou focar nos botões de qualidade */
.header-buttons-bar .stream-quality-btn svg {
    display: block;
    width: 16px;
    height: 16px;
    margin: auto;
}

/* Anúncios em vídeo ao lado da capa no desktop e no lugar dela em telas móveis. */
.player-middle-row {
    gap: 22px;
}

.video-ad-container {
    position: relative;
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    height: min(65vw, 320px);
    width: auto;
    aspect-ratio: var(--video-ad-ratio, 16 / 9);
    max-height: min(65vw, 320px);
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
}

.video-ad-container.is-visible {
    display: flex;
}

.video-ad-media {
    display: block;
    height: 100%;
    width: auto;
    max-width: none;
    object-fit: contain;
    background: #000;
}

.video-ad-controls {
    position: absolute;
    z-index: 7;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.video-ad-label {
    position: static;
    padding: 5px 9px;
    border-radius: 5px;
    background: var(--accent-color);
    color: #fff;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .5px;
    pointer-events: none;
}

.video-ad-close {
    position: static;
    width: 18px;
    height: 18px;
    min-width: 18px;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    flex-shrink: 0;
}

.video-ad-close[hidden] {
    display: none !important;
}

.video-ad-cover-hidden {
    display: none !important;
}

@media (min-width: 601px) {
    .player-middle-row:has(.video-ad-container.is-visible) {
        justify-content: center;
        flex-wrap: nowrap;
    }

    .video-ad-container.video-ad-desktop {
        height: min(65vw, 320px);
        width: auto;
        aspect-ratio: var(--video-ad-ratio, 16 / 9);
        max-height: min(65vw, 320px);
    }
}

@media (max-width: 600px) {
    .player-middle-row {
        gap: 0;
    }

    .player-middle-row:has(.video-ad-container.is-visible) {
        justify-content: center;
        flex-wrap: nowrap;
    }

    .video-ad-container.video-ad-mobile {
        width: min(92vw, 480px);
        height: auto;
        max-height: none;
        aspect-ratio: var(--video-ad-ratio, 16 / 9);
        border-radius: 20px;
        border: 1px solid var(--border-color);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    }

    .video-ad-container.video-ad-mobile .video-ad-media {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
}

/* Mantém a capa com seu tamanho original quando o vídeo aparece ao lado. */
.player-middle-row > .cover-wrapper {
    flex: 0 0 auto;
}

/* O iframe do YouTube ocupa toda a área reservada ao anúncio. */
.video-ad-youtube-host,
.video-ad-youtube-host iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Agrupamento dos botões do cabeçalho em telas móveis. */
.mobile-menu-group { position: relative; display: contents; }
.mobile-group-toggle { display: none; }
.mobile-menu-panel { display: contents; }

@media (max-width: 600px) {
    .header-buttons-bar {
        gap: 6px;
    }

    .mobile-menu-group {
        position: relative;
        display: flex;
        align-items: center;
        flex: 0 0 30px;
        width: 30px;
        height: 30px;
    }

    .mobile-group-toggle {
        display: inline-flex !important;
        flex: 0 0 30px;
        width: 30px;
        height: 30px;
        min-width: 30px;
        padding: 6px !important;
    }

    .mobile-group-toggle svg {
        display: block;
        width: 16px;
        height: 16px;
    }

    .mobile-menu-panel {
        display: none;
        position: absolute;
        top: calc(100% + 7px);
        right: 0;
        z-index: 150;
        flex-direction: column;
        align-items: center;
        gap: 7px;
        width: 42px;
        padding: 7px 6px;
        border: 1px solid var(--border-color);
        border-radius: 22px;
        background: var(--item-bg);
        box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
    }

    .mobile-menu-group.is-open .mobile-menu-panel {
        display: flex;
    }

    .mobile-menu-panel .social-btn-link {
        flex: 0 0 30px;
        width: 30px;
        height: 30px;
        min-width: 30px;
        padding: 6px;
    }

    .quality-buttons-panel .stream-quality-btn {
        font-size: 11px;
        font-weight: 800;
    }

    .quality-buttons-panel .stream-quality-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Controles do cabeçalho: vidro fosco semi-transparente. */
.header-buttons-bar .social-btn-link,
.header-buttons-bar .mobile-menu-panel,
.header-buttons-bar .volume-slider-panel {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
    -webkit-backdrop-filter: blur(16px) saturate(145%);
    backdrop-filter: blur(16px) saturate(145%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
body.dark-mode .header-buttons-bar .social-btn-link,
body.dark-mode .header-buttons-bar .mobile-menu-panel,
body.dark-mode .header-buttons-bar .volume-slider-panel {
    background: rgba(24, 24, 26, 0.58);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.header-buttons-bar .social-btn-link:hover,
.header-buttons-bar .social-btn-link.active,
.header-buttons-bar .social-btn-link:focus-visible {
    background: color-mix(in srgb, var(--accent-color) 35%, rgba(255,255,255,.18));
    border-color: color-mix(in srgb, var(--accent-color) 70%, transparent);
}

@media (max-width: 600px) {
    .header-buttons-bar .quality-buttons-group {
        flex: 0 0 30px;
        width: 30px;
        height: 30px;
    }
    .header-buttons-bar .quality-buttons-panel {
        align-items: center;
        gap: 7px;
        width: 42px;
        max-height: min(70vh, 360px);
        overflow: visible;
    }
    .header-buttons-bar .quality-buttons-panel .stream-quality-btn {
        flex: 0 0 30px;
    }
    .header-buttons-bar .quality-buttons-panel .volume-floating-container {
        display: flex;
        position: relative;
        flex: 0 0 auto;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        width: 30px;
        height: auto;
        min-height: 30px;
        z-index: 3;
    }
    .header-buttons-bar .quality-buttons-panel .volume-floating-container:has(.volume-slider-panel:not([hidden])) {
        width: 30px;
        height: auto;
        min-height: 30px;
    }
    .header-buttons-bar .quality-buttons-panel .volume-slider-panel {
        position: relative;
        top: auto;
        left: auto;
        width: 30px;
        height: 150px;
        min-height: 150px;
        padding: 10px 4px 8px;
        gap: 8px;
        border-radius: 15px;
        justify-content: space-between;
        order: 2;
    }
    .header-buttons-bar .quality-buttons-panel .volume-slider-panel input[type="range"] {
        flex: 1 1 auto;
        height: 100%;
        min-height: 0;
        max-height: 112px;
    }
    .header-buttons-bar .quality-buttons-panel .volume-slider-panel span {
        font-size: 9px;
    }
    .header-buttons-bar .quality-buttons-panel .volume-floating-container:has(.volume-slider-panel:not([hidden])) .volume-social-btn {
        position: relative;
        top: auto;
        left: auto;
        flex: 0 0 30px;
        width: 30px;
        height: 30px;
        min-width: 30px;
        padding: 6px;
        border: 1px solid rgba(255,255,255,.28);
        border-radius: 50%;
        background: rgba(255,255,255,.16);
    }
}


/* Até 950px, o anúncio ocupa o lugar da capa para evitar que ambos sejam cortados. */
@media (max-width: 950px) {
    .player-middle-row {
        gap: 0;
    }

    .player-middle-row:has(.video-ad-container.is-visible) {
        justify-content: center;
        flex-wrap: nowrap;
    }

    .video-ad-container.video-ad-mobile {
        width: min(92vw, 480px);
        height: auto;
        max-height: none;
        aspect-ratio: var(--video-ad-ratio, 16 / 9);
        border-radius: 20px;
        border: 1px solid var(--border-color);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    }

    .video-ad-container.video-ad-mobile .video-ad-media {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
}


/* Status e ações: mesmo vidro fosco dos controles do cabeçalho. */
.status-badge,
.action-buttons-group {
    background: rgba(255, 255, 255, 0.16) !important;
    border-color: rgba(255, 255, 255, 0.28);
    -webkit-backdrop-filter: blur(16px) saturate(145%);
    backdrop-filter: blur(16px) saturate(145%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
body.dark-mode .status-badge,
body.dark-mode .action-buttons-group {
    background: rgba(24, 24, 26, 0.58) !important;
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Ícone correspondente ao tema ativo: sol no claro e lua no escuro. */
#theme-toggle-btn #theme-icon-moon { display: none; }
body.dark-mode #theme-toggle-btn #theme-icon-sun { display: none; }
body.dark-mode #theme-toggle-btn #theme-icon-moon { display: block; }

/* Legibilidade sobre o fundo sem blur: sombras suaves por tema. */
body:not(.dark-mode) .station-name {
    text-shadow: 0 1px 3px rgba(255,255,255,.75), 0 2px 8px rgba(255,255,255,.38);
}
body:not(.dark-mode) .station-slogan {
    text-shadow: 0 1px 4px rgba(255,255,255,.65);
}
body:not(.dark-mode) .track-info {
    text-shadow: 0 1px 3px rgba(255,255,255,.65), 0 2px 8px rgba(255,255,255,.30);
}
body.dark-mode .station-name {
    text-shadow: 0 2px 5px rgba(0,0,0,.45), 0 4px 16px rgba(0,0,0,.25);
}
body.dark-mode .station-slogan {
    text-shadow: 0 1px 4px rgba(0,0,0,.40);
}
body.dark-mode .track-info {
    text-shadow: 0 2px 5px rgba(0,0,0,.45), 0 3px 12px rgba(0,0,0,.20);
}

/* Letreiro: mesma superfície de vidro fosco dos controles do cabeçalho. */
.post-ticker-wrapper {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    -webkit-backdrop-filter: blur(16px) saturate(145%);
    backdrop-filter: blur(16px) saturate(145%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
body.dark-mode .post-ticker-wrapper {
    background: rgba(24, 24, 26, 0.58);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}


/* Capa e barra de ações: mesma superfície de vidro dos controles do cabeçalho.
 *   A transparência do PNG permite visualizar o vidro da própria capa. */
.cover-wrapper {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
    -webkit-backdrop-filter: blur(16px) saturate(145%);
    backdrop-filter: blur(16px) saturate(145%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
body.dark-mode .cover-wrapper {
    background: rgba(24, 24, 26, 0.58);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* A barra de ações se estende no mobile; manter o vidro também nessa largura. */
@media (max-width: 600px) {
    .action-buttons-group {
        background: rgba(255, 255, 255, 0.16) !important;
        -webkit-backdrop-filter: blur(16px) saturate(145%) !important;
        backdrop-filter: blur(16px) saturate(145%) !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
    }
    body.dark-mode .action-buttons-group {
        background: rgba(24, 24, 26, 0.58) !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    }
}
