
/* ========== MetaQuantum WebOS Base ========== */

body {
  background: #050d18;
  color: #fff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  display: block;
  -webkit-overflow-scrolling: touch; /* سلاسة في السحب باللمس */
}

body.mq-scroll-locked {
  position: fixed;
  width: 100%;
  overflow: hidden;
  left: 0;
  right: 0;
  height: 100%;
}

/* ========== Modal Framework ========== */

.webos-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vh, 48px) clamp(16px, 4vw, 48px);
  box-sizing: border-box;
  background: transparent;
  z-index: 10020;
}

.webos-modal.hidden {
  display: none;
}

.webos-modal__panel {
  position: relative;
  pointer-events: auto;
  width: min(100%, 960px);
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  border-radius: 24px;
}

.webos-modal__panel--wide {
  width: min(100%, 640px);
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.webos-modal__panel--narrow,
.webos-modal__panel--download {
  background: radial-gradient(circle at top, rgba(0,30,50,0.96), rgba(0,10,20,0.9));
  border: 1px solid rgba(0, 255, 255, 0.15);
  box-shadow: 0 0 40px rgba(0,255,255,0.14), inset 0 0 10px rgba(0,255,255,0.05);
  color: #e0faff;
}

.webos-modal__panel--narrow {
  width: min(420px, 100%);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.webos-modal__panel--narrow form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.webos-modal__panel--download {
  width: min(520px, 100%);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: center;
}

.webos-modal__panel--narrow h2,
.webos-modal__panel--download h2 {
  margin: 0;
  font-size: 1.35rem;
  color: #00f6ff;
  text-shadow: 0 0 6px rgba(0, 246, 255, 0.45);
}

.webos-modal__panel--narrow p,
.webos-modal__panel--download p {
  margin: 0;
  color: #b8e8ff;
  font-size: 0.95rem;
  line-height: 1.5;
}

.webos-modal__panel--narrow input[type="password"],
.webos-modal__panel--narrow input[type="text"],
.webos-modal__panel--narrow textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 255, 0.2);
  background: rgba(0, 20, 35, 0.85);
  color: #e8faff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.webos-modal__panel--narrow input:focus,
.webos-modal__panel--narrow textarea:focus {
  border-color: rgba(0, 246, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(0, 246, 255, 0.2);
}

.webos-modal .modal-close {
  position: absolute;
  top: clamp(16px, 2.5vw, 24px);
  right: clamp(16px, 2.5vw, 24px);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: rgba(0, 246, 255, 0.18);
  color: #00f6ff;
  font-size: 1.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0, 246, 255, 0.2);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.webos-modal .modal-close:hover {
  background: rgba(0, 246, 255, 0.3);
  box-shadow: 0 0 16px rgba(0, 246, 255, 0.28);
  transform: scale(1.05);
}

.webos-modal .modal-close:focus-visible {
  outline: 2px solid rgba(0, 246, 255, 0.8);
  outline-offset: 2px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 18px;
}

.modal-error {
  display: none;
  color: #ff6b6b;
  font-size: 0.9rem;
  margin-top: 6px;
}

.modal-error:not(:empty) {
  display: block;
}

.modal-btn {
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.modal-btn--primary {
  background: linear-gradient(135deg, #00d6ff, #7afcff);
  color: #002133;
  box-shadow: 0 10px 26px rgba(0, 214, 255, 0.25);
}

.modal-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(0, 214, 255, 0.3);
}

.download-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-width: 360px;
  margin: 0 auto 12px;
  width: 100%;
}

.download-copy {
  font-size: 0.95rem;
  color: #b0dfff;
  margin-bottom: 18px;
  max-width: 520px;
  margin-inline: auto;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 16, 28, 0.68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  z-index: 10010;
  transition: opacity 0.2s ease;
  opacity: 0;
}

.modal-backdrop.visible {
  display: block;
  opacity: 1;
}

/* === Neo login card === */
.auth-card-shell {
  position: relative;
  width: 100%;
  max-width: 760px;
  flex: 0 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(18px, 4vw, 32px);
  margin: 0 auto;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: clamp(440px, 52vw, 560px);
  min-height: 300px;
  display: flex;
  flex-direction: row;
  background:
    radial-gradient(circle at 12% 10%, rgba(0, 238, 255, 0.08), transparent 60%),
    linear-gradient(135deg, #030f21, #020713 58%);
  border: 2px solid rgba(0, 238, 255, 0.85);
  border-radius: 28px;
  box-shadow:
    0 0 30px rgba(0, 238, 255, 0.38),
    0 28px 58px rgba(0, 0, 0, 0.62);
  overflow: hidden;
  color: #f6fdff;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}


.auth-card::after {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(0, 238, 255, 0.32), transparent 60%);
  pointer-events: none;
  filter: blur(34px);
  opacity: 0.45;
}

.auth-card[data-mode="register"] {
  flex-direction: row-reverse;
}

.auth-pane {
  flex: 0 0 54%;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3vh, 22px);
  padding: clamp(24px, 3.6vw, 36px);
  background: linear-gradient(170deg, rgba(4, 20, 38, 0.96), rgba(2, 12, 26, 0.94));
  position: relative;
  z-index: 1;
  box-shadow: inset -1px 0 0 rgba(0, 238, 255, 0.12);
}

.form-box {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.8vh, 22px);
  max-width: 320px;
}

.form-box[aria-hidden="true"] {
  display: none;
}

.form-caption {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: rgba(0, 236, 255, 0.85);
}

.form-box h2 {
  margin: 0;
  font-size: clamp(1.22rem, 2.2vw, 1.4rem);
  font-weight: 600;
  color: #f9feff;
  text-transform: capitalize;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.6vh, 18px);
}

.input-box {
  position: relative;
  border-bottom: 1.5px solid rgba(99, 236, 255, 0.4);
  padding-bottom: 6px;
  display: flex;
  align-items: center;
}

.input-box input {
  width: 100%;
  padding: 9px 28px 7px 0;
  border: none;
  background: none;
  color: #f3fdff;
  font-size: 1rem;
  letter-spacing: 0.015em;
}

.input-box input::placeholder {
  color: rgba(176, 224, 236, 0.55);
}

.input-box:focus-within {
  border-bottom-color: rgba(99, 236, 255, 0.95);
  box-shadow: 0 14px 24px rgba(0, 238, 255, 0.12);
}

.input-box input:focus {
  outline: none;
  color: #ffffff;
}

.input-icon {
  position: absolute;
  top: 50%;
  right: 0;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px;
  opacity: 0.78;
  filter: drop-shadow(0 0 10px rgba(0, 238, 255, 0.5));
  pointer-events: none;
}

.input-icon--user {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%235EF0FF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E");
}

.input-icon--mail {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%235EF0FF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2' ry='2'/%3E%3Cpath d='M3 7l9 6 9-6'/%3E%3C/svg%3E");
}

.form-box textarea {
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 1.5px solid rgba(99, 236, 255, 0.4);
  background: transparent;
  color: #f3fdff;
  font-size: 0.9rem;
  line-height: 1.4;
  resize: vertical;
  min-height: 48px;
}

.form-box textarea:focus {
  outline: none;
  border-bottom-color: rgba(99, 236, 255, 0.95);
}

.auth-card .btn {
  align-self: flex-start;
  border: none;
  border-radius: 999px;
  padding: 10px 28px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  background: linear-gradient(135deg, #00e2ff, #0087ff 70%);
  color: #011223;
  box-shadow: 0 14px 32px rgba(0, 135, 255, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.auth-card .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(0, 135, 255, 0.48);
  filter: brightness(1.05);
}

.auth-card .btn:active {
  transform: translateY(0);
}

.form-switch {
  display: flex;
  justify-content: center;
  gap: 6px;
  font-size: 0.82rem;
  color: rgba(183, 236, 255, 0.82);
}

.form-switch .link-btn {
  border: none;
  background: none;
  padding: 0;
  color: #57e8ff;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.form-switch .link-btn:hover {
  color: #aef6ff;
  text-decoration: underline;
}

.auth-advanced {
  background: rgba(6, 26, 46, 0.68);
  border-radius: 16px;
  border: 1px solid rgba(0, 236, 255, 0.22);
  padding: 14px 16px;
  box-shadow: inset 0 0 0 1px rgba(0, 32, 56, 0.45);
}

.auth-advanced summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  color: rgba(160, 236, 255, 0.88);
  list-style: none;
}

.auth-advanced summary::marker,
.auth-advanced summary::-webkit-details-marker {
  display: none;
}

.auth-advanced summary::after {
  content: "▾";
  float: right;
  transition: transform 0.2s ease;
}

.auth-advanced details[open] summary::after {
  transform: rotate(180deg);
}

.advanced-hint {
  margin: 10px 0;
  font-size: 0.8rem;
  color: rgba(199, 241, 255, 0.7);
}

.remember-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: rgba(188, 236, 255, 0.78);
}

