/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
  /* Colors */
  --bg-dark: #050505;
  --bg-card: #0f0f0f;
  --bg-input: #1a1a1a;
  
  --gold-primary: #d4af37;
  --gold-light: #f3e6b3;
  --gold-dark: #8a6e2f;
  --gold-gradient: linear-gradient(135deg, #d4af37 0%, #f6d365 100%);
  
  --text-white: #ffffff;
  --text-gray: #a0a0a0;
  --text-inactive: #555555; /* For inactive steps */
  
  --danger: #ff4d4d;
  --success: #00b894;

  /* Spacing & Layout */
  --sidebar-width: 280px;
  --header-height: 70px;
  --border-radius: 16px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-white);
  overflow-x: hidden;
  font-size: 16px;
}

/* Scrollbar Styling */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 4px; }

/* =========================================
   2. FULL PAGE LOADER
   ========================================= */
#pageLoader {
  position: fixed;
  inset: 0;
  background-color: var(--bg-dark);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#pageLoader.fade-out { opacity: 0; visibility: hidden; }
.loader-content { text-align: center; }
.rotating-logo {
  width: 80px;
  margin-bottom: 20px;
  animation: spinLogo 2s linear infinite;
}
@keyframes spinLogo { 0% { transform: rotateY(0deg); } 100% { transform: rotateY(360deg); } }

/* =========================================
   3. MOBILE HEADER & NAVIGATION
   ========================================= */
.mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 50;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.logo-area { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; color: var(--gold-primary); }
.logo-area img { width: 32px; }
.nav-toggle-btn { background: none; border: none; color: var(--text-white); font-size: 1.5rem; cursor: pointer; }

.app-layout { display: flex; min-height: 100vh; padding-top: var(--header-height); }
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid rgba(212, 175, 55, 0.1);
  z-index: 100;
  transform: translateX(-100%);
  transition: transform var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.sidebar.active { transform: translateX(0); }
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast);
}

.sidebar-overlay.active { opacity: 1; visibility: visible; }
.sidebar-header { padding: 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.sidebar-logo { width: 30px; }
.close-btn { background: none; border: none; color: var(--text-gray); font-size: 1.2rem; cursor: pointer; }
.nav-menu { flex: 1; padding: 20px 10px; overflow-y: auto; }
.nav-label { font-size: 0.8rem; text-transform: uppercase; color: var(--text-gray); margin-bottom: 10px; padding-left: 14px; letter-spacing: 1px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 8px;
  color: var(--text-gray);
  text-decoration: none;
  border-radius: 12px;
  transition: all var(--transition-fast);
}

.nav-icon { width: 24px; height: 24px; object-fit: contain; }
.nav-item:hover, .nav-item.active {
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-primary);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.sidebar-footer { padding: 20px; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  background: var(--gold-gradient);
  color: #000;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: transform var(--transition-fast);
}
.contact-btn:active { transform: scale(0.96); }

/* =========================================
   4. MAIN CONTENT & HEADER
   ========================================= */
.main-content {
  flex: 1;
  padding: 20px;
  width: 100%;
}

.plan-header {
  text-align: center;
  margin-bottom: 30px;
  animation: slideDown 0.6s ease;
}

.plan-info {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.1) 0%, rgba(0,0,0,0) 100%);
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 15px;
}

.plan-hero-logo { width: 50px; filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.3)); }
.plan-info h1 { font-size: 1.5rem; margin-bottom: 4px; }
.capital-req { color: var(--text-gray); font-size: 0.9rem; }
.gold-text { color: var(--gold-primary); font-weight: 700; }

/* =========================================
   5. VERTICAL PROCESS STEPPER (MUI Style)
   ========================================= */
.process-stepper {
  max-width: 650px;
  margin: 0 auto;
  padding-left: 15px;
  position: relative;
}

/* Vertical Divider Line */
.process-stepper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  bottom: 0;
  width: 2px;
  background-color: var(--text-inactive);
  z-index: 1;
}

.step-wrapper {
  margin-bottom: 30px;
  padding-left: 20px;
  position: relative;
}

/* Step Header: Icon and Label */
.step-head {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  gap: 15px;
  z-index: 10;
  position: relative;
  transition: color var(--transition-fast);
}

.step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-dark);
  border: 2px solid var(--text-inactive);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-inactive);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.step-label {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-inactive);
  transition: color var(--transition-fast);
}

/* ACTIVE State Styling */
.step-wrapper.active .step-icon {
  border-color: var(--gold-primary);
  background: var(--gold-primary);
  color: #000;
}

.step-wrapper.active .step-label {
  color: var(--text-white);
}

