body {
    margin: 0;
    padding: 0;
    background-color: #101010;
    font-family: 'Montserrat', 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: #181818;
    width: 80%;
    max-width: 1200px;
    min-height: 600px;
    margin: 20px auto;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 16px;
}

.store-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, #d13b3b 20%, #d13b3b 80%, transparent);
}

.signin-container {
    display: none;
    flex-direction: column;
    align-items: center;
    background-color: #101010;
    padding: 20px;
    border-radius: 8px;
    width: 33%;
    height: 100%;
}

.signin-header {
    color: #ffffff;
    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;
}

.signin-disclaimer {
    font-size: 14px;
    color: #666666;
    text-align: center;
    margin: -5px 0 5px 0;
}

.secret-phrase {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 5px 0;
}

.signin-button {
    padding: 10px 20px;
    background-color: #101010;
    border: 2px solid #d13b3b;
    border-radius: 6px;
    color: #ffffff;
    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: #d13b3b;
}

.signin-button.auth-button:disabled {
    border-color: #cccccc;
    color: #cccccc;
    cursor: not-allowed;
}

.signin-button.auth-button.success {
    border-color: #00cc00;
    color: #00cc00;
    background-color: #101010;
}

.signin-button.auth-button.failed {
    border-color: #d13b3b;
    color: #d13b3b;
    background-color: #101010;
}

.user-container {
    background-color: #101010;
    width: 40%;
    height: 250px;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    position: relative;
    align-items: stretch;
}

.user-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: -4px;
}

