/* ============================================================
   RUP Radio Player – Hlavní styly
   ============================================================ */

.rup-radio-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

/* ====== HLAVNÍ KONTEJNER ====== */
.rup-radio-container {
    background: #0d3e18;
    border-radius: 12px;
    padding: 15px;
    margin: 0 auto;
    max-width: 700px;
    overflow: hidden;
    border: 1px solid #155e27;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.rup-radio-title {
    font-size: 40px;
    color: #dfb62d !important;
    font-weight: bold;
    margin: 10px 0;
    text-align: center;
    border: none;
    background: none;
    padding: 0;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(223, 182, 45, 0.2);
}

/* ====== LOGO ====== */
.rup-radio-logo {
    display: block;
    max-width: 120px;
    height: auto;
    margin: 0 auto 10px auto;
    border-radius: 50%;
    border: 3px solid #dfb62d;
    padding: 4px;
    background: #0d3e18;
    box-shadow: 0 0 30px rgba(223, 182, 45, 0.15);
}

/* ====== AUDIO PŘEHRÁVAČ ====== */
.rup-radio-audio {
    width: 100%;
    max-width: 400px;
    display: block;
    margin: 10px auto;
    border-radius: 30px;
    border: 2px solid #dfb62d;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    background: #155e27;
}

/* ====== INFO MARQUEE ====== */
.rup-radio-marquee {
    background: #0d3e18 !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    margin: 10px auto !important;
    border: 2px solid #dfb62d !important;
    max-width: 90% !important;
    text-align: center !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4) inset, 0 2px 8px rgba(223, 182, 45, 0.15) !important;
}

.rup-radio-marquee marquee {
    font-size: 15px !important;
    color: #dfb62d !important;
    font-weight: bold !important;
    display: block !important;
    width: 100% !important;
    white-space: nowrap !important;
    text-shadow: 0 0 10px rgba(223, 182, 45, 0.15) !important;
    letter-spacing: 0.3px !important;
}

/* ====== STAV STREAMSERVERU ====== */
.rup-radio-status-label {
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: #bbf7d0 !important;
    margin: 8px 0 5px 0;
    border: none;
    background: none;
    padding: 0;
}

.rup-radio-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
    border: none !important;
    background: none !important;
    padding: 0;
    height: auto;
    width: auto;
}

.rup-icon {
    display: block;
    width: 28px;
    height: 28px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

.rup-icon.active {
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(223, 182, 45, 0.8));
}

/* ====== IKONY - CESTY ====== */
.rup-icon-play {
    background-image: url(../images/play.png);
}
.rup-icon-pause {
    background-image: url(../images/pause.png);
}
.rup-icon-stop {
    background-image: url(../images/stop.png);
}
.rup-icon-play.active {
    background-image: url(../images/play_selected.png);
}
.rup-icon-pause.active {
    background-image: url(../images/pause_selected.png);
}
.rup-icon-stop.active {
    background-image: url(../images/stop_selected.png);
}

/* ====== VIZUALIZAČNÍ TLAČÍTKA ====== */
.rup-viz-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
    width: 100%;
}

.rup-viz-btn {
    padding: 10px 30px;
    font-size: 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    width: auto;
    min-width: 220px;
    transition: all 0.3s ease;
}

.rup-viz-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.rup-viz-btn-start {
    background: #dfb62d;
    color: #0d3e18;
    box-shadow: 0 2px 8px rgba(223, 182, 45, 0.3);
}

.rup-viz-btn-start:hover {
    background: #ecc84a;
    box-shadow: 0 4px 15px rgba(223, 182, 45, 0.5);
}

.rup-viz-btn-stop {
    background: #d32f2f;
    color: #fff;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
}

.rup-viz-btn-stop:hover {
    background: #e53935;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.5);
}

/* ====== MILKDROP KONTEJNER ====== */
#rup-milkdrop-container {
    display: none;
    width: 100%;
    height: 300px;
    background: #000;
    border-radius: 8px;
    margin: 10px 0;
    overflow: hidden;
    position: relative;
}

