:root {
    color-scheme: dark;
    --igr-bg: #070b14;
    --igr-surface: rgba(19, 27, 43, .86);
    --igr-surface-strong: #151e30;
    --igr-border: rgba(148, 163, 184, .18);
    --igr-text: #f7f9fc;
    --igr-muted: #9ba9bd;
    --igr-accent: #2bb3f3;
    --igr-accent-2: #2bb3f3;
    --igr-danger: #ff6b7a;
    --igr-radius: 22px;
    --igr-shadow: 0 24px 70px rgba(0, 0, 0, .36);
}

html[data-theme="light"] {
    color-scheme: light;
    --igr-bg: #edf4fa;
    --igr-surface: rgba(255, 255, 255, .91);
    --igr-surface-strong: #ffffff;
    --igr-border: rgba(31, 76, 110, .16);
    --igr-text: #102437;
    --igr-muted: #607386;
    --igr-accent: #087fba;
    --igr-accent-2: #2bb3f3;
    --igr-danger: #c53b4c;
    --igr-shadow: 0 20px 55px rgba(38, 72, 98, .15);
}

html { background: var(--igr-bg); }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--igr-text) !important;
    background:
        radial-gradient(circle at 15% -5%, rgba(43, 179, 243, .16), transparent 34rem),
        radial-gradient(circle at 95% 8%, rgba(94, 162, 255, .15), transparent 30rem),
        var(--igr-bg) !important;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="light"] body {
    background:
        radial-gradient(circle at 15% -5%, rgba(43, 179, 243, .18), transparent 34rem),
        radial-gradient(circle at 95% 8%, rgba(94, 162, 255, .14), transparent 30rem),
        var(--igr-bg) !important;
}

html[data-theme="light"] body::before { opacity: .32; }

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: .18;
    background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 38px 38px;
}

#page-wrapper { background: transparent !important; }

.igr-shell,
#page-wrapper > .container-md,
#page-wrapper > .container-sm,
body > .container,
body > .container-sm {
    position: relative;
    width: min(1180px, calc(100% - 28px));
    margin-inline: auto;
}

.igr-panel,
.jumbotron1,
#page-wrapper .bg-dark,
.modal-content {
    background: var(--igr-surface) !important;
    border: 1px solid var(--igr-border) !important;
    border-radius: var(--igr-radius) !important;
    box-shadow: var(--igr-shadow);
}

.igr-panel,
.jumbotron1,
.modal-content { backdrop-filter: blur(18px); }

.igr-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(10px, 2vw, 20px);
    margin-bottom: 22px;
    overflow: hidden;
}

.igr-cover.igr-panel {
    border: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.igr-cover img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: cover;
    border-radius: inherit;
}

.igr-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 430px);
    gap: clamp(24px, 5vw, 64px);
    align-items: center;
    padding: clamp(24px, 5vw, 58px);
    margin-bottom: 22px;
    overflow: hidden;
    position: relative;
}

.igr-hero::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -90px;
    bottom: -120px;
    border-radius: 50%;
    background: rgba(43, 179, 243, .13);
    filter: blur(4px);
}

.igr-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    margin-bottom: 14px;
    border: 1px solid rgba(43, 179, 243, .28);
    border-radius: 999px;
    color: var(--igr-accent);
    background: rgba(43, 179, 243, .08);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.igr-hero h1 {
    margin: 0 0 12px;
    max-width: 760px;
    font-size: clamp(2.1rem, 5vw, 4.7rem);
    line-height: .98;
    letter-spacing: -.055em;
}

.igr-hero p { color: var(--igr-muted); max-width: 650px; font-size: clamp(1rem, 1.8vw, 1.16rem); }
.igr-hero img { width: 100%; max-height: 350px; object-fit: contain; filter: drop-shadow(0 30px 30px rgba(0,0,0,.38)); }

