/* === Base & Typography === */
:root {
  --primary: #343a40;
  --primary-hover: #23272b;
  --dark: #1a1a1a;
  --dark-nav: #212529;
  --light-bg: #f5f5f5;
  --card-bg: #ffffff;
  --text: #212529;
  --text-muted: #6c757d;
  --border: #dee2e6;
  --accent: #495057;
  --gradient: linear-gradient(135deg, #343a40 0%, #495057 100%);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--light-bg);
  padding-bottom: 0;
}

/* === Navigation === */
.navbar {
  background: var(--dark-nav) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  padding: 0.8rem 1rem;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.3px;
}

.nav-link {
  font-weight: 500;
  transition: opacity 0.2s;
}

.nav-link:hover {
  opacity: 0.85;
}

/* === Hero / Top Header === */
.topHeader {
  background: var(--gradient);
  color: #fff;
  margin-bottom: 0;
  width: 100%;
  padding: 2.5rem 1.5rem 2rem;
  border-radius: 0 0 12px 12px;
}

.topHeader h1 {
  font-weight: 800;
  font-size: 2rem;
  margin-top: 0 !important;
}

.topHeader .lead {
  color: rgba(255,255,255,0.9);
  font-style: normal !important;
  font-size: 1.05rem;
}

/* === Forms === */
.form-group label {
  font-weight: 600;
  color: var(--text);
}

.form-control {
  border-radius: 8px;
  border: 1.5px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
  padding: 0.5rem 0.75rem;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

.numberOfTeams {
  width: 75px;
  display: inline-block;
}

#inlineCheckbox1 {
  display: inline-block;
  min-height: 18px;
  min-width: 18px;
  cursor: pointer;
}

.form-check-label {
  cursor: pointer;
}

/* === Team Inputs === */
.team-input {
  display: block;
  margin: 8px 0;
}

.team-input label {
  min-width: 28px;
  padding: 0 5px 0 0;
  font-weight: 600;
  color: var(--text-muted);
}

input.form-control {
  display: inline-block;
}

input.form-control.classWeight {
  /* controlled by JS */
}

.team-input input[type="text"] {
  max-width: 75%;
}

input[type="text"]#league_name {
  max-width: 500px;
}

.classWeight {
  width: 65px;
  display: inline-block;
}

/* === Buttons === */
.generateOrder,
#submit {
  background: var(--gradient);
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
  transition: transform 0.15s, box-shadow 0.2s;
  margin-top: 16px;
  margin-bottom: 50px;
}

.generateOrder:hover,
#submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(26,115,232,0.35);
  background: var(--gradient);
}

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

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

/* === Lottery Image === */
#lotteryPic {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 2rem auto 4rem;
  border-radius: 12px;
}

/* === Cards (Blog) === */
.card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.card-footer {
  background: var(--light-bg);
  border-top: 1px solid var(--border);
}

/* === Draft Results === */
.draftPick {
  margin-right: 10px;
  border-radius: 6px;
  font-weight: 600;
}

.teamResults {
  display: inline-block;
  padding-left: 10px;
  margin-bottom: 0;
}

.team-results {
  margin-bottom: 10px;
}

#leagueName {
  padding-bottom: 10px;
  font-weight: 700;
}

.tableResults {
  width: 100% !important;
  margin-bottom: 60px;
  border: 1.5px solid var(--border) !important;
  border-radius: 10px;
  padding: 16px !important;
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.showAll {
  border-radius: 8px;
  font-weight: 600;
}

/* === Audio Pills === */
.nav-pills .nav-link.active {
  background: var(--primary);
}

.nav-pills .nav-link {
  border-radius: 8px;
  font-weight: 500;
}

audio {
  margin-top: 12px;
  border-radius: 30px;
}

/* === How-To Section === */
.how-to-section {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin: 1.5rem 0;
}

.how-to-section h2 {
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.how-to-section p {
  line-height: 1.7;
  color: var(--text-muted);
}

/* === Footer === */
.site-footer {
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

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

.site-footer-social {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer-social a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 0.2rem;
}

.site-footer-social a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* === Responsive === */
@media (max-width: 480px) {
  .generateOrder {
    width: 100%;
  }
  .topHeader h1 {
    font-size: 1.5rem;
  }
  .topHeader {
    padding: 1.5rem 1rem 1.2rem;
  }
}

@media (min-width: 1025px) {
  .classWeight {
    width: 65px;
  }
}

/* === Results Page CTA Card === */
.fdl-results-cta {
  background: var(--gradient);
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}

.fdl-results-cta-heading {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

/* === Loops Email Capture === */
.loops-email-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.18);
}

.loops-caption {
  color: rgba(255,255,255,0.75);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.2px;
  margin-bottom: 0.75rem;
}

.newsletter-form-container.fdl-loops {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fdl-form-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  width: 100%;
  max-width: 400px;
}

.fdl-input {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,0.97);
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.875rem;
  font-family: inherit;
  color: #212529;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.fdl-input:focus {
  border-color: rgba(255,255,255,0.7);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.12);
}

.fdl-input::placeholder {
  color: #9ca3af;
}

.fdl-btn {
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.45);
  border-radius: 8px;
  padding: 8px 16px;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.fdl-btn:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.75);
}

.fdl-success-msg {
  color: rgba(255,255,255,0.9);
  font-size: 0.875rem;
  margin: 0;
}

.fdl-error-msg {
  color: #fca5a5;
  font-size: 0.875rem;
  margin: 0;
}

.fdl-back-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.55);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  padding: 0;
}

.fdl-back-btn:hover {
  color: rgba(255,255,255,0.9);
  text-decoration: underline;
}

@media (max-width: 480px) {
  .fdl-form-row {
    max-width: 100%;
  }

  .fdl-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .fdl-input {
    font-size: 0.8rem;
  }
}