.auth-aside {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(22px, 3.4vw, 32px);
  background: linear-gradient(140deg, rgba(0, 25, 48, 0.92), rgba(0, 14, 32, 0.95));
  overflow: hidden;
  min-height: 100%;
}

.auth-aside::before,
.auth-aside::after {
  display: none;
}

.auth-pane-row {
  display: flex;
  align-items: flex-start;
  gap: clamp(12px, 2.6vw, 22px);
}

.auth-pane-main {
  flex: 1 1 auto;
  min-width: 0;
}

.auth-pane-side {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  padding-right: 26px;
  padding-left: 4px;
}

.auth-logo {
  width: clamp(80px, 14vw, 120px);
  height: auto;
  filter: drop-shadow(0 0 18px rgba(0, 238, 255, 0.55));
}

@media (min-width: 900px) {
  .auth-pane-side {
    padding-right: 44px;
  }
}

.auth-message {
  position: relative;
  z-index: 2;
  width: min(260px, 90%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  align-items: center;
  opacity: 1;
  transform: none;
  transition: opacity 0.3s ease;
  filter: none;
  padding: 12px 12px;
  margin: 0;
  max-width: 100%;
  background: rgba(3, 18, 36, 0.6);
  border: 1px solid rgba(0, 214, 255, 0.2);
  border-radius: 16px;
}

.auth-message h3 {
  margin: 0;
  font-size: clamp(1.02rem, 2vw, 1.24rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f8feff;
  text-shadow: 0 0 18px rgba(0, 214, 255, 0.35);
  text-align: inherit;
}

.auth-message p {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(214, 248, 255, 0.86);
  line-height: 1.46;
  text-align: inherit;
  max-width: 100%;
}

.auth-note {
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 255, 255, 0.7);
}

.auth-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(0, 52, 72, 0.42);
  border: 1px solid rgba(170, 248, 255, 0.35);
  color: #b5f6ff;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-card:not([data-mode="register"]) .auth-message--login,
.auth-card[data-mode="register"] .auth-message--register {
  display: flex;
}

.auth-card:not([data-mode="register"]) .auth-message--register,
.auth-card[data-mode="register"] .auth-message--login {
  display: none;
}

@media (max-width: 900px) {
  .auth-aside {
    min-height: 100%;
  }
  .auth-message {
    width: 100%;
    max-width: none;
    margin: 0;
  }
}

@media (max-width: 768px) {
  .auth-card--split,
  .auth-card--split[data-mode="register"] {
    flex-direction: column;
  }

  .auth-card--split .auth-pane,
  .auth-card--split .auth-aside {
    width: 100%;
    flex: 0 0 auto;
  }

  .auth-aside {
    min-height: 180px;
  }

  .auth-message {
    width: 100%;
    min-height: 100%;
    justify-content: flex-start;
    padding: 18px 16px;
  }
}

@keyframes cardGlow {
  0% {
    box-shadow:
      0 34px 60px rgba(0, 0, 0, 0.55),
      0 0 24px rgba(0, 214, 255, 0.12);
  }
  50% {
    box-shadow:
      0 38px 66px rgba(0, 0, 0, 0.6),
      0 0 32px rgba(0, 214, 255, 0.22);
  }
  100% {
    box-shadow:
      0 34px 60px rgba(0, 0, 0, 0.55),
      0 0 24px rgba(0, 214, 255, 0.12);
  }
}

@keyframes asideSweep {
  0% { opacity: 0.72; }
  50% { opacity: 0.95; }
  100% { opacity: 0.72; }
}

@keyframes messagePulse {
  0% { filter: drop-shadow(0 0 0 rgba(0, 214, 255, 0)); }
  50% { filter: drop-shadow(0 0 16px rgba(0, 214, 255, 0.32)); }
  100% { filter: drop-shadow(0 0 0 rgba(0, 214, 255, 0)); }
}

.remember-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.8);
}

.remember-option input {
  width: auto;
}

.remember-option span {
  color: rgba(178, 236, 255, 0.82);
}

.auth-card .btn {
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-weight: 600;
  font-size: 0.96rem;
  cursor: pointer;
  background: linear-gradient(120deg, #0bf4ff 0%, #0d73ff 100%);
  color: #012033;
  box-shadow: 0 14px 34px rgba(11, 126, 255, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.auth-card .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 48px rgba(11, 126, 255, 0.45);
  filter: brightness(1.05);
}

.auth-card .btn.outline {
  background: transparent;
  border: 1px solid rgba(0, 214, 255, 0.45);
  color: #8fe7ff;
  box-shadow: none;
}

.auth-card .btn.outline:hover {
  background: rgba(0, 214, 255, 0.12);
  box-shadow: none;
}

.ghost-btn {
  border: 1px solid rgba(0, 214, 255, 0.32);
  background: transparent;
  color: rgba(170, 238, 255, 0.85);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ghost-btn:hover {
  background: rgba(0, 214, 255, 0.12);
  border-color: rgba(0, 214, 255, 0.45);
}

.link-btn {
  border: none;
  background: none;
  color: #73eaff;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0;
  text-decoration: underline;
}

.link-btn:hover {
  color: #c9f8ff;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: rgba(180, 236, 255, 0.75);
}


.advanced-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.form-error {
  color: #ff6b6b;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .auth-card {
    flex-direction: column;
    max-width: min(420px, 100%);
    min-height: auto;
  }

  .auth-card[data-mode="register"] {
    flex-direction: column;
  }

  .auth-pane {
    flex: none;
    padding: clamp(20px, 7vw, 32px) clamp(18px, 7vw, 28px);
    gap: 18px;
  }

  .auth-card .btn {
    align-self: stretch;
  }

  .auth-aside {
    flex: none;
    padding: clamp(18px, 7vw, 30px);
    justify-content: flex-start;
    margin-top: 12px;
  }

  .auth-aside::before {
    clip-path: polygon(0 0, 100% 0, 100% 86%, 0 100%);
    transform: none !important;
  }

  .auth-aside::after {
    inset: clamp(12px, 6vw, 22px);
  }

  .auth-message {
    align-items: flex-start;
    text-align: left;
    width: 100%;
    transform: none !important;
    filter: none !important;
    gap: 6px;
    margin: 0;
    padding: 0;
    text-align: left;
  }
}

@media (max-width: 600px) {
  .auth-card-shell {
    padding: 20px 12px;
  }

  .auth-card {
    border-radius: 24px;
    max-width: min(360px, 100%);
  }

  .auth-pane {
    padding: clamp(18px, 8vw, 28px) clamp(14px, 8vw, 22px);
    gap: 16px;
  }

  .auth-form {
    gap: 16px;
  }

  .input-box {
    padding-bottom: 4px;
  }

  .auth-card .btn {
    width: 100%;
    text-align: center;
    padding: 10px 26px;
    font-size: 0.9rem;
  }

  .auth-aside {
    padding: clamp(20px, 8vw, 30px);
    align-items: flex-start;
    justify-content: flex-start;
  }

  .auth-aside::after {
    inset: clamp(12px, 7vw, 20px);
  }

  .auth-message {
    width: 100%;
    gap: 5px;
    transform: none !important;
    filter: none !important;
    padding: 0;
    margin: 0;
    align-items: flex-start;
    text-align: left;
  }

  .auth-message h3 {
    font-size: 0.98rem;
  }

  .auth-message p {
    font-size: 0.74rem;
  }

  .auth-note {
    font-size: 0.6rem;
  }
}

@media (max-width: 480px) {
  .webos-modal {
    padding: 16px;
  }

  .toggle {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .auth-card {
    max-width: min(320px, 100%);
    border-radius: 20px;
  }

  .form-box h2 {
    font-size: 1.08rem;
  }

  .auth-message h3 {
    font-size: 0.94rem;
    text-align: left;
  }

  .auth-message p {
    font-size: 0.72rem;
    text-align: left;
  }

  .auth-note {
    font-size: 0.58rem;
    text-align: left;
  }

  .auth-card .btn {
    padding: 10px 24px;
    font-size: 0.88rem;
  }

  .auth-aside {
    padding: clamp(18px, 8vw, 28px);
    align-items: flex-start;
    justify-content: flex-start;
  }
}


/* Link between modals */
.switch-link {
  margin-top: 14px;
  font-size: 0.9rem;
  color: #aaa;
}

.switch-link a {
  color: #00f6ff;
  text-decoration: none;
  font-weight: bold;
}

.switch-link a:hover {
  text-decoration: underline;
}

/* Login modal: single-pane layout after removing auth-aside */
#loginModal .auth-card--split {
  display: block;
}

#loginModal .auth-pane {
  width: 100%;
  flex: 1 1 auto;
}


/* ========== Overlay + Fullscreen Search Card ========== */

#search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  }
  
  #search-overlay.visible {
  opacity: 1;
  pointer-events: all;
  }

