/* ==========================================================================
   Design System & CSS Variables
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Outfit:wght@700;800&family=Roboto+Mono:wght@600&display=swap');

:root {
  /* Colors */
  --color-bg-primary: hsl(240, 40%, 8%);
  --color-bg-secondary: hsl(240, 25%, 8%);
  --color-accent-purple: hsl(280, 100%, 65%);
  --color-accent-cyan: hsl(180, 90%, 55%);
  --color-text-primary: hsl(0, 0%, 95%);
  --color-text-secondary: hsl(0, 0%, 80%);
  
  /* Fonts */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Roboto Mono', monospace;
  
  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 40px;
  --spacing-xl: 64px;
  
  /* Glassmorphism */
  --glass-bg: linear-gradient(135deg, hsl(240, 30%, 12%) 0%, hsl(240, 25%, 8%) 100%);
  --glass-border: 1px solid hsl(280, 100%, 65%, 0.12);
  --glass-shadow: 0 8px 32px hsl(280, 100%, 65%, 0.08), 0 2px 8px hsl(0, 0%, 0%, 0.2);
  --glass-blur: blur(16px);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Typography Scales */
  --text-h1: 48px;
  --text-h2: 36px;
  --text-h3: 24px;
  --text-body: 16px;
  --text-small: 14px;
  
  /* Radii */
  --radius-card: 16px;
  --radius-btn: 12px;
  --radius-input: 8px;
}

@media (max-width: 768px) {
  :root {
    --text-h1: 32px;
    --text-h2: 28px;
    --text-h3: 20px;
    --text-body: 15px;
    --text-small: 13px;
  }
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

header {
  margin-bottom: 0; /* Change this to 0 */
}

main {
  margin-top: 0; /* Clear out any top margin */
}

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

main.page-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
p { font-size: var(--text-body); margin-bottom: var(--spacing-sm); }
small { font-size: var(--text-small); }

a {
  color: var(--color-accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-purple);
}

ul {
  list-style: none;
}

/* ==========================================================================
   Background Animations
   ========================================================================== */
.bg-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  background: var(--color-bg-primary);
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: floatOrb 30s infinite alternate ease-in-out;
}

.orb-purple {
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, var(--color-accent-purple) 0%, transparent 70%);
  top: -10%;
  left: -10%;
  animation-delay: -5s;
}

.orb-cyan {
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--color-accent-cyan) 0%, transparent 70%);
  bottom: -10%;
  right: -10%;
  animation-delay: -15s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(10%, 10%) scale(1.1); }
  100% { transform: translate(-10%, -10%) scale(0.9); }
}

.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--color-text-primary);
  border-radius: 50%;
  opacity: 0.05;
  animation: floatParticle 20s infinite linear;
}

@keyframes floatParticle {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  20% { opacity: 0.08; }
  80% { opacity: 0.08; }
  100% { transform: translateY(-100px) scale(1.5); opacity: 0; }
}

/* ==========================================================================
   Utilities & Layout
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.glass-card {
  background: var(--glass-bg);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-card);
  padding: var(--spacing-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-accent-purple) 0%, var(--color-accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  font-family: var(--font-heading);
  font-size: var(--text-body);
  font-weight: 700;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  padding: var(--spacing-sm) var(--spacing-md);
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.2);
  border-radius: inherit;
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent-purple) 0%, hsl(280, 80%, 55%) 100%);
  color: #fff;
  box-shadow: 0 4px 15px hsl(280, 100%, 65%, 0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--color-accent-cyan) 0%, hsl(180, 80%, 45%) 100%);
  color: var(--color-bg-primary);
  box-shadow: 0 4px 15px hsl(180, 90%, 55%, 0.3);
}

.btn-full {
  width: 100%;
  padding: 20px var(--spacing-md);
  font-size: 18px;
}

/* Button Micro-animations */
.btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px hsl(280, 100%, 65%, 0.25);
}

.btn-secondary:hover {
  box-shadow: 0 12px 40px hsl(180, 90%, 55%, 0.25);
}

.btn:active {
  transform: translateY(-2px) scale(0.98);
}

.btn-pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 hsl(280, 100%, 65%, 0.4); }
  70% { box-shadow: 0 0 0 15px hsl(280, 100%, 65%, 0); }
  100% { box-shadow: 0 0 0 0 hsl(280, 100%, 65%, 0); }
}

/* Icons within buttons */
.btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform var(--transition-fast);
}

.btn:hover svg {
  transform: translateX(4px);
}

