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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #f59e0b;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --text: #1f2937;
    --text-light: #6b7280;
}

body {
    font-family: 'Nunito', sans-serif;
    min-height: 100vh;
    background: var(--bg-gradient);
    color: var(--text);
    overflow-x: hidden;
}

#app {
    position: relative;
    min-height: 100vh;
    padding: 20px;
}

/* Фоновая анимация */
#weather-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Заголовок */
.header {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 30px 0;
}

.logo {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.tagline {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

/* Основной контент */
.main-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin: 0 auto;
}

/* Выбор времени */
.time-selector {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.time-selector h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.time-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.time-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    border: 3px solid #e5e7eb;
    border-radius: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.time-btn:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.time-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
    color: white;
}

.time-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.time-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.time-range {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 5px;
}

/* Карточка погоды */
.weather-result {
    margin-bottom: 30px;
}

.weather-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    margin-bottom: 25px;
    transition: all 0.5s ease;
}

.weather-card:hover {
    transform: scale(1.02);
}

.weather-icon {
    font-size: 6rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.weather-temp {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary);
    margin: 15px 0;
}

.weather-desc {
    font-size: 1.4rem;
    color: var(--text-light);
    margin-bottom: 25px;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding-top: 25px;
    border-top: 2px solid #f3f4f6;
}

.detail {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.detail-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.detail-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.detail-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

/* Прогноз на неделю */
.forecast-section {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.forecast-section h3 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.forecast-day {
    text-align: center;
    padding: 15px 5px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    transition: all 0.3s ease;
}

.forecast-day:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
}

.forecast-day-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 8px;
}

.forecast-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.forecast-temp {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

/* Кнопка обновить */
.refresh-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 18px 35px;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--secondary) 0%, #f97316 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(245, 158, 11, 0.5);
}

.refresh-btn:active {
    transform: translateY(0);
}

.refresh-icon {
    display: inline-block;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.refresh-btn:hover .refresh-icon {
    transform: rotate(180deg);
}

/* Футер */
.footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 30px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .logo {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .time-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .weather-icon {
        font-size: 4rem;
    }
    
    .weather-temp {
        font-size: 3rem;
    }
    
    .weather-details {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .forecast-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .forecast-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .forecast-day {
        padding: 10px 5px;
    }
    
    .forecast-icon {
        font-size: 1.5rem;
    }
}
