/* ============================================
   Biorhythm Compatibility Calculator - CSS Styles
   Neobrutalism Design System
   ============================================ */

/* Global box-sizing */
.biorhythm-compatibility-calculator-container,
.biorhythm-compatibility-calculator-container *,
.biorhythm-compatibility-calculator-container *::before,
.biorhythm-compatibility-calculator-container *::after {
  box-sizing: border-box;
}

/* ============================================
   CSS Variables - Light Mode (Default)
   ============================================ */
.biorhythm-compatibility-calculator-container {
  /* Background colors */
  --bg-primary: #f5f5f0;
  --bg-secondary: #fff;
  --bg-section: #fff;
  
  /* Borders */
  --border-color: #333;
  
  /* Text colors */
  --text-primary: #222;
  --text-secondary: #555;
  --text-light: #666;
  
  /* Brand colors */
  --color-accent: #e91e63;
  --color-success: #27ae60;
  --color-warning: #f39c12;
  --color-danger: #e74c3c;
  --color-purple: #9b59b6;
  --color-teal: #1abc9c;
  --color-blue: #3498db;
  
  /* Biorhythm specific colors */
  --color-physical: #e74c3c;
  --color-emotional: #e91e63;
  --color-intellectual: #3498db;
  
  /* Person colors */
  --color-person1: #3498db;
  --color-person2: #e91e63;
  
  /* Shadows (neobrutalism) */
  --shadow-sm: 2px 2px 0 rgba(0,0,0,0.1);
  --shadow-md: 4px 4px 0 rgba(0,0,0,0.15);
  --shadow-lg: 8px 8px 0 rgba(0,0,0,0.15);
  
  /* Border radius */
  --radius-container: 8px;
  --radius-section: 6px;
  --radius-button: 4px;
  --radius-input: 4px;
  
  /* Input focus */
  --input-focus-bg: #fff0f5;
  
  /* Header title */
  --title-color: #c2185b;
  --title-shadow: 2px 2px 0 rgba(255,255,255,0.5);
  
  /* Button hover background */
  --btn-hover-overlay: rgba(0,0,0,0.1);
  
  /* Gauge colors */
  --gauge-bg: #e0e0e0;
  --gauge-fill: #e91e63;
}

/* ============================================
   Manual Dark Mode (.dark class)
   ============================================ */
.biorhythm-compatibility-calculator-container.dark {
  /* Background colors */
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-section: #2d2d2d;
  
  /* Borders */
  --border-color: #e0e0e0;
  
  /* Text colors */
  --text-primary: #e8e8e8;
  --text-secondary: #b0b0b0;
  --text-light: #909090;
  
  /* Brand colors - brighter for dark bg */
  --color-accent: #f48fb1;
  --color-success: #52c77a;
  --color-warning: #f5b041;
  --color-danger: #ec7063;
  --color-purple: #af7ac5;
  --color-teal: #48d1cc;
  --color-blue: #5dade2;
  
  /* Biorhythm specific colors - brighter */
  --color-physical: #ec7063;
  --color-emotional: #f48fb1;
  --color-intellectual: #5dade2;
  
  /* Person colors */
  --color-person1: #5dade2;
  --color-person2: #f48fb1;
  
  /* Shadows */
  --shadow-sm: 2px 2px 0 rgba(255,255,255,0.08);
  --shadow-md: 4px 4px 0 rgba(255,255,255,0.12);
  --shadow-lg: 8px 8px 0 rgba(255,255,255,0.12);
  
  /* Input focus */
  --input-focus-bg: #3a3a3a;
  
  /* Header title */
  --title-color: #f48fb1;
  --title-shadow: 2px 2px 0 rgba(0,0,0,0.5);
  
  /* Button hover background */
  --btn-hover-overlay: rgba(255,255,255,0.1);
  
  /* Gauge colors */
  --gauge-bg: #404040;
  --gauge-fill: #f48fb1;
}

/* ============================================
   System Dark Mode Auto Detection
   ============================================ */
