/* === Pegel-Dashboard Styles === */
/* Basierend auf dem kanal-baden.de Design */

/* Variablen & Setup */
:root {
    --bg-dark: #051220;
    --bg-light: #0d2942;
    --primary: #238ad2;
    --accent: #3da9f5;
    --glass-dark: rgba(10, 25, 41, 0.85);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.8);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-light) 100%);
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text-main);
    min-height: 100vh;
}

h1 {
    font-size: 42px;
    text-align: center;
    color: var(--text-main);
    margin: 30px 0 40px 0;
    text-shadow: 0 0 20px rgba(35, 138, 210, 0.8);
}

.loading {
    text-align: center;
    font-size: 20px;
    color: var(--text-muted);
    padding: 40px;
}

#data {
    margin: 0;
    padding: 0;
}

.stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 30px 0;
    padding: 0;
}

.station {
    background: var(--glass-dark);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.station:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(35, 138, 210, 0.3);
    border-color: var(--primary);
}

.station h2 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 24px;
}

.station-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.station-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pegel-nummer {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-family: 'Courier New', monospace;
    opacity: 0.8;
}

.coordinates {
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
    margin: 15px 0;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-row:last-of-type {
    border-bottom: none;
}

.label {
    color: var(--text-muted);
    font-size: 14px;
}

.value {
    color: var(--primary);
    font-weight: bold;
    font-size: 18px;
}

.relative-value {
    color: var(--accent);
}

.timestamp {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    font-style: italic;
    margin-top: 15px;
}

.chart-container {
    margin-top: 1.5rem;
    height: 200px;
    position: relative;
    padding: 10px 0;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.error {
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.5);
}

.error-message {
    color: #ff6b6b;
    text-align: center;
}

.update-info {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 30px;
    padding: 20px;
    background: var(--glass-dark);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 32px;
        margin: 20px 0 30px 0;
    }

    .stations-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .station {
        padding: 20px;
    }

    .station h2 {
        font-size: 20px;
    }
}