/* --- Home Page Leaderboard --- */
.home-leaderboard-wrapper {
    width: 100%;
    background: #23272e;
    border-radius: 8px;
    border: 1px solid #363c47;
    margin-bottom: 30px;
    overflow: hidden;
}

.home-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    color: #c5c8cc;
    font-family: 'Exo 2', sans-serif;
}

.home-leaderboard-table thead tr {
    background-color: #363c47;
}

.home-leaderboard-table th {
    padding: 12px 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: left;
    text-transform: uppercase;
    color: #ffffff;
}

.home-leaderboard-table tbody tr {
    border-bottom: 1px solid #363c47;
}

.home-leaderboard-table tbody tr:last-child {
    border-bottom: none;
}

.home-leaderboard-table tbody tr:hover {
    background-color: #2a2e35;
}

.home-leaderboard-table td {
    padding: 12px 15px;
    vertical-align: middle;
    font-size: 0.9rem;
}

.home-leaderboard-table td:first-child {
    text-align: center;
    font-weight: 700;
    color: #ff9100;
    width: 60px;
}

.home-leaderboard-table td:nth-child(2) {
    font-weight: 600;
    color: #ffffff;
}

.home-leaderboard-table td:last-child {
    font-weight: 700;
    color: #00ff3a;
    text-align: right;
}

.home-leaderboard-table tbody tr td[colspan="3"] {
    text-align: center;
    color: #8c8f94;
    padding: 20px;
}

/* ---- SPLASH SCREEN & PAGE LOAD ---- */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #110e1a; /* Match body background */
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-out;
}
#splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.splash-content {
    text-align: center;
}
.splash-content .stackup-logo {
    font-size: 3rem;
    margin-bottom: 20px;
}
.loader {
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top: 5px solid #718cff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Initially hide the main app content */
#app-wrapper {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s 0.2s ease-in; /* 0.2s delay for a smoother effect */
}
/* Class to show the content after loading */
#app-wrapper.loaded {
    opacity: 1;
    visibility: visible;
}

/* ---- ORIGINAL CSS ---- */
html,body {
    background-color: #171928;
    user-select: none;
    width: 100%;
    height: 100%;
    scrollbar-width: none;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    --bar-width: 0;
}

/* New: Class to disable scrolling and lock the page when a modal is open */
.modal-open {
    overflow: hidden !important;
    height: 100vh;
    position: fixed;
    width: 100vw;
    min-width: 5000px;
}

/* ---- TOP BAR & NAVIGATION (ORIGINAL PUSH VALUES PRESERVED) ---- */
.top-bar {
    background-color: #171928;
    box-shadow: #101218 0 4px 20px;
    display: flex;
    align-items: center;
    position: fixed;
    width: 100%;
    height: 75px;
    min-height: 60px;
    top: 0;
    left: 0;
    z-index: 10;
    transition: 0s ease-in;
    justify-content: space-between;
}

/* ---- FORM VALIDATION & ERROR STYLES ---- */
.form-group.error input {
    border-color: #e53e3e; /* Red border for error */
    background-color: rgba(229, 62, 62, 0.1); /* Faint red background */
}
.form-group.error input:focus {
    border-color: #e53e3e;
    box-shadow: 0 0 0 1px #e53e3e; /* Red focus glow */
}
.error-message {
    color: #e53e3e;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.8rem;
    margin-top: 6px;
    display: none; /* Hidden by default */
}
.form-group.error .error-message {
    display: block;
}
#pushed{
    width: calc(100% - 240px);
    left: 240px;
    display: flex;
    overflow: auto;
}
#custom-pushed {
    margin-left: 260px;
}
.stackup-logo {
    position: relative;
    color: rgb(255, 255, 255);
    font-family: "Raleway", sans-serif;
    text-shadow: 0 0 12px #718cff;
    font-weight: 350;
    font-style: oblique;
    padding-left: var(--dynamic-margin-left);
}


/* NEW: Balance Display Container Style */

.balance-container {



    margin-right: auto;



    display: flex;

    align-items: center;

    justify-content: center;

    background: rgba(20, 16, 52, 0.8);

    border: 2px solid rgb(61, 49, 203);

    border-radius: 8px;

    padding: 8px 12px;

    margin-right: 10px;

    color: white;

    font-family: 'Exo 2', sans-serif;

    font-size: 1rem;

}


#user-balance-field {
    font-weight: 700;
    color: white; /* Green for balance */
    margin-left: 8px;
    min-width: 60px; /* Prevents text jump */
}


.auth-area {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: var(--dynamic-margin-right);
}