/* ========== Splash Screen ========== */



.splash-logo {
  width: 250px;
  height: auto;
  animation: pulseGlow 1.5s infinite alternate;
  filter: drop-shadow(0 0 20px #00f6ff);
}


/* Splash screen */
.splash-screen {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #111, #000);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  animation: fadeIn 1.5s ease-out;
}

.splash-screen h1 {
  font-size: 2.5rem;
  color: #00f6ff;
  text-shadow: 0 0 25px #00f6ff;
  animation: pulseGlow 2s infinite alternate;
}





.fade-out {
  animation: fadeOut 1s ease forwards;
}

#welcome-splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, rgba(0, 255, 255, 0.1), rgba(0, 0, 0, 0.9));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  animation: fadeInSplash 0.6s ease-out forwards;
}

#welcome-splash.hidden {
  display: none;
}

.splash-circle {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
}

.splash-circle img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  animation: zoomIn 1.2s ease-out;
}

.loading-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 150px;
  height: 150px;
  border: 6px solid transparent;
  border-top: 6px solid #00ffff;
  border-radius: 50%;
  animation: spin 2s linear infinite;
}

.splash-text {
  color: #0ff;
  margin-top: 20px;
  font-size: 1.5em;
  animation: fadeInText 1.2s ease-in-out;
}



/* ========== Tabs + New Tab Button ========== */

#tabBar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  overflow-x: auto;
  }
  

/* ========== Toolbar + Tabs + Actions ========== */





        /* ========== Tab ========== */

        .tab {
          align-items: center;
          gap: 4px;
          font-size: 0.9rem;
          font-weight: 500;
          white-space: nowrap;
          background: rgba(0, 20, 40, 0.4);
          backdrop-filter: blur(8px);
          border-radius: 10px;
          padding: 8px 14px;
          margin-right: 6px;
          display: inline-flex;
          box-shadow: 0 4px 20px rgba(0, 255, 255, 0.1);
          transition: background 0.3s, transform 0.2s;
          border: 1px solid rgba(0, 255, 255, 0.1);
          }
          
          .tab img {
          width: 24px;
          height: 24px;
          margin: 0 auto;
          filter: drop-shadow(0 0 4px rgba(0,255,255,0.4));
          margin-right: 6px;
          
          }
          
          
          .tab:hover {
          background: rgba(0, 40, 80, 0.6);
          transform: scale(1.02);
          box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
          }
          
          
          .tab span {
          font-size: 0.7rem;
          }
          
          /* Active tab indicator (optional glow) */
          .tab.active {
          background: rgba(0, 60, 100, 0.6);
          box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
          }
          
          
          .tab-wrapper {
          display: flex;
          align-items: center;
          background: rgba(255,255,255,0.06);
          border-radius: 8px;
          padding: 4px 10px;
          color: white;
          transition: all 0.3s ease;
          box-shadow: 0 0 6px rgba(0, 246, 255, 0.1);
          font-size: 0.75rem;
          height: 36px;
          }
          
          .tab-wrapper:hover {
          background: rgba(0, 246, 255, 0.12);
          box-shadow: 0 0 10px rgba(0, 246, 255, 0.3);
          }
          
          .tab-wrapper.dragging {
          opacity: 0.5;
          transform: scale(0.98);
          transition: transform 0.2s ease;
          }
          
          .close {
          margin-left: 8px;
          cursor: pointer;
          color: #00f6ff;
          }
          
          .tab[data-fixed="true"] .close {
          display: none;
          }

          

/* ========== Action Buttons ========== */

.actions {
  display: flex;
  flex-wrap: wrap;
  }
  
  .actions button {
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  font-size: 20px;
  color: #00f6ff88;
  border-radius: 8px;
  transition: all 0.25s ease;
  }
  
  .actions button:hover {
  background: rgba(0, 246, 255, 0.1);
  color: #00f6ff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
  }
  
  .actions button:active {
  transform: scale(0.92) translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  }
  
  .actions button::after {
  content: '';
  position: absolute;
  border-radius: 12px;
  inset: 0;
  box-shadow: 0 0 18px rgba(0, 246, 255, 0.2);
  z-index: -1;
  }
  
      /* ========== Notification Dots ========== */

      .notif-dot {
        position: absolute;
        top: -8px;
        right: -6px;
        min-width: 18px;
        height: 18px;
        padding: 2px 5px;
        background-color: red;
        color: white;
        font-size: 10px;
        font-weight: bold;
        line-height: 1;
        text-align: center;
        border-radius: 50%;
        box-shadow: 0 0 6px red;
        animation: softPulse 2.5s ease-out infinite;
        pointer-events: none;
        z-index: 99;
        display: inline-block;
      }
      
      .notif-dot.shake {
        animation: notifShake 0.4s;
      }


button {
  border: none;
  border-radius: 8px;
  background: rgba(0, 255, 255, 0.15);
  color: #00f6ff;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}
button:hover {
  background: rgba(0, 255, 255, 0.3);
}



    
/* ========== Tab Content ========== */

.main-content {
  padding: 20px;
  }
  
  .tab-content {
  display: none;
  opacity: 0;
  transform: scale(0.98) translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  }
  
  .tab-content.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.08);
  animation: tabFadeIn 0.4s ease-out;
  border-radius: 14px;
  backdrop-filter: blur(8px);
  background: rgba(0, 50, 70, 0.03);
  height: calc(80vh - 130px); /* أو حسب مساحة المتصفح الفعلية */
  overflow: auto;
  }
  
  
  .tab-content iframe {
  width: 100%;
  height: 100%;
  min-height: 500px; 
  border: none;
  }
   
  /* ========== Tab Container Wrapper ========== */
  
#tabContainer {
  display: none;
  position: absolute;
  top: 90px; /* ✅ اجعله يظهر فوق معلومات العملة */
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 20px;
  max-height: 70vh;
  background: rgba(0, 12, 25, 0.9);
  border-radius: 18px;
  border: 1px solid rgba(0, 255, 255, 0.15);
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(150%);
  overflow: auto;
  margin: 0 auto;
  animation: tabFadeIn 0.4s ease;
}

#tabContainer.visible {
  display: block;
  position: relative;
  z-index: 10;
}
  
#tabContainer.hide-after-search {
  display: none !important;
}

.tab-content.active {
    display: block;
    animation: tabFadeIn 0.4s ease-out;
    box-shadow: 0 0 35px rgba(0, 255, 255, 0.08);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    background: rgba(0, 50, 70, 0.03);


  }

@media (max-width: 768px) {
  #tabContainer {
    padding: 10px;
    margin-top: 10px;
  }

  .tab-content iframe {
    min-height: 300px;
  }

  .actions button {
    margin: 6px 4px;
    font-size: 14px;
    padding: 6px 8px;
  }
}




  
  
/* ========== User Card Start ========== */

.user-card {
  position: fixed;
  top: 84px;
  right: 24px;
  left: auto;
  width: min(300px, calc(100vw - 32px));
  display: none;
  background: linear-gradient(160deg, rgba(8, 24, 36, 0.95), rgba(6, 14, 24, 0.9));
  border: 1px solid rgba(0, 246, 255, 0.22);
  border-radius: 18px;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.35),
    0 0 22px rgba(0, 246, 255, 0.12);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  color: #d9f7ff;
  padding: 14px 16px 12px;
  z-index: 10030;
  font-size: 0.92rem;
  animation: fadeIn 0.35s ease-out;
}

.user-card.is-open {
  display: block;
}

.user-card.hidden.is-open {
  display: block;
}

.user-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0, 246, 255, 0.35), rgba(0, 246, 255, 0) 30%, rgba(0, 246, 255, 0.2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* caret arrow pointing to the user icon */
.user-card::after {
  content: "";
  position: absolute;
  top: -8px;
  left: var(--caret-left, 24px);
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid rgba(0, 28, 44, 0.75);
  filter: drop-shadow(0 -1px 0 rgba(0, 246, 255, 0.2));
}

.user-meta {
  margin-top: 8px;
  font-size: 0.75rem;
  color: rgba(217, 247, 255, 0.75);
  line-height: 1.4;
}

.user-meta--flash {
  color: #00f6ff;
  text-shadow: 0 0 12px rgba(0, 246, 255, 0.5);
}

.user-meta--panel {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 18, 30, 0.65);
  border: 1px solid rgba(0, 246, 255, 0.18);
}

#auth-step-icon {
  animation: glowPulse 1.2s ease-in-out infinite;
  border-radius: 50%;
  background: rgba(0, 255, 255, 0.05);
}

#auth-step-text {
  animation: fadeInUp 0.5s ease;
}

.fade-in-trigger {
  animation: fadeInUp 0.4s ease;
}

