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

* {
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: #f5f5f5;
    margin: 0;
}

h1 {
    font-size: 22px;
    font-weight: 700;
}

/* Navigation */
.main-nav {
    position: relative;
    background: white;
    height: 60px;
    overflow: visible;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.nav-logo {
    position: absolute;
    top: 0;
    left: 20px;
    height: 80px;
    width: auto;
    z-index: 101;
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-links {
    display: flex;
    align-items: center;
    height: 100%;
    padding-left: 115px;
    gap: 28px;
    padding-right: 24px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 15px;
    white-space: nowrap;
}

.nav-links a:hover {
    color: #000;
}

.main-content {
    padding-top: 65px;
    padding-left: 20px;
    padding-right: 20px;
}

/* Nav avatar */
.nav-avatar-wrapper {
    position: relative;
    margin-left: auto;
}

.nav-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
}

.nav-avatar:hover {
    background: #333;
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    min-width: 130px;
    z-index: 200;
    overflow: hidden;
}

.nav-dropdown.open {
    display: block;
}

.nav-dropdown a {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.nav-dropdown a:hover {
    background: #f5f5f5;
    color: #000;
}

@media (max-width: 768px) {
    .nav-links {
        gap: 16px;
    }

    .nav-links a {
        font-size: 13px;
    }
}

/* Admin Playground Nav */
.playground-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #c0392b;
    padding: 0 20px 0 115px;
    height: 40px;
}

.playground-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
    padding-right: 12px;
    border-right: 1px solid rgba(255,255,255,0.3);
}

.playground-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.playground-links a {
    text-decoration: none;
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.playground-links a:hover {
    background: rgba(0,0,0,0.2);
    color: #fff;
}

.playground-links a.active {
    background: #e8ff47;
    color: #000;
}

@media (max-width: 768px) {
    .playground-nav {
        height: auto;
        padding: 8px 12px 8px 20px;
        flex-wrap: wrap;
    }

    .playground-label {
        border-right: none;
        padding-right: 0;
    }
}

/* Admin Playground Content */
.playground-content {
    padding: 28px 24px 40px;
}

.playground-content h1 {
    margin: 0 0 20px;
}

.admin-form-subtitle {
    margin: -12px 0 20px;
    font-size: 14px;
    color: #666;
}

.admin-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    max-width: 700px;
}

.admin-index-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-index-card:hover {
    border-color: #bbb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.admin-index-card--action {
    border-color: #c0392b;
}

.admin-index-card--action:hover {
    border-color: #a93226;
    box-shadow: 0 2px 8px rgba(192,57,43,0.12);
}

.admin-index-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #111;
}

.admin-index-card--action .admin-index-card-title {
    color: #c0392b;
}

.admin-index-card-desc {
    font-size: 12px;
    color: #888;
}

.admin-form-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    padding: 28px 32px;
    max-width: 480px;
}

.form-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    max-width: 480px;
}

.form-errors ul {
    margin: 0;
    padding-left: 18px;
    color: #dc2626;
    font-size: 14px;
}

.form-group select,
.form-group input[type="number"] {
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0 12px;
    font-size: 15px;
    color: #333;
    background: #fff;
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
}

.form-group select:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: #888;
}

@media (max-width: 768px) {
    .playground-content {
        padding: 20px 16px 32px;
    }

    .admin-form-card {
        padding: 20px 18px;
    }
}

/* Matches Page */
.matches-container {
    max-width: 750px;
    margin: 0 auto;
}

.stage-name {
    font-size: 22px;
    font-weight: 700;
    margin: 20px 0 10px;
}

.day-header {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    margin: 12px 0 6px;
}

.game-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    text-align: center;
    flex: 1;
    min-width: 0;
}

.game-team-ranking {
    font-size: 12px;
    color: #999999;
    font-weight: 500;
}

.game-box--open .game-team {
    padding-top: 15px;
}

.game-box--open .game-scores {
    align-self: flex-start;
}