.login-button {
    background-color: rgba(42, 33, 122, 0.75);
    color: white;
    border: 2px solid rgb(61, 49, 203);
    border-radius: 8px;
    padding: 8px 16px;
    font-family: 'Exo 2', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.login-button:hover {
    background-color: rgb(61, 49, 203);
}



.funds-button {
 
    line-height: 20px;
    padding-top: 2px;
    padding-bottom: 8px;
    margin-left: 12px;

    
    background-color: rgba(42, 33, 122, 0.75);
    color: white;
    border: 2px solid rgb(61, 49, 203);
    border-radius: 8px;
    font-family: 'Exo 2', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-weight: 100;
    font-size: 2rem;
}
.funds-button:hover {
    background-color: rgb(61, 49, 203);
}

.register-button {
    background-color: rgba(42, 33, 122, 0.75);
    color: white;
    border: 2px solid rgb(61, 49, 203);
    border-radius: 8px;
    padding: 8px 16px;
    font-family: 'Exo 2', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.register-button:hover {
    background-color: rgb(61, 49, 203);
}
.profile-container {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}
img {
    image-rendering: smooth;
}
.profile-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgb(61, 49, 203);
}
.profile-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: rgba(20, 16, 52, 0.95);
    border: 1px solid rgb(61, 49, 203);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-width: 160px;
    z-index: 1000; /* Increased z-index to ensure it's on top */
}
/* Updated profile dropdown item styles to match side buttons */
.profile-dropdown .dropdown-item {
    display: flex;
    position: relative;
    color: white;
    font-family: 'Exo 2', sans-serif;
    padding: 10px;
    cursor: pointer;
    background-color: rgba(20, 16, 52, 0.55); /* Matches side button base color */
    border: 2px solid rgba(0, 0, 0, 0); /* Invisible border for hover transition */
    border-radius: 8px; /* Matches side button radius */
    margin: 4px 0;
    transition: background-color 0.2s ease, border-color 0.2s ease; /* Smooth transition */
}
.profile-dropdown .dropdown-item:hover {
    background-color: rgb(61, 49, 203); /* Matches side button hover color */
    border-color: rgb(61, 49, 203); /* Matches side button hover border */
}
.hidden {
    display: none !important;
}

/* ---- MODAL & LOGIN/REGISTER FORM STYLES (FIXED) ---- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.modal-container {
    display: flex;
    flex-direction: column; /* This is for the header/body structure */
    max-width: 500px; /* Reverted from 800px */
    width: 100%; /* Changed from 500px to be responsive */
    background: rgba(42, 33, 122, 1); /* Original background */
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transition: max-width 0.3s ease-in-out; /* Added transition */
}

/* 🚀 NEW: Modifier for wider modals like 'Add Funds' */
.modal-container.modal-container-wide {
    max-width: 600px;
}


@media (max-width: 500px) {
    .modal-container {
        max-width: calc(100% - 30px); /* Adjust to leave some space on the sides */
    }

    .steps-container {
        margin-left: -5px;
    }

}



/* NEW: Header with darker background */
.modal-header {
    background-color: rgba(25, 20, 75, 1); /* Darker version of the original */
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(16, 11, 58, 0.76);
}
/* NEW: Body wrapper for padding */
.modal-body {
    padding: 24px;
}
.modal-content-area {
    /* This class is no longer used for overall structure, but for compatibility */
    position: relative;
    width: 100%;
}
.close-modal {
    position: static; /* No longer needs to be absolute */
    font-size: 1.5rem;
    color: #8c8f94;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}
.close-modal:hover {
    color: #fff;
}
.modal-title {
    color: #fff;
    text-align: left;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    margin: 0; /* Removed other margins */
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    color: #8c8f94;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 5px;
}
/* NEW: Required red asterisk */
.form-group label::after {
    content: ' *';
    color: #e53e3e;
}
.modal-body input { /* Targeted specifically to avoid conflicts */
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgb(67, 53, 175);
    border-radius: 8px;
    background: rgba(20, 16, 52, 0.55);
    color: #fff;
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}
.modal-body input:focus {
    border-color: rgb(61, 49, 203);
    outline: none;
}
.modal-body input::placeholder {
    color: #555;
}
.form-link {
    text-align: right;
    font-size: 0.9rem;
    margin-bottom: 20px;
}
/* FIXED: No underline on hover */
.form-link a, .register-link a {
    color: rgb(130, 120, 255);
    text-decoration: none;
    font-family: 'Exo 2', sans-serif;
    transition: color 0.2s ease;
}
.form-link a:hover, .register-link a:hover {
    text-decoration: none;
    color: #fff;
}
/* FIXED: Login button updated */
.login-submit {
    width: 100%;
    background: rgb(61, 49, 203);
    border: 2px solid rgb(61, 49, 203); /* Border from sidebar buttons */
    color: white;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    transition: filter 0.2s ease;
}
.login-submit:hover {
    filter: brightness(90%); /* Darkens on hover */
}
.login-submit:disabled {
    background: #555;
    border-color: #777;
    cursor: not-allowed;
    filter: brightness(100%);
}
.social-login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
}
.social-login-divider::before, .social-login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #333;
}
.social-login-divider span {
    padding: 0 15px;
    color: #555;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
}
.social-login {
    display: flex;
    justify-content: center;
    gap: 15px;
}
.social-icon {
    background: rgba(20, 16, 52, 0.55);
    border: 1px solid #373b45;
    border-radius: 8px;
    padding: 10px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.social-icon:hover {
    background: #373b45;
}
.social-icon img {
    width: 100%;
    height: 100%;
}
.register-link {
    text-align: center;
    color: #8c8f94;
    font-family: 'Exo 2', sans-serif;
    margin-top: 25px;
}
/* ---- SIDE BAR ---- */
.side-bar-content:not(.static-side-bar-content) {
    display: block;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}
#side-bar-close .side-bar-button::before {
    content: "";
}