#user-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(0, 246, 255, 0.6);
  object-fit: cover;
  box-shadow:
    0 0 0 3px rgba(0, 246, 255, 0.08),
    0 6px 18px rgba(0, 246, 255, 0.22);
}

#avatar-container {
  position: relative;
  width: 64px;
  height: 64px;
  margin: auto;
}

#avatar-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  opacity: 0.6;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(0,255,255,0.4) 0%, transparent 70%);
  animation: pulseBackground 3s infinite;
}

.user-header { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; margin-bottom: 10px; }

.user-info { display: grid; gap: 4px; align-items: start; }
.user-info #userLevel { font-weight: 700; font-size: 1rem; color: #9bd6e3; }
.user-info #syncStatus { font-size: .86rem; opacity: .9; }
.user-info #emailDisplay { font-size: .92rem; color: #d9f7ff; word-break: break-word; }
.user-info #user-membership-level { font-size: .9rem; color: #00f6ff; }

.sync-status {
  font-size: 14px;
  color: #ff5555;
}

.sync-status.connected {
  color: #00ff88;
}

.user-details { margin: 8px 0 12px 0; text-align: left; }

.user-details div { margin-bottom: 4px; font-size: .86rem; }

#walletBalance.user-balance { font-size: 0.98rem; font-weight: 700; color: #e6fbff; letter-spacing: 0.2px; }
#userType.user-type { color: #9bd6e3; font-size: .88rem; }

.user-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }


.user-btn {
  flex: 1;
  background: #00f6ff;
  border: none;
  color: #00222e;
  padding: 10px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.user-btn:hover {
  background: #00e0ff;
}

.hidden {
  display: none;
}

@media (max-width: 600px) {
  .user-card {
    width: min(260px, calc(100vw - 24px));
    padding: 12px 12px 10px;
    font-size: 0.86rem;
  }

  .user-header { grid-template-columns: 56px 1fr; gap: 10px; margin-bottom: 8px; }
  #avatar-container { width: 56px; height: 56px; }
  #user-avatar { width: 46px; height: 46px; }
  .user-info #userLevel { font-size: 0.92rem; }
  .user-info #emailDisplay { font-size: 0.86rem; }
  .user-info #user-membership-level { font-size: 0.82rem; }
  #walletBalance.user-balance { font-size: 0.9rem; }
  #userType.user-type { font-size: 0.84rem; }
  .user-details div { font-size: 0.82rem; }
  .user-btn { padding: 8px; }
}

.card-open-animation {
  animation: zoomFadeIn 0.35s ease forwards;
}

/* Glow effect removed per design cleanup */

.info-list {
  margin: 16px 0 18px;
  padding-left: 20px;
  color: #b8e8ff;
  line-height: 1.5;
}

.info-list li {
  margin-bottom: 8px;
}

.key-manager-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.key-manager-actions button {
  flex: 1 1 auto;
  min-width: 160px;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  background: linear-gradient(135deg, #00d6ff, #38f9ff);
  color: #002133;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.key-manager-actions button.secondary {
  background: rgba(0, 214, 255, 0.08);
  color: #9bd6e3;
  border: 1px solid rgba(0, 214, 255, 0.25);
}

.key-manager-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 214, 255, 0.25);
}

.key-manager-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(0, 40, 60, 0.6);
  border: 1px solid rgba(0, 214, 255, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  color: #d9f7ff;
  font-size: 0.95rem;
}

.key-manager-status .status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  background: #ff7878;
  box-shadow: 0 0 8px rgba(255, 120, 120, 0.6);
}

.key-manager-status.ready .status-indicator {
  background: #4dff9a;
  box-shadow: 0 0 8px rgba(77, 255, 154, 0.6);
}

.key-export {
  background: rgba(0, 18, 30, 0.6);
  border: 1px solid rgba(0, 214, 255, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
}

.key-export label {
  display: block;
  font-weight: 600;
  color: #d9f7ff;
  margin-bottom: 8px;
}

.key-export textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  background: rgba(0, 32, 50, 0.8);
  color: #e0faff;
  border: 1px solid rgba(0, 214, 255, 0.25);
  border-radius: 10px;
  padding: 10px;
  font-family: "Roboto Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.4;
}

.key-export textarea:focus {
  outline: 2px solid rgba(0, 214, 255, 0.45);
  outline-offset: 2px;
}

.key-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.key-export-actions button {
  flex: 1 1 auto;
  min-width: 150px;
  padding: 9px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  background: linear-gradient(135deg, #00d6ff, #38f9ff);
  color: #002133;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.key-export-actions button.secondary {
  background: rgba(0, 214, 255, 0.08);
  color: #9bd6e3;
  border: 1px solid rgba(0, 214, 255, 0.25);
}

.key-export-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
  transform: none;
}

.key-export-actions button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 214, 255, 0.25);
}

/* Login modal redesign */
.login-modal--stack {
  max-width: 360px;
  text-align: left;
  padding: 32px 24px 26px;
}

.login-stack {
  position: relative;
  min-height: 360px;
}

.login-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 20px;
  border-radius: 16px;
  background: rgba(0, 20, 35, 0.82);
  border: 1px solid rgba(0, 214, 255, 0.18);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(28px) scale(0.94);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.login-card.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  z-index: 3;
}

.login-card.is-before {
  opacity: 0.55;
  transform: translate(-8px, -16px) scale(0.97);
  pointer-events: none;
  z-index: 2;
}

.login-card.is-after {
  opacity: 0;
  transform: translateY(32px) scale(0.9);
  pointer-events: none;
  z-index: 1;
}

.login-card-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-card-header h2,
.login-card-header h3 {
  margin: 0;
  color: #e0faff;
}

.login-card-header p {
  margin: 0;
}

.card-back {
  align-self: flex-start;
  background: none;
  border: none;
  color: #9bd6e3;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px 0;
}

.card-back:hover,
.card-back:focus-visible {
  color: #d9f7ff;
  outline: none;
  text-decoration: underline;
}

.login-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.card-nav-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(0, 214, 255, 0.25);
  background: rgba(0, 214, 255, 0.08);
  color: #9bd6e3;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.card-nav-next:hover,
.card-nav-next:focus-visible {
  background: rgba(0, 214, 255, 0.18);
  border-color: rgba(0, 214, 255, 0.4);
  color: #d9f7ff;
  transform: translateY(-1px);
  outline: none;
}

.login-card--manager .login-card-actions {
  justify-content: flex-start;
}

.login-card--manager .card-nav-next {
  background: rgba(0, 214, 255, 0.05);
}

.login-card .info-text {
  color: #9bd6e3;
  font-size: 0.9rem;
}

.info-text.small {
  font-size: 0.82rem;
  color: #7fbed3;
}

.login-card--keys .drawer-card,
.login-card--recovery .drawer-card {
  background: rgba(0, 18, 32, 0.8);
  border: 1px solid rgba(0, 214, 255, 0.14);
}

.login-header {
  margin-bottom: 18px;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 214, 255, 0.35);
  background: rgba(0, 214, 255, 0.08);
  color: #9bd6e3;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.login-header h2 {
  margin: 0 0 6px;
}

.login-highlights {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 8px;
}

.login-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #c2ecff;
  font-size: 0.92rem;
}

.highlight-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(0, 214, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: #00d6ff;
}

.login-section {
  background: rgba(0, 20, 35, 0.7);
  border: 1px solid rgba(0, 214, 255, 0.15);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.login-section--primary {
  border-color: rgba(0, 214, 255, 0.25);
  background: rgba(0, 28, 46, 0.75);
}

.login-advanced {
  background: rgba(0, 24, 42, 0.68);
}

.section-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.login-section h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: #e0faff;
}

.section-title h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #e0faff;
}

.section-subtitle {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: #7fbed3;
}

.section-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-form label {
  font-weight: 600;
  color: #d9f7ff;
}

.login-form .input-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 32, 50, 0.85);
  border: 1px solid rgba(0, 214, 255, 0.25);
  border-radius: 10px;
  padding: 0 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form .input-shell:focus-within {
  border-color: rgba(0, 214, 255, 0.45);
  box-shadow: 0 0 0 2px rgba(0, 214, 255, 0.18);
}

.input-icon {
  color: #00d6ff;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login-form input {
  background: rgba(0, 32, 50, 0.85);
  border: 1px solid rgba(0, 214, 255, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  color: #e0faff;
}

.login-form .input-shell input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 0;
  margin-top: 0;
  color: #e0faff;
}

.login-form .input-shell input:focus {
  outline: none;
  box-shadow: none;
}

