* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    color: #fff;
    overflow: hidden;
}

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}

.screen.hidden {
    display: none;
}

.landing-content {
    text-align: center;
    padding: 3rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 1.5rem;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    }
    to {
        box-shadow: 0 0 40px rgba(0, 255, 255, 0.5);
    }
}

h1 {
    font-size: 4rem;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, #00ffff, #0099ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    animation: titlePulse 2s ease-in-out infinite alternate;
}

@keyframes titlePulse {
    from {
        text-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    }
    to {
        text-shadow: 0 0 40px rgba(0, 255, 255, 0.5);
    }
}

.input-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

input {
    padding: 1rem;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #00ffff;
    border-radius: 0.8rem;
    color: #fff;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
}

input:focus {
    outline: none;
    border-color: #0099ff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    transform: scale(1.02);
}

button {
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    background: linear-gradient(45deg, #00ffff, #0099ff);
    border: none;
    border-radius: 0.8rem;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.5);
}

button:active {
    transform: scale(0.98);
}

#game-screen {
    position: relative;
    width: 100%;
    height: 100%;
}

#game-ui {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 300px;
}

#player-info {
    background: rgba(0, 0, 0, 0.8);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border: 1px solid rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

#sponsor-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#sponsor-logo img {
    height: 24px;
    width: auto;
}

#player-display {
    color: #00ffff;
    font-weight: bold;
}

#timer, #score {
    font-family: monospace;
    font-size: 0.9rem;
    color: #fff;
}

#nearest-lagrange {
    color: #00ff00;
    font-size: 0.9rem;
}

#balance-status {
    color: #ffd700;
    font-size: 0.9rem;
}

#sponsor-satisfaction {
    color: #00ffff;
    font-size: 0.9rem;
    font-weight: bold;
}

#controls-hint {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.8rem;
    text-align: center;
    border: 1px solid rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

#controls-hint p {
    margin: 0.2rem 0;
    color: rgba(255, 255, 255, 0.9);
}

.mission-box {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.75rem;
    border-radius: 8px;
    max-width: 250px;
    border: 1px solid rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.mission-box h3 {
    color: #ffd700;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.mission-box p {
    font-size: 0.8rem;
    margin: 0.3rem 0;
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .landing-content {
        padding: 2rem;
        margin: 1rem;
    }

    #game-ui {
        max-width: 250px;
    }

    #player-info {
        font-size: 0.8rem;
        padding: 0.5rem;
    }

    #sponsor-logo img {
        height: 20px;
    }

    #controls-hint {
        display: none;
    }
}

@media (min-width: 769px) {
    #joystick-container {
        display: none;
    }
}

.game-description {
    margin: 1rem 0 2rem 0;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.game-description p {
    margin: 0.5rem 0;
}

#win-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.win-content {
    background: rgba(0, 0, 0, 0.9);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
    animation: appear 0.5s ease-out;
}

@keyframes appear {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.win-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #00ffff, #0099ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.win-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.hidden {
    display: none !important;
}

/* Sponsor Selection Screen */
.sponsor-content {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    margin: 0 auto;
    overflow-y: auto;
    max-height: 100vh;
    box-sizing: border-box;
}

.sponsor-content h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

#sponsor-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
}

.sponsor-card {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    height: 100%;
    box-sizing: border-box;
}

.sponsor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    border-color: rgba(0, 255, 255, 0.4);
}

.sponsor-card img.sponsor-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.sponsor-card h3 {
    font-size: 1.5rem;
    color: #ffd700;
    text-align: center;
    margin: 0.5rem 0;
}

.sponsor-card p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    font-size: 0.9rem;
    text-align: center;
    margin: 0;
}

.sponsor-card .mission-objectives,
.sponsor-card .special-abilities {
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.sponsor-card h4 {
    color: #00ffff;
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
}

.sponsor-card button.select-sponsor {
    margin-top: auto;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(45deg, #00ffff, #0099ff);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sponsor-card button.select-sponsor:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

/* Responsive styles */
@media (max-width: 1200px) {
    .sponsor-content {
        padding: 1.5rem;
    }

    #sponsor-cards {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .sponsor-content {
        padding: 1rem;
    }

    .sponsor-content h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    #sponsor-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.5rem;
    }

    .sponsor-card {
        padding: 1rem;
    }

    .sponsor-card img.sponsor-logo {
        width: 80px;
        height: 80px;
        padding: 0.5rem;
    }

    .sponsor-card h3 {
        font-size: 1.2rem;
    }

    .sponsor-card p {
        font-size: 0.85rem;
    }

    .sponsor-card .mission-objectives,
    .sponsor-card .special-abilities {
        padding: 0.8rem;
    }

    .sponsor-card h4 {
        font-size: 0.9rem;
    }

    .sponsor-card button.select-sponsor {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .sponsor-content h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .sponsor-card {
        padding: 0.8rem;
    }

    .sponsor-card img.sponsor-logo {
        width: 60px;
        height: 60px;
    }

    .sponsor-card h3 {
        font-size: 1.1rem;
    }

    .sponsor-card p {
        font-size: 0.8rem;
    }
}

/* Handle landscape orientation on mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .sponsor-content {
        padding: 0.5rem;
        display: flex;
        flex-direction: column;
    }

    .sponsor-content h2 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    #sponsor-cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 0.5rem;
    }

    .sponsor-card {
        padding: 0.8rem;
    }

    .sponsor-card img.sponsor-logo {
        width: 50px;
        height: 50px;
        padding: 0.3rem;
    }

    .sponsor-card .mission-objectives,
    .sponsor-card .special-abilities {
        padding: 0.5rem;
    }
}

#joystick-container-left,
#joystick-container-right {
    position: absolute;
    bottom: 5rem;
    z-index: 100;
    width: 120px;
    height: 120px;
}

/* Left joystick */
#joystick-container-left {
    left: 2rem;
}

/* Right joystick */
#joystick-container-right {
    right: 2rem;
}