.game-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 16px;
    margin-bottom: 10px;
    gap: 10px;
}

.game-scores {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    min-width: 120px;
}

.game-scores-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.game-scores-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: right;
    white-space: nowrap;
    width: 62px;
}

@media (max-width: 480px) {
    .game-scores-label {
        white-space: normal;
        width: 28px;
    }
}

.game-scores-actual .game-scores-label {
    color: #888;
}

.game-scores-pick .game-scores-label {
    color: #2563eb;
}

.game-scores-sep {
    color: #bbb;
    font-size: 13px;
}

.game-scores input[type="number"] {
    width: 2ch;
    height: 2ch;
    aspect-ratio: 1;
    text-align: center;
    padding: 8px;
    box-sizing: content-box;
    -moz-appearance: textfield;
}

.game-scores input[type="number"]::-webkit-inner-spin-button,
.game-scores input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.game-bet {
    width: 20px;
    text-align: center;
    display: inline-block;
    color: #2563eb;
    font-size: 15px;
}

.game-actual {
    width: 20px;
    text-align: center;
    display: inline-block;
    font-weight: 700;
    font-size: 16px;
    color: #111;
}

.game-status {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    text-align: center;
}

/* Game bet errors */
.game-bet-errors {
    font-size: 11px;
    color: #dc2626;
    font-weight: 500;
    text-align: center;
    max-width: 120px;
}

/* Game save status */
.game-save-status {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.game-save-status--saving {
    color: #888;
}

.game-save-status--saved {
    color: #16a34a;
}

.game-save-status--failed {
    color: #dc2626;
}

/* Game points badge */
.game-points-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 10px;
}

.game-points-badge--scored {
    background: #dcfce7;
    color: #16a34a;
}

.game-points-badge--zero {
    background: #f3f4f6;
    color: #9ca3af;
}

/* Tables */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    font-size: 14px;
}

table th {
    background: #000000;
    color: #fff;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 12px 16px;
    text-align: left;
    white-space: nowrap;
}

table th:first-child {
    border-top-left-radius: 8px;
}

table th:last-child {
    border-top-right-radius: 8px;
}

table td {
    padding: 11px 16px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}

table tr:last-child td {
    border-bottom: none;
}

table tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

table tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

table tbody tr:hover td {
    background: #f7f7f7;
}

table td a {
    color: #111;
    font-weight: 500;
    text-decoration: none;
}

table td a:hover {
    text-decoration: underline;
}

/* User Picks Page */
.user-picks-title {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 20px;
}

/* Ranking Table */
.ranking-container {
    max-width: 500px;
    margin: 0 auto;
}

.ranking-container h1 {
    text-align: center;
}

.ranking-table-wrapper {
    max-width: 500px;
}

.ranking-pos-col {
    width: 10px;
    max-width: 10px;
}

.ranking-name-col,
.ranking-table-wrapper table td:nth-child(2) {
    padding-left: 8px;
}

.ranking-picks-btn {
    display: inline-block;
    padding: 2px 10px;
    background: #111;
    color: #fff !important;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.15s;
    margin-left: 16px;
}

.ranking-picks-btn:hover {
    background: #444;
}

.ranking-table-wrapper table th:nth-child(3),
.ranking-table-wrapper table td:nth-child(3) {
    width: 30%;
}

/* Rules Page */
.rules-container {
    max-width: 700px;
    margin: 0 auto;
}

.rules-section {
    margin-bottom: 32px;
}

.rules-section h2 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    margin-top: 0;
}

.rules-section p {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    margin: 0 0 10px;
}

.rules-tldr {
    background: #f0f7ff;
    border-left: 4px solid #3b82f6;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 32px;
}

.rules-table {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    margin-bottom: 14px;
}

.rules-table td {
    white-space: normal;
    vertical-align: top;
}

.rules-table td strong {
    display: block;
    font-weight: 600;
}