.login-form input:focus {
  outline: 2px solid rgba(0, 214, 255, 0.45);
  outline-offset: 1px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.form-actions button {
  padding: 10px 22px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #00d6ff, #38f9ff);
  font-weight: 600;
  color: #001f2f;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 214, 255, 0.2);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.form-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 214, 255, 0.25);
}

.form-error {
  margin-top: 6px;
  color: #ff8080;
  font-weight: 500;
}

.access-drawer-toggle {
  margin: 4px 2px 10px;
}

.access-drawer-toggle button {
  width: 100%;
  text-align: left;
  background: rgba(0, 214, 255, 0.05);
  border: 1px solid rgba(0, 214, 255, 0.15);
  color: #9bd6e3;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 0.95rem;
  padding: 12px 14px;
  border-radius: 12px;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.access-drawer-toggle button:hover {
  background: rgba(0, 214, 255, 0.1);
  border-color: rgba(0, 214, 255, 0.25);
  color: #d9f7ff;
}

.access-drawer-toggle button:hover .toggle-label {
  text-decoration: underline;
}

.toggle-hint {
  font-size: 0.82rem;
  color: #6fbdd9;
}

.toggle-icon {
  align-self: flex-end;
  transition: color 0.2s ease;
}

.access-drawer {
  display: grid;
  gap: 18px;
}

.drawer-card {
  background: rgba(0, 28, 46, 0.6);
  border: 1px solid rgba(0, 214, 255, 0.12);
  border-radius: 12px;
  padding: 16px;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-text {
  color: #c2ecff;
  margin: 0;
}

.login-tasks {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: grid;
  gap: 6px;
}

.login-tasks li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #c2ecff;
  font-size: 0.9rem;
}

.login-tasks li::before {
  content: "◈";
  color: #00d6ff;
  font-size: 0.75rem;
  line-height: 1.4;
  margin-top: 2px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.card-primary,
.card-secondary {
  flex: 1 1 auto;
  min-width: 150px;
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.card-primary {
  background: linear-gradient(135deg, #00d6ff, #38f9ff);
  color: #002133;
  box-shadow: 0 5px 15px rgba(0, 214, 255, 0.2);
}

.card-secondary {
  background: rgba(0, 214, 255, 0.08);
  color: #9bd6e3;
  border: 1px solid rgba(0, 214, 255, 0.25);
}

.import-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(0, 214, 255, 0.18);
}

.import-form textarea {
  width: 100%;
  min-height: 110px;
  background: rgba(0, 32, 50, 0.85);
  border: 1px solid rgba(0, 214, 255, 0.25);
  border-radius: 10px;
  padding: 10px;
  color: #e0faff;
  font-family: "Roboto Mono", monospace;
}

.import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
}

.remember-key-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.login-footer {
  margin-top: 16px;
  text-align: center;
}

.login-assurance {
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(0, 214, 255, 0.08);
  border: 1px solid rgba(0, 214, 255, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
  color: #c2ecff;
  font-size: 0.9rem;
}

.assurance-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 214, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #00d6ff;
}

.login-footer .switch-link {
  margin: 4px 0;
}

.download-link {
  background: none;
  border: none;
  color: #00d6ff;
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.95rem;
}

.download-link:hover {
  color: #38f9ff;
}

.recovery-alert {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(255, 160, 0, 0.12);
  border: 1px solid rgba(255, 190, 70, 0.4);
  border-radius: 10px;
  color: #ffe7b3;
  font-size: 0.92rem;
}

.recovery-alert.ready {
  background: rgba(77, 255, 154, 0.12);
  border-color: rgba(77, 255, 154, 0.4);
  color: #dbffe9;
}

.access-drawer.hidden {
  display: none;
}

.access-drawer.open {
  display: grid;
}

/* Recovery wizard */
.recovery-header {
  margin-bottom: 18px;
}

.wizard-progress {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.progress-step {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  border-radius: 10px;
  background: rgba(0, 25, 40, 0.5);
  border: 1px solid transparent;
  color: #8ccfe6;
  font-size: 0.85rem;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.progress-step.active {
  border-color: rgba(0, 214, 255, 0.5);
  color: #e0faff;
  background: rgba(0, 30, 48, 0.7);
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 214, 255, 0.18);
  color: #e0faff;
  margin-bottom: 6px;
  font-weight: 600;
}

.wizard-body {
  min-height: 220px;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wizard-step.hidden {
  display: none;
}

.wizard-step input,
.wizard-step textarea {
  background: rgba(0, 32, 50, 0.85);
  border: 1px solid rgba(0, 214, 255, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  color: #e0faff;
}

.method-group {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.method-group legend {
  font-weight: 600;
  margin-bottom: 6px;
  color: #d9f7ff;
}

.method-option {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(0, 24, 38, 0.6);
  border: 1px solid rgba(0, 214, 255, 0.12);
}

.method-option.active {
  border-color: rgba(0, 214, 255, 0.4);
  background: rgba(0, 30, 48, 0.75);
}

.method-option input[type="radio"] {
  accent-color: #00d6ff;
}

.method-title {
  font-weight: 600;
  color: #e0faff;
}

.method-copy {
  color: #9bd6e3;
  font-size: 0.92rem;
}

.method-input {
  width: 100%;
  margin-top: 4px;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.wizard-actions .card-primary,
.wizard-actions .card-secondary {
  flex: 1 1 0;
}

.wizard-actions .card-secondary[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.recovery-summary {
  background: rgba(0, 28, 46, 0.6);
  border: 1px solid rgba(0, 214, 255, 0.15);
  border-radius: 12px;
  padding: 16px;
  color: #d9f7ff;
  line-height: 1.5;
  min-height: 140px;
}

.recovery-summary.error {
  border-color: rgba(255, 120, 120, 0.4);
  background: rgba(128, 24, 36, 0.6);
  color: #ffe2e2;
}

.recovery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
    .window {
      position: absolute;
      top: 100px;
      left: 100px;
      width: 600px;
      height: 400px;
      min-width: 360px;
      min-height: 240px;
      background: rgba(10, 10, 10, 0.9);
      border-radius: 12px;
      box-shadow: 0 0 20px rgba(0, 246, 255, 0.15);
      backdrop-filter: blur(12px);
      overflow: hidden;
      opacity: 0;
      transform: scale(0.95);
      transition: transform 0.3s ease, opacity 0.3s ease;
      z-index: 9999;
    }
    
    .window.fade-out {
      opacity: 0;
      transform: scale(0.9);
    }

    .window.dragging,
    .window.resizing {
      transition: none;
    }

    .window-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px;
      background: rgba(0, 246, 255, 0.1);
      border-bottom: 1px solid rgba(0, 246, 255, 0.15);
    }
    
    .window-icon {
      width: 24px;
      height: 24px;
      margin-right: 8px;
    }
    
    .window-title {
      flex: 1;
      font-size: 0.9rem;
      font-weight: bold;
      color: #00f6ff;
    }
    
    .window-controls button {
      background: transparent;
      border: none;
      font-size: 1.1rem;
      color: #00f6ff;
      cursor: pointer;
      transition: transform 0.2s ease;
    }
    
    .window-controls button:hover {
      transform: scale(1.2);
    }
    
    .window-content {
      width: 100%;
      height: calc(100% - 50px);
      background: #000;
      overflow-y: auto; 
      overflow-x: hidden;
    }
    
    .window-content iframe {
      width: 100%;
      height: 100%;
      border: none;
      background: #000;
    }


    .window-dock {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      height: 48px;
      background: rgba(0,0,0,0.8);
      display: flex;
      align-items: center;
      padding: 0 12px;
      gap: 10px;
      z-index: 9999;
      border-top: 1px solid #111;
    }

    .window-resize-handle {
      position: absolute;
      background: transparent;
      z-index: 13010;
      pointer-events: auto;
      touch-action: none;
    }

    .window.maximized .window-resize-handle {
      display: none;
    }

    .window-resize-handle:hover,
    .window-resize-handle:active {
      background: rgba(0, 246, 255, 0.08);
    }

    .window-resize-handle.window-resize-n,
    .window-resize-handle.window-resize-s {
      left: 14px;
      right: 14px;
      height: 12px;
      cursor: ns-resize;
    }

    .window-resize-handle.window-resize-n {
      top: 0;
      border-radius: 12px 12px 0 0;
    }

    .window-resize-handle.window-resize-s {
      bottom: 0;
      border-radius: 0 0 12px 12px;
    }

    .window-resize-handle.window-resize-e,
    .window-resize-handle.window-resize-w {
      top: 14px;
      bottom: 14px;
      width: 12px;
      cursor: ew-resize;
    }

    .window-resize-handle.window-resize-e {
      right: 0;
      border-radius: 0 12px 12px 0;
    }

    .window-resize-handle.window-resize-w {
      left: 0;
      border-radius: 12px 0 0 12px;
    }

    .window-resize-handle.window-resize-ne,
    .window-resize-handle.window-resize-se,
    .window-resize-handle.window-resize-sw,
    .window-resize-handle.window-resize-nw {
      width: 18px;
      height: 18px;
    }

    .window-resize-handle.window-resize-ne {
      top: 0;
      right: 0;
      cursor: nesw-resize;
    }

    .window-resize-handle.window-resize-se {
      bottom: 0;
      right: 0;
      cursor: nwse-resize;
    }

    .window-resize-handle.window-resize-sw {
      bottom: 0;
      left: 0;
      cursor: nesw-resize;
    }

    .window-resize-handle.window-resize-nw {
      top: 0;
      left: 0;
      cursor: nwse-resize;
    }

    .window-tab-strip {
      display: none;
      position: fixed;
      top: 18px;
      left: 50%;
      transform: translate(-50%, 0);
      width: min(1040px, 96vw);
      padding: 8px 12px;
      background: rgba(0, 20, 32, 0.82);
      border: 1px solid rgba(0, 246, 255, 0.12);
      border-radius: 18px;
      backdrop-filter: blur(16px);
      box-shadow: 0 20px 40px rgba(0, 10, 20, 0.3);
      z-index: 13000;
      overflow-x: auto;
      scrollbar-width: none;
      gap: 6px;
      transition: top 0.25s ease, opacity 0.25s ease;
    }

    .window-tab-strip::-webkit-scrollbar {
      display: none;
    }

    .window-tab-strip[hidden] {
      display: none !important;
    }

    .window-tab {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 8px 14px;
      border-radius: 12px;
      border: none;
      background: transparent;
      color: #d8f8ff;
      font-size: 0.78rem;
      letter-spacing: 0.02em;
      cursor: pointer;
      transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
      position: relative;
    }

    .window-tab img {
      width: 18px;
      height: 18px;
      border-radius: 4px;
      object-fit: cover;
    }

    .window-tab .tab-label {
      max-width: 120px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .window-tab .tab-close {
      margin-left: 4px;
      font-size: 0.8rem;
      opacity: 0.6;
      transition: opacity 0.2s ease;
    }

    .window-tab:hover,
    .window-tab:focus-visible {
      background: rgba(0, 246, 255, 0.1);
      color: #f5fdff;
      outline: none;
    }

    .window-tab.is-active {
      background: linear-gradient(135deg, rgba(0, 246, 255, 0.24), rgba(0, 120, 255, 0.18));
      color: #ffffff;
      box-shadow: 0 8px 18px rgba(0, 40, 60, 0.35);
    }

    .window-tab.is-minimized {
      opacity: 0.6;
    }

    .window-tab .tab-close:hover {
      opacity: 1;
    }

    .window-minimized {
      position: fixed;
      top: 18px;
      right: 24px;
      z-index: 13002;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 8px;
    }

    .window-minimized[hidden] {
      display: none !important;
    }

    .window-minimized-toggle {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 8px 14px;
      border-radius: 14px;
      border: 1px solid rgba(0, 246, 255, 0.2);
      background: rgba(0, 24, 38, 0.85);
      color: #dcf7ff;
      font-size: 0.82rem;
      letter-spacing: 0.05em;
      cursor: pointer;
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
      transition: background 0.2s ease, transform 0.2s ease;
    }

    .window-minimized-toggle:hover,
    .window-minimized-toggle:focus-visible {
      background: rgba(0, 40, 60, 0.9);
      transform: translateY(-1px);
      outline: none;
    }

    .window-minimized-toggle:disabled,
    .window-minimized-toggle[aria-disabled="true"] {
      cursor: default;
      opacity: 0.5;
      transform: none;
    }

    .window-minimized-toggle .badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 22px;
      height: 22px;
      padding: 0 6px;
      border-radius: 999px;
      background: rgba(0, 246, 255, 0.3);
      color: #03131f;
      font-weight: 600;
      letter-spacing: 0.05em;
    }

    .window-minimized-toggle .badge.is-empty {
      display: none;
    }

    .window-minimized-toggle .chevron {
      font-size: 0.7rem;
      opacity: 0.7;
      transition: transform 0.2s ease;
    }

    .window-minimized.is-open .window-minimized-toggle .chevron {
      transform: rotate(180deg);
    }

    .window-minimized-menu {
      position: relative;
      display: none;
      min-width: 240px;
      max-height: 320px;
      padding: 10px;
      border-radius: 16px;
      border: 1px solid rgba(0, 246, 255, 0.15);
      background: rgba(0, 18, 28, 0.95);
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
      overflow-y: auto;
      gap: 8px;
    }

    .window-minimized-menu.is-open {
      display: flex;
      flex-direction: column;
    }

    .window-minimized-item {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      padding: 8px 10px;
      border-radius: 12px;
      border: none;
      background: transparent;
      color: #d6f4ff;
      cursor: pointer;
      font-size: 0.82rem;
      letter-spacing: 0.02em;
      text-align: left;
      transition: background 0.2s ease, transform 0.2s ease;
    }

    .window-minimized-item:hover,
    .window-minimized-item:focus-visible {
      background: rgba(0, 55, 80, 0.85);
      transform: translateY(-1px);
      outline: none;
    }

    .window-minimized-item img {
      width: 28px;
      height: 28px;
      border-radius: 8px;
      object-fit: cover;
    }

    .window-minimized-item .title {
      flex: 1;
    }

    .window-page-toggle {
      position: fixed;
      right: 16px;
      bottom: calc(96px + env(safe-area-inset-bottom, 0px));
      z-index: 13000;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 14px 18px;
      min-height: 52px;
      border-radius: 18px;
      border: 1px solid rgba(0, 246, 255, 0.2);
      background: rgba(0, 20, 32, 0.85);
      color: #e2fcff;
      font-size: 0.9rem;
      letter-spacing: 0.04em;
      cursor: pointer;
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
      transition: transform 0.2s ease, background 0.2s ease;
      touch-action: manipulation;
    }

    .window-page-toggle:hover,
    .window-page-toggle:focus-visible {
      transform: translateY(-2px);
      background: rgba(0, 35, 55, 0.9);
      outline: none;
    }

    .window-page-toggle[aria-expanded="true"] {
      background: rgba(0, 70, 110, 0.95);
    }

    .window-page-toggle .toggle-count {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 22px;
      height: 22px;
      padding: 0 6px;
      border-radius: 999px;
      background: rgba(0, 246, 255, 0.25);
      color: #f1feff;
      font-size: 0.75rem;
      font-weight: 600;
      letter-spacing: 0.04em;
    }

    .window-page-toggle .toggle-count.is-empty {
      display: none;
    }

    .window-page-tray {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 15, 24, 0.96);
      border-top: 1px solid rgba(0, 246, 255, 0.14);
      border-radius: 22px 22px 0 0;
      box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.5);
      padding: 14px 18px calc(24px + env(safe-area-inset-bottom, 0px));
      transform: translateY(100%);
      transition: transform 0.25s ease;
      z-index: 12999;
      pointer-events: none;
      max-height: 70vh;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .window-page-tray[hidden] {
      display: none !important;
    }

    .window-page-tray.is-open {
      transform: translateY(0);
      pointer-events: auto;
    }

    .window-page-tray .tray-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      color: #d9f7ff;
      font-size: 0.92rem;
      letter-spacing: 0.05em;
      gap: 12px;
    }

    .window-page-tray .tray-close {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: 1px solid rgba(0, 246, 255, 0.2);
      background: transparent;
      color: #e2fcff;
      font-size: 1rem;
      cursor: pointer;
      transition: background 0.2s ease;
    }

    .window-page-tray .tray-close:hover,
    .window-page-tray .tray-close:focus-visible {
      background: rgba(0, 40, 65, 0.9);
      outline: none;
    }

    .window-page-tray .tray-count {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 24px;
      height: 24px;
      padding: 0 8px;
      border-radius: 999px;
      background: rgba(0, 246, 255, 0.18);
      color: #f2fdff;
      font-size: 0.78rem;
      font-weight: 600;
      letter-spacing: 0.06em;
    }

    .window-page-tray .tray-count.is-empty {
      display: none;
    }

    .window-page-list {
      display: flex;
      flex-direction: column-reverse;
      gap: 12px;
      overflow-y: auto;
    }

    .window-page-card {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 12px;
      background: rgba(0, 35, 54, 0.8);
      border-radius: 16px;
      border: 1px solid transparent;
      color: #d5f4ff;
      box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
      transition: border 0.2s ease, transform 0.2s ease, background 0.2s ease;
    }

    .window-page-card.is-active {
      border-color: rgba(0, 246, 255, 0.4);
      background: linear-gradient(135deg, rgba(0, 246, 255, 0.2), rgba(0, 120, 255, 0.25));
      color: #f2fdff;
    }

    .window-page-card__body {
      display: flex;
      align-items: center;
      gap: 12px;
      flex: 1;
      padding: 0;
      border: none;
      background: transparent;
      color: inherit;
      text-align: left;
      cursor: pointer;
    }

    .window-page-card__body:hover,
    .window-page-card__body:focus-visible {
      outline: none;
    }

    .window-page-card__body:hover .card-body,
    .window-page-card__body:focus-visible .card-body {
      opacity: 0.95;
    }

    .window-page-card img {
      width: 32px;
      height: 32px;
      border-radius: 10px;
      object-fit: cover;
      box-shadow: 0 4px 12px rgba(0, 246, 255, 0.18);
    }

    .window-page-card .card-title {
      font-size: 0.95rem;
      letter-spacing: 0.03em;
    }

    .window-page-card .card-state {
      font-size: 0.72rem;
      opacity: 0.7;
    }

    .window-page-card .card-body {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 2px;
    }

    .window-page-card__actions {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .window-page-card__close {
      width: 32px;
      height: 32px;
      border-radius: 10px;
      border: 1px solid rgba(0, 246, 255, 0.25);
      background: rgba(0, 30, 45, 0.8);
      color: #f6fdff;
      cursor: pointer;
      font-size: 0.8rem;
      transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    }

    .window-page-card__close:hover,
    .window-page-card__close:focus-visible {
      transform: scale(1.08);
      background: rgba(0, 55, 80, 0.95);
      box-shadow: 0 0 12px rgba(0, 246, 255, 0.35);
      outline: none;
    }

    @media (max-width: 1024px) {
      .window-tab-strip {
        top: 14px;
        width: min(980px, 94vw);
      }

      .window-minimized {
        top: 14px;
        right: 16px;
      }
    }

    @media (max-width: 859px) {
      .window-minimized {
        display: none !important;
      }

      .window-page-tray {
        bottom: calc(96px + env(safe-area-inset-bottom, 0px));
        max-height: calc(70vh - 96px);
      }
    }

    @media (min-width: 860px) {
      .window-tab-strip {
        display: flex;
      }

      .window-page-toggle,
      .window-page-tray {
        display: none;
      }
    }

    @media (max-width: 480px) {
      .window-tab-strip {
        top: 88px;
        width: 90vw;
      }

      .window-page-toggle {
        left: auto;
        right: 16px;
        bottom: calc(82px + env(safe-area-inset-bottom, 0px));
        transform: none;
        width: 56px;
        height: 56px;
        padding: 10px;
        justify-content: center;
        gap: 6px;
        flex-direction: column;
        font-size: 0.8rem;
        border-radius: 16px;
      }

      .window-page-card {
        padding: 10px 12px;
      }
    }

    @media (max-width: 360px) {
      .window-page-toggle {
        right: 12px;
        width: 52px;
        height: 52px;
        bottom: calc(74px + env(safe-area-inset-bottom, 0px));
      }
    }
    




    

.dl-btn {
  display: inline-block;
  padding: 10px 18px;
  color: #001f2f;
  font-weight: bold;
  border-radius: 10px;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.3s ease;
  box-shadow: 0 0 8px rgba(0,255,255,0.2);
}
.dl-btn:hover {
  filter: brightness(1.15);
}   



#downloadModal h2 {
  color: #00f6ff;
  text-shadow: 0 0 6px #00f6ff88;
}

#downloadModal .dl-btn {
  display: inline-block;
  margin: 6px;
  padding: 10px 16px;
  background: #002f4d;
  color: #00f6ff;
  border: 1px solid #00f6ff33;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px #00f6ff22;
}

#downloadModal .dl-btn:hover {
  background: #003f5e;
  box-shadow: 0 0 14px #00f6ff99;
  color: #ffffff;
}

#downloadModal p {
  color: #ccc;
  font-size: 13px;
}

#downloadModal a[href^="#"] {
  color: #8cf;
  text-decoration: underline;
}

.dl-btn.disabled {
  background: rgba(0, 100, 150, 0.1);
  color: #66b3ff;
  padding: 12px 20px;
  border: 1px solid rgba(0, 200, 255, 0.1);
  border-radius: 12px;
  cursor: not-allowed;
  font-size: 14px;
  transition: all 0.3s ease;
  text-align: center;
  user-select: none;
  opacity: 0.6;
}


.back-btn {
  margin-top: 24px;
  padding: 10px 20px;
  background: rgba(0, 255, 255, 0.08);
  border: 1px solid rgba(0, 255, 255, 0.2);
  color: #00f6ff;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.back-btn:hover {
  background: rgba(0, 255, 255, 0.15);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(0, 255, 255, 0.25);
  transform: translateX(-4px);
}



/* Unified nav additions */
.mq-actions button { background: transparent; border: 1px solid rgba(0,255,255,0.15); border-radius: 8px; padding: 4px 6px; }
.mq-tabs { width: 100%; max-width: none; margin: 0; padding: 6px 20px; border-top: 1px solid rgba(0,255,255,0.1); }

/* Fine-tune unified nav/icon layout */
#nav-actions-anchor {
  display: flex;
  align-items: center;
}
.mq-actions { flex: 0 1 auto; display: inline-flex; align-items: center; gap: 8px; min-width: fit-content; padding-right: 16px; }
.mq-actions img { display: block; }

@media (max-width: 768px) {
  .mq-actions { padding-right: 0; gap: 10px; }
  .mq-actions button { flex: 0 0 auto; }
}

@media (max-width: 520px) {
  .mq-actions { gap: 8px; }
  .mq-actions button { padding: 6px 8px; }
}
#user-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(0, 255, 255, 0.4);
  cursor: pointer;
  display: block;
  pointer-events: auto;
  touch-action: manipulation;
}

