body {
    margin: 0;
    padding: 0;
    background-color: #0a0a0a;
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    box-sizing: border-box;
}

* {
    box-sizing: inherit;
}

header {
    width: 100%;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 90px;
    margin-right: 15px;
}

.logo-text {
    color: #ffffff;
    font-size: 32px;
    font-weight: 700;
}

.subheader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.subheader-link {
    color: #ffffff;
    font-size: 18px;
    font-weight: 400;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
    cursor: pointer;
}

.subheader-link:hover {
    color: #cccccc;
}

.subheader-link.active {
    color: #cccccc;
    font-weight: 700;
}

.store-container {
    background-color: #0f0f0f;
    width: 80%;
    max-width: 1200px;
    min-height: 700px;
    height: auto;
    margin: 20px auto;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
}

.store-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
       background: linear-gradient(to right, transparent, #df9f00 20%, #df9f00 80%, transparent);
}

.signin-container {
    display: none;
    flex-direction: column;
    align-items: center;
    background: #151515;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 8px;
    width: 33%;
    height: 100%;
}

.signin-header {
    color: #b2b4bd;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 10px 0;
}

.username-input {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    background-color: #181818;
    border: 1px solid #d13b3b;
    border-radius: 4px;
    color: #ffffff;
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
}

.signin-disclaimer {
    font-size: 14px;
    color: #666666;
    text-align: center;
    margin: -5px 0 5px 0;
}

.signin-disclaimer a {
    color: #53fc18;
    text-decoration: none;
}

.signin-disclaimer a:hover {
    color: #3cc70c;
}

.secret-phrase {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 10px 0;
    text-align: center;
}

.signin-button {
    padding: 10px 20px;
      background-color: #df9f00;
    border: 2px solid #df9f00;
    border-radius: 6px;
        font-family: 'Outfit', sans-serif;
    color: #000000;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    margin-top: auto;
}

.signin-button:hover:not(:disabled) {
    background-color: #ffba0d;
    border: 2px solid #ffba0d;
}

.signin-button.auth-button:disabled {
    border-color: #df9f00;
    color: #000000;
    cursor: not-allowed;
}

.signin-button.auth-button.success {
    border-color: #df9f00;
    color: #000000;
    background: linear-gradient(90deg, #f8b700, #df9f00);
}

.signin-button.auth-button.failed {
    border-color: #df9f00;
    color: #000000;
    background: linear-gradient(90deg, #f8b700, #df9f00);
}

.betting-container {
    background-color: #101010;
    width: 100%;
    min-height: 250px;
    border-radius: 8px;
    padding: 20px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    contain: layout;
    position: relative;
}

.betting-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
}

.user-info {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.welcome-text {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.points-text {
    color: #aaaaaa;
    font-size: 14px;
    font-weight: 400;
    margin: 5px 0 0 0;
}

.logout-text {
    color: #aaaaaa;
    font-size: 12px;
    font-weight: 400;
    margin: 5px 0 0 0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.logout-text:hover {
    color: #df9f00;
}

.betting-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.betting-container h2 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 20px 0;
}

.gtb-group, .brackets-group, .round-select-group {
    width: 60%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.input-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}

.input-group label {
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    margin-bottom: 5px;
}

.input-field, #round-select, .points-select {
    width: 300px;
    padding: 8px;
    background-color: #151515;
        font-family: 'Outfit', sans-serif;
    border: none;
    border-radius: 4px;
    color: #ffffff;
    font-size: 14px;
    text-align: center;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.input-field::-webkit-outer-spin-button,
.input-field::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-field:focus, #round-select:focus, .points-select:focus {
    outline: none;
}

.switch-container {
    display: flex;
    gap: 10px;
}

.switch {
    background-color: #333333;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.switch.active {
    background-color: #00cc00;
}

.switch:hover:not(.active) {
    background-color: #555555;
}

.brackets-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60%;
}

.brackets-container, .points-container {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    justify-content: center;
}

.bracket-button, .points-button {
    background-color: #151515;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.bracket-button:hover, .points-button:hover {
    background-color: #333333;
}

.bracket-button.active, .points-button.active {
    background-color: #00cc00;
    transform: scale(1.05);
}

.submit-button {
    background-color: #df9f00;
    color: #000000;
    border: 2px solid #df9f00;
    border-radius: 4px;
    padding: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    width: 60%;
    margin-top: 15px;
        font-family: 'Outfit', sans-serif;
}

.submit-button:hover:not(:disabled) {
    background-color: #ffba0d;
    border: 2px solid #ffba0d;
}

.submit-button:disabled {
    background-color: #333333;
    border-color: #555555;
    color: #777777;
    cursor: not-allowed;
}

.submit-button + .error-tooltip {
    display: none;
    position: absolute;
    top: calc(100% - 105px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #d13b3b;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 10px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.submit-button + .error-tooltip.show {
    display: block;
    opacity: 1;
    animation: fadeIn 0.5s ease;
}

.submit-button + .error-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #d13b3b transparent transparent transparent;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.rounds-container {
    background-color: #101010;
    width: 100%;
    min-height: 300px;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rounds-table-wrapper {
    width: 100%;
    max-height: 288px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
}

.rounds-table-wrapper::-webkit-scrollbar {
    width: 6px;
}

.rounds-table-wrapper::-webkit-scrollbar-track {
    background: #151515;
    border-radius: 4px;
}

.rounds-table-wrapper::-webkit-scrollbar-thumb {
    background: #df9f00;
    border-radius: 4px;
}

.rounds-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #ffba0d;
}

.rounds-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: #ffffff;
}