.y-spacer-small {
    min-height: 10px;
}

.y-spacer {
    min-height: 20px;
}

.y-spacer-large {
    min-height: 40px;
}

#side-bar-open {
    width: 240px;
    margin-right: 100px;
}
#side-bar-button-open:not(.static-side-bar-button) {
    display: flex;
    align-items: center;
    width: 100%;
    font-size: 1rem;
    color: white;
    font-weight: lighter;
    font-family: "Exo 2", sans-serif;
    padding: 0 0 0 5%;
    transition: 0.2s ease-in-out;
}
#side-bar-button-close:not(.static-side-bar-button) {
    color: transparent;
}
.static-side-bar-button {

    overflow: hidden;
    background-color: rgba(42, 33, 122, 0.55);
    color: rgba(246, 176, 0, 0);
    font-size: 2rem;
    font-family: 'Exo 2', sans-serif;
    border: 2px solid rgb(61, 49, 203);
    border-radius: 8px;
    display: block;
    vertical-align: middle;
    rotate: 0deg;
    width: 50px;
    height: 50px;
    top: 0;
    left: -100px;
    animation-fill-mode: forwards;
}
.side-bar:not(.static-side-bar-button) {
    z-index: 10;
    background-color: #171928;
    display: block;
    flex-direction: column;
    position: fixed;
    box-shadow: 1px 0 5px 0 #1c1f44;
    height: 100%;
    width: 90px;
    top: 0;
    left: 0;
    transition: 0s ease-in;
}
.side-bar-button:not(.static-side-bar-button) {
    padding-top: 10%;
    overflow: hidden;
    background-color: rgb(20, 16, 52, 0.55);
    font-size: 2rem;
    font-family: 'Exo 2', sans-serif;
    border: 2px solid rgb(61, 49, 203);
    border-radius: 8px;
    display: block;
    vertical-align: middle;
    rotate: 0deg;
    width: 50px;
    height: 50px;
    transition: rotate 0.6s ease-in-out, border 0.4s ease-in-out, filter 0.4s ease-in-out;
    top: 0;
    left: -100px;
    animation-fill-mode: forwards;
}
.side-bar-button::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 100%;
    background-image: linear-gradient(
            120deg,
            rgba(255,255,255, 0) 30%,
            rgb(176, 187, 255),
            rgba(255,255,255, 0) 70%
    );
    top: 0;
    left: -380px;
}
.side-bar-button:hover::before {
    animation: shine 1.5s forwards linear;
}
.side-bar-button:hover {
    scale: 98%;
    background-color: rgb(61, 49, 203);
    border: 2px solid rgb(61, 49, 203);
    filter: drop-shadow(0 0 10px rgba(30, 25, 77, 0.55));
}
/* ---- MAIN CONTENT LAYOUT & ELEMENTS ---- */
.content-wrapper {
    scale: 1;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    /* Add a height */
    height: 600px; /* or whatever height you want */
    box-sizing: border-box;
}

