/* ==========================================================================
   TRILLION TRADER — APPLE DESIGN SYSTEM (apple.com Aesthetic)
   San Francisco Typography, Dark Titanium, Frosted Glass & Precision Motion
   Fully Optimized for Zero-Overlap Mobile & Interactive Touch-Styled Rectangular Boxes
   ========================================================================== */

:root {
  --apple-black: #000000;
  --apple-card-bg: rgba(26, 26, 29, 0.72);
  --apple-card-border: rgba(255, 255, 255, 0.12);
  --apple-card-border-hover: rgba(255, 255, 255, 0.24);
  --apple-text-primary: #F5F5F7;
  --apple-text-secondary: #A1A1A6;
  --apple-text-tertiary: #6E6E73;
  --apple-blue: #0071E3;
  --apple-blue-hover: #0077ED;
  --apple-blue-glow: rgba(0, 113, 227, 0.35);
  --apple-accent: #2997FF;
  --apple-green: #30D158;
  --apple-red: #FF453A;
  --apple-gold: #E5A93C;
  --apple-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --apple-mono: "SF Mono", Monaco, Menlo, Consolas, monospace;
  --apple-radius-sm: 10px;
  --apple-radius-md: 16px;
  --apple-radius-lg: 24px;
  --apple-radius-full: 980px;
  --apple-transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--apple-font);
  background-color: var(--apple-black);
  color: var(--apple-text-primary);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background-color: #000000;
  color: var(--apple-text-primary);
  overflow-x: hidden;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Global text safety rule: prevent text overflow/collisions on any device */
h1, h2, h3, h4, h5, h6, p, span, a, label, li, div {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Ambient Radial Glows (Apple Keynote Lighting) */
.ambient-lighting {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle 900px at 50% -20%, rgba(41, 151, 255, 0.12), transparent 70%),
    radial-gradient(circle 700px at 80% 80%, rgba(0, 113, 227, 0.06), transparent 70%),
    radial-gradient(circle 600px at 20% 90%, rgba(48, 209, 88, 0.05), transparent 70%);
}

/* Apple Navigation Bar */
.apple-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-sizing: border-box;
}

.apple-nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.apple-logo-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  text-decoration: none;
  letter-spacing: -0.01em;
  flex-shrink: 0;
  white-space: nowrap;
}

.apple-logo-badge svg {
  fill: currentColor;
  flex-shrink: 0;
}

.apple-steps-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--apple-radius-full);
  padding: 4px 10px;
  font-size: 11px;
  color: var(--apple-text-secondary);
  flex-shrink: 0;
  white-space: nowrap;
}

.step-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: var(--apple-transition);
  flex-shrink: 0;
}

.step-dot.active {
  background: var(--apple-accent);
  box-shadow: 0 0 8px var(--apple-accent);
}

.step-dot.completed {
  background: var(--apple-green);
}

.nav-security-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--apple-text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: var(--apple-radius-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  white-space: nowrap;
}

.security-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--apple-green);
  flex-shrink: 0;
}

/* Navbar Mobile Optimizations to avoid word collision */
@media (max-width: 640px) {
  .nav-security-text {
    display: none;
  }
  .nav-security-badge {
    padding: 6px;
  }
}

@media (max-width: 520px) {
  #step-label-text {
    display: none;
  }
  .apple-steps-pill {
    padding: 6px 10px;
  }
}

@media (max-width: 380px) {
  .apple-navbar {
    padding: 0 12px;
  }
  .nav-security-badge {
    display: none;
  }
  .apple-logo-badge {
    font-size: 13px;
    gap: 6px;
  }
}

/* Main Layout & Page Transitions */
main.main-viewport {
  position: relative;
  z-index: 1;
  flex: 1;
  max-width: 980px;
  width: 100%;
  margin: 68px auto 44px;
  padding: 0 20px;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  main.main-viewport {
    margin: 58px auto 30px;
    padding: 0 14px;
  }
}