.igr-actions .btn,
.row.g-2 .btn {
    min-height: 92px;
    justify-content: center !important;
    padding: 17px 18px;
    color: var(--igr-text) !important;
    text-align: center;
    background: linear-gradient(145deg, rgba(30, 41, 61, .94), rgba(17, 25, 40, .94)) !important;
    border: 1px solid var(--igr-border) !important;
    border-radius: 18px !important;
    box-shadow: none !important;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.igr-actions .btn:hover,
.row.g-2 .btn:hover {
    transform: translateY(-3px);
    border-color: rgba(43, 179, 243, .52) !important;
    background: linear-gradient(145deg, rgba(34, 50, 72, .98), rgba(20, 33, 49, .98)) !important;
}

.igr-actions .btn i,
.row.g-2 .btn i { color: var(--igr-accent); }
.igr-actions .btn > div,
.row.g-2 .btn > div { align-items: center; text-align: center; }
.igr-actions small,
.row.g-2 small { color: var(--igr-muted) !important; font-weight: 500; }

/* Compact dashboard actions: icon works as a background watermark. */
.igr-actions .btn {
    position: relative;
    isolation: isolate;
    min-height: 68px;
    padding: 10px 8px !important;
    overflow: hidden;
}

.igr-actions .btn > i {
    position: absolute;
    left: -4px;
    bottom: -12px;
    z-index: 0;
    margin: 0 !important;
    font-size: 4.2rem !important;
    line-height: 1;
    opacity: .12;
    pointer-events: none;
}

.igr-actions .btn > div {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
}

.igr-actions .btn > div > span {
    font-size: clamp(.88rem, 1.25vw, 1.05rem);
    line-height: 1.15;
}

.igr-actions .btn small {
    font-size: .75rem;
    line-height: 1.15;
}

h1, h2, h3, h4, h5, h6 { color: var(--igr-text); letter-spacing: -.025em; }
.text-info { color: var(--igr-accent) !important; }
.text-muted, small { color: var(--igr-muted) !important; }

.igr-section-title {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 20px;
    margin: 34px 2px 16px;
    text-align: center !important;
}

.igr-section-title > div { width: 100%; text-align: center; }
.igr-section-title h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.25rem); }

.radio-item > .d-flex,
#podcast-container > .d-flex {
    padding: 7px;
    border: 1px solid var(--igr-border);
    border-radius: 19px;
    background: rgba(17, 25, 40, .88);
    transition: transform .18s ease, border-color .18s ease;
}

.radio-item > .d-flex:hover,
#podcast-container > .d-flex:hover { transform: translateY(-2px); border-color: rgba(94, 162, 255, .42); }

.station-play,
#podcast-container .btn-secondary {
    color: var(--igr-text) !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    text-align: left;
}

/* Center station/podcast labels and shorten long text with an ellipsis */
.radio-item,
#podcast-container .podcast-item,
.igr-search-page #result,
.radio-item > .d-flex,
#podcast-container .podcast-item > .d-flex {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.radio-item .station-play,
#podcast-container .podcast-item > .d-flex > a,
.igr-search-page #result .openStationModal {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.radio-item .station-play .text-container,
#podcast-container .podcast-item .text-container,
.igr-search-page #result .openStationModal .text-container {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.radio-item .text-name,
#podcast-container .podcast-item .text-name,
.igr-search-page #result .text-name {
    display: -webkit-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.radio-item .text-genre,
#podcast-container .podcast-item .text-genre,
.igr-search-page #result .text-genre {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
    text-overflow: ellipsis;
}

.radio-item img,
#podcast-container img {
    border: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 8px 22px rgba(0,0,0,.25);
}

/* Station artwork: square with softly rounded corners (podcasts stay round). */
.radio-item .station-play img,
.igr-search-page #result .openStationModal img,
.modal .preview-logo,
#npLogo {
    border-radius: 14px !important;
}

.delete-station-btn,
.radio-item [data-bs-toggle="modal"] { border-radius: 12px !important; }

/* Draggable station and podcast cards */
.radio-item > .d-flex,
#podcast-container .podcast-item > .d-flex {
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: stretch !important;
    gap: 8px !important;
    overflow: hidden !important;
}

.igr-drag-handle,
.igr-card-action {
    display: grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 !important;
    color: var(--igr-muted) !important;
    background: rgba(43, 179, 243, .07) !important;
    border: 1px solid transparent !important;
    border-radius: 13px !important;
    box-shadow: none !important;
    font-size: 1.2rem;
}

.igr-drag-handle {
    cursor: grab;
    touch-action: none;
}