/* Step Content Area */
.step-content {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: height 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

.step-content.hidden {
  opacity: 0;
  height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border: none;
}

/* =========================================
   6. SHARED COMPONENTS (Buttons, Cards, Chart)
   ========================================= */
.action-btn {
  width: 100%;
  padding: 16px;
  margin-top: 24px;
  background: var(--gold-gradient);
  border: none;
  border-radius: 12px;
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.2s, opacity 0.2s;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.action-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.action-btn:not(:disabled):active { transform: scale(0.98); }

/* DURATION CARDS */
.duration-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.duration-card input { position: absolute; opacity: 0; cursor: pointer; }
.card-content {
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px 10px;
  border-radius: 10px;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.period { font-weight: 500; color: var(--text-white); font-size: 0.9rem; }
.roi { font-size: 0.8rem; color: var(--gold-primary); font-weight: 700; }
.duration-card input:checked + .card-content {
  border-color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.05);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
  transform: translateY(-2px);
}

/* CHART & STATS */
.chart-container { background: var(--bg-input); padding: 15px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.05); margin-bottom: 20px; height: 300px; position: relative; width: 100%; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-box { background: var(--bg-input); padding: 15px; border-radius: 12px; text-align: center; }
.stat-box.total { grid-column: span 2; border: 1px solid rgba(212, 175, 55, 0.3); background: linear-gradient(90deg, rgba(212, 175, 55, 0.05), transparent); }
.stat-box .label { display: block; font-size: 0.8rem; color: var(--text-gray); margin-bottom: 4px; }
.stat-box .value { font-size: 1.1rem; font-weight: 600; }

/* PAYMENT */
.crypto-selector { margin-bottom: 20px; }
.crypto-selector p { margin-bottom: 10px; font-size: 0.9rem; color: var(--text-gray); }
.crypto-options { display: flex; gap: 10px; }
.crypto-option { flex: 1; cursor: pointer; }
.crypto-option input { display: none; }
.option-inner { background: var(--bg-input); border: 1px solid rgba(255, 255, 255, 0.1); padding: 12px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.9rem; transition: all 0.2s; }
.crypto-option input:checked + .option-inner { background: var(--gold-primary); color: #000; border-color: var(--gold-primary); font-weight: 700; }

.timer-display { text-align: center; font-size: 1.8rem; font-weight: 700; color: var(--gold-light); margin: 20px 0; letter-spacing: 2px; text-shadow: 0 0 10px rgba(212, 175, 55, 0.3); }
.qr-wrapper { text-align: center; margin-bottom: 20px; }
.qr-frame { width: 180px; height: 180px; margin: 0 auto 10px; background: #fff; padding: 10px; border-radius: 12px; position: relative; }
.qr-frame::after { content: ''; position: absolute; inset: -5px; border-radius: 16px; border: 2px solid var(--gold-primary); z-index: -1; animation: pulseGold 2s infinite; }
.qr-frame img { width: 100%; height: 100%; object-fit: contain; }
.scan-text { font-size: 0.85rem; color: var(--text-gray); text-transform: uppercase; letter-spacing: 1px; }

.address-container label { display: block; font-size: 0.8rem; color: var(--text-gray); margin-bottom: 6px; }
.input-group { position: relative; display: flex; }
.input-group input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gold-primary);
  padding: 12px 50px 12px 14px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.9rem;
  outline: none;
}

.copy-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-card);
  border: 1px solid var(--gold-primary);
  color: var(--gold-primary);
  width: 34px;
  height: 34px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.copy-btn:hover { background: var(--gold-primary); color: #000; }
.warning-box {
  background: rgba(255, 77, 77, 0.1);
  border: 1px solid rgba(255, 77, 77, 0.3);
  padding: 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #ffcccc;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.4;
}

/* MODALS & TOAST */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 30px 20px;
  border-radius: 20px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.spinner-ring {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(212, 175, 55, 0.2);
  border-top: 4px solid var(--gold-primary);
  border-radius: 50%;
  margin: 0 auto;
  animation: spinLogo 1s linear infinite;
}

.toast {
  position: fixed;
  top: 90px;
  right: 20px;
  background: var(--success);
  color: #fff;
  padding: 12px 20px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 5px 15px rgba(0, 184, 148, 0.3);
  z-index: 3000;
  animation: slideInRight 0.4s ease;
}

/* MEDIA QUERIES & UTILITY */
@media (min-width: 1024px) {
  .mobile-header { display: none; }
  .app-layout { padding-top: 0; }
  .sidebar { transform: translateX(0); width: var(--sidebar-width); }
  .mobile-only { display: none !important; }
  .main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: 40px;
  }
}
.hidden { display: none !important; }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes pulseGold {
  0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}