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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    min-height: 100vh;
    padding: 20px;
    direction: rtl;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header h1 i {
    margin-left: 15px;
    color: #ffeaa7;
}

.search-container {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.search-box {
    display: flex;
    background: rgba(255,255,255,0.2);
    border-radius: 25px;
    padding: 5px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    flex: 1;
    max-width: 400px;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 20px;
    color: white;
    font-size: 16px;
    outline: none;
}

.search-box input::placeholder {
    color: rgba(255,255,255,0.7);
}

.search-box button {
    background: rgba(255,255,255,0.3);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box button:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.05);
}

.location-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 25px;
    padding: 12px 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 14px;
    white-space: nowrap;
}

.location-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.location-btn i {
    margin-left: 8px;
}

.weather-container {
    position: relative;
}

.loading {
    text-align: center;
    color: white;
    padding: 40px;
}

.loading i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.loading p {
    font-size: 1.2rem;
    opacity: 0.8;
}

.weather-card {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.current-weather {
    text-align: center;
    margin-bottom: 30px;
}

.weather-info h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 5px;
    font-weight: 300;
}

.weather-info p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 20px;
}

.temperature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.temperature span {
    font-size: 4rem;
    color: white;
    font-weight: 200;
}

.weather-icon {
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-icon i {
    font-size: 2.5rem;
    color: #ffeaa7;
}

#weatherDescription {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    text-transform: capitalize;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.detail-item {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.detail-item i {
    color: #ffeaa7;
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.detail-item span:nth-child(2) {
    flex: 1;
    color: rgba(255,255,255,0.8);
}

.detail-item span:last-child {
    color: white;
    font-weight: 500;
}

.forecast-container h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 300;
}

.forecast-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.forecast-item {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.forecast-item:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.forecast-item .day {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.forecast-item .forecast-icon {
    font-size: 2rem;
    color: #ffeaa7;
    margin: 10px 0;
}

.forecast-item .temps {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.forecast-item .high {
    color: white;
    font-weight: 500;
}

.forecast-item .low {
    color: rgba(255,255,255,0.6);
}

.error-message {
    text-align: center;
    color: white;
    padding: 40px;
    background: rgba(231, 76, 60, 0.2);
    border-radius: 15px;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.error-message i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
    color: #e74c3c;
}

.error-message p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .search-container {
        flex-direction: column;
        align-items: center;
    }
    
    .search-box {
        width: 100%;
        max-width: none;
    }
    
    .temperature span {
        font-size: 3rem;
    }
    
    .weather-details {
        grid-template-columns: 1fr;
    }
    
    .forecast-list {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    .weather-card {
        padding: 20px;
    }
    
    .temperature {
        flex-direction: column;
        gap: 10px;
    }
    
    .weather-icon {
        width: 60px;
        height: 60px;
    }
    
    .weather-icon i {
        font-size: 2rem;
    }
}