#rup-milkdrop-container #rup-milkdrop-canvas {
    width: 100%;
    height: 100%;
}

#rup-milkdrop-container:-webkit-full-screen,
#rup-milkdrop-container:fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

#rup-milkdrop-container:-webkit-full-screen #rup-milkdrop-canvas,
#rup-milkdrop-container:fullscreen #rup-milkdrop-canvas {
    width: 100vw !important;
    height: 100vh !important;
}

/* ====== WINAMP OVERLAY ====== */
#rup-song-overlay {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    text-align: center;
    pointer-events: none;
    z-index: 15;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    padding: 0 20px;
}

#rup-song-overlay .rup-song-title {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 4px;
    text-shadow: 0 0 30px rgba(0,0,0,0.9), 0 0 60px rgba(0,0,0,0.5);
}

#rup-song-overlay .rup-song-artist {
    color: #dfb62d;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 2px;
    text-shadow: 0 0 30px rgba(0,0,0,0.9), 0 0 60px rgba(0,0,0,0.5);
}

/* ====== SKRYTÍ KURZORU ====== */
.rup-cursor-hidden {
    cursor: none !important;
}

#rup-milkdrop-container.rup-cursor-hidden {
    cursor: none !important;
}

/* ====== AKTUÁLNÍ SKLADBA ====== */
#rup_current_song {
    font-size: 16px;
    color: #dfb62d !important;
    padding: 12px 15px;
    min-height: 60px;
    max-height: 80px;
    font-weight: bold;
    text-align: center;
    background: #0d3e18 !important;
    border-radius: 4px;
    margin: 5px 0;
    border: none !important;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    line-height: 1.4;
    text-shadow: 0 0 10px rgba(223, 182, 45, 0.1);
}

/* ====== ČASOMÍRA ====== */
.rup-time-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    padding: 8px 12px;
    background: #155e27;
    border-radius: 4px;
    border: 1px solid #dfb62d;
}

#rup_time {
    font-size: 14px;
    color: #dfb62d !important;
    white-space: nowrap;
    min-width: 80px;
    font-weight: bold;
    font-family: monospace;
}

#rup_time_graph_back {
    flex: 1;
    height: 12px;
    background-color: #0d3e18 !important;
    border-radius: 4px;
    overflow: hidden;
    cursor: default;
    pointer-events: none;
    border: 1px solid #155e27;
}

#rup_time_graph {
    width: 0%;
    height: 100%;
    background: #dfb62d !important;
    border-radius: 4px;
    transition: width 0.3s;
    box-shadow: 0 0 10px rgba(223, 182, 45, 0.3);
}

/* ====== PLAYLIST ====== */
#rup_playlist_frame {
    float: none;
    width: 100%;
    height: auto;
    margin: 10px 0 0 0;
    box-sizing: border-box;
    overflow: hidden;
}

.rup-playlist-header {
    font-size: 14px;
    font-weight: bold;
    color: #dfb62d !important;
    padding: 8px 0 5px 0;
    border-bottom: 2px solid #dfb62d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rup-playlist-header .rup-playlist-count {
    color: #bbf7d0;
    font-weight: normal;
    font-size: 13px;
}

.rup-playlist-header .rup-playlist-count span {
    color: #dfb62d;
    font-weight: bold;
}

.rup-playlist {
    height: 200px;
    overflow: auto;
    border: 1px solid #155e27;
    border-radius: 4px;
    margin-top: 5px;
    background: #0d3e18;
}

.rup-playlist table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: none !important;
}

.rup-playlist table td,
.rup-playlist table th {
    border: none !important;
    border-collapse: collapse !important;
}

.rup-playlist table td:last-child,
.rup-playlist table th:last-child {
    text-align: right !important;
    padding-right: 15px !important;
}

.rup-playlist table td:first-child,
.rup-playlist table th:first-child {
    text-align: left !important;
    padding-left: 10px !important;
}

.rup-playlist thead th {
    background: #155e27;
    color: #dfb62d !important;
    padding: 6px 10px;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 2px solid #dfb62d !important;
}

