/* التهيئة العامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}

body {
    background: linear-gradient(45deg, #9fb0c9, #acb1ba);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.weather-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    transform-style: preserve-3d;
}

.weather-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 25px;
    transform: rotateY(5deg) rotateX(2deg);
    transition: transform 0.8s ease, box-shadow 0.8s ease;
    position: relative;
    overflow: hidden;
}

.weather-card:hover {
    transform: rotateY(0) rotateX(0) translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* تصميم شريط البحث */
.search-wrapper {
    margin-bottom: 25px;
    position: relative;
    transform: skewY(-2deg);
    transition: transform 0.4s ease;
}

.search-wrapper:hover {
    transform: skewY(0);
}

.search-box {
    display: flex;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(245,245,245,0.9));
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.search-box:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.search-input {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 16px;
    background: transparent;
    outline: none;
    color: #333;
}

.search-input::placeholder {
    color: #aaa;
    transition: color 0.3s;
}

.search-input:focus::placeholder {
    color: transparent;
}

.search-button {
    width: 50px;
    border: none;
    background: linear-gradient(45deg, #4b6cb7, #182848);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-button:hover {
    background: linear-gradient(45deg, #3a56a0, #121f3d);
    transform: scale(1.05) rotate(5deg);
}

.search-button i {
    font-size: 18px;
    transition: transform 0.3s;
}

.search-button:hover i {
    transform: scale(1.2);
}

/* محتوى الطقس */
.location-info {
    text-align: center;
    margin-bottom: 20px;
    transform: translateY(0);
    transition: transform 0.5s ease;
}

.weather-card:hover .location-info {
    transform: translateY(-5px);
}

.city-name {
    font-size: 28px;
    color: #333;
    margin-bottom: 5px;
    font-weight: 700;
}

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

.weather-main {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 25px 0;
    transform: scale(1);
    transition: transform 0.5s ease;
}

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

.weather-icon {
    font-size: 80px;
    color: #4b6cb7;
    transform: rotate(0deg);
    transition: transform 0.5s ease, color 0.5s ease;
}

.weather-card:hover .weather-icon {
    transform: rotate(5deg);
    color: #3a56a0;
}

.weather-details {
    text-align: center;
}

.temperature {
    font-size: 48px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    position: relative;
}

.temperature::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #4b6cb7, #182848);
    transition: transform 0.5s ease;
}

.weather-card:hover .temperature::after {
    transform: translateX(-50%) scaleX(1);
}

.description {
    font-size: 18px;
    color: #666;
    text-transform: capitalize;
}

.weather-stats {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
}

.stat-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 50px;
    background: rgba(75, 108, 183, 0.1);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(75, 108, 183, 0.2);
    transform: translateY(-3px) skewX(-5deg);
}

.stat-item i {
    margin-left: 8px;
    font-size: 20px;
    color: #4b6cb7;
}

/* توقعات الطقس */
.weather-forecast {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.forecast-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 15px;
    transition: all 0.3s ease;
    transform: translateY(0) rotate(0deg);
}

.forecast-item:hover {
    background: rgba(75, 108, 183, 0.1);
    transform: translateY(-5px) rotate(2deg);
}

.forecast-item .day {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.forecast-item i {
    font-size: 24px;
    color: #4b6cb7;
    margin: 8px 0;
    display: block;
}

.forecast-item .temp {
    font-weight: 600;
    color: #333;
}

/* تأثيرات الحركة عند التحميل */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.weather-card > * {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.weather-card > *:nth-child(1) { animation-delay: 0.1s; }
.weather-card > *:nth-child(2) { animation-delay: 0.2s; }
.weather-card > *:nth-child(3) { animation-delay: 0.3s; }
.weather-card > *:nth-child(4) { animation-delay: 0.4s; }
/* أنماط الطقس المختلفة old*/ 

/* إضافة هذه الأنماط للقائمة المنسدلة */
.search-select {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 16px;
    background: transparent;
    outline: none;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234b6cb7'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e") no-repeat;
    background-position: left 15px center;
    background-size: 15px;
    padding-right: 40px;
    transition: all 0.3s ease;
    border-radius: 50px 0 0 50px;
}

.search-select:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.search-select:focus {
    background-color: rgba(255, 255, 255, 0.9);
}

/* تعديلات لزر البحث لتتناسب مع التغيير */
.search-button {
    border-radius: 0 50px 50px 0;
    width: 60px;
}

/* تأثيرات خاصة للقائمة المنسدلة */
.search-box {
    position: relative;
}

.search-box::after {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: all 0.3s ease;
}

.search-select option {
    background: white;
    color: #333;
    padding: 10px;
}

/* تأثيرات التحويل للقائمة المنسدلة */
.search-wrapper {
    transform: skewY(-2deg) translateX(0);
    transition: transform 0.4s ease;
}

.search-wrapper:hover {
    transform: skewY(0) translateX(5px);
}

/* تأثيرات الحركة عند الفتح */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-select:focus {
    animation: slideDown 0.3s ease;
}


/* dark mooooooooooooooooooooooooooooooooooood /* 

/* أنماط الوضع الليلي */
.dark-mode {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #f0f0f0;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

.dark-mode .weather-card {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
    box-shadow: 0 15px 35px var(--shadow-color) !important;
}

.dark-mode .search-input,
.dark-mode .search-select {
    background: #2d2d2d;
    color: #fff;
}

.dark-mode .search-button {
    background: linear-gradient(45deg, #3a56a0, #121f3d);
}

/* زر التبديل */
.theme-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

#dark-mode-toggle {
    background: var(--card-bg);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#dark-mode-toggle .wi-night-clear {
    display: none;
}

.dark-mode #dark-mode-toggle .wi-day-sunny {
    display: none;
}

.dark-mode #dark-mode-toggle .wi-night-clear {
    display: block;
}

/* تعديل أنماط الطقس للوضع الليلي */
.dark-mode .weather-container.sunny {
    background: linear-gradient(135deg, #e67e22, #2c3e50) !important;
}

.dark-mode .weather-container.rainy {
    background: linear-gradient(135deg, #2c3e50, #1a1a2e) !important;
}

.dark-mode .weather-container.cloudy {
    background: linear-gradient(135deg, #4a4a4a, #2d2d2d) !important;
}