.page-view {
  display: none;
  opacity: 0;
  transform: translateY(18px) scale(0.99);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.page-view.active-view {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Headings with Apple Titanium Gradient & Responsive Line-Heights */
.apple-eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--apple-accent);
  margin-bottom: 8px;
  display: inline-block;
}

.apple-headline {
  font-size: clamp(26px, 6.5vw, 54px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin-bottom: 12px;
  color: #F5F5F7;
  background: linear-gradient(180deg, #FFFFFF 30%, #A1A1A6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  overflow-wrap: break-word;
  word-break: break-word;
}

.apple-subhead {
  font-size: clamp(14px, 3.8vw, 18px);
  font-weight: 400;
  color: var(--apple-text-secondary);
  line-height: 1.5;
  letter-spacing: -0.015em;
  max-width: 640px;
  margin: 0 auto 28px;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Apple Cards */
.apple-card {
  background: var(--apple-card-bg);
  backdrop-filter: blur(35px) saturate(190%);
  -webkit-backdrop-filter: blur(35px) saturate(190%);
  border: 1px solid var(--apple-card-border);
  border-radius: var(--apple-radius-lg);
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  transition: var(--apple-transition);
  box-sizing: border-box;
  width: 100%;
}

.apple-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
}

.apple-card:hover {
  border-color: var(--apple-card-border-hover);
}

/* Form Styles */
.apple-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.apple-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  width: 100%;
}

.apple-label {
  font-size: 13px;
  font-weight: 500;
  color: #E5E5E7;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
}

.apple-label-tag {
  font-size: 11px;
  color: var(--apple-text-tertiary);
  font-weight: 400;
}

.apple-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.apple-input-icon {
  position: absolute;
  left: 16px;
  color: var(--apple-text-tertiary);
  pointer-events: none;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.apple-input {
  width: 100%;
  height: 50px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--apple-radius-md);
  padding: 0 16px 0 46px;
  color: #FFFFFF;
  font-size: 16px; /* 16px prevents iOS Safari from auto-zooming on focus */
  font-family: inherit;
  transition: var(--apple-transition);
  outline: none;
  box-sizing: border-box;
}

.apple-input::placeholder {
  color: #636366;
}

.apple-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--apple-accent);
  box-shadow: 0 0 0 4px var(--apple-blue-glow);
}

.apple-input.input-error {
  border-color: var(--apple-red);
  box-shadow: 0 0 0 3px rgba(255, 69, 58, 0.25);
}

/* Explicit requirement helper below Age input */
.apple-age-requirement-note {
  font-size: 12.5px;
  font-weight: 500;
  color: #FF9F0A; /* Apple Amber / Yellow Accent for clear notice */
  margin-top: 5px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.4;
  overflow-wrap: break-word;
  word-break: break-word;
}

.apple-age-requirement-note svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.apple-field-error {
  font-size: 12px;
  color: var(--apple-red);
  margin-top: 3px;
  display: none;
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: break-word;
}

.apple-field-error.show {
  display: block;
}

/* Apple Buttons */
.apple-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--apple-radius-full);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--apple-transition);
  position: relative;
  user-select: none;
  box-sizing: border-box;
  text-align: center;
  line-height: 1.2;
}

.apple-btn svg {
  flex-shrink: 0;
}

.apple-btn:active {
  transform: scale(0.98);
}

.apple-btn-primary {
  background-color: var(--apple-blue);
  color: #FFFFFF;
  box-shadow: 0 4px 14px var(--apple-blue-glow);
}

.apple-btn-primary:hover {
  background-color: var(--apple-blue-hover);
  box-shadow: 0 6px 20px rgba(0, 113, 227, 0.45);
}

.apple-btn-white {
  background-color: #F5F5F7;
  color: #000000;
}

.apple-btn-white:hover {
  background-color: #FFFFFF;
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.25);
}

.apple-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #F5F5F7;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.apple-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
}

.apple-btn:disabled, .apple-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.btn-full {
  width: 100%;
}