.rup-playlist thead th:last-child {
    text-align: right;
    width: 120px;
    white-space: nowrap;
}

.rup-playlist tbody tr:nth-child(even) td {
    background-color: #0d3e18;
    color: #ffffff;
}

.rup-playlist tbody tr:nth-child(odd) td {
    background-color: #155e27;
    color: #ffffff;
}

.rup-playlist tbody tr td.current_song,
.rup-playlist tbody tr td.current_song + td {
    background-color: #155e27 !important;
    color: #dfb62d !important;
    font-weight: bold;
}

.rup-playlist tbody tr td.current_song:first-child::before {
    content: "▶ ";
    color: #dfb62d !important;
}

.rup-playlist tbody tr td {
    padding: 4px 10px;
    border: none !important;
}

.rup-playlist tfoot td {
    font-size: 12px;
    color: #bbf7d0 !important;
    padding: 5px 10px;
    background: #155e27;
    border-top: 2px solid #dfb62d;
    text-align: center;
}

.rup-playlist tfoot td span {
    color: #dfb62d;
    font-weight: bold;
}

/* ====== PLAYLIST - PRÁZDNÝ STAV ====== */
.rup-playlist-empty {
    text-align: center;
    color: #bbf7d0 !important;
    padding: 30px 20px;
    font-style: italic;
}

/* ====== ADRESA STREAMU ====== */
.rup-stream-url {
    font-size: 12px;
    color: #bbf7d0 !important;
    margin-top: 15px;
    word-break: break-all;
    background: #155e27;
    padding: 8px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #dfb62d;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rup-stream-url:hover {
    background: #1a6a2e;
    border-color: #f0c840;
    box-shadow: 0 0 20px rgba(223, 182, 45, 0.2);
}

.rup-stream-url b {
    color: #dfb62d;
}

.rup-stream-url .rup-stream-hint {
    display: block;
    font-size: 10px;
    color: #888;
    margin-top: 4px;
}

/* ====== ODKAZY ====== */
.rup-footer-links {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #155e27;
    text-align: center;
}

.rup-footer-links a {
    color: #dfb62d !important;
    text-decoration: none;
    margin: 0 8px;
    font-size: 13px;
    transition: color 0.2s ease-in-out;
}

.rup-footer-links a:hover {
    color: #ffffff !important;
    text-shadow: 0 0 8px rgba(255,255,255,0.5);
}

/* ====== CHYBOVÉ STAVY ====== */
.rup-error-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    margin: 20px 0;
}

.rup-error-box a {
    color: #721c24;
    font-weight: 600;
}

.rup-error-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.rup-error-content {
    flex: 1;
}

.rup-error-message {
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

.rup-error-help {
    margin: 8px 0 4px 0;
}

.rup-error-help a {
    display: inline-block;
    padding: 6px 16px;
    background: #d32f2f;
    color: #fff !important;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.2s;
}

.rup-error-help a:hover {
    background: #b71c1c;
    text-decoration: none !important;
}

.rup-error-hint {
    margin: 4px 0 0 0;
    color: #888;
    font-size: 12px;
}

/* ====== NAČÍTÁNÍ ====== */
.rup-loading {
    text-align: center;
    padding: 40px 20px;
}

.rup-loading .spinner {
    float: none;
    margin: 0 auto 10px;
    display: inline-block;
}

/* ====== RESPONZIVITA ====== */
@media (max-width: 600px) {
    .rup-radio-container {
        padding: 10px;
        margin: 5px;
    }
    
    .rup-radio-audio {
        width: 100%;
    }
    
    .rup-playlist {
        height: 150px;
    }
    
    .rup-time-container {
        flex-wrap: wrap;
    }
    
    .rup-icon {
        width: 24px;
        height: 24px;
    }
    
    .rup-radio-marquee {
        max-width: 100% !important;
        padding: 6px 10px !important;
    }
    
    .rup-radio-marquee marquee {
        font-size: 13px !important;
    }
    
    #rup_current_song {
        font-size: 14px;
        padding: 10px 12px;
        min-height: 50px;
        max-height: 70px;
    }
    
    .rup-radio-title {
        font-size: 28px;
        letter-spacing: 1px;
    }
    
    .rup-radio-icons {
        gap: 8px;
    }
    
    .rup-playlist thead th {
        font-size: 12px;
        padding: 4px 8px;
        white-space: nowrap;
    }
    
    .rup-playlist thead th:last-child {
        width: 80px;
        font-size: 10px;
    }
    
    .rup-playlist tbody tr td {
        padding: 3px 8px;
        font-size: 12px;
    }
    
    .rup-playlist tfoot td {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .rup-viz-btn {
        padding: 8px 20px;
        font-size: 13px;
        min-width: 180px;
    }
    
    #rup-milkdrop-container {
        height: 200px;
    }
    
    #rup-song-overlay .rup-song-title {
        font-size: 20px;
    }
    
    #rup-song-overlay .rup-song-artist {
        font-size: 14px;
    }
    
    .rup-radio-logo {
        max-width: 80px;
    }
    
    .rup-playlist-header {
        font-size: 12px;
        flex-wrap: wrap;
        gap: 5px;
    }
}

