/* Import Modern Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* CSS Variables for Premium Design Tokens */
:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Harmonious Color Palette */
  --bg-main: #060814;
  --bg-card: rgba(14, 18, 43, 0.7);
  --bg-card-hover: rgba(22, 28, 62, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.25);
  
  /* Vibrant Accents */
  --accent-gemini-start: #00f2fe;
  --accent-gemini-mid: #7f00ff;
  --accent-gemini-end: #e100ff;
  
  --color-text-primary: #ffffff;
  --color-text-secondary: #a3b3d4;
  --color-text-muted: #64748b;
  
  /* Interactive Accents */
  --color-cyan: #00f2fe;
  --color-purple: #a855f7;
  --color-pink: #f43f5e;
  --color-emerald: #10b981;
  --color-amber: #f59e0b;
  
  --shadow-neon: 0 8px 32px 0 rgba(0, 242, 254, 0.1);
  --shadow-neon-hover: 0 12px 48px 0 rgba(127, 0, 255, 0.25);
  --glass-blur: blur(16px);
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-main);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

/* Glowing Ambient Background Blobs */
.bg-glow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  mix-blend-mode: screen;
  animation: float-blob 20s infinite alternate ease-in-out;
}

.blob-1 {
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, var(--color-cyan) 0%, rgba(0, 242, 254, 0) 70%);
  top: -10%;
  right: -5%;
  animation-duration: 25s;
}

.blob-2 {
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--accent-gemini-mid) 0%, rgba(127, 0, 255, 0) 70%);
  bottom: -15%;
  left: -10%;
  animation-duration: 30s;
  animation-delay: -5s;
}

.blob-3 {
  width: 35vw;
  height: 35vw;
  background: radial-gradient(circle, var(--color-pink) 0%, rgba(244, 63, 94, 0) 70%);
  top: 40%;
  left: 45%;
  animation-duration: 22s;
  animation-delay: -10s;
}

@keyframes float-blob {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(3% , 5%) scale(1.1);
  }
  100% {
    transform: translate(-3%, -2%) scale(0.9);
  }
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
}

/* Header & Typography */
header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}

.badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-cyan);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  backdrop-filter: var(--glass-blur);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-gemini-start) 0%, #a855f7 50%, var(--accent-gemini-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header p {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--color-text-secondary);
  max-width: 700px;
  margin: 0 auto;
  font-weight: 300;
}

/* Grid Dashboard Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 4rem;
}

@media (min-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Premium Card System */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 2.5rem;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-neon);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, transparent);
  transition: var(--transition-smooth);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 242, 254, 0.3);
  box-shadow: var(--shadow-neon-hover);
}

.card:hover::before {
  background: linear-gradient(90deg, var(--accent-gemini-start), var(--accent-gemini-end));
}

.card-title-area {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 242, 254, 0.1);
  color: var(--color-cyan);
  border: 1px solid rgba(0, 242, 254, 0.2);
}

.card-title-area h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-title-area p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* Interactive Calculator Elements */
.calculator-form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.input-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.label-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-cyan);
  background: rgba(0, 242, 254, 0.08);
  padding: 0.2rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 242, 254, 0.15);
  font-family: monospace;
}

/* Custom Styled Range Sliders */
.slider-container {
  position: relative;
  display: flex;
  align-items: center;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  border: 3px solid var(--color-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.6);
  transition: var(--transition-smooth);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--color-cyan);
  box-shadow: 0 0 18px var(--color-cyan);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  border: 3px solid var(--color-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.6);
  transition: var(--transition-smooth);
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.2);
  background: var(--color-cyan);
  box-shadow: 0 0 18px var(--color-cyan);
}

/* Custom Select Dropdowns */
.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: '▼';
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

select {
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: var(--transition-smooth);
}

select:focus {
  border-color: var(--color-cyan);
  background: rgba(0, 242, 254, 0.03);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.15);
}

select option {
  background-color: #0b0e25;
  color: var(--color-text-primary);
}

/* Feature Toggles (Switches) */
.toggles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.toggle-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: var(--transition-smooth);
}

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

.toggle-card.active {
  background: rgba(0, 242, 254, 0.05);
  border-color: rgba(0, 242, 254, 0.3);
}

.toggle-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.toggle-title {
  font-size: 0.9rem;
  font-weight: 700;
}

