body {
    margin: 0;
    padding: 0;
    background-color: #0a0a0a;
    font-family: 'Montserrat', sans-serif;
}

header {
    width: 100%;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-nav {
    display: flex;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 70px;
    margin-right: 15px;
}

.logo-text {
    color: #ffffff;
    font-size: 32px;
    font-weight: 700;
}

.subheader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 0;
}

.subheader-link {
    color: #ffffff;
    font-size: 18px;
    font-weight: 400;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.subheader-link:hover {
    color: #cccccc;
}

.subheader-link.active {
    color: #cccccc;
    font-weight: 700;
}

.subheader-separator {
    color: #ffffff;
    font-size: 18px;
}

.guessthebalance-container {
    background-color: #0f0f0f;
    width: 80%;
    max-width: 1200px;
    min-height: 660px;
    max-height: 700px;
    margin: 20px auto;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.guessthebalance-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, #df9f00 20%, #df9f00 80%, transparent);
}

.inner-container {
    background: #151515;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 80%;
    max-width: 1000px;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin-bottom: 20px;
}

.guess-setup {
    position: relative;
}

.mode-switch-container {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
}

.mode-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;
}

.mode-switch.active {
    background-color: #00cc00;
}

.mode-switch:hover:not(.active) {
    background-color: #555555;
}

.guess-setup h2, .previous-rounds h2 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 20px 0;
}

.input-group {
    width: 60%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.input-group label {
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
    width: 120px;
}

.input-field {
    flex: 1;
    padding: 8px;
    background-color: #181818;
    border: none;
    border-radius: 4px;
    color: #ffffff;
    font-size: 14px;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.input-field[readonly] {
    cursor: not-allowed;
    opacity: 0.7;
}

.input-field::-webkit-outer-spin-button,
.input-field::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-field:focus {
    outline: none;
}

.prize-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.switch-container {
    display: flex;
    gap: 10px;
    margin-left: 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;
    align-items: flex-start;
    width: 60%;
}

.brackets-container {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    flex: 1;
}

.bracket-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;
}

.bracket-button:hover {
    background-color: #333333;
}

.start-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%;
}

.start-button:hover:not(:disabled) {
    background-color: #ffba0d;
        border: 2px solid #ffba0d;
}

.start-button:disabled {
    background-color: #333333;
    border-color: #555555;
    color: #777777;
    cursor: not-allowed;
}

.table-wrapper {
    width: 100%;
    max-height: 264px;
    overflow-y: auto;
}

.table-wrapper.brackets-mode {
    max-height: 219px;
}

.table-wrapper::-webkit-scrollbar {
    width: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #151515;
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: #df9f00;
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #ffba0d;
}

.table-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #df9f00 #151515;
}

.rounds-table {
    width: 100%;
    border-collapse: collapse;
    color: #ffffff;
    font-size: 14px;
}

.rounds-table th, .rounds-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #333333;
}

.rounds-table th {
    font-weight: 700;
    background-color: #151515;
}

.rounds-table tr {
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.rounds-table tr:hover {
    background-color: #2a2a2a;
}

.rounds-table .profit {
    color: #00cc00;
}

.rounds-table .loss {
    color: #d13b3b;
}

.rounds-table .winner-gtb {
    color: #FFD700;
    font-weight: 700;
}

.rounds-table .no-winner {
    color: #ffffff;
}

.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-bracket-emblem {
    display: inline-block;
    background-color: #FFD700;
    color: #000000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 400;
    text-align: center;
    width: 80px;
}

.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;
}

.popout-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.popout-container {
    background-color: #101010;
    width: 80%;
    max-width: 550px;
    height: 700px;
    border-radius: 8px;
    padding: 20px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
    filter: none !important;
    opacity: 1 !important;
}

.popout-container.dimmed {
    filter: brightness(50%) !important;
}

.end-round-popout, .end-round-popout *, .winner-id-popout, .winner-id-popout *, .brackets-winners-popout, .brackets-winners-popout * {
    filter: none !important;
    opacity: 1 !important;
}

.round-info-container {
    background: #151515;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 90%;
    height: 135px;
    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-info .winner-placeholder.gtb-mode {
    color: #FFD700 !important;
}

.winner-placeholder.no-winner {
    color: #ffffff;
}

.winner-id {
    font-size: 12px;
    font-weight: 400;
    color: #FFD700;
    margin-left: 5px;
    cursor: pointer;
}

.winner-id.brackets-mode {
    color: #FFD700;
}

.winner-id: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%;
    height: 500px;
    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-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #df9f00 #101010;
}