.igr-drag-handle:active { cursor: grabbing; }
.igr-card-action { color: var(--igr-accent) !important; }
.igr-delete-action { color: #ff7f8d !important; }

.igr-card-actions {
    display: grid;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 5px;
    min-width: 0;
}

.igr-card-actions .igr-card-action {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    border-radius: 10px !important;
    font-size: 1rem;
}

.igr-card-actions .igr-delete-action:hover,
.igr-card-actions .igr-delete-action:focus-visible {
    color: #fff !important;
    background: rgba(255, 107, 122, .18) !important;
    border-color: rgba(255, 107, 122, .38) !important;
}

.igr-drag-handle:hover,
.igr-drag-handle:focus-visible,
.igr-card-action:hover,
.igr-card-action:focus-visible {
    color: var(--igr-text) !important;
    background: rgba(43, 179, 243, .16) !important;
    border-color: rgba(43, 179, 243, .35) !important;
    outline: none;
}

.igr-sort-ghost { opacity: .34; }
.igr-sort-chosen > .d-flex {
    border-color: var(--igr-accent) !important;
    box-shadow: 0 14px 35px rgba(0, 82, 165, .28) !important;
}
.igr-sort-drag > .d-flex {
    transform: rotate(.3deg);
    box-shadow: 0 20px 42px rgba(0, 0, 0, .34) !important;
}

.btn-primary, .btn-success {
    color: #031614 !important;
    font-weight: 800;
    background: linear-gradient(135deg, var(--igr-accent), #70ccf7) !important;
    border-color: transparent !important;
}

.btn-danger { background: rgba(255,107,122,.13) !important; border-color: rgba(255,107,122,.35) !important; color: #ff9ca7 !important; }
.btn-warning { background: rgba(255,193,7,.13) !important; border-color: rgba(255,193,7,.35) !important; color: #ffd865 !important; }

.form-control, .form-select, textarea, input[type="text"], input[type="url"], input[type="search"], select,
.modal .button-text-pointer, .modal select {
    min-height: 52px;
    padding: 12px 16px !important;
    color: var(--igr-text) !important;
    background: rgba(7, 11, 20, .76) !important;
    border: 1px solid var(--igr-border) !important;
    border-radius: 14px !important;
    text-align: left;
}

.form-control:focus, .form-select:focus, textarea:focus, input:focus, select:focus {
    border-color: var(--igr-accent) !important;
    box-shadow: 0 0 0 4px rgba(43,179,243,.12) !important;
}

.modal-backdrop.show { opacity: .72; }
.modal { z-index: 1080 !important; }
.modal-backdrop { z-index: 1070 !important; }
.modal-header, .modal-footer { padding: 20px 22px; }

/* High-contrast confirmation text in station and podcast delete modals. */
#deleteStationModalLabel,
#deletePodcastModalLabel,
#deleteStationModal .modal-body > p:first-child,
#deletePodcastModal .modal-body > p:first-child {
    color: var(--igr-text) !important;
}

#deleteStationModalLabel,
#deletePodcastModalLabel { font-weight: 800; }

#deleteStationModal .modal-body > p:first-child,
#deletePodcastModal .modal-body > p:first-child {
    font-weight: 600;
    opacity: .94;
}

#deleteStationModal .modal-body .text-muted,
#deletePodcastModal .modal-body .text-muted {
    color: var(--igr-muted) !important;
    opacity: 1;
}
.modal-body { padding: 4px 22px 22px; }

.accordion-item { overflow: hidden; margin-bottom: 10px; color: var(--igr-text); background: rgba(16,24,39,.8); border: 1px solid var(--igr-border) !important; border-radius: 16px !important; }
.accordion-button { padding: 18px 20px; color: var(--igr-text) !important; background: transparent !important; box-shadow: none !important; }
.accordion-button:not(.collapsed) { color: var(--igr-accent) !important; }
.accordion-body { color: var(--igr-muted); }

.player-bar {
    left: 50% !important;
    bottom: 16px !important;
    width: min(760px, calc(100% - 24px)) !important;
    transform: translateX(-50%);
    padding: 10px 12px !important;
    background: rgba(14, 22, 35, .94) !important;
    border: 1px solid rgba(43,179,243,.3) !important;
    border-radius: 18px !important;
    box-shadow: 0 24px 70px rgba(0,0,0,.56);
    backdrop-filter: blur(18px);
}

.player-bar img { border-radius: 12px !important; }
.play-btn { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--igr-accent) !important; color: #041614 !important; }

.igr-page-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.igr-back { display: inline-flex; align-items: center; gap: 8px; color: var(--igr-muted); text-decoration: none; }
.igr-back:hover { color: var(--igr-accent); }

/* Unified forms */
.igr-form-page,
.igr-podcast-page,
.igr-search-page { padding-block: 18px 44px; }

.igr-form-panel,
.igr-search-panel {
    padding: clamp(20px, 4vw, 38px) !important;
    color: var(--igr-text);
}

.igr-form-panel form {
    max-width: 760px;
    margin-inline: auto;
}

.igr-form-panel label,
.modal label {
    display: block;
    margin: 0 0 8px 4px;
    color: #d8e7f3;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.igr-form-panel input,
.igr-form-panel select,
.igr-form-panel textarea,
.modal input,
.modal select,
.modal textarea {
    color: #f8fbff !important;
    background: linear-gradient(145deg, rgba(8, 17, 30, .96), rgba(13, 27, 45, .96)) !important;
    border-color: rgba(43, 179, 243, .24) !important;
}

.igr-form-panel input:disabled {
    color: #9fc8df !important;
    opacity: 1;
    cursor: not-allowed;
}

.igr-form-panel textarea { min-height: 160px; resize: vertical; }
.igr-form-panel option, .igr-search-page option { color: #f8fbff; background: #0d1b2d; }
.igr-form-panel ::placeholder, .igr-search-page ::placeholder { color: #74879d !important; opacity: 1; }
.igr-form-panel .help-block { display: block; color: #ff9ca7; margin: -3px 0 10px 4px; }

.alert {
    border: 1px solid var(--igr-border);
    border-radius: 14px;
    color: var(--igr-text);
    background: rgba(13, 27, 45, .9);
}
.alert-success { border-color: rgba(43,179,243,.42); background: rgba(43,179,243,.10); }
.alert-danger { border-color: rgba(255,107,122,.4); background: rgba(255,107,122,.10); }

/* Podcast cards aligned with My Stations */
.igr-list-heading {
    margin: 32px 0 15px;
    color: var(--igr-text) !important;
    font-size: clamp(1.4rem, 3vw, 2rem);
    text-align: center;
}

#podcast-container { display: grid; gap: 8px; }
#podcast-container .podcast-item { margin: 0 !important; }
#podcast-container .podcast-item > .d-flex {
    padding: 7px;
    border: 1px solid var(--igr-border);
    border-radius: 19px;
    background: linear-gradient(145deg, rgba(17, 30, 48, .96), rgba(12, 22, 37, .96));
    box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
#podcast-container .podcast-item > .d-flex:hover {
    transform: translateY(-2px);
    border-color: rgba(43, 179, 243, .42);
    box-shadow: 0 15px 34px rgba(0, 0, 0, .24);
}
#podcast-container .podcast-item .btn {
    color: var(--igr-text) !important;
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}
#podcast-container .podcast-item .igr-drag-handle,
#podcast-container .podcast-item .igr-card-action {
    min-width: 44px;
    border-radius: 12px !important;
    background: rgba(43,179,243,.07) !important;
}

/* Modern station search */
.igr-search-panel { min-height: 70vh; }
.igr-page-head h1 { margin: 0 0 7px; font-size: clamp(2rem, 5vw, 3.5rem); }
.igr-page-head p { margin: 0; color: var(--igr-muted); }

.igr-search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 26px 0 12px;
    padding: 5px 8px 5px 18px;
    border: 1px solid rgba(43,179,243,.34);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(8, 17, 30, .98), rgba(13, 27, 45, .98));
    box-shadow: 0 0 0 5px rgba(43,179,243,.055), 0 18px 35px rgba(0,0,0,.2);
}
.igr-search-box i { color: var(--igr-accent); font-size: 1.35rem; }
.igr-search-box .form-control {
    min-height: 58px;
    padding-left: 0 !important;
    font-size: 1.05rem;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
.igr-search-filters .form-select {
    min-height: 54px;
    color: #dcebf5 !important;
    border-color: rgba(43,179,243,.18) !important;
    background-color: rgba(10,21,36,.92) !important;
}

.igr-search-page #result { display: grid; gap: 8px; }
.igr-search-page #result .openStationModal {
    width: 100%;
    min-height: 82px;
    margin: 0 !important;
    padding: 8px 13px;
    color: var(--igr-text) !important;
    text-align: left;
    text-decoration: none;
    background: linear-gradient(145deg, rgba(17, 30, 48, .96), rgba(12, 22, 37, .96)) !important;
    border: 1px solid var(--igr-border) !important;
    border-radius: 18px !important;
    box-shadow: none !important;
    transition: transform .18s ease, border-color .18s ease;
}
.igr-search-page #result .openStationModal:hover {
    transform: translateY(-2px);
    border-color: rgba(43,179,243,.48) !important;
}
.igr-search-page #result .openStationModal img { width: 58px !important; height: 58px !important; box-shadow: 0 8px 22px rgba(0,0,0,.28); }
.igr-search-page #result .text-name { color: #f8fbff; font-weight: 800; }
.igr-search-page .loader { color: var(--igr-muted); }