@media (prefers-color-scheme: dark) {
  .biorhythm-compatibility-calculator-container:not(.dark):not(.light) {
    /* Background colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-section: #2d2d2d;
    
    /* Borders */
    --border-color: #e0e0e0;
    
    /* Text colors */
    --text-primary: #e8e8e8;
    --text-secondary: #b0b0b0;
    --text-light: #909090;
    
    /* Brand colors */
    --color-accent: #f48fb1;
    --color-success: #52c77a;
    --color-warning: #f5b041;
    --color-danger: #ec7063;
    --color-purple: #af7ac5;
    --color-teal: #48d1cc;
    --color-blue: #5dade2;
    
    /* Biorhythm specific colors */
    --color-physical: #ec7063;
    --color-emotional: #f48fb1;
    --color-intellectual: #5dade2;
    
    /* Person colors */
    --color-person1: #5dade2;
    --color-person2: #f48fb1;
    
    /* Shadows */
    --shadow-sm: 2px 2px 0 rgba(255,255,255,0.08);
    --shadow-md: 4px 4px 0 rgba(255,255,255,0.12);
    --shadow-lg: 8px 8px 0 rgba(255,255,255,0.12);
    
    /* Input focus */
    --input-focus-bg: #3a3a3a;
    
    /* Header title */
    --title-color: #f48fb1;
    --title-shadow: 2px 2px 0 rgba(0,0,0,0.5);
    
    /* Button hover background */
    --btn-hover-overlay: rgba(255,255,255,0.1);
    
    /* Gauge colors */
    --gauge-bg: #404040;
    --gauge-fill: #f48fb1;
  }
}

/* ============================================
   Main Container
   ============================================ */
.biorhythm-compatibility-calculator-container {
  position: relative;
  max-width: 1000px;
  width: 100%;
  margin: 8px auto;
  padding: 8px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-container);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', sans-serif;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  line-height: 1.5;
}

/* ============================================
   Dark Mode Toggle Button
   ============================================ */
.dark-mode-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 6px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text-primary);
  z-index: 10;
}

.dark-mode-toggle:hover {
  transform: translate(0.5px, 0.5px);
  box-shadow: 1.5px 1.5px 0 rgba(0,0,0,0.15);
}

.dark-mode-toggle:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* ============================================
   Header
   ============================================ */
.calculator-header {
  text-align: center;
  margin-bottom: 8px;
  padding: 8px 0;
}

.main-title {
  font-size: 29px;
  font-weight: 800;
  color: var(--title-color);
  text-shadow: var(--title-shadow);
  margin: 0 0 6px 0;
}

.subtitle {
  font-size: 14.5px;
  color: var(--text-secondary);
  margin: 0;
}

/* ============================================
   2-Column Grid Layout
   ============================================ */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ============================================
   Section Styles
   ============================================ */
.input-section,
.result-section,
.gauge-section,
.chart-section,
.fun-section,
.advice-section,
.info-section {
  background: var(--bg-section);
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-section);
  box-shadow: var(--shadow-md);
}

.gauge-section,
.chart-section,
.fun-section,
.advice-section,
.info-section {
  margin-top: 8px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.section-header svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-accent);
  flex-shrink: 0;
}

/* ============================================
   Person Input Groups
   ============================================ */
.person-input-group {
  margin-bottom: 8px;
  padding: 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-section);
}

.person-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.person-icon {
  font-size: 18px;
}

.inline-inputs {
  display: flex;
  gap: 8px;
}

.input-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.input-item.flex-grow {
  flex: 1;
}

.input-item label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-item input {
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-input);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.input-item input[type="text"] {
  width: 100px;
}

.input-item input:focus {
  outline: none;
  border-color: var(--color-accent);
  background: var(--input-focus-bg);
  box-shadow: 0 0 0 2px rgba(233, 30, 99, 0.1);
}

/* ============================================
   Standard Input Styles
   ============================================ */
.input-group {
  margin-bottom: 8px;
}

.input-group label {
  display: block;
  margin-bottom: 4px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.input-group input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-input);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.input-group input:focus {
  outline: none;
  border-color: var(--color-accent);
  background: var(--input-focus-bg);
  box-shadow: 0 0 0 2px rgba(233, 30, 99, 0.1);
}

/* ============================================
   Button Styles (Neobrutalism)
   ============================================ */
.calculate-btn {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  background: var(--color-accent);
  color: #fff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-button);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.calculate-btn:hover {
  filter: brightness(1.05);
  transform: translate(1px, 1px);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.2);
}

.calculate-btn:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.calculate-btn svg {
  width: 18px;
  height: 18px;
}

