/* ==========================================================================
   Basis-Stile & Layout
   ========================================================================== */
:root {
    --primary-color: #0a1f44;
    --secondary-color: #0d3d7c;
    --text-color: #e0e0e0;
    --accent-color: #FFD700;
    --highlight-color: #28a745;
    --error-color: #dc3545;
    --background-dark: #222;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    color: var(--text-color);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    box-sizing: border-box;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(5px + env(safe-area-inset-top, 0px)) clamp(8px, 3vw, 16px) 5px;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
    font-size: clamp(16px, 4.6vw, 20px);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    cursor: default;
    min-width: 0;
    white-space: nowrap;
}

header h1 img {
    width: clamp(30px, 8.5vw, 34px);
    height: auto;
}

header .action-button {
    background: #2b3a55;
    color: var(--text-color);
    border: none;
    border-radius: 20px;
    padding: 6px clamp(9px, 2.7vw, 13px);
    font-size: clamp(13px, 3.8vw, 14px);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: background 0.3s, transform 0.2s;
}

header .action-button:hover {
    background: #3c5277;
    transform: translateY(-2px);
}

#settings-btn {
    padding: 8px 12px;
    font-size: 16px;
}

/* ==========================================================================
   Hauptinhalt & Radio-Card
   ========================================================================== */
#main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex: 1;
    width: 100%;
    padding: 80px 20px 30px;
    flex-grow: 1;
    box-sizing: border-box;
    position: relative;
}

#radio-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    margin-top: 20px;
    margin-bottom: 30px;
    min-height: 300px;
}

.radio-card {
    width: 95%;
    max-width: 450px;
    background: #1c273e;
    color: white;
    text-align: center;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s, background-image 0.5s;
    padding: 20px;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.radio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.radio-card h2 {
    font-size: 20px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    word-break: break-word;
}

/* ==========================================================================
   Radio-Card Elemente
   ========================================================================== */
.card-top-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    z-index: 5;
}

.edit-btn,
.play-pause-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s, transform 0.2s;
}

.edit-btn:hover,
.play-pause-btn:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.radio-nav-button {
    position: absolute;
    top: 35%;
    background: rgba(43, 58, 85, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
    z-index: 5;
}

.radio-nav-button:hover {
    background: rgba(60, 82, 119, 0.9);
    transform: scale(1.1);
}





.radio-nav-button.left {
position: absolute;
    top: 23%;
    left: 20px;



}







.radio-nav-button.right {
position: absolute;
    top: 23%;
    right: 20px;






}

.radio-card .user-info {
    position: relative;
    margin-bottom: 10px;
    top: auto;
    left: auto;
    transform: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

.user-nav-button {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.3s;
}

.user-nav-button:hover {
    color: var(--accent-color);
}

/* ==========================================================================
   Status- und Lautstärkeanzeige
   ========================================================================== */
.offline-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: var(--error-color);
    display: none;
    z-index: 10;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.offline-icon.show {
    display: flex;
}

.offline-icon span {
    margin-top: 10px;
    font-size: 18px;
    color: var(--error-color);
    font-weight: bold;
}

#volume-control-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
    width: 100%;
}

.volume-btn {
    background: #2b3a55;
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}

.volume-btn:hover {
    background: #3c5277;
    transform: scale(1.1);
}

.volume-indicator {
    width: 180px;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.volume-level {
    height: 100%;
    width: 50%;
    background: var(--highlight-color);
    transition: width 0.3s ease-in-out;
    border-radius: 6px;
}

.status-active,
.status-no-internet {
    font-size: 24px;
    display: none;
}

.status-active {
    color: var(--highlight-color);
    animation: speaker-animation 1s infinite;
}

.status-no-internet {
    color: var(--error-color);
}

@keyframes speaker-animation {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   Dropdown & Modals
   ========================================================================== */
#settings-dropdown {
    display: none;
    position: fixed;
    top: calc(48px + env(safe-area-inset-top, 0px));
    bottom: max(8px, env(safe-area-inset-bottom, 0px));
    right: 10px;
    background: var(--background-dark);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
    z-index: 1002;
    width: 250px;
    max-height: none;
    overflow-x: hidden;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

#settings-dropdown button {
    width: 100%;
    text-align: left;
    margin-bottom: 8px;
    font-size: 14px;
    padding: 12px;
    background: #444;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

#settings-dropdown button:last-child { margin-bottom: 0; }
#settings-dropdown button:hover { background: #555; }
#settings-dropdown button.language-btn.active {
    background-color: var(--highlight-color);
    color: white;
    font-weight: bold;
    border: 1px solid var(--accent-color);
}

#settings-dropdown .app-menu-button img {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    object-fit: cover;
    flex: 0 0 auto;
}

#settings-dropdown .app-menu-button span { flex: 1; }
#settings-dropdown .menu-end-icon { margin-left: auto; color: var(--highlight-color); }

.modal {
    display: none;
    position: fixed;
    z-index: 1003;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 20px;
    box-sizing: border-box;
}

.modal-show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--background-dark);
    margin: auto;
    padding: 20px;
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
    color: white;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-content h2,