/* Control hints visibility */
.desktop-controls {
    display: none;  /* Hidden by default */
}

.mobile-controls {
    display: block;  /* Visible by default */
}

/* Show desktop controls on larger screens */
@media (min-width: 769px) {
    .desktop-controls {
        display: block;
    }
    
    .mobile-controls {
        display: none;
    }
}

#mission-objectives {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 300px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    color: white;
    font-size: 14px;
}

.mission-box {
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.mission-box h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.mission-box p {
    margin: 5px 0;
    font-size: 12px;
}

/* Adjust for larger screens */
@media (min-width: 769px) {
    #mission-objectives {
        position: static;
        max-width: none;
        margin: 20px;
    }
}

/* Overlay styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.5s ease-out;
}

.overlay-content {
    background: rgba(0, 0, 0, 0.7);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    animation: slideUp 0.5s ease-out;
    max-width: 90%;
    width: 500px;
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.overlay h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #00ffff, #0099ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.overlay .game-description {
    margin: 1.5rem 0;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.overlay .input-container {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 2rem;
}

.overlay input {
    padding: 1rem;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #00ffff;
    border-radius: 0.8rem;
    color: #fff;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
}

.overlay input:focus {
    outline: none;
    border-color: #0099ff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    transform: scale(1.02);
}

.overlay button {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    background: linear-gradient(45deg, #00ffff, #0099ff);
    border: none;
    border-radius: 0.8rem;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.overlay button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.5);
}

.overlay button:active {
    transform: scale(0.98);
}

/* Responsive styles for overlay */
@media (max-width: 768px) {
    .overlay h1 {
        font-size: 2rem;
    }

    .overlay-content {
        padding: 1.5rem;
        margin: 1rem;
    }

    .overlay .game-description {
        font-size: 1rem;
    }

    .overlay input {
        font-size: 1rem;
        padding: 0.8rem;
    }

    .overlay button {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
}

/* Music Player UI */
.music-player {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 25px;
    padding: 8px;
    color: white;
    font-family: 'Arial', sans-serif;
    z-index: 1000;
    transition: all 0.3s ease;
    width: 40px;
    overflow: hidden;
}

.music-player.expanded {
    width: 220px;
}

.music-player button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.music-player button:hover {
    background: rgba(0, 255, 255, 0.1);
    transform: scale(1.1);
}

.player-controls {
    display: none;
    flex-direction: column;
    gap: 8px;
}

.music-player.expanded .player-controls {
    display: flex;
}

.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.volume-control {
    width: 100%;
    padding: 0 8px;
}

.volume-slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: cyan;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: cyan;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

@media (max-width: 768px) {
    .music-player {
        top: 10px;
    }
    
    .music-player.expanded {
        width: 200px;
    }
}

/* Animations */
@keyframes glow {
    0% {
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
    }
    100% {
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    }
}

.music-player {
    animation: glow 3s infinite;
}

.social-anchor {
    position: fixed;
    bottom: -1px;
    left: -1px;
    padding: 7px 14px;
    font-family: 'system-ui', sans-serif;
    font-size: 14px;
    font-weight: bold;
    background: #fff;
    color: #000;
    z-index: 10000;
    border: 1px solid #fff;
    border-radius: 0 12px 0 0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.social-anchor:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    padding: 25px;
    color: white;
    font-family: 'Arial', sans-serif;
    z-index: 100000;
    min-width: 300px;
}

.social-modal.show {
    display: block;
    animation: modalFadeIn 0.3s ease;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 99999;
}

.modal-overlay.show {
    display: block;
}

.social-modal h2 {
    margin: 0 0 20px 0;
    color: cyan;
    text-align: center;
    font-size: 1.5em;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(0, 255, 255, 0.2);
    transform: translateX(5px);
}

.social-link img {
    width: 24px;
    height: 24px;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Ensure the landing screen doesn't overlap */
#landing-screen {
    z-index: 1000;
}

.screen {
    z-index: 1000;
} 