/* style.css - Luxury Bank Account Numerology Web App */
@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300&display=swap');

:root {
  --font-main: 'Prompt', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Sukhumvit Set", "Thonburi", sans-serif;
  --bg-primary: #0a0d14;
  --bg-card: rgba(22, 28, 42, 0.7);
  --bg-card-hover: rgba(30, 38, 58, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(212, 175, 55, 0.35);
  
  --gold-primary: #fbbf24;
  --gold-glow: rgba(251, 191, 36, 0.35);
  --gold-gradient: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #d97706 100%);
  
  --emerald-super: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.3);
  --danger-red: #ef4444;
  --warning-orange: #f97316;
  --blue-bright: #38bdf8;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-lux: 0 20px 40px -15px rgba(0, 0, 0, 0.6), 0 0 30px -10px var(--gold-glow);
}

html {
  font-size: 17.5px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.65;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(217, 119, 6, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(56, 189, 248, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(16, 185, 129, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* Header */
.app-header {
  text-align: center;
  margin-bottom: 36px;
  position: relative;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 9999px;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--gold-primary);
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
}

.app-title {
  font-size: clamp(2.1rem, 4.8vw, 3.2rem);
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 30%, #fef08a 70%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.app-subtitle {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Tabs */
.nav-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.nav-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 1.05rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
}

.nav-tab-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-tab-btn.active {
  background: var(--gold-gradient);
  color: #1a1002;
  font-weight: 700;
  border-color: transparent;
  box-shadow: 0 4px 20px var(--gold-glow);
}

/* Header Actions Group (Home, Guide Icon, Theme Toggle directly under app title) */
.header-actions-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 14px auto 18px;
}

/* Nav Actions Group (Home, Guide Icon, Theme Toggle) */
.nav-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-icon-btn,
.nav-tab-btn.nav-icon-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-icon-btn:hover,
.nav-tab-btn.nav-icon-tab:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.nav-tab-btn.nav-icon-tab.active {
  background: var(--gold-gradient);
  color: #1a1002;
  border-color: transparent;
  box-shadow: 0 4px 20px var(--gold-glow);
}

.theme-icon {
  transition: transform 0.3s ease;
}

.nav-icon-btn:hover .theme-icon {
  transform: rotate(20deg) scale(1.1);
}

/* Screen 2 Top Info Bar */
.result-top-info {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 12px 24px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  text-align: center;
}

.result-top-info .info-label {
  color: var(--gold-primary);
  font-size: 1.05rem;
  font-weight: 600;
}

.result-top-info .info-val-num {
  color: #ffffff;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.35rem;
  letter-spacing: 1.5px;
}

.result-top-info .info-divider {
  color: var(--text-dim);
  font-size: 1.1rem;
}

.result-top-info .info-val-birth {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Main Grid Layout */
.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 992px) {
  .main-grid {
    grid-template-columns: 460px 1fr;
    align-items: start;
  }
}

/* Glassmorphism Card Panels */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

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

.panel-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

/* 3D Bank Card Component */
.card-scene {
  perspective: 1000px;
  margin-bottom: 28px;
}

.bank-card-container {
  width: 100%;
  aspect-ratio: 1.586 / 1; /* Standard ISO/IEC 7810 ID-1 card ratio */
  max-width: 440px;
  margin: 0 auto;
  border-radius: 20px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
  box-shadow: 0 25px 45px -15px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  overflow: hidden;
}

.bank-card-container:hover {
  transform: translateY(-4px) rotateX(4deg) rotateY(-4deg);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.85), 0 0 35px var(--gold-glow);
}

.bank-card-inner {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, #054d2e 0%, #00a950 100%);
  color: #fff;
  z-index: 1;
}

/* Card Holographic Foil Effect */
.card-foil {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 30%,
    rgba(251, 191, 36, 0.3) 45%,
    rgba(56, 189, 248, 0.25) 55%,
    transparent 75%
  );
  opacity: 0.75;
  mix-blend-mode: overlay;
  z-index: 2;
  transition: opacity 0.3s;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-chip {
  width: 46px;
  height: 36px;
  background: linear-gradient(135deg, #fef08a 0%, #ca8a04 100%);
  border-radius: 6px;
  position: relative;
  border: 1px solid #854d0e;
  overflow: hidden;
}

.card-chip::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.card-bank-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.card-number-display {
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(1.2rem, 3.8vw, 1.65rem);
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.card-holder-name {
  font-size: 0.88rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}

.card-grade-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Bank Selection Selector */
.bank-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.bank-option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.bank-option-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.bank-option-btn.active {
  background: rgba(251, 191, 36, 0.15);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.25);
}

.bank-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Input Form Controls */
.form-group {
  margin-bottom: 22px;
}

.form-label {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 10px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.account-input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(13, 17, 26, 0.85);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 2px;
  outline: none;
  transition: all 0.25s ease;
}

.account-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 20px var(--gold-glow);
  background: rgba(15, 20, 32, 0.95);
}

.input-clear-btn {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1.35rem;
  padding: 6px;
  display: none;
}

.input-clear-btn:hover {
  color: #fff;
}

.input-hint {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
}

/* Select Control */
.custom-select {
  width: 100%;
  padding: 14px 18px;
  background: rgba(13, 17, 26, 0.85);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 1.05rem;
  outline: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.custom-select:focus {
  border-color: var(--gold-primary);
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 17px 28px;
  background: var(--gold-gradient);
  border: none;
  border-radius: var(--radius-md);
  color: #1c1301;
  font-family: var(--font-main);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 8px 25px var(--gold-glow);
  transition: all 0.25s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(251, 191, 36, 0.5);
  filter: brightness(1.05);
}

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

.btn-secondary {
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 1.02rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Presets Badges */
.presets-section {
  margin-top: 20px;
}

.presets-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.presets-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preset-chip {
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.preset-chip:hover {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
  color: var(--gold-primary);
}

/* Results Section */
.results-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Hero Score Card */
.score-hero-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.score-hero-card::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero-grade-box {
  display: flex;
  align-items: center;
  gap: 16px;
}

.grade-badge-huge {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  background: var(--gold-gradient);
  color: #1a1002;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  font-weight: 800;
  box-shadow: 0 10px 25px var(--gold-glow);
  flex-shrink: 0;
}

.hero-titles h2 {
  font-size: 1.65rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.hero-titles p {
  color: var(--gold-primary);
  font-size: 1.15rem;
  font-weight: 600;
}

.sum-metric-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 12px 22px;
  text-align: right;
}

.sum-metric-box .label {
  font-size: 0.92rem;
  color: var(--text-dim);
}

.sum-metric-box .value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gold-primary);
  line-height: 1.2;
}

.hero-description {
  color: #f1f5f9;
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-highlights-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.highlight-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.highlight-box .box-label {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 5px;
}

.highlight-box .box-value {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Pair Analysis Grid */
.pairs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.pair-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all 0.2s ease;
}

.pair-card:hover {
  background: rgba(30, 41, 59, 0.7);
  transform: translateY(-2px);
}

.pair-badge-num {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.65rem;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 12px;
  min-width: 58px;
  text-align: center;
  flex-shrink: 0;
}

.pair-card.super .pair-badge-num {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-super);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.pair-card.good .pair-badge-num {
  background: rgba(56, 189, 248, 0.15);
  color: var(--blue-bright);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.pair-card.warning .pair-badge-num {
  background: rgba(249, 115, 22, 0.15);
  color: var(--warning-orange);
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.pair-card.danger .pair-badge-num {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger-red);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.pair-card.moderate .pair-badge-num {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.pair-details {
  flex: 1;
}

.pair-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.pair-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: #fff;
}

.pair-type-tag {
  font-size: 0.82rem;
  padding: 3px 10px;
  border-radius: 9999px;
  font-weight: 600;
}

.pair-card.super .pair-type-tag { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.pair-card.good .pair-type-tag { background: rgba(56, 189, 248, 0.2); color: #7dd3fc; }
.pair-card.warning .pair-type-tag { background: rgba(249, 115, 22, 0.2); color: #fb923c; }
.pair-card.danger .pair-type-tag { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.pair-card.moderate .pair-type-tag { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }

.pair-desc {
  font-size: 0.96rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* 5 Pillars Progress Bar Section */
.pillar-row {
  margin-bottom: 20px;
}

.pillar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.pillar-label {
  color: var(--text-main);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pillar-score {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--gold-primary);
}

.pillar-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.pillar-fill {
  height: 100%;
  border-radius: 9999px;
  background: var(--gold-gradient);
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Career Matrix */
.career-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.career-item {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.career-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.career-icon {
  font-size: 1.65rem;
}

.career-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}

.career-score-badge {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-primary);
  margin-bottom: 8px;
}

.career-desc {
  font-size: 0.92rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* Last 4 Digits & Birthday Callouts */
.callout-box {
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 18px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.callout-box.success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.callout-box.warning {
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.callout-box.danger {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.callout-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
}

.callout-body h4 {
  font-size: 1.18rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.callout-body p {
  font-size: 1.02rem;
  color: #cbd5e1;
  line-height: 1.65;
}

/* Auspicious Tips List */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
}

.tip-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.tip-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.tip-icon {
  font-size: 1.75rem;
}

.tip-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-primary);
}

.tip-content {
  font-size: 0.98rem;
  color: #cbd5e1;
  line-height: 1.65;
}

/* Generator Options Cards */
.generator-results-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gen-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  transition: all 0.2s ease;
}

.gen-card:hover {
  border-color: var(--border-gold);
  background: rgba(26, 34, 52, 0.8);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.gen-number {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.65rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 2px;
}

.gen-tags {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

/* Action Floating / Bottom Bar */
.action-bar {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* Modal Popup */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #111520;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  position: relative;
  text-align: center;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #fff;
}

.preview-img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Toast Notification */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(16, 185, 129, 0.95);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 9999px;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* Footer */
.app-footer {
  text-align: center;
  padding-top: 40px;
  color: var(--text-dim);
  font-size: 0.95rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 60px;
}

/* Utilities & Animations */
.animate-fade-in {
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px var(--gold-glow); }
  50% { box-shadow: 0 0 25px rgba(251, 191, 36, 0.6); }
}

/* AdSense Container Styling */
.ad-container {
  display: block;
  width: 100%;
  text-align: center;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  padding: 8px 0;
  min-height: 90px;
}

.ad-display-wrapper {
  max-width: 728px;
  margin: 24px auto 0;
}

.ad-inarticle-wrapper {
  max-width: 800px;
  margin: 24px auto;
}

.ad-multiplex-wrapper {
  max-width: 960px;
  margin: 36px auto 16px;
}

/* ==========================================================================
   LIGHT MODE THEME
   ========================================================================== */
/* ==========================================================================
   LIGHT MODE THEME (High Contrast & Clean Luxury)
   ========================================================================== */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border-subtle: rgba(0, 0, 0, 0.12);
  --border-gold: rgba(217, 119, 6, 0.4);
  
  --gold-primary: #b45309;
  --gold-glow: rgba(217, 119, 6, 0.25);
  --gold-gradient: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #b45309 100%);
  
  --emerald-super: #059669;
  --emerald-glow: rgba(5, 150, 105, 0.25);
  --danger-red: #dc2626;
  --warning-orange: #ea580c;
  --blue-bright: #0284c7;
  
  --text-main: #0f172a;
  --text-muted: #1e293b;
  --text-dim: #334155;
  
  --shadow-lux: 0 20px 40px -15px rgba(0, 0, 0, 0.08), 0 0 30px -10px rgba(217, 119, 6, 0.15);
}

[data-theme="light"] body {
  background-color: var(--bg-primary);
  color: #0f172a;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(217, 119, 6, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(2, 132, 199, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(5, 150, 105, 0.06) 0%, transparent 40%);
}

[data-theme="light"] .brand-badge {
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.35);
  color: #b45309;
  font-weight: 600;
}

[data-theme="light"] .app-title {
  background: linear-gradient(135deg, #92400e 0%, #b45309 50%, #78350f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .app-subtitle {
  color: #1e293b;
  font-weight: 450;
}

[data-theme="light"] .nav-tab-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  color: #1e293b;
  font-weight: 600;
}

[data-theme="light"] .nav-tab-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #000000;
}

[data-theme="light"] .nav-tab-btn.active {
  background: var(--gold-gradient);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(217, 119, 6, 0.35);
}

[data-theme="light"] .nav-icon-btn,
[data-theme="light"] .nav-tab-btn.nav-icon-tab {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  color: #1e293b;
}

[data-theme="light"] .nav-icon-btn:hover,
[data-theme="light"] .nav-tab-btn.nav-icon-tab:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #000000;
}

[data-theme="light"] .nav-tab-btn.nav-icon-tab.active {
  background: var(--gold-gradient);
  color: #ffffff;
}

[data-theme="light"] .glass-panel {
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  border: 1.5px solid #cbd5e1;
}

[data-theme="light"] .glass-panel::before {
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.06), transparent);
}

[data-theme="light"] .panel-title {
  color: #0f172a;
  font-weight: 700;
}

[data-theme="light"] .form-label {
  color: #0f172a;
  font-weight: 600;
}

[data-theme="light"] .input-hint {
  color: #334155;
  font-weight: 500;
}

[data-theme="light"] .account-input,
[data-theme="light"] .custom-select {
  background: #ffffff;
  border: 1.5px solid #94a3b8;
  color: #0f172a;
  font-weight: 600;
}

[data-theme="light"] .account-input:focus,
[data-theme="light"] .custom-select:focus {
  background: #ffffff;
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(217, 119, 6, 0.25);
}

/* Secondary Button in Light Mode */
[data-theme="light"] .btn-secondary {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .btn-secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #000000;
}

/* Screen 2 Top Info Bar */
[data-theme="light"] .result-top-info {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .result-top-info .info-label {
  color: #b45309;
  font-weight: 700;
}

[data-theme="light"] .result-top-info .info-val-num {
  color: #0f172a;
  font-weight: 800;
}

[data-theme="light"] .result-top-info .info-val-birth {
  color: #047857;
  font-weight: 700;
}

[data-theme="light"] .result-top-info .info-divider {
  color: #94a3b8;
}

/* Hero Score Card */
[data-theme="light"] .score-hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1.5px solid #d97706;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .hero-titles h2 {
  color: #0f172a;
  font-weight: 800;
}

[data-theme="light"] .hero-titles p {
  color: #b45309;
  font-weight: 700;
}

[data-theme="light"] .sum-metric-box {
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
}

[data-theme="light"] .sum-metric-box .label {
  color: #334155;
  font-weight: 600;
}

[data-theme="light"] .sum-metric-box .value {
  color: #b45309;
}

[data-theme="light"] .hero-description {
  color: #0f172a;
  font-weight: 500;
  border-bottom: 1.5px solid #e2e8f0;
}

[data-theme="light"] .highlight-box {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
}

[data-theme="light"] .highlight-box .box-label {
  color: #334155;
  font-weight: 600;
}

[data-theme="light"] .highlight-box .box-value {
  color: #0f172a;
  font-weight: 800;
}

/* Callout Boxes in Light Mode */
[data-theme="light"] .callout-box.success {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
}

[data-theme="light"] .callout-box.success h4 {
  color: #166534;
  font-weight: 700;
}

[data-theme="light"] .callout-box.success p {
  color: #14532d;
  font-weight: 500;
}

[data-theme="light"] .callout-box.warning {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
}

[data-theme="light"] .callout-box.warning h4 {
  color: #b45309;
  font-weight: 700;
}

[data-theme="light"] .callout-box.warning p {
  color: #78350f;
  font-weight: 500;
}

[data-theme="light"] .callout-box.danger {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
}

[data-theme="light"] .callout-box.danger h4 {
  color: #b91c1c;
  font-weight: 700;
}

[data-theme="light"] .callout-box.danger p {
  color: #7f1d1d;
  font-weight: 500;
}

[data-theme="light"] .callout-box.moderate {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
}

[data-theme="light"] .callout-box.moderate h4 {
  color: #0f172a;
  font-weight: 700;
}

[data-theme="light"] .callout-box.moderate p {
  color: #1e293b;
  font-weight: 500;
}

/* Pair Cards in Light Mode */
[data-theme="light"] .pair-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .pair-card:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .pair-title {
  color: #0f172a;
  font-weight: 700;
}

[data-theme="light"] .pair-desc {
  color: #1e293b;
  font-weight: 450;
}

/* Pair Badges & Type Tags in Light Mode (ปรับสีเข้มขึ้น ชัดเจน คมกริบ ตามผล เช่น ควรระวัง ปานกลาง คู่มงคลเด่น) */
[data-theme="light"] .pair-card.super .pair-badge-num {
  background: #dcfce7;
  color: #14532d;
  border: 1.5px solid #4ade80;
}
[data-theme="light"] .pair-card.super .pair-type-tag {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  font-weight: 700;
}

[data-theme="light"] .pair-card.good .pair-badge-num {
  background: #e0f2fe;
  color: #075985;
  border: 1.5px solid #38bdf8;
}
[data-theme="light"] .pair-card.good .pair-type-tag {
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #7dd3fc;
  font-weight: 700;
}

[data-theme="light"] .pair-card.warning .pair-badge-num {
  background: #ffedd5;
  color: #9a3412;
  border: 1.5px solid #fb923c;
}
[data-theme="light"] .pair-card.warning .pair-type-tag {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fdba74;
  font-weight: 700;
}

[data-theme="light"] .pair-card.danger .pair-badge-num {
  background: #fee2e2;
  color: #991b1b;
  border: 1.5px solid #f87171;
}
[data-theme="light"] .pair-card.danger .pair-type-tag {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  font-weight: 700;
}

[data-theme="light"] .pair-card.moderate .pair-badge-num {
  background: #f1f5f9;
  color: #1e293b;
  border: 1.5px solid #94a3b8;
}
[data-theme="light"] .pair-card.moderate .pair-type-tag {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  font-weight: 700;
}

/* 5 Pillars in Light Mode */
[data-theme="light"] .pillar-label {
  color: #0f172a;
  font-weight: 700;
}

[data-theme="light"] .pillar-score {
  color: #b45309;
  font-weight: 800;
}

[data-theme="light"] .pillar-track {
  background: #e2e8f0;
}

/* Career Matrix in Light Mode (ความเหมาะสมต่อการใช้งานตามสายอาชีพ) */
[data-theme="light"] .career-item {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .career-name {
  color: #0f172a;
  font-weight: 700;
}

[data-theme="light"] .career-score-badge {
  color: #b45309;
  font-weight: 700;
}

[data-theme="light"] .career-desc {
  color: #1e293b;
  font-weight: 450;
}

/* Tips & Remedies in Light Mode */
[data-theme="light"] .tip-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .tip-title {
  color: #b45309;
  font-weight: 700;
}

[data-theme="light"] .tip-content {
  color: #1e293b;
  font-weight: 450;
}

/* Generator Cards in Light Mode */
[data-theme="light"] .gen-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .gen-number {
  color: #0f172a;
  font-weight: 800;
}

/* Guide Cards in Light Mode */
[data-theme="light"] .guide-card,
[data-theme="light"] .remedy-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
}

[data-theme="light"] .guide-card h4,
[data-theme="light"] .remedy-card h4 {
  color: #0f172a;
  font-weight: 700;
}

[data-theme="light"] .guide-card p,
[data-theme="light"] .remedy-card p {
  color: #1e293b;
  font-weight: 450;
}

/* Table in Light Mode */
[data-theme="light"] .history-table {
  color: #0f172a;
}

[data-theme="light"] .history-table th {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
}

[data-theme="light"] .history-table td {
  color: #1e293b;
  border-color: #e2e8f0;
  font-weight: 500;
}

/* Modal in Light Mode */
[data-theme="light"] .modal-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  color: #0f172a;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .modal-card h3 {
  color: #0f172a !important;
}

[data-theme="light"] .modal-card p {
  color: #334155 !important;
}

[data-theme="light"] .modal-close-btn {
  color: #475569;
}

[data-theme="light"] .modal-close-btn:hover {
  color: #000000;
}

/* Toast Message in Light Mode */
[data-theme="light"] .toast-msg {
  background: #ffffff;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  color: #0f172a;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  font-weight: 600;
}

/* Footer in Light Mode */
[data-theme="light"] .app-footer {
  color: #334155;
  border-top-color: #cbd5e1;
}

[data-theme="light"] .app-footer p {
  color: #1e293b !important;
  font-weight: 500;
}

[data-theme="light"] .app-footer p:last-child {
  color: #475569 !important;
  font-weight: 400;
}

/* Ad Container in Light Mode */
[data-theme="light"] .ad-container {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.12);
}
