@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@600;800;900&family=Roboto:wght@500;700&display=swap');

html, body {
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #0b132b;
    font-family: 'Outfit', 'Roboto', sans-serif;
}

#game-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #0b132b;
}

#game-canvas {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

#loading-view {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 30px 40px;
    background: radial-gradient(circle at 50% 30%, rgba(26, 46, 85, 0.85) 0%, rgba(11, 19, 43, 0.95) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 28px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 180, 255, 0.2);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#game-logo {
    width: 200px;
    height: 200px;
    border-radius: 22px;
    background-image: url('game-logo.jpg');
    background-size: cover;
    background-position: center;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 20px rgba(77, 198, 255, 0.35);
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    margin-bottom: 16px;
    animation: pulseLogo 3s infinite ease-in-out;
}

@keyframes pulseLogo {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

#loading-game-name {
    margin: 0 0 18px 0;
    text-align: center;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 0.5px;
    background: linear-gradient(180deg, #FFFFFF 0%, #D4F1FF 50%, #68C8FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(0, 140, 255, 0.5));
}

.progress {
    background: rgba(8, 14, 30, 0.85);
    border: 1.5px solid rgba(80, 180, 255, 0.35);
    border-radius: 100px;
    height: 14px;
    width: 320px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

.loading-progress-bar {
    border-radius: 100px;
    background: linear-gradient(90deg, #00C875 0%, #00E5FF 55%, #3B82F6 100%);
    height: 100%;
    width: 0%;
    box-shadow: 0 0 14px rgba(0, 229, 255, 0.8);
    transition: width 0.25s ease-out;
}

#loading-percent {
    margin-top: 10px;
    color: #94A3B8;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.noselect {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

@media only screen and (max-width: 600px) {
    #loading-view {
        padding: 24px 28px;
        width: 82%;
        max-width: 320px;
    }
    #game-logo {
        width: 160px;
        height: 160px;
    }
    #loading-game-name {
        font-size: 21px;
    }
    .progress {
        width: 100%;
    }
}

/* Glassmorphic Toast Notifications for Ads & Rewards */
#ad-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-40px);
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #FFFFFF;
    padding: 13px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.3px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.65), 0 0 25px rgba(0, 180, 255, 0.3);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.35s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 90vw;
    text-align: center;
    box-sizing: border-box;
}

#ad-toast.ad-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

#ad-toast.ad-toast-warning {
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.65), 0 0 25px rgba(245, 158, 11, 0.45);
    background: linear-gradient(135deg, rgba(35, 24, 12, 0.96), rgba(50, 28, 8, 0.94));
    color: #FDE68A;
}

#ad-toast.ad-toast-error {
    border-color: rgba(239, 68, 68, 0.7);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.65), 0 0 25px rgba(239, 68, 68, 0.45);
    background: linear-gradient(135deg, rgba(40, 12, 18, 0.96), rgba(55, 15, 25, 0.94));
    color: #FECACA;
}

#ad-toast.ad-toast-success {
    border-color: rgba(16, 185, 129, 0.7);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.65), 0 0 25px rgba(16, 185, 129, 0.45);
    background: linear-gradient(135deg, rgba(10, 35, 25, 0.96), rgba(12, 45, 30, 0.94));
    color: #A7F3D0;
}

.ad-toast-icon {
    font-size: 19px;
    flex-shrink: 0;
}

.ad-toast-text {
    line-height: 1.3;
}

/* Branding Logo Overlay */
.branding-overlay {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.branding-logo {
    height: clamp(20px, 3.6vh, 34px);
    width: auto;
    max-width: min(240px, 85vw);
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 5px rgba(0, 0, 0, 0.6));
    opacity: 0.92;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

