/* CFB TXT Mobile-First Styles - Refined */

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  /* Increased from 13px */
  line-height: 1.5;
  /* Improved from 1.4 */
  padding: 12px;
  max-width: 100%;

  /* Dark theme colors - improved contrast */
  --bg: #101010;
  --fg: #f0f0f0;
  /* Lighter for better contrast */
  --gray: #aaa;
  /* Lighter from #999 */
  --border: #444;
  /* Lighter from #333 */
  --hover: #252525;
  /* Lighter from #222 */
  --green: #60e060;
  /* Brighter from #50da50 */
  --blue: #6bb6ff;
  /* Brighter from #9090ff */
  --brown: #deb887;
  /* Lighter from #cd853f */
  --red: #ff6b6b;
  /* Brighter from #ff5050 */

  background-color: var(--bg);
  color: var(--fg);
}

/* ===== LAYOUT COMPONENTS ===== */
.header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.title {
  font-size: 20px;
  /* Increased from 18px */
  font-weight: bold;
  margin: 0;
}

.subtitle {
  color: var(--gray);
  font-size: 13px;
  /* Increased from 12px */
  margin: 0;
}

.footer {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 16px;
  text-align: center;
}

.main-content {
  margin: 12px 0;
}

/* ===== NAVIGATION ===== */
.nav-bar {
  margin-top: 8px;
}

.nav {
  color: var(--blue);
  text-decoration: none;
  margin-right: 12px;
}

.nav:hover {
  text-decoration: underline;
}

.nav.active {
  color: var(--fg);
  font-weight: bold;
}

.footer .nav {
  font-size: 11px;
  display: block;
  margin-bottom: 4px;
}

/* ===== HEADERS & SECTIONS ===== */
.week-header {
  font-size: 17px;
  /* Increased from 16px */
  font-weight: bold;
  text-align: center;
  margin: 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  text-transform: uppercase;
}

.date-section {
  margin: 20px 0 12px 0;
}

