@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,500&display=swap');

:root {
  --bg-primary: #060913;
  --bg-secondary: #0c1122;
  --bg-card: rgba(12, 17, 34, 0.7);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-focus: #ffc300;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-gold: #ffc300;
  --accent-gold-gradient: linear-gradient(135deg, #ffc300 0%, #ff9f00 100%);
  --accent-green: #00e676;
  --accent-red: #ff3d00;
  
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-serif: 'Playfair Display', serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-display);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Gradients */
.radial-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
}

.glow-1 {
  top: -10%;
  right: -5%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(255, 195, 0, 0.08) 0%, rgba(6, 9, 19, 0) 70%);
}

.glow-2 {
  top: 40%;
  left: -10%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(0, 230, 118, 0.05) 0%, rgba(6, 9, 19, 0) 70%);
}

.glow-3 {
  bottom: 5%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(255, 195, 0, 0.06) 0%, rgba(6, 9, 19, 0) 70%);
}

/* Typography & Layout Spacing */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

h2 {
  font-size: 2.5rem;
}

.serif-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
}

span.gradient-text {
  background: var(--accent-gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 8%;
  background: rgba(6, 9, 19, 0.75);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
}

.logo {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

nav a:hover {
  color: var(--text-primary);
}

/* Auth Navigation Controls */
.auth-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.4rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.2rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
  gap: 0.6rem;
}

.btn-primary {
  background: var(--accent-gold-gradient);
  color: #05070f;
  box-shadow: 0 10px 25px -5px rgba(255, 195, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(255, 195, 0, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

/* Layout Blocks */
main {
  padding-top: 90px;
}

section {
  padding: 8rem 8% 6rem;
  max-width: 1300px;
  margin: 0 auto;
  position: relative;
}

/* Hero Section */
.hero-container {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 6rem;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 195, 0, 0.08);
  color: var(--accent-gold);
  padding: 0.5rem 1.2rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 195, 0, 0.15);
  letter-spacing: 0.03em;
}

.hero-title {
  font-size: 3.8rem;
  line-height: 1.15;
  margin-bottom: 2rem;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 650px;
}

.hero-cta-group {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 3rem;
}

.price-container {
  display: flex;
  flex-direction: column;
}

.original-price {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.sale-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-gold);
}

/* Stats Banner */
.stats-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 3rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-lbl {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Ebook Visual 3D */
.book-wrapper {
  perspective: 1200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.book-container {
  width: 320px;
  height: 430px;
  position: relative;
  transform-style: preserve-3d;
  animation: floatBook 6s cubic-bezier(0.445, 0.05, 0.55, 0.95) infinite;
  box-shadow: 0 35px 65px rgba(0,0,0,0.6);
  border-radius: 4px;
}

.book-cover {
  width: 100%;
  height: 100%;
  border-radius: 4px 10px 10px 4px;
  background-size: cover;
  background-position: center;
  position: absolute;
  z-index: 2;
  box-shadow: inset 5px 0 12px rgba(255,255,255,0.08);
}

.book-spine {
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 100%;
  background: #000;
  transform: rotateY(-90deg) translateX(-14px);
  transform-origin: left center;
  z-index: 1;
}

@keyframes floatBook {
  0%, 100% {
    transform: translateY(0) rotateY(-8deg) rotateX(6deg);
  }
  50% {
    transform: translateY(-20px) rotateY(8deg) rotateX(-6deg);
  }
}

/* Comparison Section */
.fail-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
}

.fail-box {
  background: rgba(255, 61, 0, 0.015);
  border: 1px solid rgba(255, 61, 0, 0.08);
  border-radius: 20px;
  padding: 3rem;
}

.success-box {
  background: rgba(0, 230, 118, 0.015);
  border: 1px solid rgba(0, 230, 118, 0.08);
  border-radius: 20px;
  padding: 3rem;
}

.comp-header {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.comp-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.comp-item {
  display: flex;
  gap: 1rem;
}

.comp-item i {
  margin-top: 0.25rem;
  font-size: 1.1rem;
}

.comp-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* Calculator Area */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 3.5rem;
  box-shadow: var(--shadow-premium);
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 5rem;
}

.section-tag {
  color: var(--accent-gold);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  display: block;
}

.section-title {
  font-size: 2.8rem;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.15rem;
}

/* DECLUTTERED CALCULATOR SECTION */
.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.calc-inputs-panel {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.calc-step {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.75rem;
}

.calc-step:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.calc-step-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.calc-step-num {
  background: rgba(255, 195, 0, 0.12);
  color: var(--accent-gold);
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 800;
}

/* Gender toggle buttons */
.gender-toggle {
  display: flex;
  gap: 1rem;
}

.gender-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  transition: var(--transition-smooth);
}

.gender-btn.active {
  background: var(--bg-primary);
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  box-shadow: 0 0 15px rgba(255, 195, 0, 0.1);
}

/* Weight fields */
.weight-input-container {
  display: flex;
  align-items: center;
  position: relative;
  max-width: 250px;
}

.weight-input-container input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  font-size: 1.3rem;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  outline: none;
  transition: var(--transition-smooth);
}

.weight-input-container input:focus {
  border-color: var(--accent-gold);
}

.weight-unit {
  position: absolute;
  right: 1.2rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Body fat visuals layout */
.bf-picker-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.bf-option {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.85rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.bf-option:hover {
  background: rgba(255, 195, 0, 0.02);
  border-color: rgba(255, 195, 0, 0.3);
}

.bf-option.active {
  background: rgba(255, 195, 0, 0.06);
  border-color: var(--accent-gold);
}

.bf-percentage {
  font-weight: 700;
  font-size: 0.95rem;
}

/* Select wrapper */
.select-wrapper select {
  width: 100%;
  max-width: 450px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
}

/* Hunger styles */
.hunger-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.hunger-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.hunger-card:hover {
  border-color: rgba(255,255,255,0.15);
}

.hunger-card.active {
  background: rgba(0, 230, 118, 0.05);
  border-color: var(--accent-green);
}

.hunger-card-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.hunger-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Calculator Results Panel */
.calc-results-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 3rem;
}

.results-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.results-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.results-title {
  font-size: 1.8rem;
  font-weight: 800;
}

.results-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.res-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.res-row span:first-child {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.res-val {
  font-weight: 700;
  font-size: 1.25rem;
}

.res-subval {
  font-size: 0.8rem;
  color: var(--accent-green);
}

.teaser-blur-box {
  background: rgba(6, 9, 19, 0.6);
  border: 1px solid rgba(255, 195, 0, 0.15);
  border-radius: 14px;
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-top: 2.5rem;
}

.teaser-blur-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(6, 9, 19, 0.1) 0%, rgba(6, 9, 19, 0.98) 85%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 1.5rem;
}

.teaser-macro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  filter: blur(5px);
}

.teaser-macro-item {
  background: rgba(255,255,255,0.02);
  padding: 1rem;
  border-radius: 10px;
}

.teaser-cta-btn {
  z-index: 5;
  margin-bottom: 0.5rem;
}

/* Interactive Plate section */
.plate-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 6rem;
  align-items: center;
}