.modal-content h3 {
    margin: 0;
    text-align: center;
    color: #fff;
}

.modal-content input,
.modal-content button {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    box-sizing: border-box;
}

.modal-content input {
    background: #333;
    color: white;
    border: 1px solid #555;
}

.modal-content button {
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-content button.save-user-btn,
.modal-content button.save-radio-btn,
.modal-content button.save-play-btn,
.modal-content #search-button-modal,
.modal-content #ip-locate-btn,
.modal-content #add-api-btn,
.modal-content .set-active-api-btn {
    background-color: var(--highlight-color);
    color: white;
}

.modal-content .close-modal-btn,
.modal-content #delete-radio-btn,
.modal-content .delete-api-btn {
    background-color: var(--error-color);
    color: white;
}

.modal-content hr {
    border: none;
    border-top: 1px solid #555;
}

#existing-users-list,
#api-list,
#search-results-modal {
    list-style-type: none;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#existing-users-list li,
#api-list li {
    background-color: #333;
    padding: 15px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.radio-item {
    background-color: #1c273e;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.radio-item .status-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.radio-item .status-dot.online { background-color: var(--highlight-color); }
.radio-item .status-dot.offline { background-color: var(--error-color); }
.radio-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}
.radio-item p { margin: 5px 0; color: #ccc; font-size: 0.9rem; }

#existing-users-list li span,
#api-list li span {
    font-size: 1.1rem;
    flex-grow: 1;
}

#existing-users-list li div,
#api-list li div {
    display: flex;
    gap: 10px;
}

#existing-users-list li div button,
#api-list li div button {
    width: auto;
    padding: 10px 15px;
    font-size: 14px;
    border-radius: 20px;
}

.api-list-item.active { border: 2px solid var(--highlight-color); }
.api-list-item .api-url { word-break: break-all; }
.api-list-item .status-icon { font-size: 1.2rem; }
.api-list-item .status-icon.active { color: var(--highlight-color); }
.api-list-item .status-icon.inactive { color: var(--error-color); }

.hidden { display: none !important; }

#install-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    width: 100%;
}

#install-app-btn {
    background-color: #17a2b8;
    color: white;
    border-radius: 15px;
    padding: 15px 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
    max-width: 350px;
}

