* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #0f1923;
  color: #e0e0e0;
  line-height: 1.6;
}

header {
  text-align: center;
  padding: 2rem 1rem 1rem;
  background: linear-gradient(135deg, #1a2a3a 0%, #0f1923 100%);
  border-bottom: 2px solid #2a3a4a;
}

header h1 {
  font-size: 2.5rem;
  color: #ff6b35;
  letter-spacing: 2px;
}

.tagline {
  color: #8899aa;
  font-size: 1.1rem;
  margin-top: 0.3rem;
}

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

section { margin-bottom: 2rem; }

#intro {
  text-align: center;
  padding: 1rem;
  background: #1a2a3a;
  border-radius: 8px;
  border: 1px solid #2a3a4a;
}

h2 {
  font-size: 1.3rem;
  color: #ff6b35;
  margin-bottom: 1rem;
  border-bottom: 1px solid #2a3a4a;
  padding-bottom: 0.5rem;
}

/* Tabs */
#sport-tabs, #league-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab {
  padding: 0.5rem 1rem;
  background: #1a2a3a;
  border: 1px solid #2a3a4a;
  border-radius: 6px;
  cursor: pointer;
  color: #aabbcc;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.tab:hover { border-color: #ff6b35; color: #fff; }
.tab.active { background: #ff6b35; color: #fff; border-color: #ff6b35; }

.tab-logo {
  padding: 0.3rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  background: #ffffff;
  border-color: #ddd;
}

.league-logo {
  height: 28px;
  max-width: 100%;
  object-fit: contain;
  filter: brightness(0.9);
}

.tab-logo:hover .league-logo,
.tab-logo.active .league-logo {
  filter: brightness(1.1);
}

/* Team grid */
#team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.5rem;
}

.team-card {
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 100px;
}

.team-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.team-label {
  line-height: 1.2;
}

.team-label.no-logo {
  font-size: 1rem;
}

.chip-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 2px;
}

.team-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.team-card.selected { border-color: #ff6b35; box-shadow: 0 0 8px rgba(255,107,53,0.4); }

/* Selected teams */
#selected-teams {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.selected-chip .remove {
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.7;
}

.selected-chip .remove:hover { opacity: 1; }

/* Form */
#subscribe-form {
  display: flex;
  gap: 0.5rem;
  max-width: 500px;
}

#email-input {
  flex: 1;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  border: 1px solid #2a3a4a;
  background: #1a2a3a;
  color: #e0e0e0;
  font-size: 1rem;
}

#email-input:focus { outline: none; border-color: #ff6b35; }

#submit-btn {
  padding: 0.7rem 1.5rem;
  border-radius: 6px;
  border: none;
  background: #ff6b35;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

#submit-btn:disabled { background: #555; cursor: not-allowed; }
#submit-btn:not(:disabled):hover { background: #e55a25; }

#form-status {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.status-success { color: #4caf50; }
.status-error { color: #f44336; }

footer {
  text-align: center;
  padding: 1.5rem;
  color: #556677;
  font-size: 0.85rem;
  border-top: 1px solid #2a3a4a;
}

footer a { color: #ff6b35; text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  header h1 { font-size: 1.8rem; }
  #team-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  #subscribe-form { flex-direction: column; }
  .team-logo { width: 32px; height: 32px; }
  .league-logo { height: 22px; }
}