/* Disclaimer Box (Apple Regulatory Card) */
.apple-disclaimer-box {
  margin-top: 32px;
  padding: 22px 18px;
  border-radius: var(--apple-radius-md);
  background: rgba(20, 20, 22, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  box-sizing: border-box;
  width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.disclaimer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #A1A1A6;
  margin-bottom: 12px;
}

.disclaimer-badge svg {
  flex-shrink: 0;
}

.disclaimer-text {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--apple-text-secondary);
  font-weight: 400;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.disclaimer-text p + p {
  margin-top: 12px;
}

/* Terms & Conditions Container */
.terms-scroll-pane {
  max-height: 460px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Momentum smooth scrolling on iOS */
  padding: 22px 20px;
  background: rgba(16, 16, 18, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--apple-radius-md);
  text-align: left;
  font-size: 13.5px;
  line-height: 1.65;
  color: #D1D1D6;
  margin-bottom: 22px;
  box-sizing: border-box;
  width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Apple Custom Scrollbar */
.terms-scroll-pane::-webkit-scrollbar {
  width: 5px;
}

.terms-scroll-pane::-webkit-scrollbar-track {
  background: transparent;
}

.terms-scroll-pane::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.terms-scroll-pane::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
}

.terms-main-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: break-word;
}

.terms-section-title {
  font-size: 14.5px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 20px 0 8px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: break-word;
}

.terms-section-title:first-child {
  margin-top: 0;
}

.terms-list {
  list-style: none;
  padding-left: 0;
  margin: 10px 0;
}

.terms-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word;
}

.terms-list li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--apple-accent);
}

.terms-date-tag {
  display: inline-block;
  margin-top: 18px;
  font-size: 11.5px;
  color: var(--apple-text-tertiary);
  font-weight: 500;
}

/* Terms Actions Group (Side-by-Side Proper Size on All Devices) */
.terms-action-buttons {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
  margin-top: 22px;
}

.terms-action-buttons .apple-btn {
  height: 50px !important;
  min-height: 50px !important;
  border-radius: var(--apple-radius-full) !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  transition: var(--apple-transition);
}

.terms-action-buttons .apple-btn-secondary {
  flex: 1 1 35% !important;
  min-width: 0 !important;
  padding: 0 16px !important;
}

.terms-action-buttons .apple-btn-primary {
  flex: 2 1 65% !important;
  min-width: 0 !important;
  padding: 0 20px !important;
}

.btn-lbl-desktop {
  display: inline;
}

.btn-lbl-mobile {
  display: none;
}

@media (max-width: 520px) {
  .btn-lbl-desktop {
    display: none;
  }
  .btn-lbl-mobile {
    display: inline;
  }
  .terms-action-buttons {
    gap: 8px !important;
  }
  .terms-action-buttons .apple-btn-secondary {
    padding: 0 10px !important;
    font-size: 14px !important;
  }
  .terms-action-buttons .apple-btn-primary {
    padding: 0 14px !important;
    font-size: 14px !important;
  }
}

/* Interactive Checkbox Control */
.apple-checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--apple-radius-md);
  cursor: pointer;
  transition: var(--apple-transition);
  text-align: left;
  margin-bottom: 22px;
  box-sizing: border-box;
  width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.apple-checkbox-container:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
}

.apple-checkbox-input {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  position: relative;
  transition: var(--apple-transition);
  margin-top: 2px;
  flex-shrink: 0;
}

.apple-checkbox-input:checked {
  background-color: var(--apple-blue);
  border-color: var(--apple-blue);
}

.apple-checkbox-input:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 7px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.apple-checkbox-text {
  font-size: 13px;
  line-height: 1.45;
  color: #E5E5EA;
  font-weight: 500;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ==========================================================================
   SIMPLE RECTANGULAR BORDERED BOXES (Apple Minimalist Request)
   Enhanced with Vibrant Touch / Hover Color Themes & Dynamic Micro-States
   ========================================================================== */
.simple-box-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 780px;
  margin: 32px auto 0;
  width: 100%;
}