/* Modern dropdowns: UserSpice navigation and form selects */
.dropdown-menu {
    min-width: 220px;
    padding: 8px;
    color: var(--igr-text) !important;
    background: rgba(10, 21, 36, .98) !important;
    border: 1px solid rgba(43, 179, 243, .28) !important;
    border-radius: 15px !important;
    box-shadow: 0 22px 55px rgba(0, 0, 0, .48) !important;
    backdrop-filter: blur(18px);
}

.dropdown-item {
    padding: 10px 12px !important;
    color: #dcebf5 !important;
    border-radius: 10px !important;
    transition: color .16s ease, background-color .16s ease, transform .16s ease;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active,
.dropdown-item:active {
    color: #fff !important;
    background: rgba(43, 179, 243, .16) !important;
    transform: translateX(2px);
}

.dropdown-divider { border-color: rgba(148, 163, 184, .16) !important; }
.dropdown-header { color: #7fcdf3 !important; font-weight: 800; letter-spacing: .04em; }

select,
.form-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 46px !important;
    color: #eaf6fd !important;
    background-color: rgba(10, 21, 36, .96) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%232bb3f3' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 6 5 5 5-5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 16px 12px !important;
    border: 1px solid rgba(43, 179, 243, .25) !important;
    border-radius: 14px !important;
    cursor: pointer;
}

select:hover,
.form-select:hover { border-color: rgba(43, 179, 243, .55) !important; }

select:focus,
.form-select:focus {
    border-color: var(--igr-accent) !important;
    box-shadow: 0 0 0 4px rgba(43, 179, 243, .12) !important;
}

/* Native option list (including Create New Station modal) */
select { color-scheme: dark; }
select option,
select optgroup {
    color: #f8fbff !important;
    background-color: #0d1b2d !important;
}
select option:checked {
    color: #ffffff !important;
    background-color: #176a94 !important;
}

/* Light theme */
html[data-theme="light"] .bg-dark,
html[data-theme="light"] #page-wrapper .bg-dark,
html[data-theme="light"] .modal-content,
html[data-theme="light"] .igr-panel,
html[data-theme="light"] .igr-form-panel,
html[data-theme="light"] .igr-search-panel,
html[data-theme="light"] .jumbotron1 {
    color: var(--igr-text) !important;
    background: var(--igr-surface) !important;
    border-color: var(--igr-border) !important;
}

html[data-theme="light"] .text-light,
html[data-theme="light"] .text-white,
html[data-theme="light"] .modal-title,
html[data-theme="light"] .modal-body,
html[data-theme="light"] .modal-header,
html[data-theme="light"] .modal-footer {
    color: var(--igr-text) !important;
}

html[data-theme="light"] .text-white-50 {
    color: var(--igr-muted) !important;
}

html[data-theme="light"] .border-secondary,
html[data-theme="light"] .modal-header,
html[data-theme="light"] .modal-footer {
    border-color: var(--igr-border) !important;
}

html[data-theme="light"] .igr-actions .btn,
html[data-theme="light"] .row.g-2 .btn,
html[data-theme="light"] .radio-item > .d-flex,
html[data-theme="light"] #podcast-container .podcast-item > .d-flex,
html[data-theme="light"] .igr-search-page #result .openStationModal {
    color: var(--igr-text) !important;
    background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(239,247,252,.98)) !important;
    border-color: rgba(31, 109, 153, .16) !important;
    box-shadow: 0 9px 25px rgba(41, 78, 104, .09) !important;
}