.date-header {
  font-size: 15px;
  /* Increased from 14px */
  font-weight: bold;
  color: var(--gray);
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

/* Section headers (h2) */
.schedule-section h2,
.ratings-section h2,
.jaccard-section h2,
.conference-standings h2 {
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.conference-standings h2 {
  color: var(--brown);
}

/* Subsection headers (h3) */
.ratings-section h3,
.ratings-comparison h3,
.unit-ratings h3,
.division-standings h3 {
  font-size: 12px;
  font-weight: bold;
  margin: 12px 0 8px 0;
  color: var(--gray);
  text-transform: uppercase;
}

/* ===== GAME CARDS ===== */
.games-container,
.schedule-container {
  margin: 16px 0;
}

.game-card {
  border: 1px solid var(--border);
  margin: 8px 0;
  padding: 8px;
  transition: all 0.1s ease;
  background: var(--bg);
}

.game-card:hover {
  background-color: var(--hover);
  border-color: var(--blue);
}

/* Game result winners */
.game-card.away-win .away-team .team-name,
.schedule-container .game-card.away-win .away-team .team-name {
  color: var(--green);
  font-weight: bold;
}

.game-card.home-win .home-team .team-name,
.schedule-container .game-card.home-win .home-team .team-name {
  color: var(--green);
  font-weight: bold;
}

.game-card.away-win .home-team .team-name,
.game-card.home-win .away-team .team-name {
  color: var(--gray);
}

.game-card.away-win .game-time,
.game-card.home-win .game-time,
.game-card.tie .game-time {
  color: var(--fg);
  font-weight: bold;
  font-size: 13px;
}

/* Team display */
.teams {
  margin-bottom: 4px;
}

.team {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
}

.team-record {
  color: var(--gray);
  font-size: 12px;
}

/* Game details */
.game-details {
  font-size: 11px;
  color: var(--gray);
}

.game-time {
  font-weight: bold;
  color: var(--fg);
}

.game-venue {
  margin: 0 4px;
}

.game-conference {
  color: var(--brown);
}

/* ===== TEAM LINKS & STYLING ===== */
.team-name {
  color: var(--fg);
  text-decoration: none;
  font-weight: bold;
}

.team-name:hover {
  color: var(--blue);
  text-decoration: underline;
}

/* FBS/FCS team distinctions */
.team-name.team-fcs {
  color: var(--gray);
  font-style: italic;
  font-weight: normal;
  cursor: default;
}

.team-name.team-fbs {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.team-name.team-fbs:hover {
  color: var(--blue);
  text-decoration: underline;
}

/* ===== TABLES ===== */
.rankings-table,
.schedule-table,
.consolidated-ratings-table,
.unit-ratings-table,
.jaccard-table,
.standings-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
  /* Increased from 12px */
}

/* Table headers */
.rankings-table th,
.schedule-table th,
.consolidated-ratings-table th,
.unit-ratings-table th,
.jaccard-table th,
.standings-table th {
  text-align: left;
  padding: 6px;
  /* Increased from 4px */
  border-bottom: 2px solid var(--border);
  font-weight: bold;
  font-size: 12px;
  /* Increased from 11px */
  text-transform: uppercase;
  background-color: var(--hover);
}

/* Table cells */
.rankings-table td,
.schedule-table td,
.consolidated-ratings-table td,
.unit-ratings-table td,
.jaccard-table td,
.standings-table td {
  padding: 6px;
  /* Increased from 4px */
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

/* Table hover states */
.rankings-table tr:hover,
.schedule-table tr:hover,
.consolidated-ratings-table tr:hover,
.unit-ratings-table tr:hover,
.jaccard-table tr:hover,
.standings-table tr:hover {
  background-color: var(--hover);
}

/* Table links */
.rankings-table a,
.schedule-table a,
.consolidated-ratings-table a,
.unit-ratings-table a,
.jaccard-table a,
.standings-table a {
  color: inherit;
  text-decoration: none;
  font-weight: bold;
}

.rankings-table a:hover,
.schedule-table a:hover,
.consolidated-ratings-table a:hover,
.unit-ratings-table a:hover,
.jaccard-table a:hover,
.standings-table a:hover {
  color: var(--blue);
  text-decoration: underline;
}

/* Column-specific styling */
.rank-col {
  text-align: right;
  width: 30px;
  font-weight: bold;
}

.team-col {
  font-weight: bold;
}

.conf-col {
  color: var(--gray);
}

.record-col,
.pct-col {
  text-align: center;
}

.pct-col {
  text-align: right;
  font-weight: bold;
}

/* Game result styling in schedule tables */
.schedule-table tr.away-win .away-col {
  color: var(--green);
  font-weight: bold;
}

.schedule-table tr.home-win .home-col {
  color: var(--green);
  font-weight: bold;
}

.schedule-table tr.win {
  color: var(--green);
}

.schedule-table tr.loss {
  color: var(--red);
}

/* ===== FILTERS ===== */
.filters {
  margin: 8px 0;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--hover);
  border-radius: 4px;
  margin-bottom: 16px;
}

.filter-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.search-box,
.conf-select,
.filter-select {
  width: 100%;
  padding: 8px;
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  border-radius: 4px;
  height: 36px;
  box-sizing: border-box;
}

.search-box:focus,
.conf-select:focus,
.filter-select:focus {
  outline: 2px solid var(--blue);
  outline-offset: -1px;
  border-color: var(--blue);
}

/* Select dropdowns */
.conf-select,
.filter-select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23999' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  padding-right: 32px;
  cursor: pointer;
}

.filter-stats {
  font-size: 11px;
  color: var(--gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* ===== UTILITY CLASSES ===== */
.no-games,
.no-results {
  text-align: center;
  padding: 32px 16px;
  color: var(--gray);
  font-style: italic;
}

.update-time {
  font-size: 11px;
  color: var(--gray);
  text-align: center;
  margin: 0;
}

/* Navigation links */
.navigation-links {
  text-align: center;
  margin: 24px 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.schedule-link {
  color: var(--blue);
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
}

.schedule-link:hover {
  text-decoration: underline;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  gap: 12px;
}

.pagination-btn {
  padding: 6px 12px;
  font-family: inherit;
  font-size: inherit;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  transition: all 0.1s;
  border-radius: 4px;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--hover);
  border-color: var(--blue);
}

.pagination-btn:disabled {
  color: var(--gray);
  cursor: not-allowed;
  opacity: 0.5;
}

#page-info {
  font-size: 12px;
  color: var(--gray);
}

/* Stats lists */
.stats {
  margin: 12px 0;
  list-style: none;
  padding: 0;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  margin: 0;
}

.stat-label {
  color: var(--gray);
}

.stat-value {
  font-weight: bold;
}

/* Percentile colors */
.elite {
  color: var(--green);
}

.good {
  color: var(--blue);
}

.average {
  color: var(--gray);
}

.below {
  color: var(--brown);
}

.poor {
  color: var(--red);
}

/* Conference tags */
.conf-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 3px;
  font-size: 9px;
  color: var(--brown);
  background-color: var(--hover);
  border-radius: 2px;
  text-transform: uppercase;
}

/* ===== ABOUT PAGE & SPECIAL CONTENT ===== */
/* About page content styles */
.about-content {
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.about-content section {
  margin: 24px 0;
}

.about-content h2 {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 16px;
  color: var(--fg);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.about-content p {
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg);
}

.about-content p:last-child {
  margin-bottom: 0;
}

.about-content a {
  color: var(--blue);
  text-decoration: none;
  font-weight: normal;
}

.about-content a:hover {
  text-decoration: underline;
}

/* Legend section styles */
.legend-section {
  margin: 16px 0;
  padding: 12px;
  background-color: var(--hover);
  border: 1px solid var(--border);
  font-size: 11px;
  text-align: center;
}

.legend-section p {
  margin: 4px 0;
  color: var(--gray);
  font-size: 12px;
}

.legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
}

/* Team page specific styles */
.team-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.team-header h1 {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
}

.team-info {
  font-size: 12px;
  color: var(--gray);
}

.team-info span {
  margin-right: 12px;
}

.team-info .conference {
  font-weight: bold;
  color: var(--brown);
}

/* Standings page specific styles */
.standings-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.standings-header h1 {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 4px;
}

.standings-subtitle {
  font-size: 12px;
  color: var(--gray);
  margin: 0;
}

.season-note {
  background-color: var(--hover);
  border: 1px solid var(--border);
  padding: 8px;
  margin: 12px 0;
  font-size: 12px;
  color: var(--gray);
  text-align: center;
}

/* Ratings sections */
.schedule-section,
.ratings-section,
.jaccard-section {
  margin: 24px 0;
}

.standings-container {
  margin: 20px 0;
}

.conference-standings {
  margin: 24px 0;
}

.division-standings {
  margin: 16px 0;
}

/* Ratings grid - simple text layout */
.ratings-grid {
  display: flex;
  gap: 24px;
  margin: 12px 0;
}

.rating-card {
  flex: 1;
}

.rating-card h4 {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 4px;
}

.rating-value {
  font-size: 16px;
  font-weight: bold;
  margin: 4px 0;
}

.rating-rank,
.rating-percentile {
  font-size: 11px;
  color: var(--gray);
}

/* Jaccard similarity table */
.jaccard-explanation {
  font-size: 11px;
  color: var(--gray);
  margin: 4px 0 8px 0;
}

.common-opponents-list {
  font-size: 11px;
  color: var(--gray);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Mobile optimizations */
@media (max-width: 480px) {
  body {
    font-size: 12px;
    padding: 16px;
  }

  .title {
    font-size: 16px;
  }

  .week-header {
    font-size: 14px;
  }

  .game-card {
    padding: 6px;
    margin: 6px 0;
  }

  .game-time {
    font-size: 13px;
  }

  .team-name {
    font-size: 12px;
  }

  /* Mobile about content */
  .about-content {
    max-width: 100%;
  }

  .about-content h2 {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .about-content p {
    font-size: 13px;
    margin-bottom: 14px;
  }

  .about-content section {
    margin: 20px 0;
  }

  .legend-section {
    margin: 12px 0;
    padding: 8px;
    font-size: 10px;
  }

  .legend {
    gap: 8px;
    justify-content: center;
  }

  .legend span {
    font-size: 9px;
    gap: 2px;
  }

  .ratings-grid {
    flex-direction: column;
    gap: 12px;
  }

  .conference-standings h2 {
    font-size: 12px;
  }

  .division-standings h3 {
    font-size: 11px;
  }

  .common-opponents-list {
    display: block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Filters mobile */
  .filters {
    margin: 6px 0;
    padding: 8px;
  }

  .filter-row {
    gap: 6px;
    margin-bottom: 6px;
  }

  .search-box,
  .conf-select,
  .filter-select {
    padding: 6px 8px;
    font-size: 13px;
    height: 32px;
  }

  .conf-select,
  .filter-select {
    padding-right: 28px;
    background-size: 10px;
    background-position: right 6px center;
  }

  /* Tables mobile - responsive without scroll */
  .rankings-table,
  .schedule-table,
  .consolidated-ratings-table,
  .unit-ratings-table,
  .jaccard-table,
  .standings-table {
    font-size: 11px;
  }

  .rankings-table th,
  .rankings-table td,
  .schedule-table th,
  .schedule-table td,
  .consolidated-ratings-table th,
  .consolidated-ratings-table td,
  .unit-ratings-table th,
  .unit-ratings-table td,
  .jaccard-table th,
  .jaccard-table td,
  .standings-table th,
  .standings-table td {
    padding: 4px 6px;
  }
}

/* Tablet and desktop */
@media (min-width: 768px) {
  body {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
  }

  .games-container,
  .schedule-container .games-container {
    max-width: 450px;
    margin: 0 auto;
  }

  .game-card {
    padding: 10px;
  }

  /* Horizontal filter layout */
  .filter-row {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .search-box {
    flex: 1;
    min-width: 200px;
    font-size: 13px;
    height: 38px;
  }

  .conf-select,
  .filter-select {
    width: auto;
    min-width: 120px;
    font-size: 13px;
    padding: 8px 32px 8px 8px;
    height: 38px;
    background-size: 12px;
    background-position: right 8px center;
  }

  /* Standings grid layout */
  .standings-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
  }

  .standings-container.single-conference {
    display: block;
    max-width: 600px;
    margin: 0 auto;
  }

  .conference-standings {
    margin: 0;
  }

  /* Better table padding */
  .rankings-table th,
  .rankings-table td,
  .schedule-table th,
  .schedule-table td,
  .consolidated-ratings-table th,
  .consolidated-ratings-table td,
  .unit-ratings-table th,
  .unit-ratings-table td,
  .jaccard-table th,
  .jaccard-table td,
  .standings-table th,
  .standings-table td {
    padding: 8px 10px;
    /* Increased from 6px 8px */
  }
}

/* Desktop hover states */
@media (hover: hover) {

  .search-box:hover,
  .conf-select:hover,
  .filter-select:hover {
    border-color: var(--blue);
  }

  .stats .stat-row:hover {
    background-color: var(--hover);
    padding-left: 4px;
    padding-right: 4px;
    border-radius: 2px;
    transition: all 0.1s ease;
  }
}