/* ==========================================================================
   Form Elements
   ========================================================================== */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--spacing-xs);
  color: var(--color-text-primary);
  font-size: var(--text-small);
}

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-input);
  font-family: var(--font-body);
  font-size: var(--text-body);
  transition: all var(--transition-fast);
  outline: none;
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Input Focus Animation */
.form-control:focus {
  border-color: var(--color-accent-purple);
  box-shadow: 0 0 0 3px hsl(280, 100%, 65%, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='hsl(0, 0%, 80%)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}

select.form-control option {
  background-color: var(--color-bg-secondary);
  color: var(--color-text-primary);
}

/* Custom Range Slider */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
  margin: var(--spacing-xs) 0;
}

input[type=range]:focus {
  outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  border: none;
}

input[type=range]:focus::-webkit-slider-runnable-track {
  background: rgba(255, 255, 255, 0.2);
}

input[type=range]::-webkit-slider-thumb {
  border: 2px solid var(--color-accent-cyan);
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: var(--color-bg-primary);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -7px;
  box-shadow: 0 0 10px var(--color-accent-cyan);
  transition: transform 0.1s;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Radio & Checkbox Styles */
.radio-group, .checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

@media (min-width: 480px) {
  .radio-group {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.radio-label, .checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
  border-radius: var(--radius-input);
  transition: all var(--transition-fast);
  font-size: var(--text-small);
  flex: 1;
}

.radio-label:hover, .checkbox-label:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.radio-label input, .checkbox-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.custom-radio, .custom-checkbox {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  margin-right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.custom-radio { border-radius: 50%; }
.custom-checkbox { border-radius: 4px; }

.custom-radio::after, .custom-checkbox::after {
  content: '';
  display: none;
}

.custom-radio::after {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent-purple);
}

.custom-checkbox::after {
  width: 5px;
  height: 10px;
  border: solid var(--color-bg-primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.radio-label input:checked ~ .custom-radio,
.checkbox-label input:checked ~ .custom-checkbox {
  border-color: var(--color-accent-purple);
}

.checkbox-label input:checked ~ .custom-checkbox {
  background: var(--color-accent-purple);
}

.radio-label input:checked ~ .custom-radio::after,
.checkbox-label input:checked ~ .custom-checkbox::after {
  display: block;
}

.radio-label input:focus-visible ~ .custom-radio,
.checkbox-label input:focus-visible ~ .custom-checkbox {
  box-shadow: 0 0 0 3px hsl(280, 100%, 65%, 0.12);
}

.radio-label:has(input:checked), .checkbox-label:has(input:checked) {
  border-color: var(--color-accent-purple);
  background: rgba(180, 80%, 55%, 0.05);
}

/* ==========================================================================
   Layout Sections
   ========================================================================== */

/* Hero & Calculator Split Layout */
.hero-split-section {
  position: relative;
  z-index: 2;
  padding: var(--spacing-xl) var(--spacing-md) var(--spacing-md) var(--spacing-md);
  margin-top: var(--spacing-lg);
  flex-shrink: 0;
}

.hero-split-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

@media (min-width: 992px) {
  .hero-split-grid {
    grid-template-columns: 1fr 1.2fr;
    min-height: calc(85vh - 100px);
  }
}

.hero-content {
  z-index: 1;
}

.hero-content h1 {
  margin-bottom: var(--spacing-sm);
  text-align: left;
}

.hero-content p {
  color: var(--color-text-secondary);
  font-size: 18px;
  margin-bottom: var(--spacing-lg);
  text-align: left;
}

.hero-content .btn {
  margin-bottom: var(--spacing-lg);
}

.trust-badges {
  display: flex;
  justify-content: flex-start;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
  flex-wrap: wrap;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-small);
  color: var(--color-text-secondary);
}

.trust-badge svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-accent-cyan);
}

.desktop-hidden {
  display: inline-flex;
}

@media (min-width: 992px) {
  .desktop-hidden {
    display: none !important;
  }
}

.calculator-column {
  width: 100%;
}

.calculator-card {
  width: 100%;
}

.calculator-card h2 {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

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

.form-group-full {
  grid-column: 1 / -1;
}

.views-display {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: var(--text-small);
  color: var(--color-accent-cyan);
}

/* Result Section */
.result-section {
  padding: var(--spacing-xl) 0;
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.result-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.result-card {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  background: linear-gradient(135deg, hsl(240, 35%, 15%) 0%, hsl(240, 30%, 10%) 100%);
  border: 1px solid hsl(180, 90%, 55%, 0.2);
  box-shadow: 0 0 40px hsl(180, 90%, 55%, 0.1);
}

.price-display-box {
  margin: var(--spacing-md) 0;
  padding: var(--spacing-md);
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.main-price {
  font-family: var(--font-mono);
  font-size: 56px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.1;
}

@media (max-width: 768px) {
  .main-price { font-size: 36px; }
}

.calculation-breakdown {
  font-size: var(--text-small);
  color: hsl(0, 0%, 70%);
}

.breakdown-table {
  width: 100%;
  max-width: 400px;
  margin: 0 auto var(--spacing-lg);
  border-collapse: separate;
  border-spacing: 0 8px;
}

.breakdown-table td {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  font-size: var(--text-body);
}

.breakdown-table tr td:first-child {
  text-align: left;
  border-radius: var(--radius-input) 0 0 var(--radius-input);
  font-weight: 500;
  color: var(--color-text-secondary);
}

.breakdown-table tr td:last-child {
  text-align: right;
  border-radius: 0 var(--radius-input) var(--radius-input) 0;
  color: var(--color-text-primary);
  font-weight: 600;
}

.result-ctas {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* SEO Content Section */
.seo-section {
  padding: var(--spacing-xl) 0;
}

.seo-section h2 {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

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

.info-card {
  text-align: center;
  padding: var(--spacing-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform var(--transition-fast);
}

.info-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.04);
}

.info-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--spacing-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(280, 100%, 65%, 0.1);
  border-radius: 50%;
  color: var(--color-accent-purple);
}

.info-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: stroke-dashoffset 0.5s ease;
}

.seo-table-container {
  overflow-x: auto;
  margin-bottom: var(--spacing-xl);
}

.seo-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.seo-table th, .seo-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.seo-table th {
  font-family: var(--font-heading);
  color: var(--color-accent-cyan);
}

.tips-list {
  list-style: none;
}

.tips-list li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 12px;
}

.tips-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-accent-purple);
  font-weight: bold;
}

/* Footer */
.site-footer {
  background: hsl(240, 50%, 5%);
  padding: var(--spacing-lg) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
}

.adsense-placeholder {
  width: 300px;
  height: 250px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: var(--text-small);
  border-radius: 4px;
}

.footer-links {
  display: flex;
  gap: var(--spacing-sm);
}

.footer-links a {
  color: hsl(0, 0%, 60%);
  font-size: var(--text-small);
}

.footer-links a:hover {
  color: var(--color-text-primary);
}

.copyright {
  color: hsl(0, 0%, 50%);
  font-size: var(--text-small);
}
