* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at bottom right, #3a0d12, #050914 70%);
  color: #eaeaf0;
  min-height: 100vh;
  padding: 60px 20px;
}

/* HEADER */
.header {
  text-align: center;
  margin-bottom: 50px;
}

.header h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.subtitle {
  color: #9aa4c7;
  margin-top: 8px;
}

/* MAIN FRAME */
.main-frame {
  max-width: 1200px;
  margin: 0 auto 70px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

/* PANELS */
.input-panel,
.gauge-panel {
  padding: 36px;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.08);
}

/* INPUT PANEL */
.input-panel h2 {
  text-align: center;
  margin-bottom: 24px;
  font-weight: 600;
}

.inputs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.inputs input {
  padding: 16px 20px;
  font-size: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(
    90deg,
    rgba(40,60,120,0.25),
    rgba(120,40,40,0.25)
  );
  color: #fff;
  outline: none;
}

.inputs input::placeholder {
  color: #8fa1d1;
}

/* GAUGE */
.gauge-wrapper {
  max-width: 360px;
  margin: 0 auto;
  text-align: center;
}

.gauge-svg {
  width: 100%;
}

/* NEEDLE */
.needle {
  transform-origin: 150px 140px;
  transform: rotate(-90deg);
  transition: transform 0.9s cubic-bezier(.2,.8,.2,1);
}

.needle line {
  stroke: white;
  stroke-width: 3;
}

.needle circle {
  fill: white;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.6));
}

/* TICKS */
.ticks line {
  stroke: rgba(255,255,255,0.35);
  stroke-width: 2;
}

/* SCORE */
.score {
  margin-top: 16px;
}

.percentage {
  font-size: 3.2rem;
  font-weight: 800;
  margin-top: 12px;
  text-shadow: 0 0 28px rgba(255,90,90,0.4);
}

.interpretation {
  margin-top: 6px;
  font-size: 0.95rem;
  color: #9aa4c7;
}

/* RESULTS */
.results {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.result-item {
  padding: 22px 26px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
}

.result-item h3 {
  margin: 0 0 6px;
  font-weight: 600;
}

.result-item p {
  margin: 0;
  color: #cfd6ff;
}

/* FOOTER */
.disclaimer {
  margin-top: 70px;
  text-align: center;
  font-size: 0.85rem;
  color: #7f88b5;
}

/* ===============================
   FOOTER — UNIVERSAL (TRANSPARENT)
   =============================== */

.footer-section {
  padding: 3rem 1.5rem 2.5rem;
  background: transparent;
}

.footer-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  align-items: center;
}

/* Navigation row */
.footer-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  font-size: 0.9rem;
  color: currentColor;
  opacity: 0.75;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity 0.2s ease;
}

.footer-link:hover {
  opacity: 1;
}

/* Legal line */
.footer-legal {
  font-size: 0.75rem;
  opacity: 0.55;
  letter-spacing: 0.03em;
  text-align: center;
}

/* ===============================
   MOBILE RESPONSIVE STYLES
   =============================== */

