* {
    box-sizing: border-box;
}

/* body {
    padding: 20px;
} */

@font-face {
    font-family: 'SamsungOne';
    src: url('../fonts/SamsungOne-700.ttf');
}


body {
    font-family: Arial, sans-serif;
    background: var(--bg-image) no-repeat center bottom fixed;
    background-size: cover;
    margin: 0;
    padding: 0;
    color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
    position: relative;
    transition: background 2s ease-in-out,
        background-image 2s ease-in-out,
        filter 2s ease-in-out;
}

body.theme-fade {
    animation: themeFade 2s ease-in-out;
}

@keyframes themeFade {
    from {
        opacity: 0.1;
        filter: blur(4px);
    }

    to {
        opacity: 1;
        filter: blur(0px);
    }
}

/* Dark overlay to improve readability */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    /* Adjust opacity if needed */
    z-index: 0;
}

.background-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    /* Keep below content but above background image */
    pointer-events: none;
    overflow: hidden;
}

/* Make sure main container sits above overlay */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 95%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Header with logo, clock, and QR */
.header {
    display: flex;
    justify-content: center;
    align-items: start;
    width: 100%;
    padding: 2.8vw 0 0 0;
}

.display {
    transform-origin: center;
    text-align: center;
    width: 100%;
    padding-top: 3.5vw
}

#digitalclock {
    color: white;
    font-size: 4.5vw;
    letter-spacing: 0.2vw;
    font-weight: 700;
    font-family: 'SamsungOne';
    display: flex;
    text-align: center;
    justify-content: center;
    stroke: black;
    stroke-width: 2.5px;
    stroke-linejoin: round;
    -webkit-text-stroke-color: black;
    -webkit-text-stroke-width: 0.5px;
    -webkit-stroke-linejoin: round;

}

#hours {
    width: 6vw;
    min-width: 6vw;
}

#minutes {
    width: 6vw;
    min-width: 6vw;
}

#second0 {
    width: 3vw;
    min-width: 3vw;
}

#second1 {
    width: 3vw;
    min-width: 3vw;
}

#ampm {
    display: none;
    margin-left: 1vw;
}

.logo {
    width: 6vw;
    height: 6vw;
}

.qr-image {
    width: 6vw;
    height: 6vw;
    border-radius: 0.2vw;
    margin-right: 0.8vw;
}

.qr-box {
    display: flex;
    margin: 0 0 0 15px;
}

.qr-box img {
    width: 157.5px;
    height: 157.5px;
    border: 2px solid #eee;
    border-radius: 10px;
}

footer {
    width: 100%;
    text-align: center;
    font-size: 1vw;
    color: #777;
    position: fixed;
    bottom: 1vw;
    display: flex;
    justify-content: center;
    align-items: baseline;
}

.footer-text {
    color: white;
    font-size: 2.5vw;
    text-align: center;
    margin: 0.8vw;
    margin-bottom: 0;
}

#version {
    position: fixed;
    right: 2vw;
    bottom: 0px;
}

.setting-div {
    border: none;
    text-align: end;
    position: absolute;
    top: 2vw;
    left: 0vw;
    font-size: 55px;

}

.settings-icon {
    font-size: 1.6vw;
    cursor: pointer;
    height: auto;
    background: none;
    color: white;
    border: none;
    outline: none;
    padding: 0.2vw 0.3vw;
}

.settings-icon:focus {
    outline: 0.3vw solid white !important;
    border-radius: 0.2vw;
}

.azanNotification-main {
    display: flex;
    justify-content: center;
    margin-top: 3vw;
}

#azanNotification {
    width: fit-content;
    padding: 0vw 1vw;
    background: var(--adhan-notification-bg);
    color: white;
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    text-align: center;
    position: fixed;
    top: 2vw;
    right: 0;
    border: 0.3vw solid var(--adhan-notification-borderColor);
}

.azan-playing-div {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5vw;
}

.azan-playing-div img {
    width: 1.5vw !important;
    height: 1.5vw !important;
    margin-left: 1vw;
}

.kaba {
    width: 6vw !important;
    height: 6vw !important;
    border-radius: 50%;
}

.play-pause {
    width: 4vw !important;
    height: 4vw !important;
}

#play-azan {
    display: none;
}

.play-pause:focus {
    border: 0.3vw solid #59a959 !important;
    border-radius: 50%;
    padding: 0.1vw;
    outline: none !important;
}

#azanNotification h3 {
    font-size: 2vw;
    margin: 0 2vw;
}

#azanNotification p {
    text-align: center;
    font-size: 1.2vw;
    margin: 0;
}

.birds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.bird {
    width: 25px;
    height: 5px;
    display: inline-block;
    position: absolute;
    transform: skew(20deg, 20deg);
    animation: wave 2.5s ease-in-out infinite;
    opacity: .85;
}

.bird::before,
.bird::after {
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    border-radius: 20%;
    background-color: #000;
}

.bird::before {
    right: 49%;
    transform-origin: right;
    transform: rotate(-40deg);
    animation: flap-left .75s ease-in-out infinite;
}

.bird::after {
    left: 49%;
    transform-origin: left;
    transform: rotate(40deg);
    animation: flap-right .75s linear infinite;
}

/* Flapping animations */
@keyframes flap-left {
    60% {
        transform: rotate(10deg);
    }

    75% {
        transform: rotate(20deg);
    }

    100% {
        transform: rotate(-40deg);
    }
}

@keyframes flap-right {
    60% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(-20deg);
    }

    100% {
        transform: rotate(40deg);
    }
}

