/* Reset and Base Styles */
* {
    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: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

header h1 {
    color: #667eea;
    font-size: 2rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .container {
        grid-template-columns: 1fr 1fr;
    }
}

/* Sections */
section {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

section h2 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

/* Webcam Section */
.webcam-section {
    grid-column: 1 / -1;
}

.webcam-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.webcam-image {
    width: 100%;
    height: auto;
    display: block;
}

.webcam-info {
    text-align: center;
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

/* Weather Widget */
.weather-widget {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.weather-data {
    display: grid;
    gap: 1rem;
}

.weather-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.weather-label {
    font-weight: 600;
    color: #555;
}

.weather-value {
    color: #667eea;
    font-weight: bold;
}

/* Forecast */
.forecast-container {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.forecast-data {
    display: grid;
    gap: 1rem;
}

.forecast-day {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #764ba2;
}

.forecast-day h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.forecast-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    font-size: 0.9rem;
}

.forecast-detail {
    display: flex;
    justify-content: space-between;
}

.forecast-detail span:first-child {
    color: #666;
}

.forecast-detail span:last-child {
    color: #667eea;
    font-weight: 600;
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 2rem;
    color: #667eea;
    font-size: 1.1rem;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: white;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 767px) {
    header h1 {
        font-size: 1.5rem;
    }

    section {
        padding: 1.5rem;
    }

    section h2 {
        font-size: 1.2rem;
    }

    .container {
        margin: 1rem auto;
    }
}
