.selector-container {
    background: transparent;   
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);         
    padding: 20px;
    border-radius: 8px;
    /*margin-bottom: 30px;*/
    max-width: 600px;    
    margin: 5px auto;
    font-family: Arial, sans-serif;
}

.selector-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.selector-row:last-child {
    margin-bottom: 0;
}

.selector-row label {
    font-weight: bold;
    color:  #f39c12;
    min-width: 80px;
}

select, button {
    padding: 10px 15px;
    font-size: 16px;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    margin: 0 5px;
    min-width: 200px;
}

button {
    background: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    min-width: auto;
    padding: 10px 20px;
}

button:hover {
    background: #2980b9;
}

button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.loading {
    color: #e67e22;
    font-style: italic;
}

.error {
    background: #e74c3c;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    text-align: center;
    font-family: Arial, sans-serif;
}

.summary {
    background: #2ecc71;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    font-family: Arial, sans-serif;
}

.file-info {
    background: #3498db;
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    text-align: center;
    font-weight: bold;
    font-family: Arial, sans-serif;
}

.stats-summary {
    background: #222;
    color: #00ff00;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    font-size: 16px; 
}

.tr4w-table {
    background: transparent;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    padding: 20px;
    border-radius: 8px;           
    /*margin: 30px auto;
    max-width: 760px; */
    max-width: 950px;    
    margin: 5px auto;
}

.tr4w-table h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    font-family: Arial, sans-serif;
}

.band-mode-matrix {            
    color: #00ff00;
    padding: 5px;  
    border-radius: 5px;           
    font-size: 16px; 
    line-height: 1.2;
}


/* KONTEJNER PRO ROZDĚLENOU TABULKU */
.split-table-container {
    display: flex;
    width: 100%;
    max-width: 760px;
}

/* FIXNÍ TABULKA - PRVNÍ SLOUPEC */
.fixed-table {
    flex-shrink: 0;
    width: 120px;
    background: transparent;
}

.fixed-table table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.fixed-table th,
.fixed-table td {
    padding: 8px 15px;
    border: none;
    background: transparent;
    text-align: left;
    height: 33px;
    line-height: 1.2;
    vertical-align: middle;
    box-sizing: border-box;
}

.fixed-table th {
    color: #e67e22;
    font-weight: bold;
    white-space: nowrap;
    font-size: 16px;
}

.fixed-table .band-label {
    color: #ffff00;
    font-weight: bold;
    white-space: nowrap;
}

.fixed-table .total-row td {
    color: #40e0d0;
    font-weight: bold;
}

/* ROLOVACÍ TABULKA - ZBYTEK OBSAHU */
.scrollable-table {
    flex: 1;
    overflow-x: auto;
    background: transparent;
    min-width: 0; /* OPRAVA: umožní této položce zmenšit se pod šířku obsahu */
}

.scrollable-table table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    /* OPRAVA: min-width: 400px odstraněno — na šířkách 768–980px (tablet)
       to bylo víc, než kolik prostoru reálně zbývá po odečtení postranního
       menu (200px) a paddingu (40px). Tabulka se teď smí zmenšit; pokud by
       i tak nestačilo místo, odroluje se sama vodorovně (overflow-x: auto výše). */
}

.scrollable-table th,
.scrollable-table td {
    padding: 8px 12px;
    text-align: center !important;
    border: none;
    background: transparent;
    height: 33px;
    line-height: 1.2;
    vertical-align: middle;
    box-sizing: border-box;
}

.scrollable-table th {
    color: #e67e22;
    font-weight: bold;
    white-space: nowrap;
    font-size: 16px;
}

.scrollable-table td {
    color: #fff;
}

.scrollable-table .total-row td {
    color: #40e0d0;
    font-weight: bold;
}

.scrollable-table .total-col {
    color: #27ae60;
    font-weight: bold;
}

/* PŮVODNÍ MATRIX TABLE - FALLBACK PRO KOMPATIBILITU */
.matrix-table {
    width: 100%;
    border-collapse: collapse;           
    max-width: 600px;
}

.matrix-table th {
    color: #e67e22;
    padding: 8px 12px;
    text-align: center;
    border: none;
    font-weight: bold;
    white-space: nowrap;
    background: transparent;
}