.toggle-desc {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

/* Switch Styles */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border-radius: 24px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .switch-slider {
  background-color: var(--color-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

input:checked + .switch-slider:before {
  transform: translateX(20px);
}

/* Calculator Output / Pricing Results */
.results-panel {
  background: radial-gradient(circle at top right, rgba(0, 242, 254, 0.07), transparent 60%), rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 1.75rem;
  margin-top: 1rem;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.results-header-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.cost-amount-large {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
}

.cost-amount-large span {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.cost-details-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cost-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.cost-detail-label {
  color: var(--color-text-secondary);
}

.cost-detail-value {
  font-weight: 600;
  font-family: monospace;
}

.discount-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Cost Efficiency Chart Styles */
.chart-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chart-toggle-buttons {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.25rem;
}

.chart-btn {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.chart-btn.active {
  background: rgba(0, 242, 254, 0.12);
  color: var(--color-cyan);
  box-shadow: inset 0 0 8px rgba(0, 242, 254, 0.1);
}

/* Rendered HTML/CSS SVG-based bar chart */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1rem;
}

.chart-bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bar-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.bar-model-name {
  font-weight: 600;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bar-model-tag {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}

.tag-flash {
  background: rgba(6, 182, 212, 0.15);
  color: var(--color-cyan);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.tag-pro {
  background: rgba(168, 85, 247, 0.15);
  color: var(--color-purple);
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.bar-cost-value {
  font-family: monospace;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.bar-track {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 100px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.bar-fill {
  height: 100%;
  width: 0; /* Dynamic animate in JS */
  border-radius: 100px;
  background: linear-gradient(90deg, var(--accent-gemini-start), var(--accent-gemini-mid));
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

.bar-chart-legend {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Specifications Matrix Area */
.specs-section {
  margin-bottom: 5rem;
}

.specs-title-row {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .specs-title-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
}

.specs-title-info h2 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.specs-title-info p {
  color: var(--color-text-secondary);
}

/* Tab controls and Search Inputs */
.specs-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 768px) {
  .specs-controls {
    width: auto;
    flex-direction: row;
    align-items: center;
  }
}

.tab-nav {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 0.3rem;
  backdrop-filter: var(--glass-blur);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  padding: 0.6rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-btn.active {
  background: var(--color-text-primary);
  color: var(--bg-main);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.15);
}

.search-wrapper {
  position: relative;
  min-width: 250px;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--color-text-primary);
  outline: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.search-input:focus {
  border-color: var(--color-cyan);
  background: rgba(0, 242, 254, 0.02);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

/* Specifications Grid Matrix (Mobile Friendly Custom Cards / Desktop Table) */
.specs-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  overflow: hidden;
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-neon);
  margin-bottom: 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--color-text-primary);
  font-weight: 700;
  font-family: var(--font-heading);
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr {
  transition: var(--transition-smooth);
}

tr:hover td {
  background: rgba(255, 255, 255, 0.015);
  color: #ffffff;
}

.model-name-cell {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.model-subtitle {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-text-muted);
  font-family: var(--font-body);
}

.pill-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pill {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
  font-weight: 600;
}

.pill-context {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

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

.pill-param {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.modality-icons {
  display: flex;
  gap: 0.6rem;
  color: var(--color-cyan);
}

.modality-icon {
  background: rgba(0, 242, 254, 0.06);
  border: 1px solid rgba(0, 242, 254, 0.12);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

/* Feature Educational Section */
.info-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .info-section {
    grid-template-columns: 1fr 1fr;
  }
}

.info-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  transition: var(--transition-smooth);
}

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

.info-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.info-card-header h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
}

.info-card-icon {
  color: var(--color-cyan);
  font-size: 1.5rem;
}

.info-card p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.info-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.info-bullets li {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  padding-left: 1.5rem;
  position: relative;
}

.info-bullets li::before {
  content: '✓';
  color: var(--color-emerald);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Footer Section */
footer {
  text-align: center;
  margin-top: 6rem;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

footer a {
  color: var(--color-cyan);
  text-decoration: none;
  transition: var(--transition-smooth);
}

footer a:hover {
  text-decoration: underline;
  color: #ffffff;
}

/* Mobile responsive specs table fallback */
@media (max-width: 767px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }
  
  thead {
    display: none;
  }
  
  tr {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
  }
  
  tr:last-child {
    border-bottom: none;
    margin-bottom: 0;
  }
  
  td {
    border: none;
    padding: 0.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
  }
  
  td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--color-text-primary);
    font-family: var(--font-heading);
    text-align: left;
    margin-right: 1rem;
  }
  
  .model-name-cell {
    align-items: flex-end;
  }
}