.main-content {
    display: block;
    /* Remove 'position: absolute', 'top', 'bottom', 'left', 'right' */
    box-sizing: border-box;
    height: auto;
    /* This combines the top margin from your existing code with new responsive margins */
    margin: 100px 45px 0 130px;
    background-color: #171928;
    transition: transform 0.3s ease-in-out;
    will-change: transform;
}
.dynamic-content-area {
    top: 0;

    /* ADD these two lines to make the container larger */
    height: 100%;
    min-height: 500px;
}
.hidden {
    display: none !important;
}
.user-info {
    position: relative;
    background-color: rgb(30, 32, 47);
    max-height: 345px;
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    box-sizing: border-box;
}
.user-level {
    border: 2px solid rgb(61, 49, 203);
    background: rgb(20, 16, 52, 0.55);
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    color: white;
    text-align: left;
    max-height: 85px;
    border-radius: 15px;
    margin-bottom: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    box-sizing: border-box;
}
.user-info-text {
    position: relative;
    z-index: 2;
    backdrop-filter: blur(2px);
    background: rgba(17, 14, 26, 0.2);
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}
.user-info h1 {
    font-family: 'Exo 2', sans-serif;
    font-size: 1.8rem;
    margin: 0;
    padding: 0;
    color: white;
    text-align: left;
}
.user-info-bottom {
    font-family: 'Exo 2', sans-serif;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.user-info-bottom h2 {
    font-size: 1rem;
    margin: 0;
    padding: 0;
    color: white;
    text-align: left;
    font-weight: 400;
}
#menu-gem {
    position: absolute;
    left: 68%;
    top: -10px;
    width: 30px;
    height: auto;
    transform: scale(15) rotate(-10deg);
    transform-origin: top left;
    z-index: 0;
    pointer-events: none;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-right: 10px;
    transition: transform 0.3s ease, scale 0.3s ease;
}
.stackup-font {
    color: #ffffff;
    font-family: "Exo 2", serif;
    margin-bottom: 10px;
}
.level-bar {
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, rgb(255, 255, 255), rgb(73, 62, 255));
    box-shadow: 0 0 10px #002bff;
    border-radius: 10px;
    transform: scaleX(var(--bar-width));
    transform-origin: left;
    transition: transform 1.2s ease-in-out;
    will-change: transform;
}
.right-align {
    color: #ffffff;
    font-family: "Exo 2", serif;
}
.slider-buttons {
    display: flex;
    gap: 10px;
}
.slider-button {
    background-color: rgba(42, 33, 122, 0.55);
    color: white;
    border: 2px solid rgb(61, 49, 203);
    border-radius: 5px;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.2s ease-in, border 0.2s ease-in;
}
.slider-button:hover {
    background-color: rgb(61, 49, 203);
    border: 2px solid rgb(61, 49, 203);
}
.recommended {
    width: 100%;
    height: auto;
    border-radius: 15px;
    display: flex;
    justify-content: start;
    align-items: start;
    box-sizing: border-box;
}

.game-display {
    width: 100%;
    height: 600px;
    border-radius: 10px;
    text-align: center;
    align-items: center;
}

.game-container.blackjack-game {
    background-color: #1a2233;
    color: #a0a3af;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column; /* This stacks the children vertically */
    height: 80vh; /* Set a fixed height to lock the size */
    overflow: hidden; /* Prevents internal content from overflowing */
}

.fixed-game-container {
    position: fixed;
    top: 100px;  /* Adjust this to set the top position */
    left: 120px; /* Adjust this to set the left position */
    width: calc(100% - 145px);
    height: calc(100vh - 150px); /* This is the new, fixed height */
    z-index: 50;
    display: flex;
    flex-direction: column;
    overflow-y: auto;  /* This is the crucial line */
}

/* Add this to prevent any child element from forcing horizontal overflow */
.fixed-game-container > * {
    max-width: 100%;
}

/* Header bar with fairness button */
.game-header-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 20px;
}

/* Main game area layout */
.game-play-area {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* This makes the game area take up all available space */
    justify-content: space-between;
    overflow-y: auto; /* Adds a scrollbar if the game content gets too long */
}


.game-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 12px;
    width: 100%;
}
.game {
    max-height: 235px;
    aspect-ratio: 77 / 100;
    width: 95%;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Exo 2", serif;
    color: transparent;
    overflow: visible;
}

.dynamic-content-area {
    top: 0;

    /* ADD these two lines to make the container larger */
    height: 100%;
    min-height: 500px;
}