.apple-rect-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 26px;
  min-height: 84px;
  background: linear-gradient(145deg, rgba(8, 28, 54, 0.78) 0%, rgba(4, 16, 32, 0.90) 100%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1.5px solid rgba(41, 151, 255, 0.35);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 45, 105, 0.28), inset 0 1px 0 rgba(41, 151, 255, 0.22);
  color: #FFFFFF;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  width: 100%;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.apple-rect-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(65, 165, 255, 0.45), transparent);
}

.apple-rect-title {
  font-size: 18px;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.apple-rect-arrow {
  color: #64A7F6;
  transition: transform 0.25s ease, color 0.25s ease;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   SHADES OF BLUE THEME FOR ALL RECTANGULAR BOXES (PAGE 3 & PAGE 4)
   -------------------------------------------------------------------------- */

/* 1. Free Class (Deep Azure Midnight Blue Shade) */
.apple-rect-box.box-free-class {
  background: linear-gradient(145deg, rgba(8, 30, 58, 0.82) 0%, rgba(4, 18, 36, 0.94) 100%);
  border-color: rgba(41, 151, 255, 0.40);
  box-shadow: 0 12px 32px rgba(0, 75, 165, 0.30), inset 0 1px 0 rgba(41, 151, 255, 0.25);
}

.apple-rect-box.box-free-class:hover,
.apple-rect-box.box-free-class:focus,
.apple-rect-box.box-free-class.box-touch-active {
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.46) 0%, rgba(41, 151, 255, 0.26) 100%) !important;
  border-color: rgba(41, 151, 255, 0.88) !important;
  box-shadow: 0 16px 42px rgba(0, 113, 227, 0.50), inset 0 0 22px rgba(41, 151, 255, 0.24) !important;
  transform: translateY(-3px);
}

.apple-rect-box.box-free-class:hover .apple-rect-title,
.apple-rect-box.box-free-class.box-touch-active .apple-rect-title {
  color: #FFFFFF;
  text-shadow: 0 0 14px rgba(41, 151, 255, 0.75);
}

.apple-rect-box.box-free-class:hover .apple-rect-arrow,
.apple-rect-box.box-free-class.box-touch-active .apple-rect-arrow {
  color: #52B4FF;
  transform: translateX(6px) scale(1.15);
}

/* 2. CPT Market Referral (Deep Royal Sapphire Blue Shade) */
.apple-rect-box.box-cpt {
  background: linear-gradient(145deg, rgba(10, 34, 66, 0.82) 0%, rgba(5, 20, 42, 0.94) 100%);
  border-color: rgba(30, 136, 229, 0.40);
  box-shadow: 0 12px 32px rgba(0, 85, 185, 0.30), inset 0 1px 0 rgba(66, 165, 245, 0.25);
}

.apple-rect-box.box-cpt:hover,
.apple-rect-box.box-cpt:focus,
.apple-rect-box.box-cpt.box-touch-active {
  background: linear-gradient(135deg, rgba(21, 101, 192, 0.46) 0%, rgba(66, 165, 245, 0.26) 100%) !important;
  border-color: rgba(66, 165, 245, 0.88) !important;
  box-shadow: 0 16px 42px rgba(21, 101, 192, 0.50), inset 0 0 22px rgba(66, 165, 245, 0.24) !important;
  transform: translateY(-3px);
}

.apple-rect-box.box-cpt:hover .apple-rect-title,
.apple-rect-box.box-cpt.box-touch-active .apple-rect-title {
  color: #FFFFFF;
  text-shadow: 0 0 14px rgba(66, 165, 245, 0.75);
}

.apple-rect-box.box-cpt:hover .apple-rect-arrow,
.apple-rect-box.box-cpt.box-touch-active .apple-rect-arrow {
  color: #64B5F6;
  transform: translateX(6px) scale(1.15);
}