.user-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 6px;
  cursor: pointer;
  pointer-events: auto;
  z-index: 1;
  touch-action: manipulation;
}


.notif-dot {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 10px;
  display: none;
  background: #00f6ff;
  color: #001b2e;
  border-radius: 12px;
  padding: 2px 4px;
  min-width: 16px;
  line-height: 1;
  text-align: center;
  box-shadow: 0 0 6px rgba(0, 255, 255, 0.45);
}

.dock-container .notif-dot {
  background: #ff3b30;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 59, 48, 0.55);
}

/* --- Layout/z-index fixes to avoid overlaps with top nav & modals --- */
/* Ensure app toolbar sits below the unified top nav with spacing */
/* Tab bar tweaks */
#tabBar, .tab { position: relative; z-index: 1800; }
/* Keep login modals above nav */
.webos-modal { z-index: 10020; }

/* Smart Search container below top nav */
#smart-search {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translate(-50%, -8px) scale(0.97);
  width: min(860px, calc(100% - 40px));
  opacity: 0;
  display: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
  z-index: 10010 !important;
}

#smart-search.active {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
#smart-search .search-inner {
  background: radial-gradient(circle at top, rgba(20, 90, 120, 0.35), rgba(2, 18, 28, 0.95));
  border: 1px solid rgba(0, 255, 255, 0.18);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
}