/* Secondary buttons */
.button-group {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.sample-btn,
.reset-btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.sample-btn {
  background: var(--color-success);
  color: #fff;
}

.reset-btn {
  background: var(--color-warning);
  color: #fff;
}

.sample-btn:hover,
.reset-btn:hover {
  filter: brightness(1.05);
  transform: translate(0.5px, 0.5px);
  box-shadow: 1.5px 1.5px 0 rgba(0,0,0,0.2);
}

.sample-btn:active,
.reset-btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* ============================================
   Result Section
   ============================================ */
.result-content {
  min-height: 280px;
}

.result-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  text-align: center;
  color: var(--text-light);
}

.result-placeholder svg {
  margin-bottom: 12px;
  opacity: 0.5;
  stroke: var(--color-accent);
}

.result-placeholder p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

/* Compatibility result cards */
.compat-summary {
  text-align: center;
  padding: 12px;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-purple) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-section);
  color: #fff;
  margin-bottom: 8px;
}

.compat-names {
  font-size: 16px;
  margin-bottom: 6px;
  opacity: 0.9;
}

.compat-score {
  font-size: 38px;
  font-weight: 800;
  font-family: 'Courier New', monospace;
}

.compat-label {
  font-size: 15px;
  margin-top: 4px;
  opacity: 0.9;
}

/* Rhythm comparison cards */
.rhythm-comparison {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comparison-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-section);
}

.comparison-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-button);
  flex-shrink: 0;
}

.comparison-info {
  flex: 1;
}

.comparison-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.comparison-values {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-family: 'Courier New', monospace;
}

.value-person1 {
  color: var(--color-person1);
  font-weight: 700;
}

.value-person2 {
  color: var(--color-person2);
  font-weight: 700;
}

.comparison-match {
  font-size: 18px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  min-width: 55px;
  text-align: right;
}

.comparison-match.high {
  color: var(--color-success);
}

.comparison-match.medium {
  color: var(--color-warning);
}

.comparison-match.low {
  color: var(--color-danger);
}

/* ============================================
   Score & Fun Section (Combined Compact)
   ============================================ */
.score-fun-section {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  margin-top: 8px;
  background: var(--bg-section);
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-section);
  box-shadow: var(--shadow-md);
}

.score-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-section);
  min-width: 160px;
}

.compact-gauge {
  display: flex;
  justify-content: center;
}

.gauge-circle {
  position: relative;
  width: 100px;
  height: 100px;
}

.gauge-circle svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.gauge-bg {
  fill: none;
  stroke: var(--gauge-bg);
  stroke-width: 10;
}

.gauge-fill {
  fill: none;
  stroke: var(--gauge-fill);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 1s ease-out;
}

.gauge-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.gauge-value {
  font-size: 24px;
  font-weight: 800;
  font-family: 'Courier New', monospace;
  color: var(--color-accent);
  line-height: 1;
}

.gauge-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  margin-top: 2px;
}

.breakdown-row {
  display: flex;
  gap: 6px;
  width: 100%;
}

.breakdown-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-button);
}

.breakdown-icon {
  font-size: 16px;
}

.breakdown-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
}

.breakdown-value {
  font-size: 15px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
}

.breakdown-item.physical .breakdown-value {
  color: var(--color-physical);
}

.breakdown-item.emotional .breakdown-value {
  color: var(--color-emotional);
}

.breakdown-item.intellectual .breakdown-value {
  color: var(--color-intellectual);
}

.fun-area {
  display: flex;
  align-items: stretch;
}

.fun-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: 100%;
}

.fun-card {
  padding: 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-section);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.fun-icon {
  font-size: 26px;
  margin-bottom: 4px;
}

.fun-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.fun-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-accent);
}

.fun-desc {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
  line-height: 1.3;
}

/* ============================================
   Chart Section
   ============================================ */
.chart-section {
  background: var(--bg-section);
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-section);
  box-shadow: var(--shadow-md);
  margin-top: 8px;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

.chart-header .section-header {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.chart-tabs {
  display: flex;
  gap: 4px;
}

.chart-tab {
  padding: 5px 12px;
  font-size: 15px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: all 0.2s;
}

.chart-tab:hover {
  background: var(--bg-secondary);
}

.chart-tab.active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.chart-wrapper {
  width: 100%;
  height: 220px;
  position: relative;
}

.chart-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--border-color);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
}

