 /* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}
@font-face {
  font-family: "Barokah";
  src: url("../data/Al Barokah.otf") format("truetype");
  font-display: swap;
}

/* FORCE LANDSCAPE */
html, body {
  width: 100vw;
  height: 100vh;
  background: #ffffff;
  overflow: hidden;
  background: url("https://rumahrakyat.id/sholat/assets/img/malam.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  touch-action: manipulation !important;
  pointer-events: auto !important;
  user-select: auto !important;
}

* {
  pointer-events: auto !important;
  touch-action: manipulation !important;
}


/* APP SCALE (ANTI LAYOUT SHIFT) */
.app {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: 18vh auto 14vh 6vh;
}

/* ================= HEADER ================= */
.header {
  display: grid;
  grid-template-columns: 21% 4vw 50% 4vw 20%;
  align-items: center;
  height: 18vh;
  padding: 0 2vw;              /* OVERSCAN SAFE */
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  border-radius: 0 0 1.5vh 1.5vh;
}



.header-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.header-separator img {
  max-height: 70%;      /* KUNCI KE HEADER */
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}


.header-left {
  text-align: center;
}

.clock {
  font-size: 6vw;
  font-weight: 800;
  color: #ffffff;
}
.clock-blink {
  animation: minuteBlink 0.6s ease;
}
#clock .sep {
  display: inline-block;
  width: 2vw;        /* ← ini kuncinya */
  text-align: center;
  animation: blinkColon 1s steps(1) infinite;
  opacity: 0.9;
  font-weight: inherit;
  font-weight: 700;
  line-height: 1;
  letter-spacing: normal !important;
  position: relative;
}


@keyframes blinkColon {
  0%   { opacity: 1; }
  50%  { opacity: 0; }
  100% { opacity: 1; }
}

.header-center {
  text-align: center;
}

.masjid-name {
  font-size: 3.5vw;
  font-weight: 500;
  letter-spacing: 0.2vw;
  color: #ffffff;
  font-family: "Barokah";
  transform: scaleY(1.0);
}

.masjid-city {
  font-size: 1.5vw;
  color: #eaeaea;
}


.header-right {
  text-align: center;
  color: #ffffff;
}

.hijri-date {
  font-size: 1.7vw;
  font-weight: 500;
}

.masehi-date {
  font-size: 1.3vw;
  font-weight: 300;
}


/* ================= CONTENT ================= */
.content {
  display: grid;
  grid-template-columns: 20% auto;
}

/* LEFT INFO */
.left-info {
  padding: 2vh 1vw;
  display: flex;          /* GANTI GRID → FLEX */
  flex-direction: column;
  gap: 1vh;
}


.info-card {
  background: rgba(255, 215, 0, 0.90);
  border-radius: 1vw;
  overflow: hidden;
  height: auto;           /* PASTI AUTO */
}
#islamic-event-float{
  color: #fff;
  text-align: center;
  font-size: 2vw;
  font-weight: 600;
}
#islamic-event-float.hidden{ display:none; }

#islamic-event-float .card-top{
  text-align: center;
  font-size: 2.2vw;
  font-weight: bold;
  line-height: 1.2;
}
#islamic-event-float .card-bottom{
  text-align: center;
  font-size: 1.6vw;
  line-height: 1.2;
}
#islamic-event-float .countdown{
  color:white;
  font-weight:700;
}

.info-title {
  background: rgba(255, 140, 0, 0.90);
  color: #fff;
  text-align: center;
  font-size: 1.5vw;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1vh 1vh;
}


.info-value {
  text-align: center;
  font-size: 3.5vw;
  font-weight: 400;
  line-height: 1.1;       /* CEGAH SPACE KOSONG */
  padding: 1vh 1vh;
}


.info-text {
  text-align: center;
  font-size: 2.2vw;
  font-weight: bold;
  line-height: 1.2;
}

.info-sub {
  text-align: center;
  color: black;
  line-height: 1.2;
}
.info-sub.top {
  font-size: 1.2vw;
  font-weight: 400;
  padding-top: 1vh;
}
.info-sub.center {
  font-size: 1.1vw;
  font-weight: 500;
}

.info-sub.small {
  font-size: 1vw;
  font-weight: 600;
  padding-bottom: 1vh;
}


/* MAIN EMPTY AREA */
.main-display {
}

/* ================= FOOTER ================= */
.footer {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.1vw;
  padding: 0 0.5vw;
}

.footer-card {
  background: rgba(0, 0, 0, 0.50);   /* transparan */
  backdrop-filter: blur(0.25vw);
  -webkit-backdrop-filter: blur(5vw);    /* Safari */
  border-radius: 1vw 1vw 0 0;
  text-align: center;
  font-size: 1.5vw;
  color: white;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-shadow:
    0 0 10px rgba(0,0,0, 0.3);
}
.footer-card::before {
  content: "";
  position: absolute;
  bottom: 0.2vh;
  left: 10%;
  right: 10%;
  height: 1vh;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255,1),
    transparent
  );

  border-radius: 2vh;
}


.footer-card span {
  font-size: 2.5vw;
}

/* ================= RAINBOW ACTIVE FOOTER ================= */
.footer-card.active{
  position: relative;
  background: rgba(255, 140, 0,0.8);
  background-size: 1600% 1600%;
}
.footer-card.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 1vh;
  color: black;
  font-weight: bold;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 0,1),
    transparent
  );

  border-radius: 2vh;
}

.footer-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.footer-separator img {
  max-height: 50%;      /* KUNCI KE HEADER */
  max-width: 50%;
  width: auto;
  height: auto;
  object-fit: contain;
}


