* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Nunito', sans-serif;
    overflow: hidden;
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#app {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container {
    width: 100%;
    height: 100%;
}

/* Menu Styles */
#menu-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 10% 0;
    width: 100%;
    height: 100%;
}

.logo-container {
    position: relative;
    width: 280px;
    height: 120px;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Responsive logo sizing */
@media (min-width: 768px) {
    .logo-container {
        width: 350px;
        height: 150px;
        margin-bottom: 40px;
    }
}

@media (min-width: 1200px) {
    .logo-container {
        width: 400px;
        height: 180px;
    }
}

.logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0; /* Start with 0 opacity */
    transition: opacity 0.3s ease; /* Smooth transition when image loads */
}

.logo.loaded {
    opacity: 1;
}

.instruction-container {
    position: relative;
    width: 90%;
    max-width: 400px;
    height: 50vh;
    max-height: 400px;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
}

.title-container {
    position: relative;
    top: -50px;
    width: 80%;
    border-radius: 25px;
    padding: 10px 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.title-text {
    font-size: 26px;
}

.instruction-text {
    margin-top: 40px;
    text-align: center;
    font-size: 20px;
    line-height: 1.5;
    padding: 0 20px;
}

.button-container {
    width: 90%;
    max-width: 360px;
    margin-top: 20px;
}

.play-button {
    width: 100%;
    height: 46px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
    border: none;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 1);
}

.play-button:hover {
    opacity: 0.8;
}

/* Loading Styles */
.game-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loader-container {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 5px solid #f5f5f5;
    border-top: 5px solid #999999;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.logo-placeholder {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

/* Responsive logo sizing for loader */
@media (min-width: 768px) {
    .logo-placeholder {
        width: 240px;
        height: 240px;
    }
    .title-text {
        font-size: 36px;
    }
    .instruction-text {
        font-size: 25px;
    }
}

@media (min-width: 1200px) {
    .logo-placeholder {
        width: 280px;
        height: 280px;
    }
}

.game-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-logo.loaded {
    opacity: 1;
}

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

/* Logo spinner */
.logo-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid #666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

.loader-logo-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}