/* 1. DESKTOP (default) */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    width:100vw;
    height:auto;
    min-height: 100vh;
    /* overflow:hidden; */
    overflow:auto;
    font-family:Arial, Helvetica, sans-serif;
    color:white;
}

/* MAIN SCREEN */
#screen{
    width:100vw;
    height:100vh;
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    align-items:center;

    /* position:relative; */

}

/* TOP BAR */
#top-bar{
    width:100%;
    height:24%;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:0px;
}

/* LOGO */
#logo{
    margin:0px;
}

#logo img{
    height: 150px;
    width: 150px;
    object-fit:contain;
}

/* BIG CLOCK */
#big-clock{
    font-family: "Noto Serif Thai", serif;
    font-size:95px;
    font-weight:700;
    text-align:center;
    letter-spacing:15px;
    line-height:1;
}

/* DATES */
#date-arabic{
    font-size:30px;
    direction:rtl;
    text-align:center;
    font-weight:900;
    opacity:0.8;
    margin-top: -6px;
}

#date-german{
    font-size:30px;
    text-align:center;
    font-weight:900;
    opacity:0.8;
    margin-bottom: -6px;
}

/* PRAYER TIMES SECTION */
#prayer-times{
    width:70%;
    height:50%;
    display:flex;
    flex-direction:column;
    justify-content:space-evenly;
    align-items:center;
}

/* EACH ROW */
.prayer-row{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr 1fr;
    align-items:center;
    text-align:center;
    font-size:45px;
    padding:8px 35px;
    background:rgba(0,0,0,0.50);/* background style blor */
    border-radius:12px;
    letter-spacing:1px;
}

/* NEXT PRAYER HIGHLIGHT */
.prayer-row.next-prayer{
    background:rgba(36, 36, 36, 0.45);/* background style blor */
    border:1px solid white;
    box-shadow:0 0 2px white;
    transition:all 0.6s ease;
}

.prayer-row.next-prayer .prayer-time{
    color:white;
    font-weight:700;
}

/* PRAYER NAMES */
.prayer-name-de{
    font-weight:400;
    text-transform:uppercase;
    font-family:'Playfair Display', serif;
    letter-spacing:2px;
    font-size:40px;
}

.prayer-name-ar{
    font-family:'Amiri', serif;
    direction:rtl;
    font-weight:400;
    font-size:40px;
    letter-spacing:4px;
}

.prayer-time{
    font-weight:700;
    font-size:50px;
    letter-spacing:4px;
}

/* BOTTOM BAR */
#bottom-bar{
    width:70%;
    height:25%;
    display:grid;
    grid-template-columns:1fr 1fr;
    grid-template-rows:auto auto;
    gap:15px;
}

/* BOTTOM BOXES */
.bottom-box{
    background:rgba(0,0,0,0.60);/* background style blor */    
    border-radius:16px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    padding:10px;
    text-align:center;
}

/* FIRST ROW */
#jumuah-box{
    grid-column:1;
    grid-row:1;
}

#next-adhan-box{
    grid-column:2;
    grid-row:1;
}

/* SECOND ROW INFO */
#info-box{
    font-family:'Cinzel', serif;
    grid-column:1 / span 2;
    grid-row:2;
    display:flex;
    flex-direction:row;
    justify-content:center;
    align-items:center;
    gap:15px;
    white-space:nowrap;
    margin-bottom:20px;
}

/* EXTRA TEXT */
#info-box .title{
    margin:0;
    font-family:'Playfair Display', serif;
    font-size:50px;
    flex-shrink:0;
    font-weight: 800;
}

#info-box .text{
    font-family: "Noto Serif Thai", serif;
    font-size:50px;
    letter-spacing:4px;
    font-weight: 800;
    margin-bottom: -10px;
    white-space:nowrap;
}

/* TITLES */
.bottom-box .title-ar{
    font-size:40px;
    direction:rtl;
    font-weight:300;
    font-family:'Amiri', serif;
}

.bottom-box .title,
.bottom-box .prayer-name{
    font-size:30px;
    margin-bottom:5px;
    font-family:'Playfair Display', serif;
    letter-spacing:1px;
}

/* TIMES */
.bottom-box .time{
    font-size:45px;
    font-weight:300;
}

/* NEXT PRAYER NAME */
.adhan-row{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:10px;
    font-size:2px;
    font-weight:300;
}

.adhan-row .title{
    font-size:30px;
    margin:0;
}

#info-box{
    position:relative;
    overflow:hidden;
}

/* IBAN visible by default */
#iban-container{
    display:flex;
    flex-wrap: nowrap;
    justify-content:center;
    align-items:center;
    text-align: center;
    gap:6px;
    min-width:0; /* 🔥 Safari fix */
}

#iban-container .title{
    font-size:35px;
}

#iban-container #extra-text{
    font-size:35px;
    margin-bottom:-7px;

    white-space:nowrap;   
    overflow:hidden;      
    text-overflow:ellipsis;      

    max-width:100%;
}

#iban-container #extra-text{
    line-break: anywhere;
    -webkit-line-break: anywhere; /* for Safari */
}

/* ticker hidden initially */
#ticker-container{
    display:none;
    width:100%;
    overflow:hidden;
}

/* scrolling text */
#ticker-text{
    display:inline-block;
    white-space:nowrap;
    font-size:30px;
    direction:rtl;
}

#ticker-text-de{
    font-family: 'Playfair Display', serif, "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji";
    display:inline-block;
    white-space:nowrap;
    font-size:30px; 
    direction:ltr;
}

/* animation */
@keyframes scrollText{
    from{
        transform: translateX(-100%);
    }
    to{
        transform: translateX(100%);
    }
}
@keyframes scrollTextDE{
    from{
        transform: translateX(100%);
    }
    to{
        transform: translateX(-100%);
    }
}

