/* الأنيميشن */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes rainFall {
    0% {
        transform: translateY(-10px) translateX(-5px);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(10px) translateX(5px);
        opacity: 0;
    }
}

@keyframes cloudMove {
    0% {
        transform: translateX(-3px);
    }

    100% {
        transform: translateX(3px);
    }
}

@keyframes sunGlow {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.3);
    }
}

@keyframes snowFall {
    0% {
        transform: translateY(-8px) rotate(0deg);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(8px) rotate(180deg);
        opacity: 0;
    }
}

/* التصميم الرئيسي - ألوان محايدة */
.weather-widget-compact {
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 10px auto;
    transition: all 0.3s ease;
}

.weather-widget-compact:hover {
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.15);
    border-color: #d1d5db;
}

.weather-main {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
    margin-bottom: 15px;
}

.weather-icon-container {
    position: relative;
    text-align: center;
}

.weather-icon {
    font-size: 3rem;
    line-height: 1;
}

.weather-icon.sunny {
    animation: sunGlow 3s ease-in-out infinite;
}

.weather-icon.cloudy {
    animation: cloudMove 4s ease-in-out infinite alternate;
}

.weather-icon.rainy .main-icon {
    animation: bounce 2s ease-in-out infinite;
}

.weather-icon.snowy {
    animation: float 4s ease-in-out infinite;
}

.weather-icon.stormy {
    animation: bounce 1s ease-in-out infinite;
}

.rain-drops {
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
}

.rain-drops span {
    font-size: 0.8rem;
    animation: rainFall 1.5s linear infinite;
}

.rain-drops span:nth-child(2) {
    animation-delay: 0.5s;
}

.rain-drops span:nth-child(3) {
    animation-delay: 1s;
}

.snow-flakes {
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
}

.snow-flakes span {
    font-size: 0.7rem;
    animation: snowFall 2s linear infinite;
}

.snow-flakes span:nth-child(2) {
    animation-delay: 0.7s;
}

.snow-flakes span:nth-child(3) {
    animation-delay: 1.4s;
}

.weather-info {
    text-align: center;
}

.city-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #2563eb;
}

.weather-desc {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0 0 8px 0;
}

.temperature {
    font-size: 3.5rem;
    line-height: 1;
    margin: 0;
    font-weight: bold;
}

.temperature::after {
    content: '°';
    font-size: 1.5rem;
    vertical-align: super;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
/*    flex-direction: column;*/
}

.detail-item {
    background: #f8fafc;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.detail-value {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 2px 0;
    color: #1f2937;
}

.detail-label {
    font-size: 0.75rem;
    color: #6b7280;
}

.forecast {
    border-radius: 12px;
/*    padding: 15px;*/
}

.forecast-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    text-align: center;
    color: #6b7280;
}

.forecast-days {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.forecast-day {
    text-align: center;
    padding: 5px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.day-name {
    margin: 0 0 5px 0;
}

.day-icon {
    font-size: 1.2rem;
    margin: 3px 0;
}

.day-temp {
    font-weight: 600;
}

.day-temp-min {
    font-size: 0.8rem;
}

.weather-footer {
    text-align: center;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid #069d9a;
    font-size: 0.7rem;
    color: #ccc;
}

.weather-widget-compact {
    background: #0669ff;
    color: #ffffff;
}
.city-name {
    color: #ffffff;
}
.weather-desc, .temperature, .day-temp {
    color: #00f9de;
}
.day-temp {
    font-size: 18px;
}
.forecast-title, .day-name {
    color: #ffffff;
}
/* التجاوب مع الشاشات الصغيرة */
@media (max-width: 480px) {
    .weather-main {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }

    .weather-details {
        grid-template-columns: repeat(2, 1fr);
    }

    .forecast-days {
        grid-template-columns: repeat(3, 1fr);
    }
}