.rules-example {
    display: block;
    font-size: 12px;
    color: #777;
    margin-top: 2px;
    font-style: italic;
}

.rules-points {
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    width: 80px;
}

.rules-note {
    font-size: 13px;
    color: #555;
    background: #f0f4f8;
    border-left: 3px solid #aac;
    padding: 10px 14px;
    border-radius: 4px;
    margin: 0;
    line-height: 1.5;
}

.rules-list {
    font-size: 15px;
    color: #333;
    line-height: 1.7;
    padding-left: 20px;
    margin: 0;
}

@media (max-width: 768px) {
    .rules-table td {
        padding: 10px 12px;
    }
}

/* Profile Page */
.profile-container {
    max-width: 480px;
    margin: 0 auto;
}

.profile-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 28px 32px;
}

.profile-email {
    font-size: 15px;
    color: #999;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group input[type="text"] {
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0 12px;
    font-size: 15px;
    color: #333;
    background: #fff;
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: #888;
}

.form-group input[type="text"]:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: default;
}

.btn-save {
    height: 40px;
    padding: 0 20px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-save:hover {
    background: #333;
}

@media (max-width: 768px) {
    .profile-card {
        padding: 20px 18px;
    }
}

/* Toast */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.toast--success {
    background: #16a34a;
    color: #fff;
}

.toast--error {
    background: #dc2626;
    color: #fff;
}

.toast.toast--hidden {
    opacity: 0;
}

/* Login Page */
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #FFFFFF;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.login-logo {
    height: 150px;
    width: auto;
}

.login-welcome {
    margin: 0;
    font-size: 18px;
}

/* Google sign in button */
.gsi-material-button {
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -webkit-appearance: none;
  background-color: WHITE;
  background-image: none;
  border: 1px solid #747775;
  -webkit-border-radius: 4px;
  border-radius: 4px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  color: #1f1f1f;
  cursor: pointer;
  font-family: 'Roboto', arial, sans-serif;
  font-size: 14px;
  height: 40px;
  letter-spacing: 0.25px;
  outline: none;
  overflow: hidden;
  padding: 0 12px;
  position: relative;
  text-align: center;
  -webkit-transition: background-color .218s, border-color .218s, box-shadow .218s;
  transition: background-color .218s, border-color .218s, box-shadow .218s;
  vertical-align: middle;
  white-space: nowrap;
  width: auto;
  max-width: 400px;
  min-width: min-content;
}

.gsi-material-button .gsi-material-button-icon {
  height: 20px;
  margin-right: 10px;
  min-width: 20px;
  width: 20px;
}

.gsi-material-button .gsi-material-button-content-wrapper {
  -webkit-align-items: center;
  align-items: center;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  -webkit-flex-wrap: nowrap;
  flex-wrap: nowrap;
  height: 100%;
  justify-content: space-between;
  position: relative;
  width: 100%;
}

.gsi-material-button .gsi-material-button-contents {
  -webkit-flex-grow: 1;
  flex-grow: 1;
  font-family: 'Roboto', arial, sans-serif;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.gsi-material-button .gsi-material-button-state {
  -webkit-transition: opacity .218s;
  transition: opacity .218s;
  bottom: 0;
  left: 0;
  opacity: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.gsi-material-button:disabled {
  cursor: default;
  background-color: #ffffff61;
  border-color: #1f1f1f1f;
}

.gsi-material-button:disabled .gsi-material-button-contents {
  opacity: 38%;
}

.gsi-material-button:disabled .gsi-material-button-icon {
  opacity: 38%;
}

.gsi-material-button:not(:disabled):active .gsi-material-button-state,
.gsi-material-button:not(:disabled):focus .gsi-material-button-state {
  background-color: #303030;
  opacity: 12%;
}

.gsi-material-button:not(:disabled):hover {
  -webkit-box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
}

.gsi-material-button:not(:disabled):hover .gsi-material-button-state {
  background-color: #303030;
  opacity: 8%;
}
