/* ==========================================================
   TAIWAN MILHAS — Components v2.0
   Premium Cards · Animated Buttons · Glass Modals
   ========================================================== */

/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-8);
  border-radius: var(--r-lg);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all var(--tr-normal);
  position: relative;
  overflow: hidden;
  z-index: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Primary CTA */
.btn-primary {
  background: var(--grad-brand-diagonal);
  color: var(--bg-void);
  font-weight: var(--fw-bold);
  box-shadow: var(--shadow-md), var(--glow-cyan);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), var(--glow-cyan-strong);
  color: var(--bg-void);
}

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

/* Shine sweep on hover */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.5) 50%, transparent 70%);
  z-index: -1;
  transition: left 0.7s var(--ease-out);
}

.btn-primary:hover::after {
  left: 140%;
}

/* Secondary / Outline */
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: rgba(0, 165, 196, 0.1);
  border-color: var(--cyan);
  color: var(--cyan-light);
  transform: translateY(-2px);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--cyan-light);
  padding: var(--sp-2) var(--sp-4);
}

.btn-ghost:hover {
  color: var(--text-white);
}

.btn-ghost .arrow {
  transition: transform var(--tr-normal);
}

.btn-ghost:hover .arrow {
  transform: translateX(4px);
}

/* Gold CTA */
.btn-gold {
  background: var(--grad-gold);
  color: var(--bg-void);
  font-weight: var(--fw-bold);
  box-shadow: var(--shadow-md), var(--glow-gold);
}

.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(245,183,49,0.4);
  color: var(--bg-void);
}

/* Sizes */
.btn-lg {
  padding: var(--sp-5) var(--sp-10);
  font-size: var(--fs-md);
  border-radius: var(--r-lg);
}

.btn-xl {
  padding: var(--sp-6) var(--sp-12);
  font-size: var(--fs-lg);
  border-radius: var(--r-xl);
}

.btn-full { width: 100%; }

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.5);
}


/* ═══════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  transition: all var(--tr-normal);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-brand), transparent);
  opacity: 0;
  transition: opacity var(--tr-normal);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--glow-card);
  border-color: var(--border-brand);
}

.card:hover::before {
  opacity: 1;
}

/* Premium Card Variant */
.card-premium {
  background: linear-gradient(165deg, var(--bg-card), var(--bg-elevated));
  border: 1px solid var(--border-brand);
  box-shadow: var(--glow-cyan);
}

.card-premium::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 70% 30%, rgba(0,165,196,0.06) 0%, transparent 50%);
  pointer-events: none;
}

/* Glass Card */
.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-medium);
}

.card-glass:hover {
  background: var(--bg-glass-strong);
  border-color: var(--border-brand);
}

/* Card image */
.card-img {
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-6);
  overflow: hidden;
}

.card-img img {
  width: 100%;
  transition: transform var(--tr-slow);
}

.card:hover .card-img img {
  transform: scale(1.03);
}

/* Card Badge */
.badge {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  background: var(--grad-brand);
  color: var(--bg-void);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  z-index: 2;
}

.badge-gold {
  background: var(--grad-gold);
}

.badge-muted {
  background: var(--text-muted);
}

/* Price Display */
.price-display {
  background: rgba(0, 165, 196, 0.08);
  border: 1px solid var(--border-brand);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-6);
}

.price-main {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-extrabold);
  color: var(--text-white);
  line-height: 1;
}

.price-main.text-cyan {
  color: var(--cyan);
}

.price-sub {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-top: var(--sp-1);
}

/* ═══════════════════════════════════════════════
   STAT NUMBERS
   ═══════════════════════════════════════════════ */

.stat-row {
  display: flex;
  gap: var(--sp-10);
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-black);
  color: var(--cyan);
  line-height: 1;
  margin-bottom: var(--sp-2);
}

.stat-label {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}


/* ═══════════════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════════════ */

.input-group {
  margin-bottom: var(--sp-5);
  text-align: left;
}

.input-group label {
  display: block;
  margin-bottom: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
}

.input-control {
  width: 100%;
  padding: var(--sp-4);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-md);
  color: var(--text-white);
  font-size: var(--fs-base);
  transition: all var(--tr-fast);
}

.input-control::placeholder {
  color: var(--text-muted);
}

.input-control:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 165, 196, 0.15);
  background: rgba(255, 255, 255, 0.07);
}


