/* 1. Set the background color of the entire page (areas outside the mobile container) */
body {
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    /* This color appears on the left and right in desktop view */
}

/* 2. Core: Mobile screen simulator container */
.lottery-bg {
    /* Max width for mobile-like appearance */
    width: 100%;
    max-width: 480px;

    /* Center it horizontally in PC browsers */
    margin: 0 auto;

    /* Minimum full height */
    min-height: 100vh;

    /* Background image setup */
    background-image: url('../images/bg.jpg');
    background-size: cover;
    background-position: center top;
    /* Set top to ensure the main part of the background is visible */
    background-repeat: no-repeat;

    /* Layout for wheel content: vertical arrangement */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;

    /* Subtle shadow for depth in desktop view */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);

    /* Hide overflow and handle positioning */
    overflow: hidden;
    position: relative;
}

/* Carousel container styles */
.carousel-container {
    width: 90%;
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 15;
}

.carousel-track {
    display: flex;
    width: 500%;
    /* 5 images */
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-track img {
    width: 20%;
    /* 1/5 of track */
    height: 100%;
    object-fit: cover;
}

.game-container {
    position: relative;
    width: 100%;
    margin-top: 150px;
    /* Position the wheel assembly lower */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.wheel-wrapper {
    width: 80%;
    aspect-ratio: 1/1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wheel-frame {
    position: absolute;
    width: 120%;
    /* Frame sizing */
    height: 120%;
    z-index: 5;
    pointer-events: none;
    /* Clicks pass through */
    background-image: url('../images/pk.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* Vertical alignment adjustment */
    transform: translateY(calc(-2% - 5px));
}

.wheel-shadow-overlay {
    position: absolute;
    width: 80%;
    height: 80%;
    z-index: 4;
    pointer-events: none;
    border-radius: 50%;
    /* Gradient overlay for depth */
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.6) 0%, transparent 40%, rgba(0, 0, 0, 0.05) 60%, rgba(0, 0, 0, 0.2) 80%, rgba(0, 0, 0, 0.3) 100%);
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.2);
}

.spin-button {
    position: absolute;
    width: 25%;
    height: 25%;
    z-index: 10;
    cursor: pointer;
    background-image: url('../images/center_button.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.1s;
}

.spin-button:active {
    transform: scale(0.95);
}

.spin-text {
    color: white;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Pointer positioned at the top center */
.wheel-pointer {
    position: absolute;
    top: 10px;
    /* Vertical positioning adjustments */
    left: 50%;
    /* Horizontal centering */
    transform: translateX(-50%);
    /* Exact centering */
    width: 30px;
    /* Adjust width based on image aspect ratio */
    height: auto;
    z-index: 10;
    /* Above the wheel canvas */
    pointer-events: none;
    /* Prevent interaction interference */
}

.wheel-base {
    position: absolute;
    bottom: -45px;
    /* Positioned below to appear as holding the wheel */
    left: 50%;
    transform: translateX(-50%);
    /* Exact centering */
    width: 100%;
    /* Slightly wider than the wheel */
    z-index: 5;
    /* Layered behind other components */
}

/* --- Victory Popup Styles --- */

.alertBox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.alert-show {
    display: flex !important;
}

.popBox {
    width: 90%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.popBox img {
    width: 100%;
    height: auto;
    cursor: pointer;
}