/* Wimbledon Equipment Impact Analyzer Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #2e7d32;
  --primary-dark: #1b5e20;
  --secondary: #1565c0;
  --accent: #ff9800;
  --bg: #fafafa;
  --bg-card: #ffffff;
  --text: #212121;
  --text-muted: #616161;
  --border: #e0e0e0;
  --shadow: rgba(0,0,0,0.1);
  --radius: 12px;
  --transition: all 0.2s ease;
}

[data-theme="dark"] {
  --primary: #81c784;
  --secondary: #64b5f6;
  --accent: #ffb74d;
  --bg: #121212;
  --bg-card: #1e1e1e;
  --text: #e0e0e0;
  --text-muted: #a0a0a0;
  --border: #424242;
  --shadow: rgba(0,0,0,0.3);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
}

.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px var(--shadow);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary);
  text-decoration: none;
}

.main-nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s;
}

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

.theme-toggle {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.theme-toggle:hover { background: rgba(0,0,0,0.1); }

.main-content { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }

.hero-section {
  text-align: center;
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.hero-container h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
  color: var(--text);
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

.preset-selector {
  display: inline-block;
  margin-top: 1rem;
}

.preset-selector label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.preset-selector select {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 1rem;
  cursor: pointer;
}

.analyzer-section .controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.control-group {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px var(--shadow);
}

.control-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.control-group input[type="range"] {
  width: 100%;
  margin: 0.75rem 0;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.value-display {
  text-align: center;
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.control-group select {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
}

.custom-input input {
  width: 48%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.875rem;
}

.results-section h2 { margin-bottom: 1.5rem; }

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.result-card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px var(--shadow);
  text-align: center;
  border-left: 4px solid var(--primary);
}

.result-card h3 { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.5rem; }

.result-value { font-size: 1.75rem; font-weight: 700; color: var(--text); margin: 0.5rem 0; }

.result-explanation { font-size: 0.875rem; color: var(--text-muted); }

.power-control { margin-top: 0.5rem; }

.power-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.power-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  width: 50%;
  transition: width 0.3s var(--transition);
}

.pc-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

.action-buttons { display: flex; gap: 1rem; justify-content: center; margin-bottom: 2rem; }

.primary-btn, .secondary-btn, .tertiary-btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.primary-btn { background: var(--primary); color: white; }

.secondary-btn { background: var(--bg-card); border: 1px solid var(--border); color: var(--text); }

.tertiary-btn { background: var(--bg); color: var(--text); }

.primary-btn:hover { background: var(--primary-dark); }

.secondary-btn:hover { background: var(--border); }

.tertiary-btn:hover { background: var(--border); }

.profiles-section h2 { margin-bottom: 1rem; }

.profiles-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.75rem; }

.profile-item {
  background: var(--bg-card);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 1px 4px var(--shadow);
}

.profile-load { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 0.25rem 0.75rem; cursor: pointer; font-size: 0.875rem; }

.reference-section { background: var(--bg-card); padding: 2rem; border-radius: var(--radius); box-shadow: 0 2px 8px var(--shadow); margin-bottom: 2rem; }

.reference-section h2 { margin-bottom: 1.5rem; color: var(--text); }

.reference-section h3 { margin: 1.5rem 0 0.75rem; color: var(--text); font-size: 1.125rem; }

.model-explanation p { margin-bottom: 1rem; }

.scenario-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin: 1.5rem 0; }

.scenario-card {
  background: var(--bg);
  padding: 1rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}

.scenario-card h4 { font-size: 1rem; margin-bottom: 0.5rem; }

.scenario-card p { font-size: 0.875rem; color: var(--text-muted); }

.assumptions-list, .tips-list { margin: 1rem 0; }

.assumptions-list li, .tips-list li { margin-bottom: 0.5rem; font-size: 0.9rem; }

.ad-reserve { text-align: center; padding: 1rem 0; }

.site-footer {
  background: var(--bg-card);
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.footer-content { max-width: 1200px; margin: 0 auto; text-align: center; }

.footer-nav a { margin: 0 0.75rem; color: var(--text-muted); }

@media (max-width: 768px) {
  .header-container { flex-direction: column; gap: 1rem; }
  .main-nav a { margin: 0 0.5rem; }
  .main-content { padding: 1rem; }
  .controls-grid { grid-template-columns: 1fr; }
  .action-buttons { flex-direction: column; }
  .profiles-list { flex-direction: column; }
  .reference-section { padding: 1rem; }
}
@media (max-width: 480px) {
  .custom-input input { width: 100%; }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
