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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 40px 0 30px;
    color: #fff;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 10px 14px;
    border-radius: 8px;
    background: #f3f4f6;
}

.search-box button {
    border: none;
    outline: none;
    background: #667eea;
    color: #fff;
    font-size: 1rem;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-box button:hover {
    background: #5a67d8;
}

.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    padding: 30px;
    color: #fff;
    font-size: 1.1rem;
    animation: pulse 1.5s infinite;
}

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

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.current {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.current-main {
    flex: 1 1 200px;
}

.city-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
}

.temperature {
    font-size: 4rem;
    font-weight: 700;
    color: #667eea;
    line-height: 1.1;
}

.weather-desc {
    font-size: 1.1rem;
    color: #6b7280;
    margin-top: 4px;
}

.current-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    flex: 1 1 240px;
}

.meta-item {
    background: #f9fafb;
    padding: 12px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 4px;
}

.meta-value {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.section-title {
    color: #fff;
    font-size: 1.25rem;
    margin: 10px 0 16px;
    font-weight: 600;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.forecast {
    text-align: center;
    padding: 18px 12px;
    transition: transform 0.15s;
}

.forecast:hover {
    transform: translateY(-4px);
}

.forecast-date {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.forecast-day {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 10px;
}

.forecast-weather {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #374151;
}

.forecast-temp {
    font-size: 1rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 6px;
}

.forecast-wind {
    font-size: 0.8rem;
    color: #9ca3af;
}

.indices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.index {
    padding: 18px 14px;
    transition: transform 0.15s;
}

.index:hover {
    transform: translateY(-4px);
}

.index-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 6px;
}

.index-level {
    font-size: 1.1rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.index-advice {
    font-size: 0.85rem;
    color: #374151;
    line-height: 1.4;
}

footer {
    text-align: center;
    padding: 30px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

footer a {
    color: #fff;
    text-decoration: underline;
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.8rem;
    }

    .temperature {
        font-size: 3rem;
    }

    .current-meta {
        grid-template-columns: 1fr 1fr;
    }

    .search-box {
        flex-direction: column;
    }

    .forecast-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
