@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

body {
    font-family: 'Inter', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

nav {
    background-color: #333;
    color: #fff;
    padding: 1em;
    text-align: center;
}

nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5em 1em;
    margin: 0 0.5em;
}

nav a:hover {
    background-color: #555;
}

h1 {
    text-align: center;
    margin-top: 20px;
}

#livescore-container {
    max-width: 1200px; /* Adjust as desired, or remove for full width */
    margin: 20px auto;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Standings Page Styling */
#standings-container {
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Transactions Page Styling */
#transactions-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Rosters Page Styling */
#rosters-container {
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.league-rosters {
    margin-bottom: 30px;
}

.league-rosters:last-child {
    margin-bottom: 0;
}

.league-rosters h2 {
    color: #0056b3;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}

.roster-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

a.roster-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.roster-card-name {
    text-align: center;
}

/* Individual Roster Page Styling */
#roster-container {
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.roster-back-link {
    text-align: center;
    margin: 0;
}

.slot-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 700;
    background-color: #e7f0ff;
    color: #0056b3;
}

.slot-badge.slot-bench {
    background-color: #eee;
    color: #666;
}

.slot-badge.slot-ir {
    background-color: #fce8e6;
    color: #c5221f;
}

.injury-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.75em;
    font-weight: 700;
    background-color: #fff3cd;
    color: #8a6d00;
}

/* Roster table has 6 columns (vs. standings' 5), so the last one
   (Fan Pts) needs its own centering rule beyond .league-standings's. */
.roster-table td:nth-child(6),
.roster-table th:nth-child(6) {
    text-align: center;
}

/* Power Rankings Page Styling */
#power-rankings-container {
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Power rankings table has 6 columns too, but League (3rd) and Power
   Score (6th) need centering beyond .league-standings's base rules. */
.power-rankings-table td:nth-child(3),
.power-rankings-table th:nth-child(3),
.power-rankings-table td:nth-child(6),
.power-rankings-table th:nth-child(6) {
    text-align: center;
}

.power-rankings-table td:nth-child(6) {
    font-weight: 700;
    color: #0056b3;
}

.league-standings {
    margin-bottom: 30px;
}

.league-standings h2 {
    color: #0056b3;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.league-standings table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.league-standings th, .league-standings td {
    border: 1px solid #ddd;
    padding: 12px 8px;
    text-align: left;
}

.league-standings th {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    font-size: 1.1em;
    text-transform: uppercase;
}

.league-standings tr:nth-child(even) {
    background-color: #f2f2f2;
}

.league-standings tr:hover {
    background-color: #ddd;
}

.league-standings td {
    font-size: 1em;
    color: #333;
}

/* Specific styling for 'Team Name' column to be bolder/larger */
.league-standings td:nth-child(2) {
    font-weight: bold;
    font-size: 1.05em;
}

/* Center Rank, PF and Streak columns */
.league-standings td:nth-child(1),
.league-standings td:nth-child(4),
.league-standings td:nth-child(5) {
    text-align: center;
}

.league-standings th:nth-child(1),
.league-standings th:nth-child(4),
.league-standings th:nth-child(5) {
    text-align: center;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85em;
    background-color: #e9ecef;
    color: #555;
}

.rank-badge.rank-1 {
    background-color: #ffd700;
    color: #5c4a00;
}

.rank-badge.rank-2 {
    background-color: #c0c0c0;
    color: #4a4a4a;
}

.rank-badge.rank-3 {
    background-color: #cd7f32;
    color: #fff;
}

.streak-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9em;
    background-color: #eee;
    color: #555;
}

.streak-badge.streak-win {
    background-color: #e6f4ea;
    color: #1e8e3e;
}

.streak-badge.streak-loss {
    background-color: #fce8e6;
    color: #c5221f;
}


.league-livescores {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.league-livescores:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.league-livescores h3 {
    color: #0056b3;
    margin-top: 0;
    margin-bottom: 15px;
}

.matchup-list {
    list-style: none;
    padding: 0;
}

.matchup-item {
    display: flex;
    flex-direction: column;
    padding: 18px;
    margin-bottom: 14px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.matchup-item:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.matchup-item:last-child {
    margin-bottom: 0;
}

.favorite-odds {
    font-size: 0.9em;
    color: #007bff;
    font-weight: 600;
    text-align: center;
    margin-bottom: 6px;
}

.matchup-header {
    width: 100%;
    text-align: center;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.odds-bar {
    display: flex;
    width: 100%;
    max-width: 280px;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #e9ecef;
}

.odds-bar-fill.home {
    background-color: #007bff;
}

.odds-bar-fill.away {
    background-color: #ff8800;
}

.odds-bar-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 280px;
    font-size: 0.75em;
    color: #888;
    margin-top: 3px;
}

.game-status {
    font-size: 0.9em;
    color: #666;
    font-weight: bold;
}

.matchup-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40%;
}

.team-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.95em;
    margin-bottom: 6px;
}

.team-name {
    font-weight: 600;
    font-size: 1.05em;
    margin-bottom: 5px;
    text-align: center;
}

.team-score {
    font-size: 1.5em;
    color: #007bff;
    font-weight: bolder;
    transition: color 0.15s ease;
}

.team.leading .team-score {
    color: #1e8e3e;
}

.team.leading .team-name {
    color: #1e8e3e;
}

.vs {
    font-weight: bold;
    font-size: 1.2em;
    width: 10%;
    text-align: center;
    color: #666;
}

/* Home Page Styling */
.hero {
    max-width: 900px;
    margin: 40px auto 10px;
    padding: 0 20px;
    text-align: center;
}

.hero-title {
    font-size: 2.4em;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.hero-subtitle {
    font-size: 1.1em;
    color: #666;
    margin: 0;
}

.nav-cards {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.nav-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 28px 16px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 1.1em;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.nav-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.nav-card-icon {
    font-size: 2em;
}

.hub-footer-note {
    text-align: center;
    color: #888;
    font-size: 0.9em;
    margin: 30px 20px;
}

/* Transactions List */
.transaction-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.transaction-item {
    padding: 16px 18px;
    margin-bottom: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.transaction-item:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.transaction-item:last-child {
    margin-bottom: 0;
}

.transaction-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.league-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background-color: #e7f0ff;
    color: #0056b3;
}

.transaction-team {
    font-weight: 600;
    color: #333;
}

.transaction-timestamp {
    margin-left: auto;
    font-size: 0.85em;
    color: #888;
}

.transaction-players {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.player-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.9em;
    font-weight: 600;
}

.player-chip.added {
    background-color: #e6f4ea;
    color: #1e8e3e;
}

.player-chip.dropped {
    background-color: #fce8e6;
    color: #c5221f;
}

.player-chip-sign {
    font-weight: 700;
}

.player-chip-position {
    font-weight: 400;
    opacity: 0.75;
    font-size: 0.9em;
}

/* Manager Name (shown wherever a team name appears) */
.manager-name {
    display: block;
    font-size: 0.8em;
    font-weight: 400;
    color: #888;
}

.roster-manager {
    text-align: center;
    margin: 0 0 15px;
    color: #666;
}

.roster-manager .manager-name {
    display: inline;
    font-weight: 700;
    color: #0056b3;
}