/* ═══════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 11, 26, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tr-normal);
}

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

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-brand);
  border-radius: var(--r-2xl);
  padding: var(--sp-10);
  width: 100%;
  max-width: 480px;
  margin: var(--sp-4);
  box-shadow: var(--shadow-2xl), var(--glow-cyan);
  transform: translateY(30px) scale(0.92);
  transition: all 0.4s var(--ease-out);
  position: relative;
}

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

.modal-close {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-5);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: var(--fs-xl);
  cursor: pointer;
  transition: color var(--tr-fast);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
}

.modal-close:hover {
  color: var(--text-white);
  background: rgba(255,255,255,0.05);
}

.modal-header {
  margin-bottom: var(--sp-8);
  text-align: center;
}

.modal-title {
  color: var(--text-white);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-2);
}

.modal-subtitle {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}


/* ═══════════════════════════════════════════════
   TOASTS
   ═══════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.toast {
  background: var(--bg-elevated);
  border-left: 4px solid var(--cyan);
  padding: var(--sp-4) var(--sp-6);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  animation: toastIn 0.4s var(--ease-out);
}

.toast.success { border-color: var(--emerald); }
.toast.error { border-color: var(--coral); }

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateX(20px); }
}


/* ═══════════════════════════════════════════════
   FEATURE LIST
   ═══════════════════════════════════════════════ */

.feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
}

.feature-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: rgba(0, 165, 196, 0.1);
  border: 1px solid var(--border-brand);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.feature-text h4 {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-1);
}

.feature-text p {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin: 0;
  line-height: var(--lh-normal);
}


/* ═══════════════════════════════════════════════
   ALERT EXAMPLE (VIP Groups)
   ═══════════════════════════════════════════════ */

.alert-card {
  background: rgba(0, 165, 196, 0.06);
  border: 1px solid var(--border-brand);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-6);
  margin-bottom: var(--sp-4);
  transition: all var(--tr-normal);
}

.alert-card:hover {
  background: rgba(0, 165, 196, 0.1);
  transform: translateX(4px);
}

.alert-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  background: var(--cyan);
  color: var(--bg-void);
  font-size: 11px;
  font-weight: var(--fw-bold);
  padding: 2px 10px;
  border-radius: var(--r-full);
  margin-bottom: var(--sp-2);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}

.alert-card p {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-primary);
  line-height: var(--lh-normal);
}


/* ═══════════════════════════════════════════════
   CHECKLIST
   ═══════════════════════════════════════════════ */

.checklist {
  display: flex;
  flex-direction: column;
}

.checklist li {
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--fs-base);
  color: var(--text-primary);
  line-height: var(--lh-normal);
}

.checklist li:last-child { border-bottom: none; }

.checklist .check-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: rgba(0, 165, 196, 0.15);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  font-size: 12px;
  margin-top: 2px;
}


/* ═══════════════════════════════════════════════
   STEP PROCESS
   ═══════════════════════════════════════════════ */

.steps {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
  position: relative;
}

/* Connecting line */
.steps::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 44px;
  bottom: 22px;
  width: 2px;
  background: linear-gradient(to bottom, var(--cyan), transparent);
  opacity: 0.2;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-5);
  position: relative;
}

.step-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--grad-brand);
  color: var(--bg-void);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-extrabold);
  font-size: var(--fs-md);
  box-shadow: var(--glow-cyan);
}

.step-content h4 {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-2);
}

.step-content p {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin: 0;
  line-height: var(--lh-relaxed);
}


/* ═══════════════════════════════════════════════
   FAQ ACCORDION
   ═══════════════════════════════════════════════ */

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--sp-6) 0;
}

.faq-item:last-child { border-bottom: none; }

.faq-item h4 {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-3);
  color: var(--text-white);
}

.faq-item p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
}


/* ═══════════════════════════════════════════════
   CHAPTER LIST (Ebook)
   ═══════════════════════════════════════════════ */

.chapter-item {
  display: flex;
  gap: var(--sp-5);
  align-items: flex-start;
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.chapter-item:last-child { border-bottom: none; }

.chapter-num {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-black);
  color: var(--cyan);
  opacity: 0.25;
  line-height: 1;
  min-width: 40px;
}

.chapter-item h4 {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-2);
}

.chapter-item p {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}
