
@font-face {
    font-family: 'Mars (TT)';
    src: url('Mars.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body { 
    padding: 0; 
    margin: 0; 
    font-family: 'Mars (TT)', sans-serif;
    background-image: url('poster.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
}

/* Unity Container */
#unity-container { position: absolute; }
#unity-container.unity-desktop {
    left: 50%; 
    transform: translateX(-50%);
    border-radius: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    background-color: black;
    padding: .5rem;
    border: 2.5px dotted #0d7377;
}
#unity-container.unity-mobile { 
    position: fixed; 
    width: 100%; 
    height: 100%; 
}

/* Unity Canvas */
#unity-canvas { background: #231F20; }
.unity-mobile #unity-canvas { 
    width: 100%; 
    height: 100%; 
}

/* Loading Bar */
#unity-loading-bar { 
    position: absolute; 
    left: 50%; 
    top: 50%; 
    transform: translate(-50%, -50%); 
    display: none;
}

/* Logos & Progress Bar */
#unity-logo { 
    width: 154px; 
    height: 130px; 
    background: url('unity-logo-dark.png') no-repeat center; 
}
#unity-progress-bar-empty { 
    width: 141px; 
    height: 18px; 
    margin-top: 10px; 
    margin-left: 6.5px; 
    background: url('progress-bar-empty-dark.png') no-repeat center;
}
#unity-progress-bar-full { 
    width: 0%; 
    height: 18px; 
    margin-top: 10px; 
    background: url('progress-bar-full-dark.png') no-repeat center;
}

/* Footer */
#unity-footer { position: relative; }
.unity-mobile #unity-footer { display: none; }
#unity-webgl-logo { 
    float: left; 
    width: 204px; 
    height: 38px; 
    background: url('webgl-logo.png') no-repeat center;
}
#unity-build-title { 
    float: right; 
    margin-right: 10px; 
    line-height: 38px; 
    font-family: 'Mars (TT)', sans-serif; 
    font-size: 18px;
    color: white;
    font-weight: bold;
}
#unity-fullscreen-button { 
    cursor: pointer; 
    float: right; 
    width: 38px; 
    height: 38px; 
    background: url('fullscreen-button.png') no-repeat center;
}
#unity-warning { 
    position: absolute; 
    left: 50%; 
    top: 5%; 
    transform: translate(-50%); 
    background: white; 
    padding: 10px; 
    display: none;
}

/* ======= CUSTOM MODAL STYLING ======= */
#custom-modal {
    display: none; /* Hidden by default */
    position: fixed; 
    z-index: 1000; 
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    background-color: rgba(17, 25, 37, 0.9); /* Transparent dark theme */
    border: 2px solid #9dffed; 
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    font-family: 'Mars (TT)', sans-serif;
    color: #9dffed;
    box-shadow: 0 0 15px rgba(157, 255, 237, 0.8);
}

/* Modal Header */
#custom-modal h2 {
    margin: 0;
    font-size: 20px;
    color: #9dffed;
}

/* Modal Body */
#custom-modal p {
    margin: 10px 0;
    font-size: 16px;
    line-height: 1.4;
}

/* Modal Close Button */
#custom-modal .close-modal {
    background: #9dffed;
    color: #111925;
    border: none;
    padding: 10px 20px;
    margin-top: 10px;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    transition: 0.3s;
}
#custom-modal .close-modal:hover {
    background: #73cfc0;
}

/* ======= MOON THEME LOADING SCREEN ======= */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(180deg, #0a0a1a 0%, #1a1a2e 50%, #16213e 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Mars (TT)', sans-serif;
    overflow: hidden;
}