/* 3. Telegram Group (Deep Cerulean / Electric Sky Blue Shade) */
.apple-rect-box.box-tg-group {
  background: linear-gradient(145deg, rgba(7, 36, 70, 0.82) 0%, rgba(3, 22, 45, 0.94) 100%);
  border-color: rgba(0, 149, 255, 0.40);
  box-shadow: 0 12px 32px rgba(0, 105, 220, 0.30), inset 0 1px 0 rgba(56, 189, 248, 0.25);
}

.apple-rect-box.box-tg-group:hover,
.apple-rect-box.box-tg-group:focus,
.apple-rect-box.box-tg-group.box-touch-active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.46) 0%, rgba(56, 189, 248, 0.26) 100%) !important;
  border-color: rgba(56, 189, 248, 0.88) !important;
  box-shadow: 0 16px 42px rgba(2, 132, 199, 0.50), inset 0 0 22px rgba(56, 189, 248, 0.24) !important;
  transform: translateY(-3px);
}

.apple-rect-box.box-tg-group:hover .apple-rect-title,
.apple-rect-box.box-tg-group.box-touch-active .apple-rect-title {
  color: #FFFFFF;
  text-shadow: 0 0 14px rgba(56, 189, 248, 0.75);
}

.apple-rect-box.box-tg-group:hover .apple-rect-arrow,
.apple-rect-box.box-tg-group.box-touch-active .apple-rect-arrow {
  color: #38BDF8;
  transform: translateX(6px) scale(1.15);
}

/* 4. Telegram Contact (Deep Cobalt Oceanic Blue Shade) */
.apple-rect-box.box-tg-contact {
  background: linear-gradient(145deg, rgba(8, 32, 62, 0.82) 0%, rgba(4, 19, 38, 0.94) 100%);
  border-color: rgba(41, 160, 255, 0.40);
  box-shadow: 0 12px 32px rgba(0, 80, 175, 0.30), inset 0 1px 0 rgba(96, 165, 250, 0.25);
}

.apple-rect-box.box-tg-contact:hover,
.apple-rect-box.box-tg-contact:focus,
.apple-rect-box.box-tg-contact.box-touch-active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.46) 0%, rgba(96, 165, 250, 0.26) 100%) !important;
  border-color: rgba(96, 165, 250, 0.88) !important;
  box-shadow: 0 16px 42px rgba(37, 99, 235, 0.50), inset 0 0 22px rgba(96, 165, 250, 0.24) !important;
  transform: translateY(-3px);
}

.apple-rect-box.box-tg-contact:hover .apple-rect-title,
.apple-rect-box.box-tg-contact.box-touch-active .apple-rect-title {
  color: #FFFFFF;
  text-shadow: 0 0 14px rgba(96, 165, 250, 0.75);
}

.apple-rect-box.box-tg-contact:hover .apple-rect-arrow,
.apple-rect-box.box-tg-contact.box-touch-active .apple-rect-arrow {
  color: #60A5FA;
  transform: translateX(6px) scale(1.15);
}

/* Page 4: Drive Link & Owner Telegram (Cohesive Blue Shades) */
.apple-rect-box.box-drive {
  background: linear-gradient(145deg, rgba(8, 30, 58, 0.82) 0%, rgba(4, 18, 36, 0.94) 100%);
  border-color: rgba(41, 151, 255, 0.40);
  box-shadow: 0 12px 32px rgba(0, 75, 165, 0.30), inset 0 1px 0 rgba(41, 151, 255, 0.25);
}

.apple-rect-box.box-drive:hover,
.apple-rect-box.box-drive:focus,
.apple-rect-box.box-drive.box-touch-active {
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.46) 0%, rgba(41, 151, 255, 0.26) 100%) !important;
  border-color: rgba(41, 151, 255, 0.88) !important;
  box-shadow: 0 16px 42px rgba(0, 113, 227, 0.50), inset 0 0 22px rgba(41, 151, 255, 0.24) !important;
  transform: translateY(-3px);
}

.apple-rect-box.box-drive:hover .apple-rect-title,
.apple-rect-box.box-drive.box-touch-active .apple-rect-title {
  color: #FFFFFF;
  text-shadow: 0 0 14px rgba(41, 151, 255, 0.75);
}

