* {
    box-sizing: border-box;
}


.noto-sans-imperial {
    font-family: "Noto Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-variation-settings:
      "wdth" 100;
    letter-spacing: 0.05em;
}

body {
    margin: 0;
    padding: 0;
    background-color: #000;
    color: #fff;
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Stars background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 4px 1px rgba(255, 255, 255, 0.4);
    animation: twinkle var(--duration, 4s) infinite ease-in-out var(--delay, 0s);
}

@keyframes twinkle {
    0%, 100% { opacity: 0.1; }
    50% { opacity: var(--brightness, 1); }
}

/* Fog effect around planet */
.planet-fog {
    position: absolute;
    width: clamp(250px, 70vw, 550px);
    height: clamp(250px, 70vw, 550px);
    border-radius: 50%;
    background: radial-gradient(
        circle at center,
        rgba(100, 170, 255, 0.3) 0%,
        rgba(100, 170, 255, 0.2) 35%,
        rgba(100, 170, 255, 0.1) 60%,
        rgba(100, 170, 255, 0) 80%
    );
    top: 50%;
    left: calc(50% - 170px);
    transform: translate(-50%, -50%);
    z-index: 0;
    filter: blur(25px);
    animation: fog-pulse 8s infinite alternate ease-in-out;
    pointer-events: none;
}

@keyframes fog-pulse {
    0% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.15);
    }
}

.start-screen {
    text-align: center;
    width: 90%;
    max-width: 600px;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.title-container {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
    z-index: 3;
}

.title-container h1 {
    position: relative;
    z-index: 5;
    margin: 0;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: rgba(240, 240, 240, 0.95);
}

.bg-planet {
    position: absolute;
    width: clamp(159px, 47.7vw, 397px);
    height: auto;
    z-index: 0;
    opacity: 1;
    top: 50%;
    left: calc(50% - 170px);
    transform: translate(-50%, -50%);
    animation: planet-spin 180s linear infinite;
}

@keyframes planet-spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Fighter base styles */
.fighter {
    position: absolute;
    width: auto;
    height: auto;
    z-index: 1;
    opacity: 1;
    transform-origin: center center;
    /* Add black outline */
    filter: drop-shadow(0 0 1px #000) drop-shadow(0 0 1px #000) drop-shadow(0 0 1px #000);
}

/* Individual fighter positioning and animations */
.fighter-1 {
    top: 25%;
    left: 31%;
    transform: translate(-50%, -50%) scale(0.7);
    animation: fighter-flight 15s infinite ease-in-out;
    --scale: 0.7;
}

.fighter-2 {
    top: 30%;
    left: 42%;
    transform: translate(-50%, -50%);
    animation: fighter-flight 15s infinite ease-in-out 0.5s;
    --scale: 1;
    z-index: 10; /* Higher z-index to position in front of title */
}

.fighter-3 {
    top: 25%;
    left: 53%;
    transform: translate(-50%, -50%) scale(0.6);
    animation: fighter-flight 15s infinite ease-in-out 1s;
    --scale: 0.6;
}

@keyframes fighter-flight {
    0% { 
        transform: translate(-50%, -50%) scale(var(--scale, 1)); 
    }
    25% { 
        transform: translate(-47%, -45%) scale(var(--scale, 1)) rotate(-1deg); 
    }
    50% { 
        transform: translate(-53%, -52%) scale(var(--scale, 1)); 
    }
    75% { 
        transform: translate(-48%, -54%) scale(var(--scale, 1)) rotate(1deg); 
    }
    100% { 
        transform: translate(-50%, -50%) scale(var(--scale, 1)); 
    }
}

h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    margin-bottom: clamp(20px, 5vh, 40px);
    letter-spacing: 0.15em;
    text-shadow: 
        /* Downward streaks */
        0 1px 0 rgba(120, 120, 120, 0.3),
        0 2px 0 rgba(120, 120, 120, 0.27),
        0 3px 0 rgba(120, 120, 120, 0.24),
        0 4px 0 rgba(120, 120, 120, 0.21),
        0 5px 0 rgba(120, 120, 120, 0.18),
        0 6px 0 rgba(120, 120, 120, 0.15),
        0 7px 0 rgba(120, 120, 120, 0.12),
        0 8px 0 rgba(120, 120, 120, 0.09),
        0 9px 0 rgba(120, 120, 120, 0.06),
        0 10px 0 rgba(120, 120, 120, 0.03),
        /* Upward streaks */
        0 -1px 0 rgba(120, 120, 120, 0.3),
        0 -2px 0 rgba(120, 120, 120, 0.27),
        0 -3px 0 rgba(120, 120, 120, 0.24),
        0 -4px 0 rgba(120, 120, 120, 0.21),
        0 -5px 0 rgba(120, 120, 120, 0.18),
        0 -6px 0 rgba(120, 120, 120, 0.15),
        0 -7px 0 rgba(120, 120, 120, 0.12),
        0 -8px 0 rgba(120, 120, 120, 0.09),
        0 -9px 0 rgba(120, 120, 120, 0.06),
        0 -10px 0 rgba(120, 120, 120, 0.03),
        /* Subtle glow */
        0 0 5px rgba(255, 255, 255, 0.4);
    font-family: "Noto Sans", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(240, 240, 240, 0.95);
    white-space: nowrap;
    position: relative;
    text-align: center;
    z-index: 2;
    filter: blur(0.3px);
    -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.8);
}