.plate-visual-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.plate-circle {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 14px solid #1c2132;
  background: #111524;
  position: relative;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  overflow: hidden;
  display: flex;
  transform: rotate(-30deg);
  transition: var(--transition-smooth);
}

.plate-pie {
  position: absolute;
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 100%);
  transform-origin: 50% 50%;
}

.pie-protein {
  background: radial-gradient(circle at center, #fb8500 0%, #d65c00 100%);
  z-index: 3;
  clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 40%);
}

.pie-carbs {
  background: radial-gradient(circle at center, #ffc300 0%, #dca000 100%);
  z-index: 2;
  clip-path: polygon(50% 50%, 100% 40%, 100% 100%, 70% 100%);
}

.pie-fats {
  background: radial-gradient(circle at center, #00b0ff 0%, #007bb5 100%);
  z-index: 1;
  clip-path: polygon(50% 50%, 70% 100%, 0 100%, 0 35%);
}

.pie-fibre {
  background: radial-gradient(circle at center, #00e676 0%, #00a651 100%);
  z-index: 4;
  clip-path: polygon(50% 50%, 0 35%, 0 0, 50% 0);
}

.plate-inner-rim {
  position: absolute;
  width: 290px;
  height: 290px;
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10;
}

.plate-interactive-controls {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.plate-control-item {
  background: rgba(255, 255, 255, 0.01);
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.plate-control-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.plate-control-item.active {
  border-color: var(--accent-gold);
  background: rgba(255, 195, 0, 0.04);
}

.plate-control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.plate-control-title {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.plate-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-protein { background: #fb8500; }
.dot-carbs { background: #ffc300; }
.dot-fats { background: #00b0ff; }
.dot-fibre { background: #00e676; }

.plate-control-pct {
  font-weight: 800;
  color: var(--accent-gold);
}

.plate-control-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* After Reading Checklist Section */
.check-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
  align-items: center;
}

.check-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.check-item {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.check-icon {
  background: rgba(0, 230, 118, 0.1);
  color: var(--accent-green);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.check-text {
  font-size: 1.1rem;
  font-weight: 500;
}

/* Testimonials / Reader reviews */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.review-card {
  background: var(--bg-card);
  padding: 3rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.review-stars {
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.review-text {
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 2rem;
  color: var(--text-primary);
  line-height: 1.7;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 44px;
  height: 44px;
  background: rgba(255, 195, 0, 0.1);
  color: var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Detailed Content Table List */
.content-table-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.table-row {
  display: flex;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
}

.table-row:hover, .table-row-accordion:hover {
  background: rgba(255, 255, 255, 0.02) !important;
}

.table-row-accordion.active {
  background: rgba(255, 255, 255, 0.01) !important;
}

.badge-tag {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-core {
  background: rgba(255, 195, 0, 0.1);
  color: var(--accent-gold);
  border: 1px solid rgba(255, 195, 0, 0.15);
}

.badge-system {
  background: rgba(0, 176, 255, 0.1);
  color: #00b0ff;
  border: 1px solid rgba(0, 176, 255, 0.15);
}

.badge-meals {
  background: rgba(0, 230, 118, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(0, 230, 118, 0.15);
}

.badge-ref {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 850px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  background: rgba(255,255,255,0.01);
  transition: var(--transition-smooth);
}

.faq-item.active {
  border-color: rgba(255, 195, 0, 0.2);
  background: rgba(255, 195, 0, 0.01);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1.2rem;
  cursor: pointer;
  user-select: none;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.8;
}

.faq-item.active .faq-answer {
  max-height: 250px;
  margin-top: 1rem;
  transition: max-height 0.3s ease-in;
}

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

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--accent-gold);
}

/* Final Call to Action Box */
.cta-box {
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid rgba(255, 195, 0, 0.15);
  text-align: center;
}

.timer-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.timer-box {
  background: rgba(0,0,0,0.5);
  padding: 0.9rem 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  min-width: 80px;
}

.timer-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1.1;
}

.timer-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* MEMBERS PORTAL TABBED STYLE */
.portal-container {
  display: none;
  padding: 8rem 8% 6rem;
  max-width: 1300px;
  margin: 0 auto;
  position: relative;
}

.portal-active .hero-section,
.portal-active #fail,
.portal-active #calculator,
.portal-active #system,
.portal-active #plate,
.portal-active #testimonials,
.portal-active #chapters,
.portal-active .faq-list,
.portal-active .cta-section {
  display: none !important;
}

.portal-active .portal-container {
  display: block !important;
}

.portal-header-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 2rem;
  margin-bottom: 3rem;
}

.portal-tabs {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.portal-tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 0.5rem 1rem;
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}

.portal-tab-btn.active {
  color: var(--accent-gold);
}

.portal-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1.25rem;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent-gold);
}

.portal-tab-content {
  display: none;
}

.portal-tab-content.active {
  display: block;
}

/* Replica calculator.net/macro Styles inside Tab */
.replica-table {
  width: 100%;
  max-width: 600px;
  margin-bottom: 2rem;
}

.replica-table td {
  padding: 0.75rem 0;
  vertical-align: middle;
}

.replica-input-half {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
  width: 80px;
  text-align: center;
}

.replica-input-full {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
  width: 120px;
}

.replica-select {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
  padding: 0.65rem 0.8rem;
  border-radius: 6px;
  color: #fff;
  width: 100%;
  max-width: 400px;
}

.unit-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.unit-tab {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
}

.unit-tab.active {
  background: var(--accent-gold-gradient);
  color: #000;
}

.results-tab-row {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  background: rgba(0,0,0,0.2);
  padding: 0.35rem;
  border-radius: 8px;
}

.res-tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.res-tab-btn.active {
  background: var(--bg-primary);
  color: var(--text-primary);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* Meal Templates */
.meal-templates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.meal-temp-card {
  background: rgba(255,255,255,0.01);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
}

.meal-temp-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.meal-temp-title {
  font-weight: 800;
  font-size: 1.2rem;
}

.meal-temp-tag {
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.85rem;
}

.meal-macro-pill {
  background: rgba(255,255,255,0.03);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  display: inline-block;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border-color);
}

/* MODAL FIX: ACCORDING TO USER - REMOVE SCROLLBARS AND SET EFFICIENT GAP DIMENSIONS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 6, 12, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(12px);
  padding: 1.5rem;
}

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

.checkout-modal {
  width: 100%;
  max-width: 500px;
  max-height: 90vh; /* Make sure it doesn't exceed viewport height */
  overflow-y: auto; /* Enable scrolling if needed on very small devices */
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  padding: 2.25rem 2.5rem !important; /* Smaller, tight spacing padding */
  
  /* Hide scrollbars */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.checkout-modal::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.modal-overlay.active .checkout-modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem !important;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem !important;
}

.modal-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-close:hover {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
}

/* Veg / Non-Veg Indicator Badges */
.badge-veg-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.badge-veg {
  background: rgba(0, 230, 118, 0.08);
  color: var(--accent-green);
  border: 1px solid rgba(0, 230, 118, 0.15);
}

.badge-nonveg {
  background: rgba(255, 61, 0, 0.08);
  color: var(--accent-red);
  border: 1px solid rgba(255, 61, 0, 0.15);
}

/* Payment Gateway Simulated Card UI */
.gateway-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem !important;
  background: rgba(0,0,0,0.25);
  padding: 0.25rem;
  border-radius: 8px;
}

.gate-tab {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  border-radius: 6px;
  font-weight: 700;
  transition: var(--transition-smooth);
}

.gate-tab.active {
  background: var(--accent-gold);
  color: #000;
}

.gateway-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* AUTHENTIC INPUT STYLINGS */
.form-group input,
.weight-input-container input,
.replica-input-half,
.replica-input-full,
.replica-select,
.select-wrapper select {
  font-family: var(--font-display);
  background: #0f162a !important;
  border: 1.5px solid #1e293b !important;
  color: #f8fafc !important;
  border-radius: 8px !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  outline: none !important;
  transition: var(--transition-smooth) !important;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2) !important;
}

.form-group input:focus,
.weight-input-container input:focus,
.replica-input-half:focus,
.replica-input-full:focus,
.replica-select:focus,
.select-wrapper select:focus {
  border-color: var(--accent-gold) !important;
  box-shadow: 0 0 0 3px rgba(255, 195, 0, 0.15), inset 0 2px 4px rgba(0,0,0,0.2) !important;
}

/* ACCORDING TO USER: ADD SPACING IN LOGIN POPUP */
#auth-modal-overlay .checkout-modal {
  padding: 3.5rem 3rem !important;
}

#auth-modal-overlay .form-group {
  margin-bottom: 2.25rem !important; /* Spacious spacing between fields */
}

#auth-modal-overlay .form-group label {
  display: block;
  margin-bottom: 0.75rem !important;
  font-weight: 600;
  color: var(--text-secondary);
}

#auth-modal-overlay button[type="submit"] {
  margin-top: 1.5rem !important;
}

#auth-modal-overlay .modal-header {
  margin-bottom: 2.5rem !important;
}

/* Compact layout for payment popup */
#checkout-modal-overlay .checkout-modal {
  padding: 1.75rem 2rem !important;
  max-width: 480px;
}

#checkout-modal-overlay .modal-header {
  margin-bottom: 1rem !important;
  padding-bottom: 0.5rem !important;
}

