/* --- General Body & Background --- */
html,
body {
    height: 100%;
    font-family: 'Luckiest Guy', cursive;
    /* This uses the new font */
}

body {
    margin: 0;
    padding: 2rem;
    background-color: #5c3c10;
    /* Fallback color */
    background-image: url('https://www.transparenttextures.com/patterns/wood-pattern.png');
    /* A nice wood texture for the "table" */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ADD THIS NEW RULE BELOW */
.login-box {
    width: 100%;
    max-width: 12200px;
    /* This is the wider value */
    padding: 2rem;
    background-color: #FDF8E1;
    border: 10px solid #c0a080;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(0, 0, 0, 0.2);


}

/* --- Game Container & Layout --- */
.game-container {
    position: relative;
    /* For positioning decorations */
    width: 100%;
    max-width: 1140px;
    min-height: 600px;
    padding: 2rem;
    background-color: #FDF8E1;
    /* A nice creamy paper color for the "board" */
    border: 10px solid #c0a080;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

/* --- The Blazor App Host --- */
#app {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a4a4a;
    text-align: center;
}

h1,
.h1 {
    color: #dc3545;
    /* A vibrant red for titles */
    text-shadow: 3px 3px 0px #fff, 5px 5px 0px rgba(0, 0, 0, 0.2);
    font-size: 4rem;
}


/* --- Themed Loading Progress --- */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #28a745;
        /* Green color */
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #dc3545;
            /* Red color */
            stroke-dasharray: calc(3.142 * var(--blazor-load-percentage, 0) * 0.8), 500;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    font-size: 1.5rem;
    color: #4a4a4a;
    text-shadow: 2px 2px 0px #fff;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    text-align: center;
    line-height: 8rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading...");
    }


/* --- Themed Blazor Error UI --- */
#blazor-error-ui {
    background: #fff0f0;
    color: #d90429;
    border: 3px dashed #d90429;
    border-radius: 10px;
    bottom: 0;
    left: 0;
    padding: 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    font-size: 1.2rem;
    text-align: center;
}

    #blazor-error-ui a {
        color: #007bff;
        text-decoration: underline;
        font-weight: bold;
    }

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        top: 10px;
        right: 15px;
        font-size: 2rem;
        text-decoration: none;
        color: #d90429;
    }


/* --- Decorative Elements --- */
.decoration {
    position: absolute;
    opacity: 0.5;
    z-index: 0;
}

    .decoration.snake {
        width: 120px;
        height: 120px;
        top: -30px;
        right: -20px;
        transform: rotate(25deg);
    }

    .decoration.ladder {
        width: 100px;
        height: 100px;
        bottom: -20px;
        left: -30px;
        transform: rotate(-15deg);
    }

/* --- IPAD FIX: POPUP STYLES --- */
/* This is the overlay that covers the screen */
.popup-overlay {
    position: fixed; /* Sits on top of all other content */
    top: 0;
    left: 0;
    width: 100vw; /* Use viewport width to cover the whole screen */
    height: 100vh; /* Use viewport height for full coverage */
    background: rgba(0, 0, 0, 0.7);
    display: -webkit-flex; /* Vendor prefix for Safari compatibility */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensures it's on top */
}

/* This is the actual popup box */
.popup-content {
    background: #FDF8E1; /* Match the game board color */
    padding: 2rem;
    border-radius: 15px;
    border: 10px solid #c0a080;
    text-align: center;
    max-width: 90%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}