.loading-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Animated Stars */
.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, #fff, transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, #fff, transparent),
        radial-gradient(2px 2px at 160px 30px, #fff, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 4s linear infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Moon */
.moon-container {
    position: absolute;
    top: 20%;
    right: 15%;
    width: 200px;
    height: 200px;
}

.moon {
    position: relative;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 50%, #d0d0d0 100%);
    border-radius: 50%;
    box-shadow: 
        0 0 50px rgba(245, 245, 245, 0.3),
        inset -20px -20px 40px rgba(0, 0, 0, 0.1);
    animation: moonRotate 20s linear infinite;
}

.moon-glow {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(157, 255, 237, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

.crater {
    position: absolute;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
}

.crater-1 {
    width: 30px;
    height: 30px;
    top: 50px;
    left: 60px;
}

.crater-2 {
    width: 20px;
    height: 20px;
    top: 90px;
    left: 120px;
}

.crater-3 {
    width: 15px;
    height: 15px;
    top: 130px;
    left: 80px;
}

.mining-indicator {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 50px;
    overflow: hidden;
}

.mining-beam {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(157, 255, 237, 0.8) 0%, transparent 100%);
    animation: miningPulse 2s ease-in-out infinite;
}

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

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

@keyframes miningPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Earth */
.earth-container {
    position: absolute;
    bottom: 10%;
    left: 10%;
    width: 120px;
    height: 120px;
}

.earth {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #4a90e2 0%, #2c5aa0 50%, #1e3a8a 100%);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(74, 144, 226, 0.3);
}

.earth::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 10%;
    width: 30%;
    height: 40%;
    background: #22c55e;
    border-radius: 50% 20% 80% 30%;
    opacity: 0.8;
}

.earth::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20%;
    width: 25%;
    height: 35%;
    background: #22c55e;
    border-radius: 20% 50% 30% 80%;
    opacity: 0.8;
}

/* Loading Content */
.loading-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: #9dffed;
    max-width: 600px;
    padding: 0 20px;
}

.logo-container {
    margin-bottom: 40px;
}

.game-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 0 20px rgba(157, 255, 237, 0.5);
    background: linear-gradient(45deg, #9dffed, #ffffff, #9dffed);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleShimmer 3s ease-in-out infinite;
}

.tagline {
    font-size: 1.2rem;
    color: #9dffed;
    margin-top: 10px;
    opacity: 0.8;
}

@keyframes titleShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Progress Bar */
.loading-progress {
    margin: 40px 0;
}

.progress-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 25px;
    padding: 8px;
    border: 2px solid rgba(157, 255, 237, 0.3);
    position: relative;
    overflow: hidden;
}

.progress-bar {
    position: relative;
    height: 20px;
    background: rgba(157, 255, 237, 0.1);
    border-radius: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #9dffed, #73cfc0, #9dffed);
    background-size: 200% 100%;
    border-radius: 15px;
    width: 0%;
    transition: width 0.5s ease;
    animation: progressGlow 2s ease-in-out infinite;
}

.progress-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(157, 255, 237, 0.3), transparent);
    animation: progressSweep 2s linear infinite;
}

@keyframes progressGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes progressSweep {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    margin-top: 15px;
    font-size: 1.1rem;
    color: #9dffed;
    text-shadow: 0 0 10px rgba(157, 255, 237, 0.3);
}

/* Loading Steps */
.loading-steps {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    flex-wrap: wrap;
    gap: 20px;
}

.step {
    flex: 1;
    min-width: 120px;
    text-align: center;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.step.active {
    opacity: 1;
    transform: scale(1.05);
}

.step.completed {
    opacity: 1;
    color: #22c55e;
}

.step-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.step.active .step-icon,
.step.completed .step-icon {
    filter: grayscale(0%);
    animation: bounce 1s ease-in-out;
}

.step-text {
    font-size: 0.9rem;
    line-height: 1.3;
}

@keyframes bounce {
    0%, 20%, 60%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    80% { transform: translateY(-5px); }
}

/* Tips */
.tips-container {
    margin-top: 30px;
}

.tip {
    background: rgba(157, 255, 237, 0.1);
    border: 1px solid rgba(157, 255, 237, 0.3);
    border-radius: 10px;
    padding: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
    animation: tipFade 8s ease-in-out infinite;
}

@keyframes tipFade {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .moon-container {
        width: 150px;
        height: 150px;
        top: 15%;
        right: 10%;
    }
    
    .moon {
        width: 150px;
        height: 150px;
    }
    
    .earth-container {
        width: 80px;
        height: 80px;
    }
    
    .earth {
        width: 80px;
        height: 80px;
    }
    
    .game-title {
        font-size: 2.5rem;
    }
    
    .loading-steps {
        flex-direction: column;
        align-items: center;
    }
    
    .step {
        margin-bottom: 20px;
    }
}