#install-app-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.install-logo { width: 50px; height: 50px; border-radius: 10px; }
.install-text h3 { margin: 0; font-size: 1.2rem; font-weight: bold; }
.install-text p { margin: 0; font-size: 0.9rem; color: #c0eaff; }

.radio-card-preview {
    height: 150px;
    width: 100%;
    border-radius: 10px;
    background: #1c273e; 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.5s;
    border: 1px solid #444;
    position: relative;
    overflow: hidden;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.gallery-item {
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 10px;
    transition: transform 0.2s, border-color 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    position: relative;
    width: 120px;
    height: 80px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #333;
}

.gallery-item.selected {
    border-color: var(--highlight-color);
    transform: scale(1.05);
}

.gallery-item.selected::after {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: 5px;
    right: 5px;
    color: var(--highlight-color);
    font-size: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    padding: 2px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item p {
    margin: 0;
    padding: 5px;
    text-align: center;
    font-size: 12px;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    position: absolute;
    bottom: 0;
    width: 100%;
}

footer {
    width: 100%;
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: #bbb;
    background: rgba(0, 0, 0, 0.5);
    margin-top: auto;
}

footer a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover { color: var(--highlight-color); }

/* ==========================================================================
   Herz-Animation für Spenden (angepasste Positionierung)
   ========================================================================== */
.donate-heart {
    font-size: 28px;
    color: var(--error-color);
    cursor: pointer;
    z-index: 1000;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
    animation: heart-float 4s ease-in-out infinite,
               pulse 1.5s infinite;
    transition: transform 0.2s ease-in-out;
}

.donate-heart:hover {
    transform: scale(1.1);
    animation-play-state: paused;
}

@keyframes heart-float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   Anpassungen für Tablets und PCs (Breite Bildschirme)
   ========================================================================== */
@media screen and (min-width: 769px) {
    #main-content { justify-content: center; padding: 30px; }
    #radio-container { margin-top: 0; margin-bottom: 0; }
    .radio-card { width: 80%; max-width: 800px; padding: 35px; }
    .radio-card h2 { font-size: 30px; }
    .radio-card .user-info { font-size: 28px; padding: 15px 30px; }
    .radio-card .user-nav-button { font-size: 28px; }
    #radio-count { font-size: 24px; }
    .card-top-controls { top: 30px; right: 40px; }
    .edit-btn, .play-pause-btn { font-size: 36px; }
    .radio-nav-button { width: 100px; height: 100px; font-size: 50px; top: 50%; transform: translateY(-50%); }
    .radio-nav-button.left { left: -150px; }
    .radio-nav-button.right { right: -150px; }
    #volume-control-container { gap: 40px; margin-top: 50px; }
    .volume-btn { width: 70px; height: 70px; font-size: 32px; }
    .volume-indicator { width: 350px; height: 20px; }
}

/* ==========================================================================
   Verbesserung: Text-Wrapper für begrenzte Textlänge
   ========================================================================== */
.radio-card h2 {
    max-width: 90%;
    white-space: wrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media screen and (max-width: 420px) {
    header { gap: 6px; }
    header h1 { gap: 6px; }
    header > div { gap: 6px !important; flex: 0 0 auto; }
    header .action-button { border-radius: 16px; }
}

@media screen and (max-width: 340px) {
    #search-btn span { display: none; }
    #search-btn { padding-inline: 11px; }
}

/* ==========================================================================
   Herz & Uhrzeit Container
   ========================================================================== */
#top-info-container {
    position: absolute;
    top: calc(58px + env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 20px;
    width: max-content;
}

#datetime-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(3px);
    border-radius: 10px;
    padding: 5px 15px;
    color: #f0f0f0;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#time-display {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 1.5px;
}

#date-display {
    font-size: 11px;
    font-weight: 300;
    opacity: 0.9;
}

/* ==========================================================================
   Radio Logo Stile
   ========================================================================== */
#radio-favicon {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    background-color: rgba(0,0,0,0.2);
    margin-bottom: 15px;
}

#radio-title {
    margin: 0;
}

.radio-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.radio-item-header h3 {
    margin: 0;
}

/* APK 0003: kompakte, bildschirmfeste Titelleiste */
:root { --header-height: 48px; }
*, *::before, *::after { box-sizing: border-box; }
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    min-height: var(--header-height);
    padding: max(4px, env(safe-area-inset-top, 0px)) clamp(6px, 2vw, 12px) 4px;
    gap: 6px;
    overflow: hidden;
}
.android-app header {
    height: var(--header-height);
    padding-top: 4px;
}
header h1 {
    flex: 1 1 auto;
    min-width: 0;
    gap: clamp(4px, 1.5vw, 8px);
    font-size: clamp(15px, 4.4vw, 20px);
    overflow: hidden;
}
header h1 img {
    flex: 0 0 auto;
    width: clamp(28px, 8vw, 34px);
    height: clamp(28px, 8vw, 34px);
    object-fit: contain;
}
header > div { flex: 0 0 auto; min-width: 0; }
header .action-button {
    min-height: 36px;
    padding: 5px clamp(8px, 2.4vw, 12px);
    gap: 6px;
}
#settings-btn { width: 38px; padding: 6px; justify-content: center; }