#smartResults {
  max-height: 60vh;
  overflow: auto;
  margin-top: 8px;
}

.smart-search-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.smart-search-brand {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  background: rgba(0, 246, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 12px rgba(0, 246, 255, 0.08);
}

.smart-search-brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0, 246, 255, 0.6));
}

.smart-search-top .close-btn {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(0, 246, 255, 0.18);
  background: rgba(0, 30, 45, 0.6);
  color: #dffbff;
  cursor: pointer;
}

.smart-search-top .close-btn:hover {
  background: rgba(0, 60, 80, 0.7);
}

.smart-search-header h3 {
  margin: 4px 0 2px;
  font-size: 1.1rem;
  color: #e6fbff;
  letter-spacing: 0.5px;
}

.smart-search-header p {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: rgba(200, 235, 245, 0.7);
}

.smart-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(0, 246, 255, 0.22);
  background: linear-gradient(160deg, rgba(0, 30, 45, 0.95), rgba(0, 60, 80, 0.6));
  box-shadow: inset 0 0 12px rgba(0, 246, 255, 0.1);
}

.smart-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(0, 246, 255, 0.12);
}

.smart-search-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0, 246, 255, 0.6));
}

.smart-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #dffbff;
  font-size: 0.95rem;
  padding: 6px 2px;
}

.smart-input::placeholder {
  color: rgba(180, 220, 235, 0.6);
}

.smart-btn {
  border: none;
  border-radius: 12px;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(0, 246, 255, 0.95), rgba(120, 255, 220, 0.9));
  color: #02131d;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 246, 255, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.smart-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 246, 255, 0.45);
}

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

@media (max-width: 600px) {
  #smart-search {
    top: 64px;
    width: calc(100% - 24px);
  }
}

@media (max-width: 480px) {
  .smart-search-bar {
    flex-wrap: nowrap;
  }

  .smart-input {
    font-size: 0.9rem;
    padding: 8px;
  }

  .smart-btn {
    font-size: 0.9rem;
    padding: 8px;
  }
}

/* ✅ ضبط موضع شريط البحث في الشاشات الصغيرة */
@media (max-width: 768px) {
  #smart-search {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90% !important;
    max-width: 600px;
  }


}



