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

body {
  font-family: 'Arial', sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: white;
  min-height: 100vh;
  line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle { font-size: 1.2em; color: #ffd700; margin-bottom: 10px; }

.prize-banner {
  background: linear-gradient(45deg, #ff6b6b, #ffd700);
  padding: 15px;
  border-radius: 10px;
  margin: 20px 0;
  text-align: center;
  font-size: 1.3em;
  font-weight: bold;
  color: #1a1a2e;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.nav-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  gap: 10px;
}

.nav-tab {
  padding: 12px 25px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 25px;
  color: white;
  cursor: pointer;
  font-size: 1em;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.nav-tab:hover { background: rgba(255, 215, 0, 0.3); transform: translateY(-2px); }

.nav-tab.active {
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  color: #1a1a2e;
  font-weight: bold;
}

.tab-content { display: none; animation: fadeIn 0.5s ease-in; }
.tab-content.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.standings-table, .results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
}

.standings-table th, .standings-table td,
.results-table th, .results-table td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.standings-table th, .results-table th {
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  color: #1a1a2e;
  font-weight: bold;
}

.standings-table tr:nth-child(even), .results-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.05);
}

.standings-table tr:hover, .results-table tr:hover {
  background: rgba(255, 215, 0, 0.2);
}

.top-5 {
  background: linear-gradient(45deg, rgba(255, 215, 0, 0.3), rgba(255, 237, 78, 0.3)) !important;
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #ffd700;
  font-weight: bold;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1em;
  backdrop-filter: blur(10px);
}

.form-group input::placeholder { color: rgba(255, 255, 255, 0.6); }

.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.btn {
  padding: 12px 25px;
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  color: #1a1a2e;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4); }

.btn-danger {
  background: #dc3545;
  color: #fff;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.week-selector { display: flex; gap: 10px; margin-bottom: 20px; align-items: center; }
.week-selector select { width: auto; min-width: 150px; }

.matchup-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 20px;
  margin: 15px 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.bowler-info { text-align: center; }
.bowler-name { font-size: 1.2em; font-weight: bold; margin-bottom: 5px; }
.vs-separator { font-size: 1.5em; font-weight: bold; color: #ffd700; }

.scores { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.score { padding: 5px 10px; background: rgba(255, 255, 255, 0.2); border-radius: 5px; font-weight: bold; }

.admin-login { max-width: 400px; margin: 0 auto; }

.alert {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 8px;
  font-weight: bold;
}

.alert-success { background: rgba(40, 167, 69, 0.2); border: 1px solid rgba(40, 167, 69, 0.3); color: #28a745; }
.alert-error { background: rgba(220, 53, 69, 0.2); border: 1px solid rgba(220, 53, 69, 0.3); color: #dc3545; }

.league-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.info-card {
  background: rgba(255, 255, 255, 0.08);
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid #ffd700;
}

.info-card h3 { color: #ffd700; margin-bottom: 10px; font-size: 1.3em; }
/* ----- Mobile fixes ----- */
@media (max-width: 640px) {
  .container { padding: 12px; }

  /* Let cards scroll their content instead of clipping */
  .card { overflow: visible; padding: 16px; }

  /* Make big tables scroll horizontally on small screens */
  .standings-table,
  .results-table {
    display: block;
    width: 100%;
    overflow-x: auto;           /* enables side-scroll */
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;        /* keep columns on one line */
    border-radius: 10px;
  }

  /* Keep table header/footer readable */
  .standings-table th, .standings-table td,
  .results-table th, .results-table td {
    padding: 10px 12px;
    font-size: 14px;
  }

  /* Week selector & tabs wrap nicely */
  .week-selector {
    flex-wrap: wrap;
    gap: 8px;
  }
  .week-selector label { margin-bottom: 4px; }
  .week-selector select { min-width: 140px; }

  .nav-tabs {
    flex-wrap: wrap;
    gap: 8px;
  }
  .nav-tab {
    padding: 10px 16px;
    font-size: 14px;
  }

  /* Matchup cards: stack vertically instead of 3 columns */
  .matchup-card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }
  .vs-separator {
    order: -1;           /* put VS between players neatly */
    margin: 4px auto 0;
  }

  /* Scores pills shrink a bit */
  .scores { gap: 6px; }
  .score { padding: 4px 8px; font-size: 14px; }

  /* Headings a touch smaller on mobile */
  h1 { font-size: 1.8em; }
  h2 { font-size: 1.2em; }
}