/* ====== RESPONZIVITA - TABLET ====== */
@media (min-width: 601px) and (max-width: 1024px) {
    .rup-radio-container {
        padding: 12px;
    }
    
    #rup-milkdrop-container {
        height: 250px;
    }
}

/* ====== TISK ====== */
@media print {
    .rup-radio-container {
        background: #fff !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
    
    .rup-radio-title {
        color: #333 !important;
    }
    
    .rup-radio-audio {
        border-color: #ccc !important;
    }
    
    .rup-viz-wrapper,
    #rup-milkdrop-container {
        display: none !important;
    }
}

/* ====== ZPĚTNÁ KOMPATIBILITA ====== */
/* Staré ROD třídy - pro podporu starých šablon */
.rod-radio-container {
    /* Stejné jako .rup-radio-container */
    background: #0d3e18;
    border-radius: 12px;
    padding: 15px;
    margin: 0 auto;
    max-width: 700px;
    overflow: hidden;
    border: 1px solid #155e27;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.rod-radio-title {
    font-size: 40px;
    color: #dfb62d !important;
    font-weight: bold;
    margin: 10px 0;
    text-align: center;
    border: none;
    background: none;
    padding: 0;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(223, 182, 45, 0.2);
}

.rod-radio-marquee {
    background: #0d3e18 !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    margin: 10px auto !important;
    border: 2px solid #dfb62d !important;
    max-width: 90% !important;
    text-align: center !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4) inset, 0 2px 8px rgba(223, 182, 45, 0.15) !important;
}

.rod-radio-marquee marquee {
    font-size: 15px !important;
    color: #dfb62d !important;
    font-weight: bold !important;
    display: block !important;
    width: 100% !important;
    white-space: nowrap !important;
    text-shadow: 0 0 10px rgba(223, 182, 45, 0.15) !important;
    letter-spacing: 0.3px !important;
}

.rod-playlist {
    height: 200px;
    overflow: auto;
    border: 1px solid #155e27;
    border-radius: 4px;
    margin-top: 5px;
    background: #0d3e18;
}

.rod-playlist table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: none !important;
}

.rod-playlist table td,
.rod-playlist table th {
    border: none !important;
}

.rod-playlist table td:last-child,
.rod-playlist table th:last-child {
    text-align: right !important;
    padding-right: 15px !important;
}

.rod-playlist thead th {
    background: #155e27;
    color: #dfb62d !important;
    padding: 6px 10px;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 2px solid #dfb62d !important;
}

.rod-playlist tbody tr td.current_song,
.rod-playlist tbody tr td.current_song + td {
    background-color: #155e27 !important;
    color: #dfb62d !important;
    font-weight: bold;
}

.rod-playlist tbody tr td.current_song:first-child::before {
    content: "▶ ";
    color: #dfb62d !important;
}