.apple-rect-box.box-drive:hover .apple-rect-arrow,
.apple-rect-box.box-drive.box-touch-active .apple-rect-arrow {
  color: #52B4FF;
  transform: translateX(6px) scale(1.15);
}

.apple-rect-box.box-owner-tg {
  background: linear-gradient(145deg, rgba(7, 36, 70, 0.82) 0%, rgba(3, 22, 45, 0.94) 100%);
  border-color: rgba(0, 149, 255, 0.40);
  box-shadow: 0 12px 32px rgba(0, 105, 220, 0.30), inset 0 1px 0 rgba(56, 189, 248, 0.25);
}

.apple-rect-box.box-owner-tg:hover,
.apple-rect-box.box-owner-tg:focus,
.apple-rect-box.box-owner-tg.box-touch-active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.46) 0%, rgba(56, 189, 248, 0.26) 100%) !important;
  border-color: rgba(56, 189, 248, 0.88) !important;
  box-shadow: 0 16px 42px rgba(2, 132, 199, 0.50), inset 0 0 22px rgba(56, 189, 248, 0.24) !important;
  transform: translateY(-3px);
}

.apple-rect-box.box-owner-tg:hover .apple-rect-title,
.apple-rect-box.box-owner-tg.box-touch-active .apple-rect-title {
  color: #FFFFFF;
  text-shadow: 0 0 14px rgba(56, 189, 248, 0.75);
}

.apple-rect-box.box-owner-tg:hover .apple-rect-arrow,
.apple-rect-box.box-owner-tg.box-touch-active .apple-rect-arrow {
  color: #38BDF8;
  transform: translateX(6px) scale(1.15);
}

/* Tactile Click / Touch-Down Compression */
.apple-rect-box:active {
  transform: scale(0.97) !important;
}

/* Page 4 Hero container */
.portal-hero-container {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 28px;
  width: 100%;
}

/* Dynamic Toast Notification (Apple Style) */
.apple-toast {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  max-width: calc(100vw - 32px);
  width: max-content;
  box-sizing: border-box;
  background: rgba(28, 28, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: var(--apple-radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.apple-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--apple-accent);
  flex-shrink: 0;
}

/* Apple Footer */
.apple-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px 16px;
  background: rgba(0, 0, 0, 0.9);
  text-align: center;
  font-size: 12px;
  color: var(--apple-text-tertiary);
  z-index: 10;
  box-sizing: border-box;
  width: 100%;
}

.apple-footer-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  width: 100%;
}

/* ==========================================================================
   Comprehensive Mobile Breakpoints (Stable Sizing & Zero Overlap)
   ========================================================================== */
@media (max-width: 640px) {
  .simple-box-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 24px;
  }

  .apple-rect-box {
    padding: 22px 20px;
    min-height: 76px;
  }

  .apple-rect-title {
    font-size: 16.5px;
  }

  .apple-card {
    padding: 26px 18px;
    border-radius: 20px;
  }

  .terms-scroll-pane {
    padding: 18px 14px;
    max-height: 400px;
    font-size: 13px;
  }

  .terms-main-title {
    font-size: 14px;
  }
}

@media (max-width: 380px) {
  .apple-card {
    padding: 22px 14px;
    border-radius: 18px;
  }

  .apple-rect-box {
    padding: 20px 16px;
    min-height: 70px;
  }

  .apple-rect-title {
    font-size: 15.5px;
  }

  .apple-input {
    height: 48px;
    padding: 0 12px 0 42px;
    font-size: 16px;
  }

  .apple-input-icon {
    left: 12px;
  }

  .terms-scroll-pane {
    padding: 16px 12px;
    font-size: 12.5px;
  }

  .apple-checkbox-container {
    padding: 14px 12px;
    gap: 10px;
  }

  .apple-checkbox-text {
    font-size: 12px;
  }

  .apple-disclaimer-box {
    padding: 18px 14px;
  }

  .disclaimer-text {
    font-size: 12px;
  }
}
