#bottom-bar {
  position: fixed;
  bottom: 0;
  top: auto;
  left: 0;
  right: 0;
  width: 100%;
  height: calc(env(safe-area-inset-bottom, 0px) + 83px);
  z-index: 100000;
  background: rgba(0, 0, 0, 0.88);
  border: none;
  border-top: 1px solid rgba(128, 128, 128, 0.25);
  border-radius: 0;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding: 16px 8px calc(env(safe-area-inset-bottom, 0px) + 30px) 8px;
  box-sizing: border-box;
  opacity: 1;
  transition: background 0.3s ease, border 0.3s ease, opacity 0.2s ease, transform 0.2s ease;
}

body:has(#screen-athkar[style*="display: flex"]) #bottom-bar,
body:has(#inboxScreen[style*="display: flex"]) #bottom-bar,
body:has(#accountscreen[style*="display: flex"]) #bottom-bar {
  z-index: 100001;
}

body:has(#chatScreen[style*="display: flex"]) #bottom-bar {
  z-index: 1000001;
}

body:has(#screen-sabah[style*="display: flex"]) #bottom-bar,
body:has(#screen-massa[style*="display: flex"]) #bottom-bar,
body:has(#screen-naum[style*="display: flex"]) #bottom-bar,
body:has(#screen-ruqyah[style*="display: flex"]) #bottom-bar,
body:has(#screen-admin[style*="display: flex"]) #bottom-bar,
body:has(#screen-after-salah[style*="display: flex"]) #bottom-bar,
body:has(#screen-athan[style*="display: flex"]) #bottom-bar,
body:has(#screen-wudu[style*="display: flex"]) #bottom-bar,
body:has(#screen-masjid[style*="display: flex"]) #bottom-bar,
body:has(#screen-food[style*="display: flex"]) #bottom-bar,
body:has(#screen-travel[style*="display: flex"]) #bottom-bar,
body:has(#screen-manzil[style*="display: flex"]) #bottom-bar,
body:has(#screen-custom-athkar[style*="display: flex"]) #bottom-bar,
body:has(#screen-edit-custom[style*="display: flex"]) #bottom-bar,
body:has(#screen-custom-session[style*="display: flex"]) #bottom-bar,
body:has(#screen-extend-builtin[style*="display: flex"]) #bottom-bar {
  z-index: 100000;
}

#screen-athkar,
#inboxScreen,
#accountscreen,
#chatScreen {
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 100px) !important;
}

#viewer.screen,
#chatsScreen,
#chatScreen {
  display: none;
}

#viewer.screen[style*="display: flex"]~body #bottom-bar,
body:has(#viewer[style*="display: flex"]) #bottom-bar,
body:has(#quranAppWrapper[style*="display: flex"]) #bottom-bar,
body:has(#khatmaScreen[style*="display: flex"]) #bottom-bar,
body:has(#khatmaStatsScreen[style*="display: flex"]) #bottom-bar,
body:has(#khatmaManageScreen[style*="display: flex"]) #bottom-bar,
body:has(#homeQuickMenuScreen[style*="display: flex"]) #bottom-bar,
body:has(#qrScanScreen[style*="display: flex"]) #bottom-bar,
body:has(#avatarViewScreen[style*="display: flex"]) #bottom-bar,
body:has(#shareProfileScreen[style*="display: flex"]) #bottom-bar,
body:has(#counterScreen[style*="display: flex"]) #bottom-bar,
body:has(#duaaScreen[style*="display: flex"]) #bottom-bar,
body:has(#dailyAyahScreen[style*="display: flex"]) #bottom-bar,
body:has(#athanScreen[style*="display: flex"]) #bottom-bar {
  opacity: 0 !important;
  pointer-events: none;
  transform: translateY(100px) scale(0.8) !important;
}

#bottom-bar button {
  flex: 1;
  max-width: 90px;
  background: none;
  border: none;
  padding: 0;
  margin: 0 2px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

#bottom-bar button:active {
  transform: scale(0.94);
}

#bottom-bar button .material-symbols-outlined {
  font-size: 26px;
  color: rgba(255, 255, 255, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
  border-radius: 999px;
  background: transparent;
  transition: color 0.2s ease, background 0.25s ease, padding 0.25s ease;
}

.bottom-bar-icon-wrap {
  position: relative;
  display: inline-flex;
}

.bottom-bar-icon-wrap .home-inbox-dot {
  top: 4px;
  right: -2px;
  border-color: #000000;
}

body.light-mode .bottom-bar-icon-wrap .home-inbox-dot {
  border-color: #ffffff;
}

#bottom-bar button .bottom-bar-ai-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  transition: width 0.2s ease, height 0.2s ease;
}

#bottom-bar button.active {
  background: transparent;
  transition: background 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#bottom-bar button.active .material-symbols-outlined {
  color: #fff;
  background: #ef4444;
  padding: 4px 18px;
  border-radius: 999px;
  font-variation-settings: "FILL" 1, "wght" 600;
  animation: tabIconPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#bottom-bar button.active .bottom-bar-ai-icon {
  background: #ef4444;
  padding: 7px;
  border-radius: 999px;
  box-sizing: content-box;
  animation: tabIconPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tabIconPop {
  0% {
    transform: scale(0.75);
  }

  60% {
    transform: scale(1.25);
  }

  100% {
    transform: scale(1);
  }
}

body.light-mode #bottom-bar {
  background: rgba(255, 255, 255, 0.88);
  border: none;
  border-top: 1px solid rgba(128, 128, 128, 0.25);
}

body.light-mode #bottom-bar button .material-symbols-outlined {
  color: rgba(0, 0, 0, 0.5);
}

body.light-mode #bottom-bar button.active {
  background: transparent;
}

body.light-mode #bottom-bar button.active .material-symbols-outlined {
  color: #fff;
  background: #ef4444;
}

body.light-mode #bottom-bar button.active .bottom-bar-ai-icon {
  background: #ef4444;
}

#athanScreen {
    z-index: 1000000;
}

.athan-np-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    cursor: pointer;
}

.athan-np-card:active {
    transform: scale(0.98);
}

.athan-np-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.athan-np-icon .material-symbols-outlined {
    font-size: 25px;
    color: rgb(220, 60, 60);
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 48;
    animation: athanGlow 2.5s ease-in-out infinite, athanFloat 3s ease-in-out infinite;
}

.athan-np-main {
    flex: 1;
    min-width: 0;
}

.athan-np-label {
    font-size: 12px;
    font-weight: 600;
    color: rgb(210, 120, 120);
    margin-bottom: 3px;
}

.athan-np-name {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.athan-np-time {
    font-size: 12px;
    opacity: 0.55;
    margin-top: 2px;
}

.athan-np-divider {
    width: 1px;
    align-self: stretch;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.athan-np-clock-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.athan-np-clock-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.athan-np-clock-icon-wrap .material-symbols-outlined {
    font-size: 15px;
    color: rgb(220, 60, 60);
}

.athan-np-countdown {
    font-size: 18px;
    font-weight: 800;
    color: rgb(230, 70, 70);
    line-height: 1.1;
    white-space: nowrap;
}

.athan-np-remaining {
    font-size: 10px;
    opacity: 0.5;
    margin-top: 2px;
    white-space: nowrap;
}

.athan-np-chevron {
    font-size: 20px;
    opacity: 0.35;
    flex-shrink: 0;
}

body.light-mode .athan-np-divider {
    background: rgba(0, 0, 0, 0.1);
}

.athan-screen-wrap {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    margin-top: 0;
    margin-bottom: 40px;
}

.athan-hero {
    width: 100%;
    border-radius: 50px;
    padding: 20px;
    box-sizing: border-box;
    margin-bottom: 18px;
}

.athan-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.athan-hero-label {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.55;
    margin-bottom: 8px;
}

.athan-hero-name {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
}

.athan-hero-time {
    font-size: 16px;
    opacity: 0.7;
    margin-top: 6px;
}

.athan-hero-icon {
    font-size: 54px;
    color: rgb(180, 41, 41);
    flex-shrink: 0;
}

.athan-hero-countdown {
    width: 100%;
    text-align: center;
    margin-top: 18px;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 2px;
}

.athan-pray-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.athan-item {
    width: 100%;
    border-radius: 50px;
    padding: 16px 18px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 14px;
}

.athan-item.active-prayer {
    background-color: rgba(255, 0, 0, 0.4);
    border-color: rgba(255, 0, 0, 0.4);
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.3);
}

body.light-mode .athan-item.active-prayer {
    background-color: rgba(255, 0, 0, 0.4);
    border-color: rgba(184, 19, 19, 0.6);
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.5);
}

.athan-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.athan-item-icon .material-symbols-outlined {
    font-size: 26px;
    color: inhert;
}

.athan-item-info {
    flex: 1;
    min-width: 0;
}

.athan-item-name {
    font-size: 17px;
    font-weight: 700;
    opacity: 0.95;
}

.athan-item-sub {
    font-size: 12px;
    margin-top: 4px;
    opacity: 0.55;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.athan-item-time {
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

@keyframes athanGlow {

    0%,
    100% {
        text-shadow: 0 0 6px rgba(180, 41, 41, 0.4);
        opacity: 0.6;
    }

    50% {
        text-shadow: 0 0 20px rgba(220, 50, 50, 0.9), 0 0 40px rgba(180, 41, 41, 0.5);
        opacity: 1;
    }
}

@keyframes athanFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }
}


.athan-date-label {
    text-align: center;
    font-size: 14px;
    opacity: 0.55;
    margin-bottom: 16px;
}

.athan-week-strip {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 22px;
}

.athan-week-day {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    padding: 4px 0;
    cursor: pointer;
    font-family: inherit;
}

.athan-week-dayname {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.45;
}

.athan-week-daynum {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    opacity: 0.9;
    transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.athan-week-day.active .athan-week-dayname {
    opacity: 0.85;
}

.athan-week-day.active .athan-week-daynum {
    background: rgb(200, 30, 30);
    color: #fff;
    opacity: 1;
}

#location-now {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    border: none;
    background: rgba(239, 68, 68, 0.22);
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 8px;
    transition: transform 0.15s ease;
}

#location-now .material-symbols-outlined {
    font-size: 20px;
}

#location-now:active {
    transform: scale(0.9);
}

.athan-location-current {
    width: 100%;
    font-size: 13px;
    opacity: 0.6;
    padding: 0 8px;
    margin-bottom: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.athan-location-results {
    display: none;
    width: 100%;
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 18px;
    box-sizing: border-box;
}

.athan-location-results.open {
    display: block;
}

.location-item {
    width: 100%;
    height: 55px;
    border-radius: 50px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    padding: 0 20px;
    margin-bottom: 10px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.holy-cities-wrap {
    display: flex;
    gap: 14px;
}

.holy-city-card {
    flex: 1;
    min-width: 0;
    padding: 18px 16px;
    border-radius: 32px;
    display: flex;
    flex-direction: column;
}

.holy-city-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.holy-city-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    background: rgba(239, 68, 68, 0.15);
}

.holy-city-heading {
    min-width: 0;
}

.holy-city-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.holy-city-sub {
    font-size: 10px;
    opacity: 0.5;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.holy-city-times {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.holy-time-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 6px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.holy-time-row.active {
    background: rgba(239, 68, 68, 0.14);
}

.holy-time-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.holy-time-icon {
    font-size: 15px;
    opacity: 0.55;
    flex-shrink: 0;
}

.holy-time-row.active .holy-time-icon {
    opacity: 1;
    color: rgb(200, 30, 30);
}

.holy-time-name {
    font-size: 13px;
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.holy-time-row.active .holy-time-name {
    opacity: 1;
    font-weight: 700;
}

.holy-time-value {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.holy-time-loading {
    font-size: 12px;
    opacity: 0.45;
    padding: 10px 6px;
}

#qrScanScreen {
  background: #000;

  z-index: 2000000;
}

#qrScanScreen .closescreen {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: 14px;
  z-index: 5;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 160ms ease-out, background 0.2s ease;
}

#qrScanScreen .closescreen:active {
  transform: scale(0.94);
  background: rgba(0, 0, 0, 0.65);
}

#qrScanVideoWrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

#qrScanVideo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#qrScanOverlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.55) 100%);
}

#qrScanFrame {
  position: relative;
  width: 240px;
  height: 240px;
  border-radius: 24px;
}

.qr-scan-corner {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 3px solid #ef4444;
}

.qr-scan-corner-tl {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: 16px;
}

.qr-scan-corner-tr {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
  border-top-right-radius: 16px;
}

.qr-scan-corner-bl {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
  border-bottom-left-radius: 16px;
}

.qr-scan-corner-br {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
  border-bottom-right-radius: 16px;
}

#qrScanHint {
  margin: 0;
  padding: 0 32px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
}

#qrScanPermissionState {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 36px;
  text-align: center;
}

#qrScanPermissionState .material-symbols-outlined {
  font-size: 46px;
  color: rgba(255, 255, 255, 0.55);
}

#qrScanPermissionText {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
}

#qrScanRetryBtn {
  margin-top: 6px;
  padding: 12px 28px;
  border: none;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 160ms ease-out;
}

#qrScanRetryBtn:active {
  transform: scale(0.96);
}