/* Smart Search UI polish */
.smart-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 20, 40, 0.6);
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 12px;
  padding: 8px 10px;
  animation: pulseGlow 10s ease-in-out infinite;
}
.smart-input { flex:1; background:#07131e; color:#cfefff; border:1px solid rgba(0,255,255,0.12); padding:10px 12px; border-radius:10px; outline:none; }
.smart-input:focus { border-color:#00f6ff; box-shadow: 0 0 0 2px rgba(0,246,255,0.15); }
.smart-btn { background: rgba(0,255,255,0.08); border:1px solid rgba(0,255,255,0.18); color:#8fe7ff; border-radius:10px; padding:8px 10px; cursor:pointer; }
.smart-btn.primary { background: rgba(0,246,255,0.15); color:#00f6ff; }
.smart-btn:hover { background: rgba(0,255,255,0.2); }

.suggestions { list-style:none; margin:8px 0 0; padding:4px; background: rgba(0,20,40,0.5); border:1px solid rgba(0,255,255,0.12); border-radius:10px; }
.suggestions li { padding:8px 10px; border-radius:8px; cursor:pointer; color:#bfefff; }
.suggestions li:hover { background: rgba(0,255,255,0.08); }

#smartResults .results-header { display:flex; justify-content:space-between; align-items:center; padding:8px 4px 6px; color:#9be3ff; font-size:13px; border-bottom:1px solid rgba(0,255,255,0.08); }
#smartResults .results-title { font-weight:700; color:#e8f7ff; }
#smartResults .results-meta { opacity:0.7; }
#smartResults .results-close {
  margin-left: auto;
  background: linear-gradient(135deg, rgba(0, 246, 255, 0.25), rgba(0, 120, 160, 0.35));
  border: 1px solid rgba(0, 246, 255, 0.35);
  color: #e7fbff;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  box-shadow: 0 6px 16px rgba(0, 246, 255, 0.18);
}
#smartResults .results-close:hover { filter: brightness(1.1); }
#smartResults .results-filters { display:flex; gap:8px; flex-wrap:wrap; padding:10px 0 6px; }
#smartResults .filter-pill { background:rgba(7,18,38,0.85); color:#9be3ff; border:1px solid rgba(0,255,255,0.12); border-radius:999px; padding:6px 12px; font-weight:700; cursor:pointer; transition: all 0.15s ease; }
#smartResults .filter-pill.active { background:linear-gradient(120deg, #0f4c75, #143d59); color:#fff; border-color:rgba(0,255,255,0.35); box-shadow:0 4px 12px rgba(0,255,255,0.18); }
#smartResults .filter-pill:hover { border-color:rgba(0,255,255,0.25); transform: translateY(-1px); }
#smartResults .result-card { border:1px solid rgba(0,255,255,0.12); background: rgba(0, 20, 40, 0.45); border-radius:12px; padding:10px 12px; margin:8px 0; box-shadow: 0 6px 18px rgba(0,0,0,0.25); }
#smartResults .result-meta { display:flex; gap:8px; align-items:center; flex-wrap:wrap; font-size:12px; color:#9be3ff; margin-bottom:6px; }
#smartResults .result-badge { background:rgba(0,255,255,0.08); border:1px solid rgba(0,255,255,0.25); color:#e8f7ff; padding:4px 8px; border-radius:6px; font-weight:700; }
#smartResults .score-badge { background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.12); color:#ffd166; padding:4px 8px; border-radius:6px; font-weight:700; }
#smartResults .result-row { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
#smartResults .result-title { color:#e8fdff; font-weight:700; margin-bottom:6px; font-size:16px; }
#smartResults .result-snippet { color:#cde7ff; margin:6px 0 4px; font-size:13px; line-height:1.4; }
#smartResults .result-domain { color:#8cd2e6; font-size:12px; opacity:0.9; }
#smartResults .result-link { color:#7ac7ff; font-size:12px; word-break: break-all; display:block; }
#smartResults .result-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
#smartResults .result-btn { padding:6px 10px; border-radius:8px; background: rgba(0,255,255,0.08); color:#9be8ff; border:1px solid rgba(0,255,255,0.16); cursor:pointer; font-size:12px; }
#smartResults .result-btn.open { background: #004055; color:#bff5ff; border-color: rgba(0,255,255,0.22); }
#smartResults .result-btn.ghost:hover, #smartResults .result-btn.open:hover { filter: brightness(1.1); }

@media (max-width: 760px) {
  .mq-actions button img { width: 18px !important; height: 18px !important; }
}

#render-MQPY {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 20px;
  height: 100%;
  overflow-y: auto;

}




/* ——— Split Polish Pack (Mobile-friendly, keeps effects) ——— */

/* أساسيات دقيقة للنص */
.auth-card--split .auth-message h3,
.auth-card--split .auth-message p {
  text-align: right;
  text-wrap: balance;
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word;
  word-break: break-word;
  letter-spacing: 0.02em;
}

/* حجم نصوص ذكي باستخدام clamp */
.auth-card--split .auth-message h3 {
  font-size: clamp(0.98rem, 2.2vw, 1.24rem);
  line-height: 1.15;
}
.auth-card--split .auth-message p {
  font-size: clamp(0.78rem, 1.6vw, 0.86rem);
  line-height: 1.5;
}

/* ضبط الهندسة العامة — نُثبّت التخطيط وتقسيم 50/50 */
@media (max-width: 900px) {
  .auth-card--split {
    flex-direction: row;
    max-width: min(860px, 96vw);
    border-radius: 24px;
  }
  .auth-card--split[data-mode="register"] { flex-direction: row-reverse; }

  .auth-card--split .auth-pane,
  .auth-card--split .auth-aside {
    flex: 0 0 50%;
    width: 50%;
    min-width: 0;              /* يمنع تمدد النص */
    padding: clamp(18px, 5.4vw, 28px);
  }

  /* نثبت رسالة الجانب يمين مثل الديسكتوب */
  .auth-card--split .auth-message {
    align-items: flex-end;
    text-align: right;
    margin: 0 clamp(8px, 2vw, 16px) 0 0;
    padding: clamp(4px, 1vw, 10px) 0 clamp(4px, 1vw, 10px) clamp(8px, 1.2vw, 14px);
  }

  /* منع القص في الشريحة القطرية على iOS */
  .auth-card--split .auth-aside {
    contain: layout paint;
    border-radius: 20px; /* تتوافق مع ::after الداخلية */
    justify-content: center;
    align-items: center;
  }
  .auth-card--split .auth-aside::before {
    clip-path: polygon(44% 0, 100% 0, 100% 100%, 8% 100%);
    transform: none !important;
    will-change: opacity, transform;
  }
  .auth-card--split .auth-aside::after {
    border-radius: 18px;
    /* نزيد التباين قليلًا لتظهر الكتابة أوضح على الشاشات الصغيرة */
    background: linear-gradient(150deg, rgba(0, 22, 44, 0.94), rgba(0, 34, 64, 0.96));
  }

  /* الحقول والأزرار: هوامش وتنفس أفضل */
  .auth-card--split .auth-form { gap: clamp(12px, 2.6vh, 16px); }
  .auth-card--split .input-box { padding-bottom: 6px; }
  .auth-card--split .btn {
    width: 100%;
    padding: 12px 24px;
    font-size: clamp(0.9rem, 2.5vw, 0.98rem);
    box-shadow: 0 16px 36px rgba(0, 135, 255, 0.40);
  }
}

/* تحسين أدق لعرض آيفون (< 390px) */
@media (max-width: 390px) {
  .auth-card--split { border-radius: 20px; }
  .auth-card--split .auth-pane { padding: 14px; }
  .auth-card--split .auth-message h3 { font-size: 0.96rem; }
  .auth-card--split .auth-message p { font-size: 0.74rem; }
}

/* حل مشكلة شارة “WELCOME BACK” التي تتزاحم فوق النص */
.auth-card--split .auth-aside .auth-tag {
  transform: translateY(0);
  margin-bottom: 6px;
  white-space: nowrap;
}

/* لمسة حركة خفيفة وموفرة للطاقة على الشريحة القطرية */
@media (prefers-reduced-motion: no-preference) {
  .auth-card--split .auth-aside::before {
    animation: asideShimmer 4.2s ease-in-out infinite alternate;
  }
  @keyframes asideShimmer {
    0%   { opacity: 0.88; filter: drop-shadow(0 0 18px rgba(0,238,255,.35)); }
    100% { opacity: 1;    filter: drop-shadow(0 0 28px rgba(0,238,255,.45)); }
  }
}

/* تباين حواف البطاقة للخارج بدون زيادة وهج زائد على الموبايل */
.auth-card--split::after {
  filter: blur(28px);
  opacity: .40;
}

/* دعم آمن لحواف الشاشة (iOS safe areas) عند فتح المودال */
@supports (padding: max(0px)) {
  .webos-modal { padding: max(16px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-right)); }
}