/* Vertical wave motion */
@keyframes wave {
    40% {
        transform: translateY(40px) skew(20deg, 20deg);
    }

    50% {
        transform: translateY(50px) skew(20deg, 20deg);
    }

    60% {
        transform: translateY(40px) skew(20deg, 20deg);
    }

    100% {
        transform: translateY(0px) skew(20deg, 20deg);
    }
}


#appLoader {
    position: fixed;
    /* inset: 0; */
    background: radial-gradient(circle at center, #0a1a2fbf, #000);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    perspective: 1000px;
    width: 100%;
    height: 100%;
}

/* Ring spins independently */
.loader-ring {
    width: 12vw;
    height: 12vw;
    border-radius: 50%;
    border: 0.8vw solid rgba(255, 255, 255, 0.15);
    border-top-color: rgb(23 33 46);
    animation: ringSpin 2.5s linear infinite;
}

/* Kaaba swings front → back → front */
.loader-kaaba {
    width: 6vw;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    animation: kaabaSwing 4s ease-in-out infinite;
    position: absolute;
    /* center over ring */
    transform-origin: center;
    border-radius: 1.5vw;
}

/* Ring spin animation */
@keyframes ringSpin {
    from {
        transform: rotateZ(0deg);
    }

    to {
        transform: rotateZ(360deg);
    }
}

@keyframes kaabaSwing {
    0% {
        transform: rotateY(0deg);
    }

    /* front */
    25% {
        transform: rotateY(-140deg);
    }

    /* back from right */
    50% {
        transform: rotateY(0deg);
    }

    /* front */
    75% {
        transform: rotateY(140deg);
    }

    /* back from left */
    100% {
        transform: rotateY(0deg);
    }

    /* front */
}

.widget-searchBox {
    width: 100%;
    padding: 0.8rem !important;
    font-size: 1rem !important;
    border: 0.15rem solid var(--widget-searchBox-border) !important;
    border-radius: 0.3rem !important;
    background: var(--widget-searchBox-bg) !important;
    color: #fff !important;
}

.widget-searchBox::placeholder {
    color: #fff !important;
    opacity: 0.8 !important;
}

.widget-searchBox:focus {
    border:0.15rem solid #fff !important;
    outline: none !important;
}

#cityContainer .autocomplete-list {
  max-height: 200px !important;
  overflow-y: auto;
}
#cityContainer .autocomplete-item{
     padding: 1rem !important;
    font-size: 1rem !important;
    color: black;
    cursor: pointer;
}
#cityContainer .autocomplete-item:focus {
    background: #a5a4a4 !important;
    background-color: #a5a4a4 !important;
    color: white;
    outline: none;
}
#cityContainer .autocomplete-item:hover {
    background: #a5a4a4 !important;
    background-color: #a5a4a4 !important;
    color: white;
    outline: none;
}

@media screen and (max-width: 600px) {
    #hours {
        width: 7vh;
        min-width: 7vh;
    }

    #minutes {
        width: 7vh;
        min-width: 7vh;
    }

    #second0 {
        width: 3.5vh;
        min-width: 3.5vh;
    }

    #second1 {
        width: 3.5vh;
        min-width: 3.5vh;
    }

    .prayer-section {
        flex-direction: column !important;
    }

    .prayer-card {
        flex-direction: row !important;
        width: 80% !important;
        height: auto !important;
        display: flex !important;
        justify-content: space-between !important;
        padding: 3vh 3vh !important;
    }

    .prayer-name {
        font-size: 3vh !important;
        margin-bottom: 0.2vh !important;
    }

    .prayer-time {
        font-size: 3vh !important;
    }

    .prayer-counter {
        position: absolute !important;
        width: 100% !important;
        font-size: 2vh !important;
        right: 0 !important;
        left: 0 !important;
        padding-top: 3.5vh !important;
    }

    .prayer-card.active {
        transform: scale(1.1) !important;
        padding: 3vh 3vh 4vh !important;
    }

    .prayer-card:nth-child(even)::after {
        height: 0.7vh !important;
    }

    .prayer-card:nth-child(odd)::after {
        height: 0.7vh !important;
    }

    #dateDiv {
        font-size: 1rem !important;
        text-align: center !important;
        letter-spacing: 1px;
    }

    #hijriDiv {
        font-size: 1rem !important;
        text-align: center !important;
        letter-spacing: 1px;
    }

    #digitalclock {
        font-size: 2rem !important;
    }

    .cityDiv {
        font-size: 1rem !important;
        text-align: center !important;
        letter-spacing: 1px;
    }

    #methodString {
        font-size: 1rem !important;
        text-align: center !important;
        letter-spacing: 1px;
    }

    .header {
        padding: 0.5rem 0 !important;
    }

    .settings-icon {
        padding: 1vh 1.5vh !important;
        font-size: 3vh !important;
    }

    .setting-div {
        top: 0 !important;
    }

    footer {
        font-size: 3vh !important;
        bottom: 1.5vh !important;
        flex-direction: row !important;
    }

    .footer-text {
        font-size: 2vh !important;
    }

    .logo {
        width: 6vh !important;
        height: 6vh !important;
    }

    .qr-image {
        width: 6vh;
        height: 6vh;
        margin-right: 1vh;
    }

    .display{
        flex-direction: column !important;
    }
    
    .widget-searchBox {
        padding: 0.5rem !important;
    }
    #cityContainer .autocomplete-list{
        max-height: 300px !important;
    }
}