#main-content {
    padding-top: calc(var(--header-height) + 68px);
    padding-left: clamp(8px, 3vw, 20px);
    padding-right: clamp(8px, 3vw, 20px);
}
#top-info-container {
    top: calc(var(--header-height) + 8px + env(safe-area-inset-top, 0px));
    max-width: calc(100vw - 16px);
}
.android-app #top-info-container { top: calc(var(--header-height) + 8px); }

#settings-dropdown {
    top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
    right: max(6px, env(safe-area-inset-right, 0px));
    left: auto;
    width: min(270px, calc(100vw - 12px));
    max-width: calc(100vw - 12px);
    overflow-x: hidden;
    overscroll-behavior-x: none;
    touch-action: pan-y;
}
.android-app #settings-dropdown {
    top: var(--header-height);
    right: 6px;
    bottom: 8px;
}
#settings-dropdown button {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

@media screen and (max-width: 370px) {
    header h1 { font-size: 15px; }
    header h1 img { width: 28px; height: 28px; }
    header .action-button { padding-inline: 8px; }
}

/* 0002: Senderwechsel und Senderlogo in einer gemeinsamen Reihe */
.station-logo-row {
    width: min(100%, 330px);
    display: grid;
    grid-template-columns: 58px minmax(70px, 1fr) 58px;
    align-items: center;
    justify-items: center;
    gap: clamp(12px, 5vw, 28px);
    margin: 2px auto 8px;
}
.station-logo-row .radio-nav-button,
.station-logo-row .radio-nav-button.left,
.station-logo-row .radio-nav-button.right {
    position: static;
    inset: auto;
    transform: none;
    width: 56px;
    height: 56px;
    font-size: 24px;
    margin: 0;
}
.station-logo-row #radio-favicon {
    width: 66px;
    height: 66px;
    margin: 0;
}

@media screen and (max-width: 370px) {
    .station-logo-row {
        grid-template-columns: 50px minmax(60px, 1fr) 50px;
        gap: 10px;
    }
    .station-logo-row .radio-nav-button,
    .station-logo-row .radio-nav-button.left,
    .station-logo-row .radio-nav-button.right {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    .station-logo-row #radio-favicon { width: 60px; height: 60px; }
}

.search-message {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(43, 58, 85, .88);
    color: #f4f7fb;
    line-height: 1.4;
}
.search-message.warning { border: 1px solid rgba(255, 215, 0, .45); }
.search-result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.search-result-actions button { width: 100%; }
.confirm-save-radio-btn:disabled { opacity: .42; cursor: not-allowed; }
.station-action-status { min-height: 1.4em; color: #8ee6a3; font-size: .88rem; }

#app-notice {
    position: fixed;
    left: 50%;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    transform: translate(-50%, 30px);
    z-index: 3000;
    width: min(440px, calc(100vw - 24px));
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border: 1px solid rgba(255, 215, 0, .4);
    border-radius: 14px;
    background: rgba(10, 31, 68, .97);
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}
#app-notice.show { opacity: 1; transform: translate(-50%, 0); }

/* 20260825: kompakter Player mit integrierter Uhr */
#main-content { padding-top: calc(var(--header-height) + env(safe-area-inset-top, 0px) + 10px); }
.android-app #main-content { padding-top: calc(var(--header-height) + 10px); }
#radio-container { margin-top: 0; margin-bottom: 18px; min-height: 0; }
.radio-card {
    padding: 42px 16px 14px;
    min-height: 0;
    cursor: default;
}
#datetime-container {
    position: absolute;
    top: 9px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: calc(100% - 112px);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 8px;
    white-space: nowrap;
}
#time-display { font-size: clamp(11px, 3vw, 13px); letter-spacing: .3px; font-weight: 700; }
#date-display { font-size: clamp(10px, 2.7vw, 12px); }
.datetime-separator { opacity: .6; font-size: 10px; }
.radio-card .edit-btn,
.radio-card .play-pause-btn {
    position: absolute;
    top: 8px;
    width: 36px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 7;
    border-radius: 10px;
    background: rgba(43, 58, 85, .86);
    font-size: 18px;
}
.radio-card .edit-btn { left: 10px; }
.radio-card .play-pause-btn { right: 10px; }
.radio-card .user-info { margin: 0 0 8px; padding: 6px 12px; }
#radio-favicon { width: 52px; height: 52px; margin-bottom: 8px; border-radius: 15px; }
.radio-card h2 { margin: 0; font-size: clamp(18px, 5vw, 22px); }
#volume-control-container { margin-top: 12px; gap: 10px; }
.volume-btn { width: 40px; height: 40px; font-size: 18px; }
.volume-indicator { width: min(180px, 52vw); height: 10px; }
#status-indicator { min-height: 26px; margin-top: 6px; }

