/* Reset a základní styly */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0c0c0c, #1a1a2e);
    color: #fff;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    overflow: hidden; /* Zamezí scrollu */
}

/* Hlavní kontejner s obrázkem jako pozadí */
.main-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

/* Překryvné prvky pro meteorologická data */
.overlay-container {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
}

.weather-data {
    position: absolute;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #3498db;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(5px);
    min-width: 120px;
}

.weather-data i {
    font-size: 1.5rem;
    color: #3498db;
    margin-bottom: 8px;
    text-shadow: 0 2px rgba(52, 152, 219, 0.3);
}

.weather-data .value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2ecc71;
    letter-spacing: 1px;
}

.weather-data .sub-value {
    font-size: 1.1rem;
    color: #f1c40f;
    margin-top: 4px;
}

/* Umístění jednotlivých překryvných prvků */
.temperature-data {
    top: 20px;
    left: 20px;
}

.humidity-data {
    top: 20px;
    right: 20px;
}

.time-data {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.wind-speed-data {
    bottom: 80px;
    left: 20px;
}

.wind-direction-data {
    bottom: 80px;
    right: 20px;
}

.rain-data {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.wind-speed-data {
    bottom: 20px;
    left: 20px;
}

.wind-direction-data {
    bottom: 20px;
    right: 20px;
}

/* Kontejner pro canvasy větru */
.canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Canvas pro vizualizaci směru větru */
.wind-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
    pointer-events: none;
    max-width: 100%;
    max-height: 100%;
}

/* Oddělený canvas pro animované šipky větru */
#wind-arrows-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1; /* Nižší z-index než hlavní šipka */
    pointer-events: none;
}

/* Canvas pro hlavní šipku větru */
#wind-direction-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2; /* Vyšší z-index než animované šipky */
    pointer-events: none;
}

/* Stavový řádek dole */
.status-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(0, 0, 0.7);
    border-top: 1px solid #3498db;
    z-index: 3; /* Snížený z-index, aby nebyl nad větrnými daty */
    font-size: 0.9rem;
}

#connection-status {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    border: 2px solid;
}

.status-connected {
    background: #2ecc71;
    color: #fff;
    border-color: #27ae60;
}

.status-disconnected {
    background: #e74c3c;
    color: #fff;
    border-color: #c0392b;
}

/* Responzivní design */
@media (max-width: 768px) {
    .weather-data {
        min-width: 100px;
        padding: 10px;
    }
    
    .weather-data i {
        font-size: 1.2rem;
    }
    
    .weather-data .value {
        font-size: 1.4rem;
    }
    
    .weather-data .sub-value {
        font-size: 0.9rem;
    }
    
    .temperature-data {
        top: 10px;
        left: 10px;
    }
    
    .humidity-data {
        top: 10px;
        right: 10px;
    }
    
    .time-data {
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .rain-data {
        bottom: 70px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .wind-speed-data {
        bottom: 70px;
        left: 10px;
    }
    
    .wind-direction-data {
        bottom: 70px;
        right: 10px;
    }
    
    .status-bar {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .weather-data {
        min-width: 90px;
        padding: 8px;
    }
    
    .weather-data i {
        font-size: 1rem;
    }
    
    .weather-data .value {
        font-size: 1.2rem;
    }
    
    .weather-data .sub-value {
        font-size: 0.8rem;
    }
    
    .temperature-data, .humidity-data {
        top: 8px;
    }
    
    .time-data {
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .rain-data {
        bottom: 68px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .wind-speed-data, .wind-direction-data {
        bottom: 68px;
    }
}

/* Tmavý režim - zajištěno pomocí výchozího nastavení */
body.dark-mode {
    background: linear-gradient(135deg, #0a0a0a, #161624);
    color: #e0e0e0;
}

/* Animace pro načítání */
.loading {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Speciální efekty pro důležité hodnoty */
.warning {
    color: #f39c12 !important;
}

.danger {
    color: #e74c3c !important;
}

/* Zvýraznění nebezpečných podmínek */
.wind-danger {
    animation: warning-pulse 1s infinite;
}

@keyframes warning-pulse {
    0% { border-color: #3498db; }
    50% { border-color: #e74c3c; }
    100% { border-color: #3498db; }
}

/* Zvýraznění varovných podmínek */
.wind-warning {
    animation: caution-pulse 2s infinite;
}

@keyframes caution-pulse {
    0% { border-color: #3498db; }
    50% { border-color: #f39c12; }
    10% { border-color: #3498db; }
}