.legend-item.person1 .legend-dot {
  background: var(--color-person1);
}

.legend-item.person2 .legend-dot {
  background: var(--color-person2);
}

/* ============================================
   Advice Section
   ============================================ */
.advice-section {
  background: var(--bg-section);
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-section);
  box-shadow: var(--shadow-md);
  margin-top: 8px;
}

.advice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.advice-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-section);
}

.advice-icon {
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-button);
  flex-shrink: 0;
}

.advice-text {
  flex: 1;
  min-width: 0;
}

.advice-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.advice-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

/* Advice types */
.advice-item.excellent {
  border-left: 3px solid var(--color-success);
}

.advice-item.good {
  border-left: 3px solid var(--color-blue);
}

.advice-item.caution {
  border-left: 3px solid var(--color-warning);
}

.advice-item.tip {
  border-left: 3px solid var(--color-purple);
}

/* ============================================
   Info Section
   ============================================ */
.info-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.info-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-section);
}

.info-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.info-text strong {
  display: block;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.info-text p {
  font-size: 13px;
  color: var(--text-light);
  margin: 0;
  line-height: 1.4;
}

.physical-info {
  border-top: 3px solid var(--color-physical);
}

.emotional-info {
  border-top: 3px solid var(--color-emotional);
}

.intellectual-info {
  border-top: 3px solid var(--color-intellectual);
}

/* ============================================
   Save Image Button
   ============================================ */
.save-image-btn {
  margin-top: 8px;
  padding: 10px 16px;
  background: var(--color-purple);
  color: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-button);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.save-image-btn:hover {
  filter: brightness(1.05);
  transform: translate(1px, 1px);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
}

.save-image-btn:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.save-image-btn svg {
  flex-shrink: 0;
}

/* Watermark */
.watermark {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 12px;
  color: var(--text-light);
  opacity: 0.6;
  font-weight: 500;
  pointer-events: none;
}

/* Hide save button when capturing */
.biorhythm-compatibility-calculator-container.capturing .save-image-btn {
  display: none !important;
}

/* ============================================
   Toast Notification
   ============================================ */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-button);
  padding: 10px 15px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  z-index: 1000;
  max-width: 300px;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast svg {
  stroke: var(--color-accent);
  flex-shrink: 0;
}

.toast-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.toast-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.toast-value {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ============================================
   Responsive - Tablet (768px or less)
   ============================================ */
@media (max-width: 768px) {
  .biorhythm-compatibility-calculator-container {
    margin: 6px 5px;
    padding: 7px;
    width: calc(100% - 10px);
  }

  .main-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .main-title {
    font-size: 25px;
  }

  .section-header {
    font-size: 16px;
  }

  .dark-mode-toggle {
    font-size: 15px;
    padding: 5px 8px;
  }

  .info-content {
    grid-template-columns: 1fr;
  }

  .score-fun-section {
    grid-template-columns: 1fr;
  }

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

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

  .chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .chart-legend {
    gap: 15px;
  }

  .inline-inputs {
    flex-direction: column;
    gap: 6px;
  }

  .input-item input[type="text"] {
    width: 100%;
  }
}

/* ============================================
   Responsive - Mobile (480px or less)
   ============================================ */
@media (max-width: 480px) {
  .biorhythm-compatibility-calculator-container {
    padding: 6px;
    border-width: 1px;
  }

  .input-section,
  .result-section,
  .score-fun-section,
  .chart-section,
  .advice-section,
  .info-section {
    padding: 6px;
  }

  .main-title {
    font-size: 23px;
  }

  .subtitle {
    font-size: 13.5px;
  }

  .compat-score {
    font-size: 28px;
  }

  .gauge-circle {
    width: 90px;
    height: 90px;
  }

  .gauge-value {
    font-size: 20px;
  }

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

  .chart-wrapper {
    height: 200px;
  }

  .chart-tabs {
    flex-wrap: wrap;
  }

  .chart-tab {
    font-size: 13px;
    padding: 4px 8px;
  }

  .breakdown-row {
    flex-wrap: wrap;
  }

  .breakdown-item {
    min-width: calc(33% - 4px);
  }
}