/* TEKS LEBIH TAJAM */
.footer-card.active span{
  text-shadow:
    0 0 10px rgba(0,0,0,0.5),
    0 0 20px rgba(0,0,0,0.2);
}
/* ===========================
   RUNNING TEXT PROFESIONAL
=========================== */

.running-text {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 60;
  pointer-events: none;
}

/* SHAPE BACKGROUND */
.marquee {
  position: relative;
  overflow: hidden;

  background: linear-gradient(
    135deg,
    rgba(15, 40, 90, 1),
    rgba(10, 25, 55, 0.3)
  );

  backdrop-filter: blur(1vh);
  border-radius: 0;
  padding: 1.6vh 0;
}

/* TRACK */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}

/* TEXT */
.running-text span {
  white-space: nowrap;
  font-size: 2.4vh;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
  padding-right: 1vw;
  letter-spacing: 0.1vw;
  transform: scaleY(1.6);
}

/* ANIMATION */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}



/* ================= MOBILE SAFETY ================= */
@media (max-width: 768px) {
  .header-left { font-size: 10vw; }
  .masjid-name { font-size: 6vw; }
}

#clock .sep {
  display: inline-block;
  width: 2vw;              /* stabil, tidak geser */
  text-align: center;
  animation: blinkColon 1s steps(1) infinite;
  opacity: 1;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0 !important;
}
@keyframes blinkColon {
  0%   { opacity: 1; }
  50%  { opacity: 0; }
  100% { opacity: 1; }
}

/* ===== SETTING BUTTON ===== */

#setting-btn{
  position:fixed;
  right:1vw;
  top:1vh;
  z-index:9999;
  background:rgba(255, 255, 0, 0.30);
  color:#fff;
  border:none;
  width:2.5vw;
  height:5vh;
  border-radius:50%;
  font-size:1.5vw;
  cursor:pointer;
}

.setting{
  position:fixed;
  right:15px;
  bottom:70px;
  width:260px;
  max-width: 90%;
  max-height: 80%;
  background:lightgreen;
  border-radius:10px;
  padding:15px;
  z-index:9999;
  box-shadow:0 10px 30px rgba(0,0,0,.2);
}
.hidden{
  display: none !important;
}

.setting.hidden{ display:none; }

.setting h3{
  margin-top:0;
  font-size:16px;
  text-align:center;
  color: black;
}

.setting label{
  font-size:12px;
  margin-top:8px;
  display:block;
  color: black;
}

.setting input,
.setting select{
  width:100%;
  padding:6px;
  margin-top:4px;
  border-radius: 5px;
  border: 0;
}

.setting-actions{
  display:flex;
  gap:6px;
  margin-top:10px;
}
.setting-actions button{
  flex:1;
  padding:6px;
  border-radius: 5px;
  border: 0;
  box-shadow:0 5px 10px rgba(0,0,0,.2);
  background: blue;
  color: white;
}

#set-city{
  height:40px;
}
#city-search{
  width:100%;
  padding:6px;
  margin-bottom:6px;
  border-radius:5px;
  border:0;
}

/* ===========================
   ADZAN SCREEN (FINAL CLEAN)
=========================== */

.adzan-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  
}



/* ===== FRAME ===== */
.adzan-frame-box {
  position: relative;
  width: 90%;

  z-index: 2; /* di atas blur */
}

.adzan-frame-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== TEXT DI DALAM FRAME ===== */
.adzan-text {
  position: absolute;
  inset: 0;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;
  color: #000;
}

.adzan-text h2 {
  font-size: 32px;
  margin-bottom: 10px;
}

.adzan-text h1 {
  font-size: 64px;
  font-weight: 800;
  margin-bottom: 10px;
}

.adzan-text p {
  font-size: 28px;
}

@keyframes adzanFocusBlink {
  0% {
    opacity: 1;
    color: #1e3a8a; /* biru tua */
  }

  20% {
    opacity: 0.85;
    color: #4c1d95; /* ungu gelap */
  }

  40% {
    opacity: 0.9;
    color: #065f46; /* hijau gelap */
  }

  60% {
    opacity: 1;
    color: #facc15; /* KUNING EMAS (FOCUS) */
  }

  75% {
    opacity: 0.85;
    color: #1e293b; /* abu gelap */
  }

  100% {
    opacity: 1;
    color: #1e3a8a; /* balik biru */
  }
}

.adzan-focus {
  animation: adzanFocusBlink 1.6s ease-in-out infinite;
  font-weight: 800;
  letter-spacing: 2px;
}



/* ===== HIDE / SHOW ===== */
.hidden {
  display: none !important;
}

.tarhim-screen{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998; /* di bawah adzan */
}

.tarhim-box{
  text-align: center;
  color: #ffd54f;
}

.tarhim-box h1{
  font-size: 60px;
  margin-bottom: 10px;
}

.tarhim-box p{
  font-size: 26px;
  color: #fff;
}

.hidden{
  display: none;
}
#tarhim-countdown{
  font-size: 100px;
  font-weight: 800;
  letter-spacing: 4px;
  color: yellow;
  margin-bottom: 10px;
}


/* ==============================
   ADZAN SCREEN OVERLAY
============================== */

#adzanOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 999999;
  display: none;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.adzan-box {
  color: white;
  padding: 40px;
  border-radius: 20px;
}

.adzan-box h1 {
  font-size: 60px;
  margin-bottom: 20px;
}

.adzan-box h2 {
  font-size: 90px;
  margin-bottom: 20px;
  color: gold;
}

.adzan-box p {
  font-size: 28px;
}
