@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;700&display=swap');

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Oswald', sans-serif;
    background-color: #5ac0d9; /* New background color */
    color: white;
    position: relative;
    overflow-x: hidden;
    background-image: url('../assets/background.jpg');
    background-size: contain;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Background images layout */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: none; /* Removed old background */
    z-index: 1;
    pointer-events: none;
}

/* Slot Machine Background Image */
.slot-machine-background {
    position: fixed;
    width: 400px;
    height: 600px;
    background-image: url('../assets/slot-machine.png');
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 3;
    pointer-events: none;
    left: 49%;
    top: 54%; /* Moved down */
    transform: translate(-50%, -50%) scale(1.4);
    transform-origin: center center;
}

/* Responsive background adjustments */
@media (max-width: 768px) {
    body::before {
        background-size: 100% 40%;
    }
    .top-background-image {
        width: 100%;
        height: 75%;
        z-index: 2;
    }
}

@media (max-width: 480px) {
    body::before {
        background-size: 100% 40%;
    }
    .top-background-image {
        width: 100%;
        height: 70%;
        z-index: 2;
    }
}

@media (min-width: 1200px) {
    body::before {
        background-size: 100% 40%;
    }
    .top-background-image {
        width: 100%;
        height: 85%;
        z-index: 2;
    }
}

/* Hide scrollbar */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* New layout styles - All elements use fixed positioning for consistent control */
.main-container {
    padding: 1rem;
    gap: 1rem;
    position: fixed;
    z-index: 4;
    left: 49%;
    top: 57%; /* Moved down */
    transform: translate(-50%, -50%) scale(0.7);
    transform-origin: center center;
}

/* --- Re-added Elements --- */

.fullscreen-btn-container, .previously-drawn-container, .draw-btn-container, .reset-btn-container {
    position: fixed;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.logo-container {
    display: none; /* Hide old logo containers */
}

#event-dates-container {
    left: 72%;
    top: 14%;
    transform: translate(-50%, -50%) scale(2.4);
    transform-origin: center center;
}
#main-logo-container {
    left: 78%;
    top: 41%;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: 50% 50%;
}
#mascotte-logo-container {
    left: 49%;
    top: 27%;
    transform: translate(-50%, -50%) scale(0.6);
    transform-origin: center center;
}

#event-dates-container img {
    max-width: 200px; /* A smaller default size for the dates */
}

.fullscreen-btn-container { 
    left: 97%; 
    top: 6%; 
    transform: translate(-50%, -50%) scale(1);
    transform-origin: 50% 50%;
}
.previously-drawn-container { 
    left: 49%; 
    top: 86%; /* Moved down */
    transform: translate(-50%, -50%) scale(1.0); /* Reduced size */
    transform-origin: center center;
}
.draw-btn-container { 
    left: 56%; 
    top: 62%; 
    transform: translate(-50%, -50%) scale(1);
    transform-origin: 50% 50%;
}
.reset-btn-container { 
    left: 49%; 
    top: 96%; 
    transform: translate(-50%, -50%) scale(0.75);
    transform-origin: center center;
}

.fullscreen-btn {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #f7b733;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fullscreen-icon {
    width: 24px;
    height: 24px;
    color: #f7b733;
}

.previously-drawn-container {
    border: 2px solid #f7b733;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    padding: 15px;
    width: 600px; /* Fixed width to show ~10 numbers */
    text-align: left;
    overflow: hidden; /* Hide overflow from container */
}

#drawn-numbers-list {
    display: flex;
    flex-direction: row; /* Horizontal layout */
    flex-wrap: nowrap; /* No wrapping - single line */
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
    overflow-x: auto; /* Horizontal scrollbar */
    overflow-y: hidden; /* No vertical scroll */
    white-space: nowrap;
    scroll-behavior: smooth;
    /* Custom scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: #f7b733 rgba(0, 0, 0, 0.3);
}

/* Webkit scrollbar styling */
#drawn-numbers-list::-webkit-scrollbar {
    height: 8px;
}

#drawn-numbers-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

#drawn-numbers-list::-webkit-scrollbar-thumb {
    background: #f7b733;
    border-radius: 4px;
}

#drawn-numbers-list::-webkit-scrollbar-thumb:hover {
    background: #e6a429;
}

#drawn-numbers-list li {
    background-color: rgba(0, 0, 0, 0.7);
    color: #f7b733;
    font-weight: 700;
    border: 1px solid #f7b733;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
    flex-shrink: 0; /* Prevent shrinking */
    min-width: 40px; /* Minimum width for each number */
    text-align: center;
}

#start-draw-btn, #reset-btn {
    color: white;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

#start-draw-btn {
    background: linear-gradient(135deg, #f7b733, #f4a61c);
    border: 3px solid #b87d0e;
    color: #333;
}