.rounds-table th, .rounds-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #333333;
}

.rounds-table th {
    font-weight: 700;
    color: #cccccc;
    background-color: #151515;
    position: sticky;
    top: 0;
    z-index: 1;
    text-align: center;
}

.rounds-table td {
    font-weight: 400;
}

.rounds-table tr:hover {
    background-color: #2a2a2a;
    cursor: pointer;
}

.rounds-table .no-data {
    text-align: center;
}

.status {
    display: inline-block;
    width: 60px;
    height: 24px;
    line-height: 24px;
    padding: 0;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    font-size: 12px;
    font-weight: 400;
    text-align: center;
}

.status.ended {
    background-color: #333333;
    color: #ffffff;
}

.status.active, .status.guessing {
    background-color: #00cc00;
    color: #ffffff;
}

.winner-gtb {
    color: #FFD700 !important;
    font-weight: 700;
}

.winner-bracket-emblem {
    display: inline-block;
    background-color: #FFD700;
    color: #000000;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 400;
    text-align: center;
    min-width: 80px;
    width: auto;
    white-space: nowrap;
}

.no-winner {
    color: #ffffff;
}

.profit {
    color: #00cc00;
}

.loss {
    color: #d13b3b;
}

.popout-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.popout-container {
    background-color: #101010;
    width: 80%;
    max-width: 550px;
    min-height: 700px;
    height: auto;
    border-radius: 8px;
    padding: 20px;
    color: #ffffff;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1001;
}

.popout-container.dimmed {
    filter: brightness(50%) !important;
}

.round-info-container {
    background: #151515;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 90%;
    min-height: 135px;
    height: auto;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
    position: relative;
}

.round-info-top-left {
    position: absolute;
    top: 15px;
    left: 15px;
}

.round-info-top-right {
    position: absolute;
    top: 15px;
    right: 15px;
    text-align: right;
    display: flex;
    flex-direction: column;
}

.game-round {
    font-size: 10px;
    font-weight: 400;
    color: #cccccc;
    opacity: 0.7;
    margin: 0;
    line-height: 1.4;
}

.round-date {
    font-size: 10px;
    font-weight: 400;
    color: #cccccc;
    opacity: 0.7;
    margin: 0;
    line-height: 1.4;
}

.starting-balance-info, .bonuses-info, .prize-info {
    font-size: 12px;
    font-weight: 400;
    margin: 0;
    line-height: 1.4;
    padding-left: 15px;
}

.round-info-bottom {
    position: absolute;
    bottom: 10px;
    width: calc(100% - 30px);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.round-info-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ending-balance-info {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    padding-left: 15px;
}

.ending-balance-placeholder.profit {
    color: #00cc00;
}

.ending-balance-placeholder.loss {
    color: #d13b3b;
}

.winner-info {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    padding-left: 15px;
    display: flex;
    align-items: center;
}

.winner-placeholder {
    margin-left: 5px;
}

.winner-placeholder.brackets-mode {
    display: inline-block;
    background-color: #FFD700;
    color: #000000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 400;
    text-align: center;
}

.winner-placeholder.gtb-mode {
    color: #FFD700 !important;
}

.winner-placeholder.no-winner {
    color: #ffffff;
    background-color: transparent;
}

.winner-count {
    font-size: 12px;
    font-weight: 400;
    color: #FFD700;
    margin-left: 5px;
    cursor: pointer;
}

.winner-count:hover {
    text-decoration: underline;
}

.participants-info {
    font-size: 14px;
    font-weight: 400;
    margin: 0;
    padding-right: 15px;
}

.participants-container {
    background: #151515;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 90%;
    min-height: 500px;
    height: auto;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
}

.participants-header {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
    text-align: center;
}

.participants-table-wrapper {
    width: 100%;
    max-height: 401px;
    overflow-y: auto;
}

.participants-table-wrapper::-webkit-scrollbar {
    width: 8px;
}

.participants-table-wrapper::-webkit-scrollbar-track {
    background: #101010;
    border-radius: 4px;
}

.participants-table-wrapper::-webkit-scrollbar-thumb {
    background: #df9f00;
    border-radius: 4px;
}

.participants-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #ffba0d;
}

