/* Shared UI variables and components */
:root {
    /* base sizes use rem for min/max and vw for the fluid preferred value */
    --fs-xsmall: clamp(0.6875rem, 0.6vw, 0.8125rem); /* 11px → 13px */
    --fs-small: clamp(0.8125rem, 0.9vw, 0.9375rem); /* 13px → 15px */
    --fs-base: clamp(0.875rem, 1.1vw, 1.125rem); /* 14px → 18px */
    --fs-medium: clamp(1rem, 1.4vw, 1.25rem); /* 16px → 20px */
    --fs-large: clamp(1.125rem, 2vw, 1.8rem); /* 18px → 29px */
    --fs-xlarge: clamp(1.8rem, 3vw, 2.25rem); /* 29px → 36px */
    --fs-xxlarge: clamp(2.25rem, 4vw, 3rem); /* 36px → 48px */
}

@media (max-width: 768px) {
    /* slightly smaller clamps for tablet/phone sizes */
    :root {
        --fs-xsmall: clamp(0.75rem, 0.8vw, 0.875rem); /* ~12px → 14px */
        --fs-small: clamp(0.875rem, 1.0vw, 1rem); /* ~14px → 16px */
        --fs-base: clamp(1rem, 1.25vw, 1.125rem); /* ~16px → 18px  (great body text) */
        --fs-medium: clamp(1.125rem, 1.6vw, 1.375rem); /* ~18px → 22px */
        --fs-large: clamp(1.25rem, 2.2vw, 1.75rem); /* ~20px → 28px */
        --fs-xlarge: clamp(1.75rem, 3.5vw, 2.5rem); /* ~28px → 40px */
        --fs-xxlarge: clamp(2.25rem, 5vw, 3.25rem); /* ~36px → 52px */
    }
}

/* Start button styled as large white pill with bold blue text */

.close-button {
    position: absolute;
    top: -40px;
    right: -40px;
    height: auto;
    cursor: pointer;
}

.close-button:hover {
        opacity: 0.7;
}

/* Main cover image fills container width and keeps intrinsic aspect ratio */
.main-container {
    position: relative;
    width: calc(100%);
    box-sizing: border-box;
    overflow: hidden;
}

.main-cover {
    display: block;
    /* expand the image to cover the visual viewport; compensate for
       layout wrapper padding when necessary */
    width: calc(100%);
    height: auto; /* preserve aspect ratio */
    pointer-events: none;
    user-select: none;
    background-color: transparent;
}
@media (max-width: 768px) {
    .main-cover {
        width: 100%;
        margin-left: 0;
    }
}

.main-cover-img {
    width: calc(40%);
    z-index: 2;
    position: absolute;
    right: 5%;
    bottom: 5%;
    pointer-events: none;
    user-select: none;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

    .modal-overlay.show {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.9);
        display: flex;
        justify-content: center;
        align-items: center;
    }
.modal-overlay-error{
    z-index:3000;
}
.modal-content {
    /*    position: relative;
    background-color: white;
    border: 2px solid #1a3c5e;
    border-radius: 8px;
    width: calc(40%);
    max-width: 640px;
    height: auto;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px;
    box-sizing: border-box;*/
    background-image: url('/images/nobox_bg.png');
    background-size: cover;
    background-position: center;
    width: calc(90%);
    display: flex;
    flex-direction: column;
    animation: slideInLeaderboard 0.4s ease-out;
    padding: 5%;
    border: 5px solid white;
    border-radius: 8px;
    flex: 0 1 100%;
}

.content-text {
    position: absolute;
    left: 5%;
    z-index: 2;
    color: white;
    width: 70%;
    margin: 8px 0;
    line-height: 1.4;
    font-size: var(--fs-large);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.content-text-center {
    top: 50%;
    transform: translateY(-50%);
}

.content-text-bottom {
    bottom: 10%;
    transform: none;
}

.content-text-top {
    top: 10%;
    transform: none;
}

.content-text-align-left {
    justify-content: start;
    align-content:start;
}