h1::after {
    content: none;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: clamp(10px, 4vw, 20px);
    flex-wrap: wrap;
    position: relative;
    z-index: 20;
}

.btn {
    background-color: #222233;
    color: #AAAAFF;
    border: 2px solid #AAAAFF;
    padding: clamp(8px, 2vw, 10px) clamp(20px, 5vw, 30px);
    font-size: clamp(1rem, 4vw, 1.2rem);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    position: relative;
    z-index: 20;
    text-decoration: none; /* Remove underlines */
    display: inline-block; /* Ensure proper box model for anchor tags */
}

.btn:hover, .btn:active {
    background-color: #AAAAFF;
    color: #222233;
}

/* Flying icon easter egg */
.flying-icon {
    position: fixed;
    z-index: 100;
    pointer-events: none;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 200;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #111122;
    border: 2px solid #AAAAFF;
    max-width: 450px;
    width: 90%;
    padding: 30px;
    border-radius: 5px;
    position: relative;
    color: #fff;
    box-shadow: 0 0 15px rgba(100, 150, 255, 0.3);
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #AAAAFF;
}

.close-button:hover {
    color: #fff;
}

.modal h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #AAAAFF;
    font-family: "Noto Sans", sans-serif;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    background-color: #1a1a2a;
    border: 1px solid #444455;
    color: #fff;
    font-size: 16px;
    border-radius: 3px;
}

.form-group input:focus {
    outline: none;
    border-color: #AAAAFF;
    box-shadow: 0 0 5px rgba(170, 170, 255, 0.5);
}

.form-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.form-actions .btn {
    width: 100%;
    max-width: 200px;
}

.reset-link {
    color: #AAAAFF;
    text-decoration: none;
    font-size: 14px;
}

.reset-link:hover {
    text-decoration: underline;
    color: #fff;
}

#login-status {
    color: #ff5555;
    font-size: 14px;
    text-align: center;
    margin-bottom: 10px;
    width: 100%;
}

/* For very small screens */
@media (max-width: 350px) {
    .buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .bg-planet {
        width: clamp(119px, 35vw, 238px);
        opacity: 0.8;
        left: 22%; /* Move it to the left side */
        top: 50%;
        transform: translate(-50%, -50%);
        display: block; /* Ensure it's visible */
    }
    
    .planet-fog {
        width: clamp(140px, 40vw, 260px);
        height: clamp(140px, 40vw, 260px);
        left: 22%;
        top: 50%;
        transform: translate(-50%, -50%);
        opacity: 0.8;
    }

    /* Position fighters higher on mobile screens */
    .fighter-1 {
        top: 10%;
        left: 20%; /* Left fighter */
    }

    .fighter-2 {
        top: 15%;
        left: 40%; /* Center fighter */
    }

    .fighter-3 {
        top: 10%;
        left: 60%; /* Right fighter */
    }
    
    /* Maintain animations with the new positions */
    @keyframes fighter-flight {
        0% { 
            transform: translate(-50%, -50%) scale(var(--scale, 1)); 
        }
        25% { 
            transform: translate(-47%, -45%) scale(var(--scale, 1)) rotate(-1deg); 
        }
        50% { 
            transform: translate(-53%, -52%) scale(var(--scale, 1)); 
        }
        75% { 
            transform: translate(-48%, -54%) scale(var(--scale, 1)) rotate(1deg); 
        }
        100% { 
            transform: translate(-50%, -50%) scale(var(--scale, 1)); 
        }
    }
    
    @keyframes fog-pulse {
        0% {
            opacity: 0.7;
            transform: translate(-50%, -50%) scale(1);
        }
        100% {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1.1);
        }
    }
}

/* Hypersleep container and status */
.hypersleep-container {
    text-align: center;
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
    z-index: 50;
}

.hypersleep-status {
    font-family: 'Courier New', monospace;
    color: #AAAAFF;
    font-size: clamp(0.8rem, 3vw, 1rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.8;
    display: inline-block;
    text-align: left;
}

/* Credits section */
.credits {
    position: absolute;
    top: 83vh;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(170, 170, 255, 0.7);
    font-family: "Noto Sans", sans-serif;
    z-index: 10;
}

.credits p {
    margin: 0;
    padding: 5px;
}

/* Styling for the Ko-fi support link */
.support-link {
    color: #AAAAFF;
    text-decoration: none;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: rgba(20, 20, 50, 0.6);
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-block;
    margin: 0 2px;
}

.support-link:hover, .support-link:focus {
    background-color: rgba(40, 40, 100, 0.8);
    color: white;
    box-shadow: 0 0 5px rgba(170, 170, 255, 0.5);
    text-decoration: none;
}

#rotating-name {
    color: rgba(220, 220, 255, 0.9);
    font-weight: 500;
    animation: name-glow 3s infinite alternate ease-in-out;
    transition: opacity 0.5s ease;
}

@keyframes name-glow {
    0% {
        text-shadow: 0 0 2px rgba(170, 170, 255, 0.5);
    }
    100% {
        text-shadow: 0 0 5px rgba(170, 170, 255, 0.9);
    }
}
