/* Основные стили */
.weather-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Поиск */
.weather-search-container {
    margin-bottom: 30px;
}

.weather-search-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto 20px;
}

.weather-search-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #3498db;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.weather-search-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.weather-search-btn:hover {
    background: #2980b9;
}

.weather-search-results {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    max-width: 500px;
    width: 100%;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #f5f5f5;
}

/* Текущая погода */
.weather-current-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 30px;
    color: white;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.weather-location h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.weather-time {
    opacity: 0.8;
    font-size: 14px;
}

.weather-main {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.weather-icon {
    flex: 0 0 100px;
}

.weather-icon img {
    width: 100px;
    height: 100px;
}

.weather-temp {
    margin: 0 30px;
}

.temp-value {
    font-size: 72px;
    font-weight: bold;
}

.temp-unit {
    font-size: 24px;
    vertical-align: super;
}

.weather-desc {
    font-size: 20px;
    margin-top: 10px;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

/* Прогноз */
.weather-forecast {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.forecast-day {
    background: white;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.forecast-date {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.forecast-icons img {
    width: 40px;
    height: 40px;
    margin: 5px;
}

.forecast-temps {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 10px 0;
}

.temp-max {
    color: #e74c3c;
    font-weight: bold;
}

.temp-min {
    color: #3498db;
    font-weight: bold;
}

.forecast-precip {
    color: #666;
    font-size: 14px;
}

/* Поисковая страница */
.weather-search-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

#global-weather-search {
    width: 100%;
    max-width: 600px;
    padding: 15px;
    font-size: 18px;
    border: 2px solid #3498db;
    border-radius: 8px;
    margin: 20px auto;
    display: block;
}

.popular-cities {
    margin-top: 40px;
}

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

.city-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s;
}

.city-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.city-card h4 {
    margin: 0 0 10px;
    color: #333;
}

/* Виджет */
.current-weather-widget {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.weather-header h4 {
    margin: 0 0 5px;
    color: #333;
}

.weather-time {
    color: #666;
    font-size: 12px;
}

/* Анимации */
.weather-loading .spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Адаптивность */
@media (max-width: 768px) {
    .weather-main {
        flex-direction: column;
        text-align: center;
    }
    
    .weather-temp {
        margin: 20px 0;
    }
    
    .temp-value {
        font-size: 48px;
    }
    
    .weather-forecast {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .weather-forecast {
        grid-template-columns: 1fr;
    }
    
    .cities-grid {
        grid-template-columns: 1fr;
    }
}