.settings-text, .highscore-text {
    background: none;
    color: #ffffff;
    border: none;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.settings-text:hover, .highscore-text:hover {
    opacity: 0.4;
}

.username {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
}

.points {
    display: flex;
    align-items: baseline;
    margin-top: 2px;
}

.points-number {
    font-size: 28px;
    font-weight: 100;
    color: #ffffff;
}

.points-text {
    font-size: 20px;
    font-weight: 400;
    color: #cccccc;
    margin-left: 4px;
}

.user-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat {
    font-size: 16px;
    font-weight: 400;
    color: #cccccc;
    margin-top: 2px;
}

.user-right {
    display: flex;
    align-items: stretch;
    margin-right: -15px;
}

.tier-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.tier-image {
    width: 180px;
    height: 155px;
    object-fit: contain;
    margin-bottom: -10px;
    margin-top: -5px;
}

.progress-container {
    width: 150px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.progress-label {
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 5px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #333333;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #d13b3b;
    transition: width 0.3s ease;
}

.progress-ranks {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 5px;
}

.current-rank, .next-rank {
    font-size: 12px;
    font-weight: 400;
    color: #cccccc;
}

.logout-text {
    background: none;
    color: #ffffff;
    border: none;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.logout-text:hover {
    opacity: 0.4;
}

.recent-checkouts-container {
    background-color: #101010;
    width: 30%;
    height: 250px;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.recent-checkouts-header {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 5px;
    text-align: center;
}

.checkouts-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: calc(250px - 20px - 23px);
    overflow-y: auto;
    overflow-x: visible;
    padding: 0;
}

.checkouts-list::-webkit-scrollbar {
    width: 6px;
}

.checkouts-list::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.checkouts-list::-webkit-scrollbar-thumb {
    background: #d13b3b;
    border-radius: 3px;
}

.checkouts-list::-webkit-scrollbar-thumb:hover {
    background: #b32f2f;
}

.checkout-item {
    margin-bottom: 6px;
    padding: 2px;
    border-radius: 4px;
    white-space: normal;
    word-wrap: break-word;
    overflow: visible;
    position: relative;
    z-index: 1;
    transition: background-color 0.3s ease;
}

.checkout-item:hover, .checkout-item.pop-out {
    background-color: #333333;
    border-radius: 4px;
    z-index: 2;
}

.checkout-text {
    font-size: 12px;
    font-weight: 400;
    color: #cccccc;
}

.checkout-time {
    font-size: 10px;
    font-weight: 400;
    color: #999999;
    margin-top: 2px;
}

.checkout-container {
    background-color: #101010;
    width: 40%;
    height: 600px;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-items-wrapper {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
}

.cart-items-wrapper::-webkit-scrollbar {
    width: 6px;
}

.cart-items-wrapper::-webkit-scrollbar-track {
    background: transparent;
    box-shadow: none;
}

.cart-items-wrapper::-webkit-scrollbar-thumb {
    background: #d13b3b;
    border-radius: 3px;
}

.cart-items-wrapper::-webkit-scrollbar-thumb:hover {
    background: #b32f2f;
}

.cart-items {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cart-item {
    display: flex;
    align-items: center;
    width: 100%;
    background-color: #181818;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
    flex-shrink: 0;
    border-top: 3px solid #d13b3b;
    position: relative;
    transition: opacity 0.3s ease;
}

.cart-item.processing {
    opacity: 0.5;
}

.cart-item::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, transparent, #d13b3b 20%, #d13b3b 80%, transparent);
}

.cart-prize-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-right: 10px;
}

.cart-prize-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    white-space: normal;
    word-wrap: break-word;
}

.cart-prize-name {
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
}

.cart-prize-cost {
    font-size: 12px;
    font-weight: 400;
    color: #cccccc;
    align-self: flex-end;
    margin-top: 10px;
}

.remove-text {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 12px;
    font-weight: 400;
    color: #ffffff;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.remove-text:hover {
    opacity: 0.4;
}

.cart-footer {
    width: 100%;
}

.cart-divider {
    width: 100%;
    border: 1px solid #333333;
    margin: 10px 0;
}

.cart-summary {
    width: 100%;
    margin-bottom: 10px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 400;
    color: #cccccc;
    margin-bottom: 5px;
}

.summary-name {
    color: #ffffff;
}

.summary-cost {
    color: #cccccc;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin-top: 10px;
}

.total-text {
    color: #ffffff;
}

.total-value {
    color: #ffffff;
}

.redeem-button {
    width: 100%;
    padding: 10px;
    background: none;
    border: 2px solid #d13b3b;
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.redeem-button:hover {
    background-color: #d13b3b;
}

.redeem-button.processing {
    background: none;
    border-color: #cccccc;
    color: #cccccc;
    cursor: not-allowed;
}

.redeem-button.success {
    border-color: #00cc00;
    color: #00cc00;
    background: none;
}

.redeem-button.error {
    border-color: #d13b3b;
    color: #d13b3b;
    background: none;
}

.prizes-container {
    background-color: #101010;
    width: 61%;
    height: 325px;
    border-radius: 8px;
    padding: 10px;
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.prizes-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 145px);
    width: 100%;
    height: 100%;
    gap: 0;
    position: relative;
}

.prize-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.prize-item:hover {
    background: radial-gradient(circle at center, rgb(80 74 74 / 15%) 0%, transparent 80%);
    transform: scale(1.05);
}

.prize-item.out-of-stock {
    cursor: not-allowed;
    opacity: 0.5;
}

.prize-item.out-of-stock:hover {
    transform: none;
    background: none;
}

.prize-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-top: 25px;
    margin-bottom: -5px;
}

.prize-name {
    font-size: 12px;
    font-weight: 400;
    color: #ffffff;
    text-align: center;
    margin-top: 15px;
}

.prize-cost {
    font-size: 12px;
    font-weight: 400;
    color: #cccccc;
    text-align: center;
    margin-bottom: 5px;
}

.prize-stock {
    font-size: 10px;
    font-weight: 400;
    color: #999999;
    text-align: center;
    margin-top: 0; /* Keep close to prize-cost */
}

.prize-tag {
    position: absolute;
    top: 5px; /* Upper right corner */
    right: 5px;
    font-size: 10px;
    font-weight: 400;
    color: #ffffff;
    background-color: #333333;
    padding: 2px 4px;
    border-radius: 3px;
    opacity: 0.8;
    z-index: 2; /* Ensure tag is above other elements */
}

.prizes-grid .horizontal-separator {
    width: 75px;
    height: 0.1px;
    background-color: #333333;
    top: 50%;
    left: calc(50% - 37.5px);
    transform: translateY(-50%);
    position: absolute;
    z-index: 1;
    opacity: 1;
    border: none;
    box-shadow: none;
}

.prizes-grid .horizontal-separator:nth-child(6) {
    grid-column: 1 / 2;
}

.prizes-grid .horizontal-separator:nth-child(7) {
    grid-column: 2 / 3;
}

.prizes-grid .horizontal-separator:nth-child(8) {
    grid-column: 3 / 4;
}

.prizes-grid .horizontal-separator:nth-child(9) {
    grid-column: 4 / 5;
}

.prizes-grid .horizontal-separator:nth-child(10) {
    grid-column: 5 / 6;
}

.prize-item:nth-child(1)::after,
.prize-item:nth-child(2)::after,
.prize-item:nth-child(3)::after,
.prize-item:nth-child(4)::after,
.prize-item:nth-child(11)::after,
.prize-item:nth-child(12)::after,
.prize-item:nth-child(13)::after,
.prize-item:nth-child(14)::after {
    content: '';
    position: absolute;
    width: 1px;
    height: 90px;
    background: linear-gradient(to bottom, transparent, #333333 20%, #333333 80%, transparent);
    top: 50%;
    transform: translateY(-50%);
    right: 0;
    z-index: 1;
    opacity: 1;
    border: none;
    box-shadow: none;
}

.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
}

.empty-cart-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 10px;
    margin-top: 50%;
}

