body {
    font-family: "Tajawal", sans-serif;
    box-sizing: border-box;
    direction: rtl;
    background: linear-gradient(45deg,#240165,#05001c);
}

h1,h2,h3,h4,h5,p {
    margin: 0;
}

.container {
    height: 100vh;
}

.heading {
    color: white;
    margin-right: 40px;
}

#city_name {
    font-weight: 400;
    font-size: 100px;
}

#date {
    font-weight: 200;
    font-size: 40px;
    margin: 0;
    margin-top: 20px;
}

hr {
    border-color: #5200e1;
    margin: 0 50px;
}

.cards {
    height: 200px;
    margin-top: 80px;
    display: flex;
    justify-content: space-around;
}   
.card {
    width: 12%;
    height: 95%;
    margin-top: 5px;
    background-color: white;
    box-shadow: 0px 10px 5px rgb(0 0 0 /30%);
}

.prayer_name {
    background: linear-gradient(45deg,#5709ee,#7a37bf);
    color: white;
    font-size: 30px;
    font-weight: 400;
    text-align: center;
    padding: 3px;
}

.time {
    height: 75%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#prayer_time {
    font-size: 40px;
    font-weight: 600;
}

.change_city {
    margin-top: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#city_select {
    font-family: "Tajawal", sans-serif;
    background: transparent !important; 
    background-color: transparent !important;
    color: white;
    width: 300px;
    height: 40px;
    font-size: 25px;
    font-weight: 400;
    text-align: center;
    padding: 5px;
    border-radius: 20px;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    -ms-border-radius: 20px;
    -o-border-radius: 20px;
    border: 2px solid #5200e1;
    cursor: pointer;  
}

#city_select option {
    background-color: #1a0147;
    color: white;
    padding: 3px;
    text-align: center;
}

#city_select:focus {
    outline: none; 
    border-color: #7a37bf;
}

#city_select {
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
    appearance: menulist;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='white'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: left 15px center;
    background-size: 20px;
    padding-left: 40px;
}

/* للشاشات الكبيرة جداً (أكثر من 1400px) */
@media (min-width: 1400px) {
    .card {
        width: 10%;
    }
    
    #city_name {
        font-size: 120px;
    }
    
    #prayer_time {
        font-size: 48px;
    }
}

/* للشاشات المتوسطة والتابلت (من 992px إلى 1399px) */
@media (max-width: 1399px) and (min-width: 992px) {
    .card {
        width: 14%;
    }
    
    #city_name {
        font-size: 80px;
    }
    
    #prayer_time {
        font-size: 36px;
    }
    
    .prayer_name {
        font-size: 26px;
    }
}

/* للتابلت والأيباد (من 768px إلى 991px) */
@media (max-width: 991px) {
    .container {
        height: auto;
        min-height: 100vh;
        padding-bottom: 50px;
    }
    
    .heading {
        margin-right: 20px;
        text-align: center;
        margin-left: 20px;
    }
    
    #city_name {
        font-size: 60px;
    }
    
    #date {
        font-size: 28px;
        margin-top: 10px;
    }
    
    hr {
        margin: 0 20px;
    }
    
    .cards {
        flex-wrap: wrap;
        height: auto;
        gap: 20px;
        margin-top: 40px;
        justify-content: center;
    }
    
    .card {
        width: 28%;
        height: auto;
        min-height: 180px;
        margin-bottom: 15px;
    }
    
    .prayer_name {
        font-size: 24px;
    }
    
    #prayer_time {
        font-size: 32px;
    }
    
    .time {
        height: auto;
        padding: 20px 0;
    }
    
    .change_city {
        margin-top: 80px;
        margin-bottom: 30px;
    }
    
    #city_select {
        width: 250px;
        font-size: 20px;
        height: 45px;
    }
}

/* للشاشات الصغيرة والموبايل (من 576px إلى 767px) */
@media (max-width: 767px) {
    #city_name {
        font-size: 48px;
    }
    
    #date {
        font-size: 22px;
    }
    
    .cards {
        gap: 15px;
        margin-top: 30px;
    }
    
    .card {
        width: 44%;
        min-height: 160px;
    }
    
    .prayer_name {
        font-size: 22px;
        padding: 5px;
    }
    
    #prayer_time {
        font-size: 28px;
    }
    
    #city_select {
        width: 220px;
        font-size: 18px;
        height: 42px;
        padding-left: 35px;
        background-size: 18px;
        background-position: left 12px center;
    }
    
    .change_city {
        margin-top: 60px;
    }
}

/* للشاشات الصغيرة جداً (أقل من 575px) */
@media (max-width: 575px) {
    .heading {
        margin-right: 15px;
        margin-left: 15px;
    }
    
    #city_name {
        font-size: 36px;
    }
    
    #date {
        font-size: 18px;
    }
    
    hr {
        margin: 0 15px;
    }
    
    .cards {
        gap: 12px;
        margin-top: 25px;
    }
    
    .card {
        width: 45%;
        min-height: 140px;
    }
    
    .prayer_name {
        font-size: 18px;
        padding: 4px;
    }
    
    #prayer_time {
        font-size: 24px;
    }
    
    .change_city {
        margin-top: 50px;
    }
    
    #city_select {
        width: 200px;
        font-size: 16px;
        height: 40px;
        padding: 3px;
        padding-left: 30px;
    }
    
    #city_select option {
        font-size: 14px;
    }
}

/* تحسينات إضافية للموبايل في الوضع الأفقي (landscape) */
@media (max-width: 900px) and (orientation: landscape) {
    .cards {
        gap: 10px;
    }
    
    .card {
        width: 30%;
        min-height: 140px;
    }
    
    .change_city {
        margin-top: 30px;
    }
    
    .container {
        padding-bottom: 30px;
    }
}

/* تحسينات للشاشات التي تعمل باللمس */
@media (hover: none) and (pointer: coarse) {
    #city_select {
        font-size: 18px;
        padding: 8px;
        padding-left: 40px;
    }
    
    .card {
        cursor: pointer;
        transition: transform 0.2s;
    }
    
    .card:active {
        transform: scale(0.98);
    }
}