.captcha-detail-page {
  padding-bottom: 35px;
}

.captcha-detail-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Card Styling Reset */
.card-modern {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  box-shadow: 0 4px 18px rgba(16, 24, 40, 0.03);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.alert-success.card-modern {
  background: rgba(16,185,129,0.06);
  border-color: rgba(16,185,129,0.25);
}
.alert-danger.card-modern {
  background: rgba(239,68,68,0.06);
  border-color: rgba(239,68,68,0.25);
}

/* Navigation Back button */
.detail-back-btn {
  min-height: 42px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  color: var(--text-primary);
  border-color: var(--border-default);
  background: var(--bg-surface);
}

/* Modern Hero banner Card style */
.detail-hero-modern {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface2) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  position: relative;
  overflow: hidden;
}
.detail-hero-modern::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  opacity: 0.65;
  pointer-events: none;
}
.hero-modern-badge {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.badge-accent {
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 99px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge-secondary-custom {
  background: rgba(99, 135, 175, 0.10);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 99px;
}
.hero-modern-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}
.hero-modern-desc {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 800px;
  margin: 0;
}

/* Master Redesigned Layout */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(350px, 0.85fr);
  gap: 20px;
  align-items: start;
}

/* Left panel: Duration Steps */
.step-title-block {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.step-num-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
}
.step-main-title {
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 800;
  margin: 0;
}
.step-helper-desc {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Plan Selection Cards Grid */
.detail-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.detail-plan-card {
  display: block;
  margin: 0;
  border: 2px solid var(--border-subtle);
  background: var(--bg-surface);
  border-radius: 20px;
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.02);
  outline: none !important;
}
.detail-plan-card:hover {
  background: var(--bg-surface2);
  border-color: var(--border-default);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.05);
}
.detail-plan-card.is-active {
  border-color: var(--accent);
  background: var(--bg-surface);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.12);
}
.detail-plan-card-body {
  padding: 18px;
}
.plan-duration-text {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.plan-title-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.plan-price-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
}
.plan-limits-info {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  padding: 10px 12px;
  border-radius: 12px;
}
.limit-item {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

/* Indicators below plan card */
.plan-card-footer {
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
}
.select-indicator-hint {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.selected-indicator-hint {
  color: var(--accent);
  display: none;
  align-items: center;
  gap: 4px;
}
.detail-plan-card.is-active .select-indicator-hint {
  display: none;
}
.detail-plan-card.is-active .selected-indicator-hint {
  display: inline-flex;
}

/* Right Checkout Sidebar */
.detail-sticky-panel {
  position: sticky;
  top: 90px;
}
.sidebar-step-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-main-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

/* Payment calculations */
.payment-receipt-box {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px;
}
.receipt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
}
.receipt-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.receipt-val {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}
.receipt-divider {
  height: 1px;
  background: var(--border-subtle);
}
.total-receipt-row {
  min-height: 36px;
}
.receipt-label-total {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}
.receipt-val-total {
  font-size: 20px;
  font-weight: 900;
}

/* Integrated Promo input */
.promo-input-box {
  border-color: var(--border-default) !important;
  background: var(--bg-base) !important;
  color: var(--text-primary) !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  box-shadow: none !important;
  border-left: 0 !important;
}
.promo-input-box::placeholder {
  color: var(--text-muted) !important;
  opacity: 0.8;
}
.promo-input-box:focus {
  border-color: var(--accent) !important;
}

[data-theme="dark"] .promo-input-box::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}
.promo-input-box::placeholder {
  color: var(--text-muted) !important;
}

[data-theme="dark"] .input-group-text.bg-base {
  background-color: var(--bg-surface2) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-muted) !important;
}
[data-theme="dark"] .promo-input-box {
  background-color: var(--bg-surface2) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-primary) !important;
}

/* Button & wallet displays */
.btn-purchase-action {
  font-weight: 800;
  font-size: 14.5px;
  letter-spacing: 0.2px;
  border-radius: 16px !important;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.2) !important;
  transition: all 0.2s ease;
}
.btn-purchase-action:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.28) !important;
}
.btn-purchase-action:disabled {
  box-shadow: none !important;
}
.current-wallet-display {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.wallet-label {
  font-size: 12px;
  font-weight: 600;
}
.wallet-val {
  font-size: 13.5px;
  font-weight: 800;
}

/* Border dashed box */
.border-dashed {
  border-style: dashed !important;
}
.bg-light-opacity {
  background: rgba(124, 58, 237, 0.02) !important;
}

/* Custom result modal */
.custom-result-modal {
  border: 1px solid var(--border-subtle) !important;
}
.custom-result-modal .modal-header {
  border-bottom: 0 !important;
}
.success-icon-badge {
  animation: scaleBounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleBounce {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Dark mode overrides for captcha detail page */
[data-theme="dark"] .detail-hero-modern {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface2) 100%);
}
[data-theme="dark"] .detail-plan-card {
  background: var(--bg-surface);
  border-color: rgba(255, 255, 255, 0.05);
}
[data-theme="dark"] .detail-plan-card:hover {
  background: var(--bg-surface2);
}
[data-theme="dark"] .detail-plan-card.is-active {
  border-color: var(--accent);
  background: var(--bg-surface2);
}
[data-theme="dark"] .plan-limits-info {
  background: var(--bg-base);
  border-color: rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] .payment-receipt-box {
  background: var(--bg-base);
  border-color: rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] .current-wallet-display {
  background: var(--bg-base);
  border-color: rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] .custom-result-modal {
  background: var(--bg-surface);
}

/* Responsive queries */
@media (max-width: 1199.98px) {
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .detail-sticky-panel {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .detail-plan-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .detail-hero-modern {
    padding: 18px;
  }
}

/* Banner Audio Controls */
.banner-audio-controls {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.banner-audio-controls:hover {
  opacity: 1;
}
.banner-audio-toggle:hover,
.banner-video-sound-toggle:hover {
  background: rgba(0,0,0,0.8) !important;
  transform: scale(1.1);
  border-color: rgba(255,255,255,0.5) !important;
}
.banner-audio-toggle:active,
.banner-video-sound-toggle:active {
  transform: scale(0.95);
}
.banner-audio-title {
  animation: audioTitleFadeIn 0.3s ease;
}
@keyframes audioTitleFadeIn {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}
