/* ============================================================
   MyGolfTrackers.com — Shared Stylesheet
   Color Scheme: Navy #1a2744 + Heliotrope #DF73FF
   Background: #faf7ff
   ============================================================ */

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  background: #faf7ff;
  color: #1f2937;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: #DF73FF; text-decoration: none; }
a:hover { color: #c040e0; text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; color: #1a2744; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
h4 { font-size: 1.05rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Header & Nav ─────────────────────────────────────────── */
header {
  background: #1a2744;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

nav {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand .logo-icon {
  width: 32px;
  height: 32px;
  background: #DF73FF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.nav-brand span {
  font-weight: 700;
  font-size: 1.05rem;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.nav-brand span em {
  color: #DF73FF;
  font-style: normal;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: #DF73FF;
  background: rgba(223, 115, 255, 0.1);
  text-decoration: none;
}

/* ── Hero Section ─────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1a2744 0%, #2a3d6b 100%);
  color: white;
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.hero h1 { color: white; margin-bottom: 1rem; }
.hero h1 span { color: #DF73FF; }

.hero p {
  font-size: 1.1rem;
  color: #cbd5e1;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-badges {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.badge {
  background: rgba(223, 115, 255, 0.15);
  border: 1px solid rgba(223, 115, 255, 0.4);
  color: #DF73FF;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: #DF73FF;
  color: #1a2744;
}

.btn-primary:hover {
  background: #c840e8;
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(223, 115, 255, 0.4);
}

.btn-secondary {
  background: transparent;
  color: #DF73FF;
  border: 2px solid #DF73FF;
}

.btn-secondary:hover {
  background: rgba(223, 115, 255, 0.1);
  text-decoration: none;
}

.btn-navy {
  background: #1a2744;
  color: white;
}

.btn-navy:hover {
  background: #243560;
  color: white;
  text-decoration: none;
}

.btn-danger {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.btn-danger:hover {
  background: #dc2626;
  color: white;
}

.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Score +/- buttons (big touch targets for on-course use) */
.score-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.score-btn-minus {
  background: #fee2e2;
  color: #dc2626;
}
.score-btn-minus:hover { background: #dc2626; color: white; }

.score-btn-plus {
  background: #dcfce7;
  color: #16a34a;
}
.score-btn-plus:hover { background: #16a34a; color: white; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f3f0ff;
  gap: 1rem;
  flex-wrap: wrap;
}

.card-header h2,
.card-header h3 {
  margin: 0;
}

.card-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #1a2744, #2a3d6b);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Tool cards on homepage */
.tool-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.tool-card {
  background: white;
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-top: 4px solid #DF73FF;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(223, 115, 255, 0.2);
  text-decoration: none;
  color: inherit;
}

.tool-card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.tool-card h3 { color: #1a2744; margin-bottom: 0.5rem; }
.tool-card p { color: #6b7280; font-size: 0.92rem; margin-bottom: 1.25rem; }

/* ── Layout Containers ────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.container-sm {
  max-width: 740px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ── Forms ────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: #374151;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1f2937;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #DF73FF;
  box-shadow: 0 0 0 3px rgba(223, 115, 255, 0.15);
}

input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-hint {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 0.3rem;
}

/* ── Scorecard Table ──────────────────────────────────────── */
.scorecard-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.scorecard-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  background: white;
  font-size: 0.9rem;
}

.scorecard-table th {
  background: #1a2744;
  color: white;
  padding: 0.55rem 0.5rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.scorecard-table th.row-label {
  text-align: left;
  padding-left: 0.75rem;
  min-width: 80px;
}

.scorecard-table td {
  padding: 0.5rem;
  text-align: center;
  border-bottom: 1px solid #f3f0ff;
  font-size: 0.88rem;
}

.scorecard-table td.row-label {
  font-weight: 700;
  text-align: left;
  padding-left: 0.75rem;
  background: #f9f7ff;
  color: #374151;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.scorecard-table .total-col {
  background: #f3f0ff;
  font-weight: 700;
  color: #1a2744;
}

.scorecard-table .out-in-col {
  background: #ede9fe;
  font-weight: 700;
  color: #1a2744;
}

/* Score cells */
.scorecard-table input.score-input {
  width: 42px;
  padding: 0.3rem 0.2rem;
  text-align: center;
  border: 1.5px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
}

.scorecard-table input.score-input:focus {
  border-color: #DF73FF;
  box-shadow: 0 0 0 2px rgba(223, 115, 255, 0.2);
}

/* Score vs par color coding */
.sc-eagle  { background: #fde68a !important; color: #92400e !important; font-weight: 700; }
.sc-birdie { background: #dcfce7 !important; color: #166534 !important; font-weight: 700; }
.sc-par    { background: white !important; color: #374151 !important; }
.sc-bogey  { background: #fee2e2 !important; color: #991b1b !important; font-weight: 700; }
.sc-double { background: #fecaca !important; color: #7f1d1d !important; font-weight: 700; }
.sc-worse  { background: #fca5a5 !important; color: #7f1d1d !important; font-weight: 700; }

/* ── Hole Card (mobile scorecard) ─────────────────────────── */
.hole-card {
  background: white;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  padding: 1.75rem;
  text-align: center;
  max-width: 380px;
  margin: 0 auto 1.5rem;
}

.hole-number {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}

.hole-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a2744;
  margin-bottom: 0.75rem;
}

.hole-info {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.hole-stat label {
  font-size: 0.72rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 0.15rem;
}

.hole-stat .val {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a2744;
}

.score-display {
  font-size: 3rem;
  font-weight: 800;
  color: #1a2744;
  margin: 0.75rem 0;
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.score-vs-par {
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  display: inline-block;
}

/* ── Stats / Result Boxes ─────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat-box {
  background: #f9f7ff;
  border: 1px solid #ede9fe;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}

.stat-box .stat-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: #1a2744;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-box .stat-val.accent { color: #DF73FF; }
.stat-box .stat-val.green { color: #16a34a; }
.stat-box .stat-val.red { color: #dc2626; }

.stat-box .stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Handicap index display */
.hc-display {
  background: linear-gradient(135deg, #1a2744, #2a3d6b);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  color: white;
  margin-bottom: 1.5rem;
}

.hc-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.hc-index {
  font-size: 4rem;
  font-weight: 900;
  color: #DF73FF;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.hc-subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
}

.hc-pending {
  font-size: 1.1rem;
  color: #DF73FF;
  font-weight: 600;
}

/* ── Tables ───────────────────────────────────────────────── */
.data-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  min-width: 500px;
}

.data-table thead th {
  background: #1a2744;
  color: white;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.data-table tbody tr {
  border-bottom: 1px solid #f3f0ff;
  transition: background 0.15s;
}

.data-table tbody tr:hover { background: #faf7ff; }

.data-table tbody td {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: #374151;
}

.data-table tbody td:first-child { font-weight: 600; color: #1a2744; }

/* ── Alerts / Messages ────────────────────────────────────── */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.alert-info {
  background: #f3f0ff;
  border-left: 4px solid #DF73FF;
  color: #4c1d95;
}

.alert-success {
  background: #dcfce7;
  border-left: 4px solid #16a34a;
  color: #166534;
}

.alert-warning {
  background: #fef3c7;
  border-left: 4px solid #d97706;
  color: #92400e;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #9ca3af;
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { color: #6b7280; margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.9rem; }

/* ── Tabs ─────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0.25rem;
  background: #f3f0ff;
  padding: 0.25rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.tab-btn {
  flex: 1;
  padding: 0.6rem 1rem;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: white;
  color: #1a2744;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* ── Progress / Steps ─────────────────────────────────────── */
.progress-bar-wrap {
  background: #e5e7eb;
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #DF73FF, #c840e8);
  border-radius: 999px;
  transition: width 0.3s;
}

.progress-label {
  font-size: 0.78rem;
  color: #6b7280;
  text-align: right;
  margin-bottom: 1.5rem;
}

/* ── Diff / Score Pills ───────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 0.2rem;
}

.pill-green { background: #dcfce7; color: #166534; }
.pill-red   { background: #fee2e2; color: #991b1b; }
.pill-gray  { background: #f3f4f6; color: #4b5563; }
.pill-purple { background: #f3e8ff; color: #7e22ce; }

/* ── FAQ / Accordion ──────────────────────────────────────── */
.faq-section { padding: 3rem 1.5rem; }
.faq-section h2 { text-align: center; margin-bottom: 2rem; }

.faq-item {
  background: white;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
}

.faq-question {
  padding: 1.1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #1a2744;
  user-select: none;
}

.faq-question:hover { background: #faf7ff; }

.faq-question::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 400;
  color: #DF73FF;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-item.open .faq-question::after { transform: rotate(45deg); }

.faq-answer {
  display: none;
  padding: 0 1.25rem 1.1rem;
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.7;
}

.faq-item.open .faq-answer { display: block; }

/* ── Why-Use Section ──────────────────────────────────────── */
.why-section {
  background: #f3f0ff;
  padding: 3rem 1.5rem;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

.why-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: white;
  border-radius: 10px;
  padding: 1.1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.why-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.why-item h4 { margin-bottom: 0.25rem; font-size: 0.92rem; }
.why-item p { font-size: 0.82rem; color: #6b7280; margin: 0; }

/* ── Course Hole Grid ─────────────────────────────────────── */
.hole-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.hole-cell {
  text-align: center;
}

.hole-cell label {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-bottom: 0.2rem;
  text-transform: none;
  letter-spacing: 0;
}

.hole-cell input {
  padding: 0.4rem 0.2rem;
  text-align: center;
  font-size: 0.85rem;
}

.hole-section-label {
  font-weight: 700;
  color: #1a2744;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.5rem 0 0.25rem;
  border-top: 2px solid #f3f0ff;
  margin-top: 0.5rem;
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  background: #1a2744;
  color: #94a3b8;
  padding: 2rem 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: #DF73FF; }

.footer-disclaimer {
  font-size: 0.78rem;
  color: #64748b;
  max-width: 600px;
}

/* ── AdSense Placeholder ──────────────────────────────────── */
.ad-container {
  text-align: center;
  margin: 1.5rem 0;
  min-height: 90px;
}

/* ── Utility Classes ──────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: #9ca3af; font-size: 0.85rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }

.section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-sub {
  text-align: center;
  color: #6b7280;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.divider {
  border: none;
  border-top: 1px solid #f3f0ff;
  margin: 1.5rem 0;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .hole-grid { grid-template-columns: repeat(9, 1fr); gap: 0.3rem; }
  .hole-cell input { font-size: 0.75rem; padding: 0.3rem 0.1rem; }
  .nav-links a { font-size: 0.78rem; padding: 0.3rem 0.45rem; }
  .container, .container-sm { padding: 1.5rem 1rem; }
  .card { padding: 1.25rem; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 420px) {
  .nav-links { gap: 0.1rem; }
  .nav-links a { font-size: 0.72rem; padding: 0.25rem 0.35rem; }
}