#checkout-modal-overlay #checkout-details > div:first-child {
  margin-bottom: 1rem !important;
  padding: 0.75rem !important;
  gap: 1rem !important;
}

#checkout-modal-overlay #checkout-details img {
  width: 45px !important;
  height: 60px !important;
}

#checkout-modal-overlay .checkout-row {
  margin-bottom: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

#checkout-modal-overlay .form-group {
  margin-bottom: 0.75rem !important;
}

#checkout-modal-overlay .form-group label {
  margin-bottom: 0.35rem !important;
  font-size: 0.8rem !important;
}

#checkout-modal-overlay .form-group input {
  padding: 0.6rem 0.8rem !important;
  font-size: 0.9rem !important;
}

#checkout-modal-overlay .gateway-tabs {
  margin-bottom: 0.75rem !important;
}

#checkout-modal-overlay .checkout-submit-btn {
  margin-top: 0.5rem !important;
  padding: 0.85rem !important;
}

/* System Modules Area tidy up */
.sections-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 2rem;
}

.section-card {
  border: 1.5px solid #1e293b;
  background: #090e1a;
  border-radius: 16px;
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-premium);
  position: relative;
  transition: var(--transition-smooth);
}

.section-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-gold);
  box-shadow: 0 15px 30px -10px rgba(255, 195, 0, 0.1);
}

