
/* AZURA Adaptive Polish v2 — distinct desktop/mobile layers */
:root{
  --az-surface-1: rgba(255,255,255,.045);
  --az-surface-2: rgba(255,255,255,.07);
  --az-line-1: rgba(255,255,255,.08);
  --az-line-2: rgba(120,245,255,.16);
  --az-soft-shadow: 0 18px 40px rgba(0,0,0,.26);
  --az-strong-shadow: 0 26px 70px rgba(0,0,0,.36);
}

body.az-device-desktop{
  --page-gutter: 28px;
}

body.az-device-mobile{
  --page-gutter: 14px;
}

body.az-device-desktop .main-content{
  padding-inline: clamp(18px, 2.2vw, 34px);
}

body.az-device-desktop .desktop-topbar{
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(9,11,19,.82), rgba(9,11,19,.58));
  border-bottom: 1px solid rgba(255,255,255,.06);
}

body.az-device-desktop .page{
  padding-bottom: 28px;
}

body.az-device-desktop .page.active .main-content > *{
  max-width: min(1440px, calc(100vw - 72px));
  margin-inline: auto;
}

body.az-device-desktop .card,
body.az-device-desktop .manga-card,
body.az-device-desktop .profile-menu-card,
body.az-device-desktop .profile-uid-card,
body.az-device-desktop .profile-stats-ribbon,
body.az-device-desktop .az-admin-users-pro .az-user-card{
  border-radius: 24px !important;
  box-shadow: var(--az-soft-shadow);
}

body.az-device-desktop .profile-hero-wrap{
  margin-top: 12px;
  border-radius: 28px;
  overflow: clip;
  box-shadow: var(--az-strong-shadow);
}

body.az-device-desktop .mobile-bottom-nav{
  display: none !important;
}

body.az-device-mobile{
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(120,245,255,.08), transparent 60%),
    linear-gradient(180deg, #090a11 0%, #0b0d16 100%);
}

body.az-device-mobile .desktop-topbar{
  display: none !important;
}

body.az-device-mobile .mobile-topbar{
  position: sticky !important;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(8,9,16,.88), rgba(8,9,16,.64));
  border-bottom: 1px solid rgba(255,255,255,.05);
}

body.az-device-mobile .page{
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 88px);
}

body.az-device-mobile .main-content{
  padding-inline: 14px;
}

body.az-device-mobile .page.active .main-content > *{
  max-width: 100%;
}

body.az-device-mobile .profile-hero-wrap{
  margin-top: 4px;
  border-radius: 20px;
  overflow: clip;
}

body.az-device-mobile .profile-stats-ribbon{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: -18px;
  position: relative;
  z-index: 2;
  background: transparent !important;
  box-shadow: none !important;
}

body.az-device-mobile .profile-stat-cell{
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 14px 30px rgba(0,0,0,.24);
}

body.az-device-mobile .profile-menu-section{
  margin-top: 12px;
}

body.az-device-mobile .profile-menu-card{
  min-height: 56px;
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: none;
}

body.az-device-mobile .profile-menu-card-arrow{
  opacity: .55;
}

body.az-device-mobile .mobile-bottom-nav{
  display: flex !important;
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  z-index: 90;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(9,11,19,.82);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
  box-shadow: 0 18px 50px rgba(0,0,0,.34);
}

body.az-device-mobile .bot-nav-item,
body.az-device-mobile .bot-add-btn{
  min-width: 0;
}

body.az-device-mobile .bot-add-btn{
  display: grid !important;
  place-items: center;
  gap: 2px;
  transform: none !important;
}

body.az-device-mobile .bot-nav-label{
  font-size: 10px;
}

body.az-device-mobile .bot-add-btn .bot-nav-icon{
  display: grid;
  place-items: center;
}

body.az-small-phone .mobile-bottom-nav{
  left: 8px;
  right: 8px;
  border-radius: 20px;
}

body.az-small-phone .bot-nav-label{
  font-size: 9px;
}

body.az-small-phone .profile-menu-card{
  padding: 13px 14px;
}

.az-bn-video-wrap{
  position: relative;
  isolation: isolate;
}

.az-bn-video-wrap video{
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  background: #080a12;
}

.az-bn-video-wrap::after{
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 32%;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.28));
  pointer-events: none;
  z-index: 1;
}

.az-bn-audio-btn{
  z-index: 5 !important;
  bottom: 12px !important;
  right: 12px !important;
  border-radius: 999px !important;
  background: rgba(8,10,18,.72) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  backdrop-filter: blur(14px);
  min-height: 40px;
  padding-inline: 12px !important;
  box-shadow: 0 10px 26px rgba(0,0,0,.32);
}

.az-bn-audio-btn.active{
  background: rgba(120,245,255,.18) !important;
  border-color: rgba(120,245,255,.28) !important;
}

.az-bn-media,
.az-bn-wrap,
.azura-banner-item{
  border-radius: inherit;
}

#auth-modal .azura-modal-box{
  width: min(94vw, 480px);
  max-height: min(88vh, 900px);
  overflow: auto;
  overscroll-behavior: contain;
}