/* Tablet: 900px and below */
@media (max-width: 900px) {
  .main-frame {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* Mobile: 768px and below */
@media (max-width: 768px) {
  body {
    padding: 30px 15px;
  }
  
  /* Header adjustments */
  .header {
    margin-bottom: 30px;
  }
  
  .header h1 {
    font-size: 2.2rem;
    line-height: 1.2;
  }
  
  .subtitle {
    font-size: 0.95rem;
    margin-top: 10px;
    padding: 0 10px;
  }
  
  /* Main frame spacing */
  .main-frame {
    margin-bottom: 40px;
    gap: 24px;
  }
  
  /* Panel padding reduction */
  .input-panel,
  .gauge-panel {
    padding: 24px 20px;
    border-radius: 16px;
  }
  
  /* Input field adjustments */
  .inputs {
    gap: 12px;
  }
  
  .inputs input {
    padding: 14px 16px;
    font-size: 0.95rem;
    border-radius: 12px;
  }
  
  /* Gauge scaling */
  .gauge-wrapper {
    max-width: 280px;
  }
  
  /* Needle transform origin adjustment for mobile */
  .needle {
    transform-origin: 50% 140px;
  }
  
  /* Score text adjustments */
  .percentage {
    font-size: 2.5rem;
  }
  
  .interpretation {
    font-size: 0.9rem;
  }
  
  /* Results section */
  .results {
    gap: 14px;
  }
  
  .result-item {
    padding: 18px 20px;
    border-radius: 14px;
  }
  
  .result-item h3 {
    font-size: 1.1rem;
  }
  
  .result-item p {
    font-size: 0.95rem;
    line-height: 1.4;
  }
  
  /* Footer adjustments */
  .footer-section {
    padding: 2rem 1rem 2rem;
  }
  
  .footer-nav {
    gap: 1.5rem;
  }
  
  .footer-link {
    font-size: 0.85rem;
  }
  
  .footer-legal {
    font-size: 0.7rem;
  }
  
  .disclaimer {
    margin-top: 50px;
    font-size: 0.8rem;
    padding: 0 10px;
  }
}

/* Small Phones: 480px and below */
@media (max-width: 480px) {
  body {
    padding: 20px 12px;
  }
  
  /* Header further reduction */
  .header h1 {
    font-size: 1.8rem;
  }
  
  .subtitle {
    font-size: 0.85rem;
  }
  
  /* Panel padding for small phones */
  .input-panel,
  .gauge-panel {
    padding: 20px 16px;
    border-radius: 14px;
  }
  
  .input-panel h2 {
    font-size: 1.2rem;
    margin-bottom: 18px;
  }
  
  /* Input fields */
  .inputs input {
    padding: 12px 14px;
    font-size: 0.9rem;
  }
  
  /* Gauge size for very small screens */
  .gauge-wrapper {
    max-width: 240px;
  }
  
  /* Score display */
  .percentage {
    font-size: 2rem;
  }
  
  /* Results */
  .result-item {
    padding: 16px;
  }
  
  .result-item h3 {
    font-size: 1rem;
  }
  
  .result-item p {
    font-size: 0.9rem;
  }
  
  /* Footer navigation stack vertically on very small screens */
  .footer-nav {
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
  }
  
  .disclaimer {
    margin-top: 40px;
    font-size: 0.75rem;
  }
}

/* Very Small Phones: 360px and below */
@media (max-width: 360px) {
  .header h1 {
    font-size: 1.5rem;
  }
  
  .gauge-wrapper {
    max-width: 200px;
  }
  
  .percentage {
    font-size: 1.8rem;
  }
  
  .inputs input {
    font-size: 0.85rem;
    padding: 10px 12px;
  }
  
  .result-item h3 {
    font-size: 0.95rem;
  }
  
  .result-item p {
    font-size: 0.85rem;
  }
}

/* Landscape orientation for phones */
@media (max-height: 600px) and (orientation: landscape) {
  body {
    padding: 20px;
  }
  
  .header h1 {
    font-size: 1.8rem;
  }
  
  .main-frame {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  
  .input-panel,
  .gauge-panel {
    padding: 20px;
  }
  
  .gauge-wrapper {
    max-width: 220px;
  }
}

/* Tablet portrait mode */
@media (min-width: 601px) and (max-width: 900px) and (orientation: portrait) {
  .main-frame {
    max-width: 600px;
  }
  
  .gauge-wrapper {
    max-width: 320px;
  }
}

/* Accessibility: Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .needle {
    transition: none;
  }
}

/* Accessibility: High contrast mode */
@media (prefers-contrast: high) {
  .input-panel,
  .gauge-panel,
  .result-item {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #fff;
  }
  
  .inputs input {
    border: 2px solid #fff;
  }
}

/* Touch-friendly improvements */
@media (max-width: 768px) {
  .inputs input,
  .footer-link {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Prevent text size adjustment on mobile rotation */
  html {
    -webkit-text-size-adjust: 100%;
  }
}