
        /* Zmienne CSS dla kolorów */
        :root {
            --bg-primary: #f5f5f5;
            --bg-card: white;
            --text-primary: #333;
            --text-secondary: #666;
            --border-color: #ddd;
            --shadow-color: rgba(0,0,0,0.1);
            --chart-grid: #ddd;
        }

        /* Ciemny motyw */
        [data-theme="dark"] {
            --bg-primary: #1a1a1a;
            --bg-card: #2d2d2d;
            --text-primary: #ffffff;
            --text-secondary: #b3b3b3;
            --border-color: #404040;
            --shadow-color: rgba(0,0,0,0.3);
            --chart-grid: #404040;
        }

        body {
            font-family: Arial, sans-serif;
            margin: 20px;
            background-color: var(--bg-primary);
            color: var(--text-primary);
            transition: background-color 0.3s ease;
        }

        .dashboard {
            max-width: 1200px;
            margin: 0 auto;
        }

        .card {
            background: var(--bg-card);
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 4px var(--shadow-color);
            border: 1px solid var(--border-color);
        }

        .grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 20px;
        }

        .metric {
            text-align: center;
            position: relative;
        }

        .metric-value {
            font-size: 24px;
            font-weight: bold;
            color: #2196F3;
            margin-bottom: 5px;
        }

        .metric-percentage {
            font-size: 20px;
            color: #4CAF50;
            margin-top: 5px;
        }

        .metric-label {
            color: var(--text-secondary);
            margin-top: 5px;
        }

        .battery-indicator {
            width: 100px;
            height: 20px;
            background-color: #eee;
            border-radius: 10px;
            margin: 10px auto;
            overflow: hidden;
        }

        .battery-level {
            height: 100%;
            background-color: #4CAF50;
            transition: width 0.5s ease-in-out;
        }

        /* Nowy kod dla ikony wykresu i tooltipa */
        .chart-icon-container {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 1000;
            cursor: pointer;
        }

        .chart-icon {
            background: var(--bg-card);
            color: var(--text-primary);
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 10px var(--shadow-color);
            border: 1px solid var(--border-color);
            transition: all 0.3s ease;
        }

        .chart-icon:hover {
            transform: scale(1.1);
            box-shadow: 0 4px 15px var(--shadow-color);
        }

        .chart-tooltip {
            position: fixed;
            bottom: 80px;
            right: 20px;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 15px;
            box-shadow: 0 2px 10px var(--shadow-color);
            min-width: 250px;
            max-width: 300px;
            z-index: 999;
            visibility: hidden;
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.3s ease;
        }

        .chart-tooltip.active {
            visibility: visible;
            opacity: 1;
            transform: translateY(0);
        }

        .chart-tooltip-header {
            font-weight: bold;
            margin-bottom: 10px;
            padding-bottom: 5px;
            border-bottom: 1px solid var(--border-color);
            color: var(--text-primary);
        }

        .chart-tooltip-content {
            color: var(--text-secondary);
            font-size: 0.9em;
            line-height: 1.4;
        }

        /* Pozostałe style */
        .chart-container {
            position: relative;
            height: 400px;
        }

        .header {
            text-align: center;
            margin-bottom: 30px;
        }

        .refresh-btn {
            background: #2196F3;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 4px;
            cursor: pointer;
        }

        .refresh-btn:hover {
            background: #1976D2;
        }

        .debug-info {
        font-family: monospace;
        margin-top: 20px;
        padding: 10px;
        background: var(--bg-primary);
        color: var(--text-primary);
        border: 1px solid var(--border-color);
        border-radius: 4px;
        font-size: 0.9em;
        line-height: 1.5;
        }

        .controls {
            margin: 20px 0;
            text-align: center;
        }

        .time-range {
            margin: 0 10px;
            padding: 8px;
            border-radius: 4px;
            border: 1px solid #ddd;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin: 20px 0;
        }

        .stat-card {
            background: var(--bg-card);
            padding: 15px;
            border-radius: 8px;
            box-shadow: 0 2px 4px var(--shadow-color);
            border: 1px solid var(--border-color);
        }

        .stat-title {
            font-size: 0.9em;
            color: var(--text-secondary);
            margin-bottom: 5px;
        }

        .stat-value {
            font-size: 1.2em;
            font-weight: bold;
        }

        .trend-up { color: #F44336 !important; }
        .trend-down { color: #4CAF50 !important; }
        .status-good { color: #4CAF50 !important; }
        .status-warning { color: #FFC107 !important; }
        .status-critical { color: #F44336 !important; }
        .trend-neutral { color: #2196F3 !important; }

        .footer {
            background: var(--bg-card);
            padding: 20px;
            margin-top: 40px;
            border-radius: 8px;
            box-shadow: 0 2px 4px var(--shadow-color);
        }

        .footer-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
        }

        .footer-section {
            padding: 10px;
        }

        .footer-section h3 {
            color: #2196F3;
            margin-bottom: 15px;
            font-size: 1.1em;
        }

        .tech-stack {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .tech-item {
            background: var(--bg-primary);
            color: var(--text-primary);
            padding: 8px 12px;
            border-radius: 15px;
            font-size: 0.9em;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .tech-percentage {
            background: #2196F3;
            color: white;
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 0.8em;
        }

        .version-info {
            font-size: 0.9em;
            color: #666;
            margin-top: 10px;
        }

        .footer-divider {
            height: 1px;
            background: var(--border-color);
            margin: 15px 0;
        }

        .header-controls {
            display: flex;
            gap: 10px;
            justify-content: center;
            margin-top: 15px;
        }

        .theme-toggle {
            background: transparent;
            border: 2px solid var(--border-color);
            color: var(--text-primary);
            padding: 10px;
            border-radius: 50%;
            cursor: pointer;
            width: 42px;
            height: 42px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .theme-toggle:hover {
            background: var(--border-color);
        }
        .weather-info-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding: 10px;
        }
        .weather-info-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 10px;
        border-radius: 8px;
        background-color: var(--bg-primary);
        }
        .weather-info-item i {
        font-size: 24px;
        margin-bottom: 5px;
        }

.weather-info-item .label {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.weather-info-item .value {
    color: var(--text-primary);
    font-size: 1.2em;
    font-weight: bold;
}

.weather-info-item .trend {
    font-size: 0.8em;
    margin-left: 5px;
}

.trend.up {
    color: #40c057;
}

.trend.down {
    color: #fa5252;
}
.weather-card {
    transition: all 0.3s ease;
}

.weather-card.collapsed .weather-info-grid {
    display: none;
}

.weather-card.collapsed .collapse-btn i {
    transform: rotate(180deg);
}

.collapse-btn {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
}

.collapse-btn:hover {
    opacity: 0.8;
}

.weather-card-header {
    position: relative;
    padding-right: 40px;
}

.weather-source {
    font-size: 0.9em;
    color: var(--text-secondary);
    display: none;
    text-align: center;
    margin-top: 5px;
}

.weather-card.collapsed .weather-source {
    display: block;
}

.weather-source a {
    color: #2196F3;
    text-decoration: none;
}

.weather-source a:hover {
    text-decoration: underline;
}

/* Zaktualizowane style dla sekcji z kamerami */
.camera-card {
    width: 100%;
    background: var(--bg-card);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px var(--shadow-color);
    max-width: 100%;
    box-sizing: border-box;
}

.camera-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

.camera-item {
    background: var(--bg-primary);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    height: fit-content;
}

.camera-header {
    padding: 10px 15px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.camera-header i {
    color: #2196F3;
}

.camera-feed {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Proporcje 16:9 */
    height: 0;
    overflow: hidden;
}

.camera-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.camera-image:hover {
    transform: scale(1.02);
}

/* Style dla modalu */
.camera-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.camera-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
}

.camera-modal-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
}

.camera-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.camera-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
}
.camera-feed {
    position: relative;
}

.camera-feed::after {
    content: "Kliknij prawym aby odświeżyć";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px;
    font-size: 12px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.camera-feed:hover::after {
    opacity: 1;
}

/* Dodaj animację odświeżania */
@keyframes refreshing {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.camera-image.refreshing {
    animation: refreshing 0.5s ease-in-out;
}