.game:hover {
    cursor: pointer;
    scale: 1.02;
    rotate: 0.5deg;
    filter: saturate(300%);
}
.game {
    scale: 1.0;
    rotate: 0deg;
    filter: saturate(200%);
}
.footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #3a3e4c;
    border-bottom: 1px solid #3a3e4c;
    font-size: 12px;
    color: #a0a3af;
    text-align: center;
    line-height: 1.6;
}
.footer p {
    color: rgb(82, 75, 192);
}
/* ---- ANIMATIONS ---- */
@keyframes shine {
    0% {left: -800px}
    90% {left: 500%}
    100% {left: 100%}
}
/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
    .side-bar {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 80px;
    }
}
/* NEW: Multi-step form styles */
.progress-container {
    flex-grow: 1; /* Allows it to take up available space */
    height: 8px;
    background-color: rgba(30, 23, 121, 0.55); /* Dark background for the bar */
    border-radius: 4px;
    margin: 0 24px;
    overflow: hidden;
}
#progress-bar {
    width: 0;
    height: 100%;
    background-color: #718cff; /* Progress color */
    border-radius: 4px;
    transition: width 0.3s ease-in-out; /* Smooth width change */
}
.steps-container {
    display: flex;
    width: 200%; /* Two steps side-by-side */
    transition: transform 0.4s ease-in-out;
}
.register-step {
    flex: 0 0 50%; /* Each step takes up exactly half of the container */
    box-sizing: border-box;
    margin-right: 25px;
}



#verification-code-inputs {
    display: flex;
    justify-content: space-between; /* Distributes inputs evenly */
    gap: 10px; /* Adds space between the inputs */
    margin-top: 10px;
}

.code-input {
    width: 48px;
    height: 88px;
    text-align: center;
    font-size: 3.5rem;
    font-weight: 600;
    color: #009aff;
    background: rgba(20, 16, 52, 0.55);
    border: 2px solid rgb(67, 53, 175);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease-in-out;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #8c8f94;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.back-button {
    color: #8c8f94;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
}
.back-button:hover {
    color: #fff;
}
.terms-conditions {
    border: 1px solid rgb(67, 53, 175);
    border-radius: 8px;
    background: rgba(20, 16, 52, 0.55);
    padding: 15px;
    margin-bottom: 20px;
}
.terms-conditions h3 {
    color: #fff;
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
}
.terms-content {
    height: 150px; /* Set a fixed height for scrolling */
    overflow-y: auto;
    color: #8c8f94;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
}
.terms-content::-webkit-scrollbar {
    width: 8px;
}
.terms-content::-webkit-scrollbar-track {
    background: rgba(20, 16, 52, 0.55);
}
.terms-content::-webkit-scrollbar-thumb {
    background: #4a4d6b;
    border-radius: 4px;
}
.terms-content p {
    margin: 0;
}
.form-group-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}
.form-group-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    background: transparent;
    border: 2px solid rgb(67, 53, 175);
}
.form-group-checkbox label {
    margin: 0;
    font-size: 1rem;
}

/* ---- TOAST NOTIFICATIONS (FIXED FOR BOTTOM-CENTER STACKING) ---- */
#toast-container {
    /* REQUIRED: Fixed position, spanning the width of the viewport */
    position: fixed;
    bottom: 20px; /* Aligns container 20px from the bottom */
    left: 0;
    right: 0;
    
    /* Centering and Stacking */
    display: flex;
    flex-direction: column-reverse; /* Stacks new toasts on top of old ones (pushes them up) */
    align-items: center; /* Centers the toasts horizontally within the container */
    gap: 10px;
    
    /* Ensure maximum visibility and correct behavior */
    z-index: 5000;
    pointer-events: none; /* Allows clicks to pass through the container when empty */
}
.toast {
    color: white;
    font-family: 'Exo 2', sans-serif;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    
    /* Animation: Moves from 20px below its final position (out of sight) to 0 */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    opacity: 0;
    transform: translateY(20px);
    
    /* Allow interaction (e.g., dismissing) if needed */
    pointer-events: auto;  
    
    /* Ensure the toast doesn't get too wide on large screens */
    max-width: 400px;
    width: 100%; /* Allows flex centering to work better */
}
/* NOTE: We removed the old conflicting type definitions and now define the final .toast.show state */
.toast.show {
    opacity: 1;
    transform: translateY(0); /* Slides up into final position */
}
/* Re-introduced type styling, ensuring correct background/border */
.toast-success {
    background-color: #28a745b0;
    border: 1px solid #218838;
}
.toast-error {
    background-color: #dc3545b0;
    border: 1px solid #c82333;
}
.toast-info {
    background-color: #17a2b8b0;
    border: 1px solid #138496;
}


#game-splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: 5s;
    opacity: 1;
}

#game-splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Spinner animation */
.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