.az-auth-pass-wrap{
  position: relative;
}

.az-auth-pass-toggle{
  position: absolute;
  right: 12px;
  top: 50%;
  translate: 0 -50%;
  height: 36px;
  min-width: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  color: var(--text-muted, #c8ced8);
  cursor: pointer;
}

.az-auth-pass-wrap .azura-input{
  padding-right: 54px;
}

.az-login-helper,
.az-register-helper{
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted, #b7bfd0);
  line-height: 1.5;
}

.az-strength{
  margin-top: 10px;
}

.az-strength-bar{
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.06);
}

.az-strength-fill{
  width: 12%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff647e, #f0d068);
  transition: width .2s ease;
}

.az-strength-label{
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted, #b7bfd0);
}

.az-last-login-chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  cursor: pointer;
  font-size: 12px;
  color: var(--text, #eef1f7);
}

.az-profile-tools{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

.az-profile-tool{
  min-height: 58px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.07);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  color: var(--text, #eef1f7);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(0,0,0,.24);
}

.az-profile-tool b{
  display: block;
  font-size: 14px;
}

.az-profile-tool span{
  display: block;
  font-size: 11px;
  color: var(--text-muted, #b7bfd0);
}

.az-tool-icon{
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(120,245,255,.14);
  color: #8ff6ff;
  flex: 0 0 auto;
}

.az-account-modal{
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2,4,8,.72);
  backdrop-filter: blur(12px);
}

.az-account-modal.open{
  display: flex;
}

.az-account-card{
  width: min(100%, 660px);
  max-height: min(90vh, 900px);
  overflow: auto;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(11,13,21,.96), rgba(8,10,17,.98));
  box-shadow: 0 26px 80px rgba(0,0,0,.42);
}

.az-account-head{
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 20px 22px 16px;
  background: linear-gradient(180deg, rgba(11,13,21,.98), rgba(11,13,21,.88));
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.az-account-head h3{
  margin: 0;
  font-size: 22px;
}

.az-account-head p{
  margin: 6px 0 0;
  color: var(--text-muted, #b7bfd0);
  font-size: 13px;
}

.az-account-close{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: var(--text, #eef1f7);
  cursor: pointer;
}

.az-account-body{
  padding: 20px 22px 22px;
  display: grid;
  gap: 16px;
}

.az-account-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}

.az-account-field{
  display: grid;
  gap: 8px;
}

.az-account-field.full{
  grid-column: 1 / -1;
}

.az-account-field label{
  font-size: 12px;
  color: var(--text-muted, #b7bfd0);
}

.az-account-field input,
.az-account-field textarea{
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: var(--text, #eef1f7);
  padding: 14px 15px;
  outline: none;
}

.az-account-field textarea{
  min-height: 110px;
  resize: vertical;
}

.az-account-preview{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
}

.az-account-avatar{
  width: 62px;
  height: 62px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(120,245,255,.22), rgba(139,123,255,.24));
}

.az-account-avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.az-account-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
}

.az-account-actions button{
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
}

.az-btn-soft{
  background: rgba(255,255,255,.04);
  color: var(--text, #eef1f7);
}

.az-btn-primary-2{
  background: linear-gradient(135deg, rgba(120,245,255,.26), rgba(139,123,255,.28));
  color: #f8fbff;
}

#azura-cloud-sync{
  font-size: 20px;
}

button,
.btn-outline,
.btn-primary,
.profile-menu-card,
.az-au-sync,
.az-user-actions button,
.az-coin-line button{
  touch-action: manipulation;
}

body.az-device-mobile #azura-cloud-sync{
  bottom: calc(env(safe-area-inset-bottom, 0px) + 94px) !important;
  top: auto !important;
}

#az-performance-chip{
  display: none !important;
}

@media (max-width: 820px){
  .az-profile-tools{
    grid-template-columns: 1fr;
  }
  .az-account-modal{
    align-items: flex-end;
    padding: 8px;
  }
  .az-account-card{
    width: 100%;
    max-height: 92vh;
    border-radius: 24px 24px 0 0;
  }
  .az-account-grid{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px){
  .az-bn-audio-btn{
    min-height: 36px;
    padding-inline: 10px !important;
  }
  .az-bn-audio-label{
    display: none;
  }
  .az-account-head{
    padding: 16px 16px 14px;
  }
  .az-account-body{
    padding: 16px;
  }
}

.az-owner-login-helper{
  margin-top: 12px;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  padding:10px 12px;
  border-radius:16px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.06);
}
.az-owner-login-helper span{
  font-weight:800;
  color:var(--gold-light);
}
.az-owner-login-helper code{
  padding:4px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.06);
}
.az-owner-login-helper button{
  margin-left:auto;
  border:0;
  border-radius:12px;
  padding:8px 10px;
  background:linear-gradient(135deg,#78f5ff,#8b7bff);
  color:#09111a;
  font-weight:900;
  cursor:pointer;
}