.broken-station-dialog { max-width: 390px; text-align: center; }
.broken-radio-icon { font-size: 42px; color: #ffcc4d; margin-bottom: 5px; }
.broken-station-dialog h2 { margin-bottom: 8px; }
#broken-station-message { font-weight: 800; color: #fff; overflow-wrap: anywhere; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.dialog-actions button { min-height: 48px; border-radius: 12px; border: 0; color: #fff; font-weight: 800; font-size: 16px; }
.danger-button { background: #b4232d; }

@media (hover: none) {
    .radio-card:hover { transform: none; box-shadow: 0 8px 25px rgba(0, 0, 0, .4); }
}

@media screen and (max-width: 370px) {
    #datetime-container { max-width: calc(100% - 100px); gap: 3px; padding-inline: 4px; }
    #date-display { font-size: 9px; }
    #time-display { font-size: 10px; }
    .radio-card { padding-left: 10px; padding-right: 10px; }
}

.radio-item-logo {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
}
.form-field { display: grid; gap: 7px; margin: 14px 0; text-align: left; }
.form-field label { font-weight: 700; color: var(--highlight-color); }
.form-field input { width: 100%; }
.field-help { margin: -4px 0 14px; font-size: .86rem; opacity: .82; text-align: left; }

/* Konto und Sendersicherung: klar getrennte, gut tippbare Schaltflächen. */
#account-modal #account-start > button,
#account-modal #account-fields > button,
#account-modal #account-active > button,
#account-modal .account-panel > .close-modal-btn {
    min-height: 48px;
    border-radius: 10px;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* display:block wird in account.js zur Umschaltung gesetzt; deshalb
   Abstände direkt an den Buttons statt gap am Container verwenden. */
#account-modal #account-start > button + button,
#account-modal #account-fields > button + button,
#account-modal #account-active > button + button {
    margin-top: 12px;
}

#account-modal #account-fields > label {
    display: block;
    margin-bottom: 12px;
}
#account-modal #account-fields > label input {
    display: block;
    margin-top: 7px;
}
#account-modal .account-panel > .close-modal-btn {
    margin-top: 5px;
}

/* Serversicherungs-Information: schmalen Smartphone-Bildschirmen angepasst. */
#account-modal .account-server-info { white-space: pre-line; overflow-wrap: anywhere;
  font-size: .88rem; line-height: 1.6; padding: 12px; border-radius: 12px;
  background: rgba(255,255,255,.09); color: #f2f2f2; margin: 14px 0 18px; }

/* Konto-/Gast-Trennung, ohne die vorhandene Button-Gestaltung zu ueberschreiben */
.account-scope-hint{font-size:.88rem;line-height:1.5;color:#d6e4f5;background:rgba(255,255,255,.07);border-radius:10px;padding:11px 13px;margin:10px 0 14px;}
#account-take-guest{margin-top:12px;}
