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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    margin-right: 15px;
    border-radius: 8px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 300;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

nav ul li a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Main Content */
main {
    min-height: calc(100vh - 120px);
    padding: 30px 0;
}

h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.2rem;
    font-weight: 300;
}

h3 {
    color: #34495e;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 400;
}

/* Weather Grid */
.weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.sensor-card {
    background: white;
    border: none;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sensor-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.sensor-card h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.4rem;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

.reading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.reading span:first-child {
    font-weight: 500;
    color: #555;
}

.reading span:last-child {
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Trend Indicators */
.trend {
    font-weight: bold;
    font-size: 1.2em;
    margin-left: 8px;
}

.trend.up { 
    color: #e74c3c; 
}

.trend.down { 
    color: #3498db; 
}

.trend.stable { 
    color: #27ae60; 
}

/* Min/Max Section */
.minmax-section {
    margin-top: 20px;
    padding: 15px;
    background: #ecf0f1;
    border-radius: 8px;
    border-left: 4px solid #95a5a6;
}

.minmax-section strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 8px;
}

.minmax-section small {
    color: #555;
    line-height: 1.4;
}

/* Chart Containers */
.chart-container {
    width: 100%;
    height: 400px;
    margin: 30px 0;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
/* Windy Containers */
.windy-container {
    margin: 30px 0;
}

.iframe-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 25px 0;
    margin-top: 50px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 20px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 5px 10px;
    }

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

    .chart-container {
        height: 300px;
        padding: 15px;
    }

    .windy-container {
       margin: 20px 0;
    }


    h2 {
        font-size: 1.8rem;
    }
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.btn:hover {
    background: #2980b9;
}

/* Status Indicators */
.status-ok {
    color: #27ae60;
    font-weight: bold;
}

.status-warning {
    color: #f39c12;
    font-weight: bold;
}

.status-error {
    color: #e74c3c;
    font-weight: bold;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Timestamp styling */
small {
    color: #7f8c8d;
    font-style: italic;
    display: block;
    margin-top: 15px;
    text-align: center;
}
