html, body {
  margin: 0;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  width: 100%;
  font-family: 'SF Pro Display', sans-serif;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  color-scheme: dark;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #000000;
  color: #ffffff;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  padding-bottom: 150px;
  transition: background-color 0.3s ease, color 0.3s ease;
}
img {
  -webkit-user-drag: none;
  pointer-events: none;
}
@font-face {
  font-family: "QPC-Uthmani-Hafs";
  src: url("https://storage.googleapis.com/hadafimagesmp3/UthmanicHafs1Ver18.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000000ff;
  color: #fff;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
  overflow-y: auto;
  z-index: 100000;
  display: none;
  transition: background 0.3s ease, color 0.3s ease;
}
.screen.active {
  display: block;
}
.closescreen {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  left: 14px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.15);
  color: inherit;
  border: 1px solid rgba(239, 68, 68, 0.35);
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  z-index: 9999999999;
  
  opacity: 0;
  transform: scale(0.8) rotate(-90deg);
  transition: all 0.3s ease 0.2s;
}

.screen.active .closescreen {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.closescreen:active {
  transform: scale(0.88);
  background: rgba(239, 68, 68, 0.25);
}
.closescreen .material-symbols-outlined {
  font-size: 32px;
}

#quranAppWrapper,
#counterScreen {
  z-index: 10000;
}