#tasbih-container{
    width:100%;
    overflow:hidden;
    display:flex;
    align-items:center;
}

#tasbih-container #tasbih-text{
    white-space:nowrap;
    font-size: 35px;
    font-weight: 700;
    font-family:'Amiri', serif;
    direction:rtl;
    display:inline-block;
}

/* scroll animation (RIGHT → LEFT like Arabic) */
@keyframes scrollTasbih{
    from{
        transform: translateX(-100%);
    }
    to{
        transform: translateX(100%);
    }
}

/* // 3 ANIMATION: CONIC GRADIENT SPINNING BORDER */
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: true;
}

#next-adhan-box.active-iqamah{

    --angle: 0deg;

    border-radius: 16px;
    border: 2px solid rgba(255,255,255,0.2);

    background:
        conic-gradient(
        from var(--angle),
        rgba(255,255,255,0.08),
        rgba(0,0,0,0.6),
        rgba(255,255,255,0.08),
        rgba(0,0,0,0.6)
        );

    animation: rotateBg 4s linear infinite;
}

@keyframes rotateBg {
    to {
        --angle: 360deg;
    }
}

#dev-footer{
    width:70%;
    margin:5px auto 20px auto; /* center + spacing */
    
    display:flex;
    justify-content:space-between;
    align-items:center;
    
    font-family:'Inter', sans-serif;
    color:#9CA3AF;
    font-size:15px;
    font-weight: 400;
    letter-spacing: 0.2px;
    opacity:0.7;

    padding-left: 20px;
    padding-right: 20px;
    padding-top: 10px;
    
    border-top:1px solid rgba(255,255,255,0.2);
    text-decoration: none;
}
    
#dev-center{
    text-align:center;
}

#dev-center a{
    color:white;
    text-decoration:none;
    cursor: pointer;
}

#dev-right{
    display:flex;
    gap:10px;
}

.icon{
    width:32px;
    height:32px;
    border-radius:50%; /* 👈 NOT circle */
    background:rgba(255,255,255,0.15);
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
    text-decoration:none;
    transition:0.2s;
}

.icon:hover{
    background:rgba(255,255,255,0.25);
}


/* 2. TABLET */
@media (max-width: 1024px) {

    body{
        overflow:auto;
    }
    #screen{
        min-height:100vh;
        height:auto;
    }

    #top-bar{
        width:70%;
        height:25%;
        gap:0px;
    }

    #prayer-times{
        width:70%;
        height: 50%;
        gap:12px;
    }

    #bottom-bar{
        width:70%;
        height: 25%;
    }

    #prayer-times .prayer-row{
        width:100%;
        font-size:45px;
        padding:8px 35px;
    }

    #logo img{
        width:150px;
        height:150px;
        object-fit:contain;
    }

    #big-clock{
        font-size:90px;
        letter-spacing:12px;
    }

    #date-arabic,
    #date-german{
        font-size:25px;
    }

    .prayer-name-de,
    .prayer-name-ar{
        font-size:38px;
    }

    .prayer-time{
        font-size:38px;
    }

    .bottom-box .time{
        font-size:38px;
    }
    .bottom-box .title-ar{
        font-size:30px;
    }
    .bottom-box .title{
        font-size:28px;
    }

    .adhan-row .title{
        font-size:28px;
    }

    .bottom-box #iban-container .title,
    .bottom-box #iban-container #extra-text{
        font-size:35px;
    }

        #tasbih-container #tasbih-text{
        font-size:35px;
    }

}

/* 3. MOBILE */
@media (max-width: 900px){

    body{
        overflow:auto;
    }

    #screen{
        min-height:100vh;
        height:auto;
        padding:10px 0;
    }
    

    #top-bar{
        gap:3px;
    }

    #prayer-times{
        width:90%;
        height: auto;
    }
    #bottom-bar{
        width:90%;
        height:auto;
    }

    #logo img{
        width:120px;
        height:120px;
    }

    #big-clock{
        font-size:60px;
        letter-spacing:3px;
    }

    #date-arabic,
    #date-german{
        font-size:17px;
    }
    #date-german{
        margin-bottom: 10px;
    }

    #prayer-times .prayer-row{
        width:100%;
        font-size:45px;
        padding:6px 10px;
    }

    .prayer-name-de,
    .prayer-name-ar{
        font-size:23px; 
    }

    .prayer-time{
        font-size:25px;
    }
    #prayer-times{
        margin-bottom: 10px;
    }
       /* STACK EVERYTHING */

    .bottom-box .time{
        font-size:28px;
    }
    .bottom-box .title-ar{
        font-size:20px;
    }
    .bottom-box .title{
        font-size:17px;
        margin-bottom:5px;
    }

    .adhan-row .title{
        font-size:17px;
        margin-bottom:5px;
    }
    .bottom-box #iban-container {
        -webkit-touch-callout: none; /* iOS Safari */
    }
    
    .bottom-box #iban-container span{
        color: white!important;
        text-decoration: none!important;
    }
    
    .bottom-box #iban-container .title, 
    .bottom-box #iban-container #extra-text{
        font-size: 18px;
        white-space:nowrap;
        color: white!important;
        text-align:center;
        text-decoration: none;
        letter-spacing: 0px;
    }

    .bottom-box #iban-container #extra-text {
        margin-bottom: -4px;
        text-decoration: none;
        pointer-events: none;
    }


    #ticker-container #ticker-text,
    #ticker-container #ticker-text-de{
        font-size:25px;
    }
    #tasbih-container #tasbih-text{
        font-size:25px;
    }

    body #dev-footer{
        width:86%;
        padding-left: 5px;
        padding-right: 5px;
        padding-top: 10px;
    
    }

}