.section-num {
  font-weight: 800;
  color: var(--accent-gold);
  font-size: 0.85rem;
  background: rgba(255, 195, 0, 0.08);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  width: max-content;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.section-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: #fff;
}

.section-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

.resource-card-download {
  transition: var(--transition-smooth);
}

.resource-card-download:hover {
  transform: translateY(-4px) !important;
  border-color: var(--accent-gold) !important;
  box-shadow: 0 15px 30px -10px rgba(255, 195, 0, 0.15) !important;
}

/* Mobile Menu Toggle Button Default Hide */
.mobile-menu-toggle {
  display: none;
}

/* ==========================================
   TABLET & MOBILE RESPONSIVE OPTIMIZATIONS
   ========================================== */

/* TABLETS (Max-width: 1024px) */
@media (max-width: 1024px) {
  header {
    padding: 1.25rem 5%;
  }

  section {
    padding: 5rem 5% 4rem;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 3.5rem;
    text-align: center;
  }

  .hero-visual {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-group {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .stats-banner {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding-top: 2.5rem;
  }

  .fail-comparison-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .calc-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .plate-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .plate-interactive-controls {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
  }

  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .meal-templates-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  #portal-timing > div {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  .portal-container {
    padding: 5rem 5% 4rem !important;
  }
}

/* PHONES & SMALL TABLETS (Max-width: 768px) */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1100;
    transition: var(--transition-smooth);
  }

  .mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  header nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: rgba(6, 9, 19, 0.98);
    backdrop-filter: blur(30px);
    border-left: 1px solid var(--border-color);
    padding: 6.5rem 2rem 2.5rem;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
  }

  header nav.active {
    right: 0;
  }

  header nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }

  header nav a {
    font-size: 1.05rem;
    font-weight: 600;
    display: block;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.02);
  }

  header nav .btn {
    width: 100%;
    margin-top: 0.5rem;
    justify-content: center;
  }

  .logo {
    font-size: 1.15rem;
  }

  .hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
  }

  .hero-description {
    font-size: 1.05rem;
  }

  .price-container {
    align-items: center;
  }

  .sale-price {
    font-size: 1.9rem;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta-group button {
    padding: 1rem 1.5rem !important;
  }

  .stats-banner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .fail-box, .success-box {
    padding: 2rem 1.5rem;
  }

  .calc-results-panel {
    padding: 1.25rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .calc-layout,
  .calc-inputs-panel {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .teaser-blur-box {
    padding: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 1.5rem !important;
  }

  .teaser-macro-grid {
    gap: 0.5rem !important;
  }

  .plate-circle {
    width: 280px;
    height: 280px;
    border-width: 10px;
  }

  .plate-inner-rim {
    width: 240px;
    height: 240px;
  }

  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .sections-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .section-card {
    padding: 2.25rem 1.75rem;
  }

  .content-table-wrapper {
    overflow-x: auto;
  }

  .table-row {
    font-size: 0.85rem;
    gap: 1rem;
    padding: 1rem 0.75rem;
  }

  /* Portal Tab Buttons horizontally scrollable on mobile */
  .portal-tabs {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.75rem;
    gap: 0.5rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .portal-tabs::-webkit-scrollbar {
    display: none;
  }

  .portal-tab-btn {
    font-size: 0.95rem;
    padding: 0.4rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }

  /* Replica table scaling */
  .replica-table,
  .replica-table tbody,
  .replica-table tr {
    display: block !important;
    width: 100% !important;
  }

  .replica-table tr {
    margin-bottom: 1.25rem !important;
  }

  .replica-table td {
    display: block !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .replica-table td.hide-mobile-td {
    display: none !important;
  }

  .replica-select {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .replica-input-full {
    width: 120px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .replica-input-half {
    width: 75px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: inline-block !important;
  }

  /* Shrink glass cards on mobile so they don't force overflow */
  .glass-card {
    padding: 1.25rem !important;
    border-radius: 12px !important;
  }

  /* Shrink portal results panel on mobile */
  .calc-results-panel {
    padding: 1.25rem !important;
  }

  /* Make replica result tab buttons scrollable horizontally */
  .results-tab-row {
    overflow-x: auto !important;
    white-space: nowrap !important;
    display: flex !important;
    gap: 0.5rem !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 0.25rem !important;
  }

  .results-tab-row::-webkit-scrollbar {
    display: none !important;
  }

  .res-tab-btn {
    flex: 0 0 auto !important;
    padding: 0.5rem 0.85rem !important;
    font-size: 0.8rem !important;
  }

  /* Teaser visual guides */
  .bf-picker-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .hunger-options {
    grid-template-columns: 1fr;
  }

  /* Unlocked Portal Specific Mobile Rules */
  .portal-container {
    padding: 4rem 0.75rem 3rem !important;
  }

  .portal-container,
  .portal-container *,
  .portal-tab-content,
  .portal-tab-content *,
  .calc-layout,
  .calc-inputs-panel,
  .calc-results-panel,
  form,
  table,
  tr,
  td,
  input,
  select,
  div {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .portal-header-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1.5rem !important;
    text-align: left !important;
  }

  .portal-header-banner .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Stack result rows vertically to prevent label and value colliding */
  .res-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.35rem !important;
    padding-bottom: 0.85rem !important;
  }

  .res-row span:first-child {
    font-size: 0.85rem !important;
  }

  /* Stack BMR setting radio label choices */
  #rep-ccsettingcontent label {
    display: block !important;
    margin-bottom: 0.65rem !important;
    margin-right: 0 !important;
  }

  /* Horizontally scrollable meal filter buttons */
  .portal-tab-content #portal-meals > div:first-child {
    overflow-x: auto !important;
    white-space: nowrap !important;
    display: flex !important;
    gap: 0.5rem !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 0.5rem !important;
    width: 100% !important;
  }

  .portal-tab-content #portal-meals > div:first-child::-webkit-scrollbar {
    display: none !important;
  }

  .portal-tab-content #portal-meals .meal-filter-btn {
    flex: 0 0 auto !important;
  }

  .meal-temp-card {
    padding: 1.25rem !important;
  }

  #portal-timing > div {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Restrict long option text in select boxes from breaking width */
  select, .replica-select {
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    white-space: nowrap !important;
  }
}

/* Testimonial Carousel Dots */
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
  opacity: 0.5;
}

.carousel-dot.active {
  background: var(--accent-gold) !important;
  opacity: 1 !important;
  width: 24px !important;
  border-radius: 4px !important;
}

/* Teaser Diagnostic Quiz Buttons */
.quiz-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.quiz-btn:hover {
  border-color: rgba(255, 195, 0, 0.4);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.quiz-btn.active {
  background: rgba(255, 195, 0, 0.1) !important;
  border-color: var(--accent-gold) !important;
  color: #fff !important;
  box-shadow: 0 0 15px -3px rgba(255, 195, 0, 0.15);
}

.teaser-quiz-card {
  max-width: 420px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