.matrix-table td {            
    color: #fff;
    padding: 6px 12px;
    text-align: center;
    border: none;
    background: transparent;           
}

.matrix-table .band-label {
    color: #ffff00;
    font-weight: bold;
    text-align: left;
    padding-left: 15px;
    white-space: nowrap;
}

.matrix-table .total-row {
    color: #40e0d0;
    font-weight: bold;
}

.matrix-table .total-col {
    color: #27ae60;
    font-weight: bold;
}

.qso-count {
    color: #00ffff;
}

.zero-count {
    color: #666;
}

.no-data {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 40px;
    font-family: Arial, sans-serif;
}

.instructions {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-family: Arial, sans-serif;
}

.instructions h4 {
    margin-top: 0;
    color: #856404;
}

.instructions code {
    background: #f8f9fa;
    padding: 2px 4px;
    border-radius: 3px;
    color: #2c3e50;
}

/* MAPA A FILTRY */

#map {
    width: 100%;
    max-width: 800px;
    height: 500px;    
    margin: 10px auto; 
    border: 3px solid#40e0d0;
    border-radius: 10px;
}

/* Pro mobilní zařízení */
@media (max-width: 768px) {
    #map {
        height: 200px; 
        min-height: 100px;
    }
}

.map-container {
    background: transparent;
    max-width: 950px;
    padding: 5px 20px;
    border-radius: 8px;
    margin: 5px auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    position: relative;
}