.participants-table {
    width: 100%;
    border-collapse: collapse;
    color: #ffffff;
    font-size: 12px;
}

.participants-table th, .participants-table td {
    padding: 2px;
    text-align: center;
    border-bottom: 1px solid #333333;
}

.participants-table th {
    font-weight: 700;
    background-color: #101010;
    height: 48px;
}

.participants-table tr {
    height: 48px;
    transition: background-color 0.3s ease;
}

.participants-table tr:hover {
    background-color: #2a2a2a;
}

.participants-table .mode-free {
    background-color: #333333;
    color: #ffffff;
    width: 60px;
    height: 24px;
    line-height: 24px;
    padding: 0;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 400;
    display: inline-block;
    text-align: center;
}

.participants-table .mode-points {
    background-color: #ff8c00;
    color: #ffffff;
    width: 60px;
    height: 24px;
    line-height: 24px;
    padding: 0;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 400;
    display: inline-block;
    text-align: center;
}

.participants-table .position {
    background-color: #333333;
    color: #ffffff;
    width: 30px;
    height: 18px;
    line-height: 18px;
    padding: 0;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 400;
    display: inline-block;
    text-align: center;
}

.participants-table .position-1-emblem {
    background-color: #FFD700;
    color: #000000;
}

.participants-table .position-2-emblem {
    background-color: #C0C0C0;
    color: #000000;
}

.participants-table .winner-gtb {
    color: #FFD700 !important;
    font-weight: 500;
}

.participants-table .second-gtb {
    color: #C0C0C0;
}

.participants-table .winner-brackets {
    color: #FFD700 !important;
}

.winner-guess-emblem {
    display: inline-block;
    background-color: #FFD700;
    color: #000000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 400;
    text-align: center;
}

.winners-container {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #101010;
    width: 20%;
    max-height: 400px;
    border-radius: 8px;
    padding: 15px;
    z-index: 1100;
    flex-direction: column;
    align-items: center;
}

.winners-container.active {
    display: flex;
}

.winners-header {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
    text-align: center;
}

.winners-table-wrapper {
    width: 100%;
    max-height: 350px;
    overflow-y: auto;
}

.winners-table-wrapper::-webkit-scrollbar {
    width: 6px;
}

.winners-table-wrapper::-webkit-scrollbar-track {
    background: #151515;
    border-radius: 4px;
}

.winners-table-wrapper::-webkit-scrollbar-thumb {
    background: #df9f00;
    border-radius: 4px;
}

.winners-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #ffba0d;
}

.winners-table {
    width: 100%;
    border-collapse: collapse;
    color: #ffffff;
    font-size: 12px;
}

.winners-table td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid #333333;
}

.winners-table tr {
    height: 32px;
    transition: background-color 0.3s ease;
}

.winners-table tr:hover {
    background-color: #2a2a2a;
}

/* =============== PERFECT 3-SECTION FIXED HEADER =============== */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 73px; /* slightly taller for better feel */
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
    padding: 0 24px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.header-content {
    width: 100%;
       max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto; /* Left | Center | Right */
    align-items: center;
    gap: 40px; /* controls space between logo ↔ menu ↔ button */
}

/* Logo - Left */
.header-logo-link {
    display: block;
    flex-shrink: 0;
}

.header-logo {
    height: 58px;
        border-radius: 400px;
}

/* Navigation - Perfectly Centered */
.header-nav {
    display: flex;
    justify-content: center;
    gap: 48px; /* more space between menu items */
}

/* Menu Links */
.nav-link {
    color: #d0d0d0;
    font-size: 0.98rem;
    font-weight: 400;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    position: relative;
    padding: 8px 0;
    transition: all 0.25s ease;
}

.nav-link:hover {
    color: #f8b700;
}

.nav-link.active {
    color: #ffffff;
    font-weight: 400;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    border-radius: 2px;
}

/* Discord Button - Right */
.nav-btn.join-discord {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: linear-gradient(90deg, #f8b700, #df9f00);
    color: #0e0e0e;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 15px;
    padding: 12px 26px;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(248, 183, 0, 0.35);
    transition: all 0.25s ease;
    white-space: nowrap;
}

.nav-btn.join-discord:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(248, 183, 0, 0.5);
    background: linear-gradient(90deg, #ffcc33, #f8b700);
}

.discord-btn-logo {
    height: 21px;
    width: 21px;
    filter: brightness(0); /* makes white SVG turn black to match text */
}

/* Push content below header */
main {
    margin-top: 100px;
}

/* Optional: shrink on scroll */
.fixed-header.scrolled {
    height: 70px;
    padding: 0 20px;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(12px);
}