/* ===== НЕДАВНИЕ ГОРОДА ===== */
.recent-cities {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e9ecef;
}

.recent-cities h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.recent-cities-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recent-city-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    animation: slideIn 0.4s ease-out forwards;
    opacity: 0;
    position: relative;
    overflow: hidden;
}

.recent-city-item:nth-child(1) { animation-delay: 0.1s; }
.recent-city-item:nth-child(2) { animation-delay: 0.2s; }
.recent-city-item:nth-child(3) { animation-delay: 0.3s; }
.recent-city-item:nth-child(4) { animation-delay: 0.4s; }
.recent-city-item:nth-child(5) { animation-delay: 0.5s; }

.recent-city-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
}

.recent-city-name-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
}

.city-icon {
    font-size: 24px;
    opacity: 0.9;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
    transition: all 0.3s ease;
}

.recent-city-item:hover .city-icon {
    opacity: 1;
    transform: scale(1.1);
}

.recent-city-name {
    color: #2c3e50;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.recent-city-name::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #3498db, #2980b9);
    transition: width 0.3s ease;
}

.recent-city-item:hover .recent-city-name::after {
    width: 100%;
}

.recent-city-item:hover .recent-city-name {
    color: #1a5276;
}

.recent-city-temp-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.recent-city-temp {
    color: #e74c3c;
    font-weight: 600;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    border-radius: 10px;
    min-width: 70px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(231, 76, 60, 0.1);
}

.recent-city-item:hover .recent-city-temp {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.15);
    transform: scale(1.05);
    color: #c0392b;
}

.recent-city-delete {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #dee2e6;
    color: #95a5a6;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.recent-city-delete:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-color: #e74c3c;
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.empty-history {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px dashed #ced4da;
    font-size: 16px;
    margin: 15px 0;
}

.recent-city-item.active {
    background: linear-gradient(135deg, #d6eaf8 0%, #aed6f1 100%);
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.recent-city-item.active .recent-city-name {
    color: #1a5276;
    font-weight: 600;
}

.recent-city-item.active .recent-city-temp {
    background: rgba(255, 255, 255, 0.95);
    color: #c0392b;
    font-weight: 700;
}

@media (max-width: 600px) {
    .recent-city-item {
        padding: 12px 15px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .recent-city-name-container {
        justify-content: center;
        margin-bottom: 5px;
    }

    .recent-city-temp-container {
        justify-content: space-between;
        width: 100%;
        padding-top: 8px;
        border-top: 1px dashed #dee2e6;
    }

    .city-icon {
        font-size: 20px;
    }

    .recent-city-name {
        font-size: 15px;
    }

    .recent-city-temp {
        font-size: 16px;
        min-width: 60px;
        padding: 4px 10px;
    }

    .recent-city-delete {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}
/* Стили для иконок погоды в истории */
.weather-emoji {
    font-size: 24px;
    display: inline-block;
    min-width: 32px;
    text-align: center;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}

.recent-city-item:hover .weather-emoji {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 3px 5px rgba(0,0,0,0.2));
}

/* Цвета для разных типов погоды */
.recent-city-item:nth-child(1) .weather-emoji {
    animation: subtleGlow 3s ease-in-out infinite;
}

@keyframes subtleGlow {
    0%, 100% { filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1)); }
    50% { filter: drop-shadow(0 0 5px rgba(255,255,0,0.3)); }
}

/* Для темной темы */
@media (prefers-color-scheme: dark) {
    .weather-emoji {
        filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
    }
}