.band-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.band-filter-btn {
    padding: 8px 16px;
    border: 2px solid #3498db;
    background: #2c3e50;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.band-filter-btn.active {
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

.band-filter-btn:hover {
    opacity: 0.8;
}

/* Barvy tlačítek podle pásem */
.band-filter-btn[data-band="160M"] { background: #8B0000; border-color: #8B0000; }
.band-filter-btn[data-band="80M"] { background: #FF4500; border-color: #FF4500; }
.band-filter-btn[data-band="60M"] { background: #FF6347; border-color: #FF6347; }
.band-filter-btn[data-band="40M"] { background: #FFA500; border-color: #FFA500; }
.band-filter-btn[data-band="30M"] { background: #FFD700; border-color: #FFD700; color: #000; }
.band-filter-btn[data-band="20M"] { background: #00FF00; border-color: #00FF00; color: #000; }
.band-filter-btn[data-band="17M"] { background: #00CED1; border-color: #00CED1; color: #000; }
.band-filter-btn[data-band="15M"] { background: #1E90FF; border-color: #1E90FF; }
.band-filter-btn[data-band="12M"] { background: #4169E1; border-color: #4169E1; }
.band-filter-btn[data-band="10M"] { background: #8A2BE2; border-color: #8A2BE2; }
/* VKV pásma (DIGI/EDI) */
.band-filter-btn[data-band="6M"] { background: #FF00FF; border-color: #FF00FF; }
.band-filter-btn[data-band="4M"] { background: #DA70D6; border-color: #DA70D6; color: #000; }
.band-filter-btn[data-band="2M"] { background: #FF1493; border-color: #FF1493; }
.band-filter-btn[data-band="70CM"] { background: #FF69B4; border-color: #FF69B4; color: #000; }
.band-filter-btn[data-band="23CM"] { background: #DDA0DD; border-color: #DDA0DD; color: #000; }
.band-filter-btn[data-band="13CM"] { background: #BA55D3; border-color: #BA55D3; }
.band-filter-btn[data-band="ALL"] { background: #40e0d0; border-color: #2980b9; color: #8B0000; }

.map-stats {
    text-align: center;
    color: #2ecc71;
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0;
}

/* QSO TABULKA */
.qso-table-container {
    background: transparent;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    padding: 20px;
    border-radius: 8px;
    max-width: 950px;    
    margin: 5px auto;
    /*margin: 5px 0;*/
}

.qso-table-container h3 {
    color: #27ae60;
    text-align: center;
    margin-bottom: 20px;
}

.qso-table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
}

.qso-table thead {
    background: #34495e;
}

.qso-table th {
    padding: 12px 8px;
    text-align: center;
    border-bottom: 2px solid #2ecc71;
    color: #e67e22;
    font-weight: bold;
    white-space: nowrap;
}

.qso-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #34495e;
}

.qso-table tbody tr:hover {
    background: rgba(52, 152, 219, 0.1);
}

.qso-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.1);
}

.qso-table tbody tr:nth-child(even):hover {
    background: rgba(52, 152, 219, 0.15);
}

.qso-call {
    color: #3498db;
    font-weight: bold;
}

.qso-date {
    color: #95a5a6;
    font-size: 14px;
}

.qso-band {
    color: #f39c12;
    font-weight: bold;
}

.qso-mode {
    color: #9b59b6;
}

.qso-rst {
    color: #1abc9c;
    text-align: center;
}

.qso-cqz {
    color: #e74c3c;
    text-align: center;
    font-weight: bold;
}

.no-qso-message {
    text-align: center;
    color: #95a5a6;
    padding: 40px;
    font-style: italic;
}

/* DXCC Summary */
.dxcc-summary {
    max-width: 950px;    
    margin: 5px auto;
    /*margin-top: 15px;*/
    background: transparent;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    text-align: center;    
    border-radius: 8px;
    padding: 15px;
}

.dxcc-summary details {
    cursor: pointer;
    color: #3498db;
    cursor: pointer; 
}

.dxcc-summary summary {
    font-size: 16px;
    font-weight: bold;
    color: #2ecc71;
    padding: 10px;
    background: transparent;
    border-radius: 5px;
    user-select: none;
    cursor: pointer;
}

.dxcc-summary summary:hover {
    background: #575858;
}

.dxcc-list {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    cursor: default;
}


.dxcc-item {
    background: #2c3e50;
    padding: 8px 12px;
    border-radius: 4px;
    border-left: 4px solid #3498db;
    font-size: 14px;
    color:  #40e0d0;
    cursor: pointer;
}

a.dxcc-item,
a.dxcc-item:visited,
a.dxcc-item:hover,
a.dxcc-item:active {
    color: #40e0d0 !important;       
    text-decoration: none !important;
}

.dxcc-item-count {
    float: right;
    color: #95a5a6;
    font-weight: bold;
}


/* Informační panel animace - základní styl */
#animationInfo {
    text-align: center;
    margin-top: 10px;
    color: #2ecc71;
    font-weight: bold;
    display: none;
    padding: 10px;
    background: rgba(44, 62, 80, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Mobilní zobrazení */
@media (max-width: 768px) {
    #animationInfo {
        font-size: 15px;
        padding: 8px 5px;
        margin-top: 8px;
    }
    
    #currentQsoTime {
        display: block;
        margin-top: 5px;
        line-height: 1.6;
    }
    
    #currentQsoTime span {
        display: inline-block;
        margin: 0 3px;
        font-size: 18px;
    }
}

/* Extra malé mobily 
@media (max-width: 400px) {
    #animationInfo {
        font-size: 10px;
        padding: 6px 3px;
    }
    
    #currentQsoTime span {
        font-size: 9px;
        margin: 0 2px;
    }
}*/

/* Mobilní zobrazení tlačítek - vždy 3 řádky */
@media screen and (max-width: 768px) {
    .map-container > div > div {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        align-items: stretch !important;
    }
    
    /* Wrapper pro první řádek - Gray Line a Bands */
    .mobile-row-1 {
        display: flex !important;
        gap: 10px !important;
        width: 100% !important;
    }
    
    .mobile-row-1 > button,
    .mobile-row-1 > select {
        flex: 1 !important;
        width: 50% !important;
    }
    
    /* Wrapper pro druhý řádek - Animace a Pauza */
    .mobile-row-2 {
        display: flex !important;
        gap: 10px !important;
        width: 100% !important;
    }
    
    .mobile-row-2 > button {
        flex: 1 !important;
        width: 50% !important;
    }
    
    /* Wrapper pro třetí řádek - Vpřed/Vzad */
    .mobile-row-3 {
        display: flex !important;
        gap: 10px !important;
        width: 100% !important;
    }
    
    .mobile-row-3 > button {
        flex: 1 !important;
        width: 50% !important;
    }
}