html[data-theme="light"] .station-play,
html[data-theme="light"] #podcast-container .podcast-item .btn {
    color: var(--igr-text) !important;
}

html[data-theme="light"] .igr-form-panel label,
html[data-theme="light"] .modal label {
    color: #29485d !important;
}

html[data-theme="light"] .igr-form-panel input,
html[data-theme="light"] .igr-form-panel select,
html[data-theme="light"] .igr-form-panel textarea,
html[data-theme="light"] .modal input,
html[data-theme="light"] .modal select,
html[data-theme="light"] .modal textarea,
html[data-theme="light"] .igr-search-box,
html[data-theme="light"] .igr-search-filters .form-select {
    color: #17344a !important;
    background-color: rgba(248, 252, 255, .98) !important;
    background-image: none;
    border-color: rgba(8, 127, 186, .22) !important;
}

html[data-theme="light"] input:disabled,
html[data-theme="light"] .igr-form-panel input:disabled,
html[data-theme="light"] .form-control:disabled {
    color: #506b7d !important;
    background: #e5eef4 !important;
    opacity: 1;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder,
html[data-theme="light"] .igr-form-panel ::placeholder,
html[data-theme="light"] .igr-search-page ::placeholder {
    color: #687d8e !important;
    opacity: 1;
}

html[data-theme="light"] select,
html[data-theme="light"] .form-select {
    color: #17344a !important;
    background-color: #f8fcff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23087fba' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 6 5 5 5-5'/%3E%3C/svg%3E") !important;
}

html[data-theme="light"] select option,
html[data-theme="light"] select optgroup {
    color: #17344a !important;
    background-color: #f8fcff !important;
}

html[data-theme="light"] .dropdown-menu {
    color: var(--igr-text) !important;
    background: rgba(255,255,255,.98) !important;
    border-color: rgba(8,127,186,.22) !important;
    box-shadow: 0 20px 48px rgba(41,78,104,.18) !important;
}

html[data-theme="light"] .dropdown-item { color: #29485d !important; }
html[data-theme="light"] .dropdown-item:hover,
html[data-theme="light"] .dropdown-item:focus,
html[data-theme="light"] .dropdown-item.active,
html[data-theme="light"] .dropdown-item:active {
    color: #075b85 !important;
    background: rgba(43,179,243,.13) !important;
}

html[data-theme="light"] .dropdown-header { color: #0872a7 !important; }
html[data-theme="light"] .dropdown-divider { border-color: var(--igr-border) !important; }

html[data-theme="light"] .btn-secondary {
    color: #17344a !important;
    background: #e4eef5 !important;
    border-color: #c3d4df !important;
}
html[data-theme="light"] .btn-secondary:hover,
html[data-theme="light"] .btn-secondary:focus {
    color: #0b2639 !important;
    background: #d5e5ef !important;
    border-color: #9ebdce !important;
}
html[data-theme="light"] .btn-danger {
    color: #8e2030 !important;
    background: #fbe7ea !important;
    border-color: #eab5bc !important;
}
html[data-theme="light"] .btn-warning {
    color: #694b00 !important;
    background: #fff2c7 !important;
    border-color: #dfc66f !important;
}

html[data-theme="light"] .alert {
    color: var(--igr-text) !important;
    background: rgba(255,255,255,.92) !important;
}
html[data-theme="light"] .alert-success { background: #e4f7f0 !important; }
html[data-theme="light"] .alert-danger { background: #fbe7ea !important; }

html[data-theme="light"] .accordion-item {
    color: var(--igr-text) !important;
    background: rgba(255,255,255,.88) !important;
}
html[data-theme="light"] .accordion-button,
html[data-theme="light"] .accordion-button:not(.collapsed) {
    color: var(--igr-text) !important;
    background: rgba(255,255,255,.94) !important;
}
html[data-theme="light"] .accordion-body { color: var(--igr-muted) !important; }

html[data-theme="light"] .igr-search-page #result .text-name,
html[data-theme="light"] #podcast-container .podcast-item,
html[data-theme="light"] #podcast-container .podcast-item a,
html[data-theme="light"] .radio-item,
html[data-theme="light"] .radio-item a {
    color: var(--igr-text) !important;
}

html[data-theme="light"] .navbar-dark .navbar-brand,
html[data-theme="light"] .navbar-dark .navbar-nav .nav-link,
html[data-theme="light"] .navbar .dropdown-toggle {
    color: #17344a !important;
}
html[data-theme="light"] .navbar-dark .navbar-nav .nav-link:hover,
html[data-theme="light"] .navbar-dark .navbar-nav .nav-link:focus,
html[data-theme="light"] .navbar-dark .navbar-nav .show > .nav-link {
    color: #075b85 !important;
}

html[data-theme="light"] .modal-backdrop.show { opacity: .48; }
html[data-theme="light"] .modal .btn-close,
html[data-theme="light"] .modal .btn-close-white {
    filter: none !important;
    opacity: .78;
}
html[data-theme="light"] .modal .btn-close:hover,
html[data-theme="light"] .modal .btn-close-white:hover { opacity: 1; }

html[data-theme="light"] .output {
    color: var(--igr-text) !important;
    background: var(--igr-surface) !important;
    border-color: var(--igr-border) !important;
    box-shadow: var(--igr-shadow);
}
html[data-theme="light"] .output label { color: #29485d !important; }
html[data-theme="light"] .output input {
    color: #17344a !important;
    background: #f8fcff !important;
    border-color: rgba(8,127,186,.22) !important;
}
html[data-theme="light"] .output p,
html[data-theme="light"] .output h1,
html[data-theme="light"] .output h2,
html[data-theme="light"] .output h3 { color: var(--igr-text) !important; }

html[data-theme="light"] .player-bar {
    background: rgba(255,255,255,.95) !important;
    box-shadow: 0 18px 48px rgba(38,72,98,.22);
}
html[data-theme="light"] #npName,
html[data-theme="light"] .player-bar .text-white,
html[data-theme="light"] .player-bar i { color: var(--igr-text) !important; }

/* UserSpice footer */
html[data-theme="dark"] footer,
html[data-theme="dark"] #footer,
html[data-theme="dark"] .footer,
html[data-theme="dark"] footer.bg-light,
html[data-theme="dark"] footer.bg-white {
    color: var(--igr-text) !important;
    background: #0d1522 !important;
    border-color: var(--igr-border) !important;
}

html[data-theme="dark"] footer p,
html[data-theme="dark"] footer span,
html[data-theme="dark"] footer small,
html[data-theme="dark"] #footer p,
html[data-theme="dark"] #footer span,
html[data-theme="dark"] #footer small,
html[data-theme="dark"] .footer p,
html[data-theme="dark"] .footer span,
html[data-theme="dark"] .footer small {
    color: var(--igr-muted) !important;
}

html[data-theme="dark"] footer a,
html[data-theme="dark"] #footer a,
html[data-theme="dark"] .footer a {
    color: #7fcdf3 !important;
}

html[data-theme="dark"] footer a:hover,
html[data-theme="dark"] #footer a:hover,
html[data-theme="dark"] .footer a:hover {
    color: #b7e7ff !important;
}

/* UserSpice login and registration */
.igr-auth-page {
    position: relative;
    width: min(100% - 24px, 960px);
    min-height: calc(100vh - 150px);
    margin-inline: auto;
    padding-block: clamp(24px, 6vw, 70px) !important;
    color: var(--igr-text);
    background: transparent !important;
}

.igr-login-page #loginModal .modal-dialog { max-width: 520px; }
body:has(.igr-login-page) .igr-theme-toggle { z-index: 1090; }
.igr-login-page #loginModal .modal-content,
.igr-register-page .card,
.igr-register-page .jumbotron,
.igr-register-page .jumbotron1,
.igr-register-page form {
    color: var(--igr-text) !important;
    background: var(--igr-surface) !important;
    border: 1px solid var(--igr-border) !important;
    border-radius: var(--igr-radius) !important;
    box-shadow: var(--igr-shadow);
    backdrop-filter: blur(18px);
}

.igr-register-page form {
    max-width: 760px;
    margin-inline: auto;
    padding: clamp(20px, 4vw, 38px);
}

.igr-auth-page .modal-header,
.igr-auth-page .modal-body,
.igr-auth-page .card-header,
.igr-auth-page .card-body,
.igr-auth-page .card-footer {
    color: var(--igr-text) !important;
    background: transparent !important;
    border-color: var(--igr-border) !important;
}

.igr-auth-page h1,
.igr-auth-page h2,
.igr-auth-page h3,
.igr-auth-page h4,
.igr-auth-page h5,
.igr-auth-page h6,
.igr-auth-page b,
.igr-auth-page label,
.igr-auth-page legend { color: var(--igr-text) !important; }

.igr-auth-page p,
.igr-auth-page .form-text,
.igr-auth-page .text-body-secondary,
.igr-auth-page small { color: var(--igr-muted) !important; }

.igr-auth-page input::placeholder,
.igr-auth-page textarea::placeholder {
    color: #91a6b9 !important;
    opacity: 1 !important;
}

.igr-auth-page .form-control,
.igr-auth-page .form-select,
.igr-auth-page .input-group-text {
    color: var(--igr-text) !important;
    background: rgba(7, 11, 20, .76) !important;
    border-color: var(--igr-border) !important;
}

.igr-auth-page .input-group-text {
    min-width: 52px;
    justify-content: center;
    border-radius: 0 14px 14px 0 !important;
    cursor: pointer;
}

.igr-auth-page .input-group .form-control {
    border-radius: 14px 0 0 14px !important;
}

.igr-auth-page .form-check-input {
    min-height: auto;
    background-color: var(--igr-surface-strong) !important;
    border-color: var(--igr-border) !important;
}
.igr-auth-page .form-check-input:checked {
    background-color: var(--igr-accent) !important;
    border-color: var(--igr-accent) !important;
}

.igr-auth-page a { color: var(--igr-accent); }
.igr-auth-page a:hover { color: #7fcdf3; }
.igr-auth-page .btn-primary,
.igr-auth-page .btn-success {
    min-height: 50px;
    border-radius: 999px !important;
}

html[data-theme="light"] .igr-auth-page .form-control,
html[data-theme="light"] .igr-auth-page .form-select,
html[data-theme="light"] .igr-auth-page .input-group-text {
    color: #17344a !important;
    background: #f8fcff !important;
    border-color: rgba(8,127,186,.22) !important;
}
html[data-theme="light"] .igr-auth-page .form-check-input {
    background-color: #ffffff !important;
    border-color: #9ebdce !important;
}
html[data-theme="light"] .igr-auth-page .form-check-input:checked {
    background-color: var(--igr-accent) !important;
    border-color: var(--igr-accent) !important;
}
html[data-theme="light"] .igr-auth-page input::placeholder,
html[data-theme="light"] .igr-auth-page textarea::placeholder {
    color: #687d8e !important;
    opacity: 1 !important;
}

/* Forgot password */
.igr-forgot-page > .container,
.igr-forgot-page .card,
.igr-forgot-page .jumbotron,
.igr-forgot-page form {
    color: var(--igr-text) !important;
    background: var(--igr-surface) !important;
    border: 1px solid var(--igr-border) !important;
    border-radius: var(--igr-radius) !important;
    box-shadow: var(--igr-shadow);
}
.igr-forgot-page form {
    max-width: 620px;
    margin-inline: auto;
    padding: clamp(20px, 4vw, 36px);
}

/* UserSpice user settings */
.igr-settings-page {
    position: relative;
    z-index: 1;
    color: var(--igr-text);
}
.igr-settings-page main > h1 { margin-bottom: 22px; }
.igr-settings-page .bg-body-tertiary,
.igr-settings-page .alternate-background {
    color: var(--igr-text) !important;
    background: var(--igr-surface) !important;
    border-color: var(--igr-border) !important;
    border-radius: var(--igr-radius) !important;
    box-shadow: var(--igr-shadow);
}
.igr-settings-page label,
.igr-settings-page h1,
.igr-settings-page h2,
.igr-settings-page h3,
.igr-settings-page p { color: var(--igr-text) !important; }
.igr-settings-page .form-control,
.igr-settings-page .form-control-plaintext,
.igr-settings-page .input-group-text,
.igr-settings-page input[type="email"],
.igr-settings-page input[type="password"] {
    min-height: 50px;
    padding: 11px 15px !important;
    color: var(--igr-text) !important;
    background: rgba(7, 11, 20, .76) !important;
    border: 1px solid var(--igr-border) !important;
    border-radius: 14px !important;
}
.igr-settings-page .input-group .form-control {
    border-radius: 0 14px 14px 0 !important;
}
.igr-settings-page .input-group .btn,
.igr-settings-page .input-group .input-group-text {
    min-width: 48px;
    justify-content: center;
    border-radius: 14px 0 0 14px !important;
}
.igr-settings-page .input-group > :last-child {
    border-radius: 0 14px 14px 0 !important;
}
.igr-settings-page .img-thumbnail {
    padding: 5px;
    background: var(--igr-surface-strong) !important;
    border-color: var(--igr-border) !important;
    border-radius: 20px !important;
    box-shadow: var(--igr-shadow);
}
.igr-settings-page input::placeholder { color: #91a6b9 !important; opacity: 1 !important; }

html[data-theme="light"] .igr-settings-page .form-control,
html[data-theme="light"] .igr-settings-page .form-control-plaintext,
html[data-theme="light"] .igr-settings-page .input-group-text,
html[data-theme="light"] .igr-settings-page input[type="email"],
html[data-theme="light"] .igr-settings-page input[type="password"] {
    color: #17344a !important;
    background: #f8fcff !important;
    border-color: rgba(8,127,186,.22) !important;
}
html[data-theme="light"] .igr-settings-page input::placeholder {
    color: #687d8e !important;
}

@media (max-width: 575.98px) {
    .igr-auth-page { width: min(100% - 14px, 960px); padding-block: 16px !important; }
    .igr-register-page form { padding: 18px 14px; }
    .igr-login-page #loginModal .modal-dialog { margin: 7px; }
}

.igr-theme-toggle {
    position: fixed;
    top: 78px;
    right: 16px;
    z-index: 1040;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 8px 13px;
    color: var(--igr-text);
    font: inherit;
    font-size: .86rem;
    font-weight: 800;
    background: var(--igr-surface-strong);
    border: 1px solid rgba(43,179,243,.35);
    border-radius: 999px;
    box-shadow: 0 10px 28px rgba(0,0,0,.18);
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background-color .16s ease;
}

.igr-theme-toggle:hover {
    transform: translateY(-2px);
    border-color: var(--igr-accent);
}

.igr-theme-toggle span:first-child { color: var(--igr-accent); font-size: 1.08rem; }

@media (max-width: 767.98px) {
    .igr-shell, #page-wrapper > .container-md, #page-wrapper > .container-sm, body > .container, body > .container-sm { width: min(100% - 18px, 1180px); }
    .igr-hero { grid-template-columns: 1fr; padding: 24px; }
    .igr-hero img { max-height: 230px; }
    .igr-actions .btn, .row.g-2 .btn { min-height: 76px; }
    .radio-item > .d-flex,
    #podcast-container .podcast-item > .d-flex {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        gap: 5px !important;
    }
    .radio-item img { width: 52px !important; height: 52px !important; }
    .radio-item .btn-lg { padding: .55rem .65rem; }
    .igr-drag-handle, .igr-card-action { min-width: 38px; }
    .radio-item .text-name,
    #podcast-container .podcast-item .text-name,
    .igr-search-page #result .text-name {
        font-size: .9rem !important;
        line-height: 1.15;
    }
    .radio-item .text-genre,
    #podcast-container .podcast-item .text-genre,
    .igr-search-page #result .text-genre {
        font-size: .76rem !important;
        line-height: 1.15;
    }
    .igr-section-title { align-items: center; flex-direction: column; }
    .igr-page-head { align-items: flex-start; flex-direction: column; }
    .igr-form-panel, .igr-search-panel { padding: 18px 14px !important; }
    #podcast-container .podcast-item img { width: 50px !important; height: 50px !important; margin-right: 8px !important; }
    .igr-theme-toggle { top: 68px; right: 10px; min-width: 42px; justify-content: center; padding: 8px 10px; }
    .igr-theme-toggle span:last-child { display: none; }
}

@media (max-width: 379.98px) {
    .radio-item .text-name,
    #podcast-container .podcast-item .text-name,
    .igr-search-page #result .text-name { font-size: .84rem !important; }

    .radio-item .text-genre,
    #podcast-container .podcast-item .text-genre,
    .igr-search-page #result .text-genre { font-size: .7rem !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
