/* PracticeBeat Styles */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #059669;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 2rem 1rem;
  text-align: center;
}

header h1 {
  margin: 0 0 0.25rem;
  font-size: 2rem;
}

tagline {
  margin: 0;
  opacity: 0.9;
  font-size: 1.1rem;
}

main { max-width: 800px; margin: 0 auto; padding: 1rem; }

section { margin-bottom: 2rem; }

section h2, section h3 { margin-top: 0; }

.field-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

select, input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  background: var(--card);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  font-weight: 500;
}

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

button.secondary {
  background: var(--accent);
  margin-right: 0.5rem;
}

button.secondary:hover { background: #047857; }

.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.preset-btn {
  background: var(--card);
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

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

.session-output {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.session-block {
  border-left: 3px solid var(--primary);
  padding-left: 1rem;
  margin-bottom: 1rem;
}

.session-block:last-child { margin-bottom: 0; }

block-title { font-weight: 600; color: var(--primary); }

block-time { font-size: 0.9rem; color: var(--text-light); }

block-exercises { margin-top: 0.5rem; }

block-exercises li { margin-bottom: 0.25rem; }

session-actions {
  margin-bottom: 1.5rem;
}

saved-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

saved-item {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
}

saved-item:hover { background: var(--border); }

.placeholder { color: var(--text-light); text-align: center; }

guide {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

guide h2 { color: var(--primary); }

footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

footer a { color: var(--primary); text-decoration: none; }

footer a:hover { text-decoration: underline; }

.version { margin-top: 0.5rem; }

@media (max-width: 600px) {
  header h1 { font-size: 1.5rem; }
  .preset-buttons { flex-direction: column; }
  .session-actions { display: flex; flex-wrap: wrap; }
}

@media print {
  header, footer, .setup, .presets, .session-actions, .saved-sessions, button {
    display: none;
  }
  .session-output { box-shadow: none; border: 1px solid #000; }
}


/* 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;
}