#start-draw-btn:hover {
    background: linear-gradient(135deg, #f8c04c, #f5ae3b);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

#reset-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 20px;
    font-size: 14px;
}

#reset-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: white;
}

#quick-test-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 5px; /* Add spacing between buttons */
}

#reset-btn:hover, #quick-test-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

#quick-test-btn {
    border-color: rgba(247, 183, 51, 0.6); /* Yellow border for distinction */
    color: rgba(247, 183, 51, 0.8);
}

#quick-test-btn:hover {
    background: rgba(247, 183, 51, 0.1);
    color: #f7b733;
    border-color: #f7b733;
}

.message-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1.1em;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}


/* --- Control Menu --- */
.control-menu {
    position: fixed;
    top: 20px;
    right: -300px; /* Start off-screen */
    width: 300px;
    background-color: rgba(20, 20, 20, 0.9);
    color: white;
    border-left: 2px solid #4a90e2;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    z-index: 1000;
    transition: right 0.3s ease-in-out;
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    display: none; /* Hide the menu by default */
}

.control-menu.open {
    right: 0;
}

.menu-toggle-btn {
    position: absolute;
    top: 50%;
    left: -32px;
    transform: translateY(-50%);
    width: 30px;
    height: 60px;
    background-color: #4a90e2;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 24px;
    line-height: 60px;
    text-align: center;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.menu-content {
    padding: 20px;
    height: 90vh;
    overflow-y: auto;
}

.control-group {
    margin-bottom: 20px;
    border-bottom: 1px solid #444;
    padding-bottom: 15px;
}

.control-group h3 {
    margin-top: 0;
    color: #4a90e2;
}

.control-group label {
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
    font-size: 14px;
}

.control-group input[type="range"] {
    width: 100%;
}

.copy-btn {
    width: 100%;
    padding: 10px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
}

.copy-btn:hover {
    background-color: #218838;
}


/* --- Slot Machine --- */
.slot-machine-casing {
    padding: 1rem;
    background: transparent;
    border-radius: 20px;
}

.slot-display-area {
    gap: 1vw;
    padding: 1vw;
    background-color: #000;
    border-radius: 12px;
    border: 0.5vw solid #f7b733;
    box-shadow: 
        inset 0 0 15px rgba(0,0,0,0.8),
        0 8px 25px rgba(0,0,0,0.5);
    display: flex;
}

.slot-reel-container {
    width: 20vw;
    height: 28vw;
    max-width: 140px;
    max-height: 196px;
    overflow: hidden;
    background-color: #1a0000;
    border-radius: 8px;
}

.slot-reel {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.1s linear;
    will-change: transform;
}

.slot-digit {
    width: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18vw;
    font-weight: 700;
    -webkit-text-stroke: 0.3vw #f7b733;
    color: #f7b733;
    text-shadow: 0 0 10px #f7b733, 0 0 20px #f7b733;
    background: transparent;
}

.slot-reel.stopping {
    transition: transform 2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* --- Responsive Design --- */
@media (min-width: 768px) {
    .slot-digit {
        font-size: 130px;
        -webkit-text-stroke-width: 2px;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 0.5rem;
    }
    
    .previously-drawn-container h2 {
        font-size: 1rem;
    }
} 

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a0000 0%, #2d1e1f 50%, #1a0000 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-out;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(247, 183, 51, 0.3);
    border-top: 4px solid #f7b733;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

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

.loader-text {
    font-size: 2rem;
    font-weight: bold;
    color: #f7b733;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.loader-subtext {
    font-size: 1.1rem;
    color: #f8c858;
    opacity: 0.8;
}

/* Hide all content until loaded */
body.loading .main-container,
body.loading .top-background-image,
body.loading .slot-machine-background,
body.loading .control-menu {
    opacity: 0;
    visibility: hidden;
}

body.loaded .main-container,
body.loaded .top-background-image,
body.loaded .slot-machine-background,
body.loaded .control-menu {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-in;
} 

/* Basic utility classes to replace Tailwind CDN */
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.p-4 { padding: 1rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.max-w-4xl { max-width: 56rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.overflow-x-auto { overflow-x: auto; }
.text-center { text-align: center; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.transform { transform: translateZ(0); }
.transition-all { transition-property: all; }
.transition-opacity { transition-property: opacity; }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }
.ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.hover\:scale-105:hover { transform: scale(1.05); }
.hover\:scale-110:hover { transform: scale(1.1); }
.active\:scale-95:active { transform: scale(0.95); }
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }
.h-6 { height: 1.5rem; }
.flex-1 { flex: 1 1 0%; }
.flex-grow { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-wrap { flex-wrap: wrap; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; } 