.participants-table {
    width: 100%;
    border-collapse: collapse;
    color: #ffffff;
    font-size: 12px;
}

.participants-table th, .participants-table td {
    padding: 8px;
    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 .default-row {
    background-color: #101010;
}

.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;
}

.participants-table .second-gtb {
    color: #C0C0C0;
}

.participants-table .winner-brackets {
    color: #FFD700;
}

.admin-buttons {
    display: flex;
    gap: 10px;
}

.cancel-round-button {
    background-color: #101010;
    color: #ffffff;
    border: 2px solid #d13b3b;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.cancel-round-button:hover {
    background-color: #d13b3b;
}

.end-round-button {
    background-color: #101010;
    color: #ffffff;
    border: 2px solid #00cc00;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.end-round-button:hover {
    background-color: #00cc00;
}

.ended-round-message {
    display: flex;
    align-items: center;
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
}

.ended-round-message p {
    margin: 5px 0;
    margin-left: 5px;
}

.delete-round {
    color: #d13b3b;
    cursor: pointer;
}

.delete-round:hover {
    text-decoration: underline;
}

.end-round-popout, .end-round-popout *, .winner-id-popout, .winner-id-popout *, .brackets-winners-popout, .brackets-winners-popout * {
    filter: none !important;
    opacity: 1 !important;
}

.end-round-popout {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #101010;
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
    padding: 20px;
    z-index: 1100;
    flex-direction: column;
    align-items: center;
}

.end-round-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #101010;
    margin: 10px;
    padding: 15px;
    border-radius: 4px;
    z-index: 1100;
}

.end-round-header {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    text-align: center;
}

.end-round-container .input-group {
    width: 100%;
}

.end-round-container .input-field {
    background-color: #151515;
    border: none;
    color: #ffffff;
}

.end-round-container .input-field:focus {
    border-color: #00cc00;
    outline: none;
}

.end-round-submit {
    background-color: #101010;
    color: #ffffff;
    border: 2px solid #00cc00;
    border-radius: 4px;
    padding: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin-top: 15px;
}

.end-round-submit:hover {
    background-color: #00cc00;
}

.winner-id-popout {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #101010;
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
    padding: 20px;
    z-index: 1100;
    flex-direction: column;
    align-items: center;
}

.winner-id-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #101010;
    margin: 10px;
    padding: 15px;
    border-radius: 4px;
    z-index: 1100;
}

.winner-id-header {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    text-align: center;
}

.winner-id-container .input-group {
    width: 100%;
}

.winner-id-container .input-field {
    background-color: #151515;
    border: none;
    color: #ffffff;
    cursor: not-allowed;
    opacity: 0.7;
}

.winner-id-container .input-field:focus {
    outline: none;
}

.brackets-winners-popout {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #101010;
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
    padding: 20px;
    z-index: 1100;
    flex-direction: column;
    align-items: center;
}

.brackets-winners-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #101010;
    margin: 10px;
    padding: 15px;
    border-radius: 4px;
    z-index: 1100;
}

.brackets-winners-header {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    text-align: center;
}

.winners-table-wrapper {
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
}

.winners-table-wrapper::-webkit-scrollbar {
    width: 8px;
}

.winners-table-wrapper::-webkit-scrollbar-track {
    background: #101010;
    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-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #df9f00 #101010;
}

.winners-table {
    width: 100%;
    border-collapse: collapse;
    color: #ffffff;
    font-size: 12px;
}

.winners-table th, .winners-table td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid #333333;
}

.winners-table th {
    font-weight: 700;
    background-color: #101010;
    height: 48px;
}

.winners-table tr {
    height: 48px;
    transition: background-color 0.3s ease;
}

.winners-table tr:hover {
    background-color: #2a2a2a;
}

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-popout {
    background: #151515;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    width: 300px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
}

.login-popout h2 {
    color: #b2b4bd;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 20px 0;
}

.login-error {
    color: #d13b3b;
    font-size: 14px;
    margin-top: 10px;
}

.login-button {
    background-color: #df9f00;
    color: #000000;
    border: 2px solid #df9f00;
    border-radius: 4px;
    padding: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
}

.login-button:hover:not(:disabled) {
    background-color: #ffba0d;
        border: 2px solid #ffba0d;
}

.login-button:disabled {
    background-color: #333333;
    border-color: #555555;
    color: #777777;
    cursor: not-allowed;
}

.login-popout .input-group {
    width: 100%;
}