.content {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background: rgba(0,0,0,1);
  padding-top: calc(env(safe-area-inset-top) + 110px);
  padding-left: 22px;
  padding-right: 22px;
  padding-bottom: 32px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: linear-gradient(to bottom,#000000 0%,#000000ec 40%,rgba(0,0,0,0) 100%);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: background 0.3s ease;
}
.title {
  margin: 0;
  padding: 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  text-align: center;
  pointer-events: none;
  transition: font-size 0.35s ease, transform 0.35s ease, opacity 0.25s ease, color 0.3s ease;
}

.container {
  margin-top: 90px;
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 15px;
  box-sizing: border-box;
}
.box {
  max-width: 100%;
  height: auto;
  padding: 15px;
  margin: 15px auto;
  background: rgba(239, 68, 68, 0.15);
  color: inherit;
  border: 1px solid rgba(239, 68, 68, 0.35);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-radius: 40px;
  display: flex;
  position: relative;
  box-sizing: border-box;
  transition: background 0.3s ease, color 0.3s ease, border 0.3s ease;
  
}
@media (min-width: 900px) {
  .container {
    margin-top: 80px;
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 15px;
    padding-left: 20px;
    padding-right: 20px;
  }
  .box {
    margin: 0;
    max-width: 100%;
    height: auto;
  }
}

.box {
  animation: pop 0.8s ease;
}

@keyframes pop {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.title-box {
  font-weight: bold;
  color: inherit;
  font-size: 16px;
  position: absolute;
  top: 15px;
  left: 15px;
  margin: 0;
  padding: 0;
  transition: color 0.3s ease;
}
.boxicon {
  font-weight: bold;
  font-size: 20px;
  position: absolute;
  bottom: 5px;
  left: 15px;
  z-index: 1;
  margin: 0;
  padding: 0;
}
.boxicon .material-symbols-outlined {
  font-size: 28px;
  color: inherit;
  font-weight: bold;
  line-height: 1;
  transition: color 0.3s ease;
}
.boxtext{
  color: inherit;
  transition: color 0.3s ease;
}
.alltext{
  color: inherit;
  transition: color 0.3s ease;
}
.allbtn {
  justify-content: center;
  background: rgba(239, 68, 68, 0.15);
  color: inherit;
  border: 1px solid rgba(239, 68, 68, 0.35);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  transition: background 0.3s ease, color 0.3s ease, border 0.3s ease;
}

.allbtn .material-symbols-outlined {
  font-size: 30px;
  color: inherit;
  transition: color 0.3s ease;
}

.allitem {
  background: rgba(239, 68, 68, 0.15);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(239, 68, 68, 0.35);
  transition: background 0.3s ease, border 0.3s ease;

  opacity: 0;
  transform: translateY(20px);
  animation: fadeItem 0.8s ease forwards;
}

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

.allist{
  background: rgba(239, 68, 68, 0.15);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f80000;
  transition: background 0.3s ease, border 0.3s ease;
}
.search {
  background: rgba(239, 68, 68, 0.15) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  backdrop-filter: blur(30px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
  outline: none;
  transition: background 0.3s ease, color 0.3s ease, border 0.3s ease !important;
}

.search::placeholder {
  color: rgba(239, 68, 68, 0.6) !important;  
  opacity: 1; 
}

.them-choose{
  position: fixed;
  top: 60px;
}


body.light-mode {
  background-color: #ffffff;
  color: #000000;
  color-scheme: light;
}

body.light-mode .screen {
  background: #ffffff;
  color: #000000;
}

body.light-mode .screen1 {
  background-color: #ffffff;
}

body.light-mode .header {
  background: linear-gradient(to bottom, #ffffff 0%, #ffffffec 40%, rgba(255,255,255,0) 100%);
}

body.light-mode .content {
  background: rgba(255, 255, 255, 1);
}

body.light-mode .box {
  background: rgba(239, 68, 68, 0.15);
  color: inherit;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

body.light-mode .title-box,
body.light-mode .boxtext,
body.light-mode .alltext {
  color: inherit;
}

body.light-mode .boxicon .material-symbols-outlined {
  color: inherit;
}

body.light-mode .closescreen {
  background: rgba(239, 68, 68, 0.15);
  color: inherit;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

body.light-mode .closescreen:active {
  background: rgba(239, 68, 68, 0.25);
}

body.light-mode .title {
  color: #000000;
}

body.light-mode .allbtn {
  background: rgba(239, 68, 68, 0.15);
  color: inherit;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

body.light-mode .allbtn .material-symbols-outlined {
  color: inherit;
}

body.light-mode .allitem {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

body.light-mode .allist {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f80000;
}

body.light-mode .search {
  background: rgba(239, 68, 68, 0.15) !important;
  color: inherit !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
}

body.light-mode .search::placeholder {
  color: rgba(239, 68, 68, 0.6) !important;
}

.them-choose {
  top: 370px;
  z-index: 1100;
  display: flex;
  gap: 10px;
  left: 50%;
  transform: translateX(-50%);
}
.them-choose button {
  border-radius: 50px;
  width: 80px;
  height: 50px;
  font-weight: bold;
  font-size: 14px;
}



.notification-setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  margin: 10px 0;
}

.setting-label {
  font-size: 16px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #db0000;
}

input:checked + .slider:before {
  transform: translateX(26px);
}




.popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.popupoverlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
}

.popupcontent {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translate(-50%);
  z-index: 2;
  width: 70%;
  max-width: 500px;
  height: 45%;
  padding: 20px 40px;
  border-radius: 50px;
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid rgba(239, 68, 68, 0.35);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
   color: #1a1a1a;
 
  text-align: center;
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.popup-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6B6B 0%, #EE5A6F 100%);
  color: #ffffff;
  font-size: 36px;
  box-shadow: 0 8px 24px rgba(255, 107, 107, 0.4);
}

.popup-icon .material-symbols-outlined {
  font-size: 36px;
}

.popup-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #c33c3c;
}

.popup-description {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 40px;
  color: #ccc;
}

.popup-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.popup-btn {
  width: 100%;
  padding: 16px 32px;
  font-size: 20px;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  color: #ffffff;
  transition: all 0.2s ease;
  border: none;
}

.popup-btn-primary:active {
  transform: translateY(0);
}

.popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}



@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    transform: translate(-50%, 40px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
  }
}



.otp-box {
  width: 46px;
  height: 56px;
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  color: #db0000;
  border: 2px solid #ddd;
  border-radius: 12px;
  background: white;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
  caret-color: transparent;
}
.otp-box:focus {
  border-color: #db0000;
  box-shadow: 0 0 0 3px rgba(219,0,0,0.15);
}
.otp-box:not(:placeholder-shown) {
  border-color: #db0000;
  background: #fff5f5;
}

/* ── OTP Area Layout ───────────────────────── */
#emailInputArea,
#otpInputArea {
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 12px;
}
#otpInputArea {
  gap: 16px;
}
.otp-boxes-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.otp-sublinks {
  display: flex;
  gap: 20px;
}
.otp-link-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
  padding: 0;
}
.otp-link-btn.red   { color: #db0000; }
.otp-link-btn.grey  { color: #888; }
.otp-hint {
  margin: 0;
  font-size: 14px;
  color: #888;
  text-align: center;
}