.empty-cart-text {
    font-size: 16px;
    font-weight: 400;
    color: #cccccc;
    text-align: center;
}

.settings-overlay, .highscore-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #00000080;
    z-index: 1000;
    display: none;
}

.settings-container, .highscore-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #101010;
    padding: 20px;
    border-radius: 8px;
    width: 33%;
    max-width: 400px;
    display: none;
    flex-direction: column;
    align-items: center;
    z-index: 1001;
}

.settings-header, .highscore-header {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 20px 0;
}

.casino-link {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

.casino-name {
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    width: 40%;
}

.casino-input {
    width: 60%;
    padding: 8px;
    background-color: #181818;
    border: 1px solid #d13b3b;
    border-radius: 4px;
    color: #ffffff;
    font-size: 14px;
}

.casino-input:disabled {
    background-color: #333333;
    color: #666666;
    cursor: not-allowed;
    border-color: #00cc00;
}

.casino-input.success {
    border-color: #00cc00;
    background-color: #181818;
    box-shadow: 0 0 5px rgba(0, 204, 0, 0.3);
}

.save-button {
    width: 100%;
    padding: 10px;
    background: #101010;
    border: 2px solid #d13b3b;
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    margin-top: 10px;
}

.save-button:hover:not(:disabled) {
    background-color: #d13b3b;
}

.save-button.processing {
    background: #101010;
    border-color: #cccccc;
    color: #cccccc;
    cursor: not-allowed;
}

.save-button.success {
    border-color: #00cc00;
    color: #00cc00;
    background: #101010;
}

.save-button.error {
    border-color: #d13b3b;
    color: #d13b3b;
    background: #101010;
}

.signin-disclaimer a {
    color: #53fc18;
    text-decoration: none;
}

.signin-disclaimer a:hover {
    color: #3cc70c;
}

.highscore-table-wrapper {
    width: 100%;
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
}

.highscore-table-wrapper::-webkit-scrollbar {
    width: 6px;
}

.highscore-table-wrapper::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.highscore-table-wrapper::-webkit-scrollbar-thumb {
    background: #d13b3b;
    border-radius: 3px;
}

.highscore-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #b32f2f;
}

.highscore-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: #ffffff;
}

.highscore-table th, .highscore-table td {
    padding: 6px;
    text-align: left;
    border-bottom: 1px solid #333333;
}

.highscore-table th {
    font-weight: 700;
    color: #cccccc;
    background-color: #181818;
    position: sticky;
    top: 0;
    z-index: 1;
}

.highscore-table td {
    font-weight: 400;
}

.highscore-table tr:hover {
    background-color: #333333;
}