/* ==========================================================================
   XPROTECT MODALS & DIALOGS STYLES
   ========================================================================== */

/* Modal Backdrop */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 18, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Modal Card */
.modal-container {
  background: #0d121f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), var(--shadow-glow-blue);
  width: 100%;
  max-width: 600px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(15px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-container {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.modal-title i {
  color: var(--accent-blue);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.65;
}

.modal-body h4 {
  color: #ffffff;
  font-size: 1.05rem;
  margin: 18px 0 8px;
}

.modal-body h4:first-child {
  margin-top: 0;
}

.modal-body p {
  margin-bottom: 12px;
}

.modal-body ul {
  padding-left: 20px;
  margin-bottom: 14px;
}

.modal-body li {
  margin-bottom: 6px;
}

.modal-highlight-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-left: 4px solid var(--accent-blue);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 16px 0;
  color: #e2e8f0;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  background: rgba(255, 255, 255, 0.02);
}

/* Token / Credits Modal Specifics */
.packages-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.package-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.package-card:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent-blue);
  transform: translateY(-2px);
}

.package-amount {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.package-tag {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.package-price {
  background: var(--accent-blue);
  color: #ffffff;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

#auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 99999;
}

#auth-modal-overlay.hidden {
  display: none !important;
}

.auth-card-dark {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 20px;
  width: 400px;
  max-width: 92vw;
  padding: 30px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  font-family: 'Outfit', sans-serif;
  color: white;
  margin: auto;
  box-sizing: border-box;
}

.auth-title-dark {
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}

.auth-step-dark {
  display: flex;
  align-items: center;
  margin-top: 18px;
  color: #666;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.auth-step-dark.active {
  color: #fff;
}

.auth-step-dark.completed {
  color: #aaa;
}

.step-icon-dark {
  margin-right: 15px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-line-dark {
  margin-left: 11px;
  border-left: 2px solid #333;
  height: 20px;
  margin-top: 9px;
}

.step-line-dark.completed {
  border-left-color: #4cd964;
}

.auth-btn-premium {
  background: linear-gradient(135deg, #7c62db 0%, #5a42b3 100%);
  color: white;
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 17px;
  margin-top: 30px;
  border: none;
  cursor: pointer;
  display: block;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
}

.auth-btn-premium:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(124, 98, 219, 0.4);
}

.auth-btn-premium:disabled {
  background: #333;
  color: #777;
  cursor: not-allowed;
  transform: none;
}

.status-check-green {
  color: #4cd964;
}

.status-circle-pending {
  width: 20px;
  height: 20px;
  border: 2px solid #444;
  border-radius: 50%;
}

.auth-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

.auth-step.active {
  color: #ffffff;
}

.auth-step.completed {
  color: var(--accent-green);
}

.auth-step-line {
  margin-left: 11px;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  height: 20px;
}

.auth-step-line.completed {
  border-left-color: var(--accent-green);
}


/* Toast Notifications */
.reward-toast {
  position: fixed;
  top: 24px;
  right: -420px;
  width: 340px;
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 16px;
  color: #ffffff;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
  z-index: 100000;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.reward-toast.show {
  right: 24px;
}

.reward-icon {
  background: linear-gradient(135deg, #7c62db 0%, #5a42b3 100%);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(124, 98, 219, 0.4);
}

.reward-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.reward-content p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.reward-close {
  position: absolute;
  top: 10px;
  right: 14px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: color 0.2s;
}

.reward-close:hover {
  color: #ffffff;
}

@media (max-width: 480px) {
  .reward-toast {
    right: 16px;
    left: 16px;
    width: auto;
    top: -150px;
    transition: top 0.4s ease;
  }
  .reward-toast.show {
    top: 20px;
    right: 16px;
    left: 16px;
  }
}
