body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: radial-gradient(circle at center, #101a30 0%, #050510 100%);
    color: #ffffff;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    user-select: none;
}


/* Landing Page Overlay */
#landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Changed to start for scrolling */
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    transition: opacity 0.5s ease;
    overflow-y: auto;
    /* Allow scrolling on small screens */
    padding: 40px 20px;
    box-sizing: border-box;
}

header {
    text-align: center;
    margin-bottom: 20px;
    animation: fadeInDown 0.8s ease-out;
    flex-shrink: 0;
}

.logo {
    font-size: clamp(40px, 15vw, 80px);
    /* Responsive font size */
    font-weight: 900;
    letter-spacing: 15px;
    margin: 0;
    background: linear-gradient(135deg, #00ffaa 0%, #00ccff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(0, 255, 170, 0.3));
}

.tagline {
    font-size: clamp(12px, 4vw, 18px);
    color: #aaddff;
    letter-spacing: 4px;
    text-transform: uppercase;
}

#damage-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 50%, rgba(255, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.1s;
}

.landing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    animation: fadeInUp 1s ease-out;
    width: 90%;
    max-width: 1000px;
}

.play-box {
    background: rgba(255, 255, 255, 0.05);
    padding: clamp(30px, 5vw, 50px);
    border-radius: 32px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.play-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 170, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.play-box input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    color: white;
    font-size: 18px;
    text-align: center;
    outline: none;
    transition: border-color 0.3s;
    width: 100%;
    box-sizing: border-box;
}

.play-box input:focus {
    border-color: #00ffaa;
}

#play-btn {
    background: linear-gradient(135deg, #00ffaa 0%, #00cc88 100%);
    border: none;
    padding: 15px;
    border-radius: 12px;
    color: #050510;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 255, 170, 0.3);
}

#play-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 255, 170, 0.5);
}

.game-info {
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 16px;
    width: 100%;
    box-sizing: border-box;
}

.game-info h3 {
    margin-top: 0;
    color: #00ffaa;
    font-size: 18px;
}

.game-info p {
    font-size: 14px;
    line-height: 1.5;
}

.extended-info {
    margin-top: 20px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: left;
    animation: fadeInUp 1.2s ease-out;
}

@media (max-width: 1024px) {
    .extended-info {
        gap: 35px;
    }
}

@media (max-width: 768px) {
    .extended-info {
        gap: 30px;
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .extended-info {
        gap: 25px;
        margin-top: 10px;
    }
}

.info-block {
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 170, 0.1);
    transition: all 0.3s ease;
}

.info-block:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 255, 170, 0.3);
}

.info-block h2 {
    color: #00ffaa;
    font-size: 24px;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(0, 255, 170, 0.3);
    padding-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-block p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    font-size: 14px;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .info-block {
        padding: 15px;
    }

    .info-block h2 {
        font-size: 20px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .info-block p {
        font-size: 13px;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .info-block {
        padding: 12px;
        border-radius: 8px;
    }

    .info-block h2 {
        font-size: 18px;
        margin-bottom: 10px;
        padding-bottom: 6px;
    }

    .info-block p {
        font-size: 12px;
        line-height: 1.4;
    }
}

.strategy-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 15px;
}

@media (min-width: 768px) {
    .strategy-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .strategy-grid {
        gap: 10px;
        margin-top: 12px;
    }
}

.strat-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.strat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.strat-card h4 {
    margin: 0 0 8px;
    color: #00ccff;
    font-size: 16px;
}

.strat-card p {
    font-size: 12px;
    margin: 0;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 480px) {
    .strat-card {
        padding: 12px;
    }

    .strat-card h4 {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .strat-card p {
        font-size: 11px;
    }
}

.news-section {
    margin-top: 60px;
    width: 100%;
    max-width: 800px;
    background: rgba(0, 255, 170, 0.03);
    border: 1px solid rgba(0, 255, 170, 0.1);
    border-radius: 20px;
    padding: 30px;
    box-sizing: border-box;
}

.news-section h2 {
    color: #00ffaa;
    margin-top: 0;
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.news-section ul {
    list-style: none;
    padding: 0;
    margin: 15px 0 0;
}

.news-section li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.news-section li:last-child {
    border-bottom: none;
}

.update-date {
    font-size: 12px;
    margin-top: 15px;
    opacity: 0.6;
}

.landing-footer {
    margin-top: 60px;
    /* Reduced from 100px to accommodate news */
    margin-bottom: 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    width: 100%;
    max-width: 800px;
    flex-shrink: 0;
}

.landing-footer nav {
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    /* Wrap links on small screens */
}

.landing-footer nav a {
    color: #aaddff;
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;
}

.landing-footer nav a:hover {
    color: #00ffaa;
}

/* Responsive adjustments for In-game UI */
#lang-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    pointer-events: auto;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    z-index: 200;
}

#settings-btn {
    position: fixed;
    top: 20px;
    right: 140px;
    /* Next to lang toggle */
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    pointer-events: auto;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

#settings-menu {
    position: fixed;
    top: 75px;
    right: 20px;
    background: rgba(0, 10, 20, 0.9);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(0, 255, 170, 0.3);
    backdrop-filter: blur(20px);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 180px;
    animation: fadeInDown 0.3s ease-out;
    pointer-events: auto;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-nav a {
    color: #aaddff;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-nav a:hover {
    color: #00ffaa;
}

.close-settings {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

@media (max-width: 1024px) {
    #hud {
        top: 10px;
        left: 10px;
        scale: 0.45;
        transform-origin: top left;
    }

    #leaderboard {
        display: none !important;
    }

    body.show-leaderboard #leaderboard {
        display: block !important;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 2500;
        width: 180px;
        background: rgba(0, 5, 20, 0.9);
        border: 2px solid #00ffaa;
    }

    #lang-toggle {
        top: 10px;
        right: 10px;
        padding: 4px 10px;
        font-size: 11px;
    }

    #settings-btn {
        top: 10px;
        right: 100px;
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    #settings-btn {
        scale: 0.8;
        top: 60px;
    }

    #settings-menu {
        top: 55px;
        right: 10px;
    }
}

/* Mini Map Styles */
#minimap-container {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 150px;
    height: 150px;
    background: rgba(0, 5, 20, 0.75);
    border: 2px solid rgba(0, 255, 170, 0.4);
    border-radius: 8px;
    overflow: hidden;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#minimap {
    width: 100%;
    height: 100%;
}

@media (max-width: 1024px) {
    #minimap-container {
        top: 10px;
        right: 10px;
        width: 100px;
        height: 100px;
        border-width: 1.5px;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Leaderboard UI */
#leaderboard {
    position: fixed;
    top: 180px;
    /* Moved down to make room for Mini Map */
    right: 20px;
    width: 220px;
    background: rgba(0, 5, 15, 0.7);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    pointer-events: auto;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 50;
    font-family: 'Segoe UI', sans-serif;
    animation: fadeInRight 0.5s ease-out;
}

.leaderboard-header {
    font-size: 14px;
    font-weight: bold;
    color: #00ffaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 255, 170, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

#leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-item.loading {
    color: #666;
    font-style: italic;
    justify-content: center;
    padding: 20px 0;
}

.rank-num {
    color: #aaddff;
    font-weight: bold;
    margin-right: 8px;
}

.rank-1 {
    color: #ffd700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.rank-2 {
    color: #c0c0c0;
}

.rank-3 {
    color: #cd7f32;
}

.player-name {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

.player-mass {
    font-weight: bold;
    color: #00ffaa;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 600px) {
    #leaderboard {
        width: 130px;
        top: 60px;
        right: 10px;
        font-size: 11px;
        padding: 10px;
    }

    .leaderboard-header {
        font-size: 11px;
        margin-bottom: 8px;
    }
}

#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.stat-bar {
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 16px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: #aaddff;
    width: fit-content;
}

#evolution-status {
    font-size: 20px;
    font-weight: bold;
    color: #44ff88;
    margin-top: 4px;
    text-shadow: 0 0 10px rgba(68, 255, 136, 0.4);
}

/* Evolution Guide Styles */
#evolution-guide {
    position: fixed;
    left: 20px;
    top: 180px;
    background: rgba(0, 10, 20, 0.85);
    padding: 18px;
    border-radius: 16px;
    color: white;
    font-size: 13px;
    z-index: 100;
    border: 1px solid rgba(0, 255, 170, 0.2);
    backdrop-filter: blur(15px);
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    min-width: 200px;
}

/* Mobile specific styling for the guide - HIDDEN per user request */
#evolution-guide.mobile-guide {
    display: none;
}

#evolution-guide.mobile-guide .guide-title {
    font-size: 12px !important;
}


#lang-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    pointer-events: auto;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

#lang-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #00ffaa;
}

.lang-picker {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaddff;
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    backdrop-filter: blur(5px);
}

.lang-picker:hover {
    background: rgba(0, 255, 170, 0.1);
    border-color: #00ffaa;
    color: #fff;
}

#notifications {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background: rgba(0, 20, 40, 0.85);
    padding: 12px 24px;
    border-radius: 30px;
    border: 1px solid rgba(0, 255, 170, 0.4);
    color: #00ffaa;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(0, 255, 170, 0.2);
    animation: notificationAnim 3s forwards;
}

@keyframes notificationAnim {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    15% {
        opacity: 1;
        transform: translateY(0);
    }

    85% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

canvas {
    display: block;
}

/* Game Over Modal */
#game-over-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    z-index: 2000;
    animation: modalFadeIn 0.5s ease;
    pointer-events: auto;
    flex-wrap: wrap;
    gap: 40px;
}

/* Position leaderboard below game over when shown */
body.show-leaderboard #leaderboard {
    position: fixed !important;
    top: auto !important;
    right: auto !important;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    z-index: 2001;
}

.modal-content {
    background: rgba(20, 30, 50, 0.6);
    padding: 60px 40px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
    max-width: 450px;
    width: 90%;
}

.modal-content h2 {
    font-size: clamp(32px, 10vw, 56px);
    margin: 0 0 20px;
    background: linear-gradient(135deg, #FF3366 0%, #FF9933 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 5px;
    font-weight: 900;
}

.final-score {
    font-size: 28px;
    color: #aaddff;
    margin-bottom: 40px;
}

#retry-btn {
    background: linear-gradient(135deg, #00ffaa 0%, #00ccff 100%);
    border: none;
    padding: 18px 50px;
    border-radius: 15px;
    color: #050510;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#retry-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 40px rgba(0, 255, 170, 0.5);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile Controls */
#mobile-controls {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: none;
    pointer-events: none;
    z-index: 1000;
}

/* Show mobile controls when display is set to block by JavaScript */
#mobile-controls[style*="display: block"],
#mobile-controls.show {
    display: block !important;
    pointer-events: none;
}

#joystick-container {
    position: absolute;
    bottom: calc(50px + env(safe-area-inset-bottom));
    left: 50px;
    width: 150px;
    height: 150px;
    pointer-events: auto;
}

#joystick-base {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
}

#joystick-stick {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, rgba(0, 255, 170, 0.5), rgba(0, 204, 255, 0.5));
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    box-shadow: 0 0 25px rgba(0, 255, 170, 0.3);
    transition: transform 0.05s linear;
}

#boost-btn {
    position: absolute;
    bottom: calc(70px + env(safe-area-inset-bottom));
    right: 50px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(255, 51, 102, 0.1);
    border: 2px solid rgba(255, 51, 102, 0.3);
    color: #ff3366;
    font-weight: 900;
    font-size: 16px;
    letter-spacing: 2px;
    backdrop-filter: blur(10px);
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    outline: none;
    box-shadow: 0 0 30px rgba(255, 51, 102, 0.1);
}

#boost-btn:active {
    background: rgba(255, 51, 102, 0.3);
    transform: scale(0.9);
    box-shadow: 0 0 60px rgba(255, 51, 102, 0.4);
    border-color: #ff3366;
}

/* Skill Buttons - Touch Controls for Mobile */
#skill-buttons {
    position: fixed;
    display: none;
    /* Hidden by default, shown when mobile controls are active */
    flex-direction: column;
    gap: 8px;
    right: 180px;
    bottom: calc(70px + env(safe-area-inset-bottom));
    z-index: 1001;
    pointer-events: auto;
}

.skill-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: rgba(0, 255, 200, 0.25);
    border: 2px solid rgba(0, 255, 200, 0.6);
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 255, 200, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.skill-btn:active {
    transform: scale(0.92);
    background: rgba(0, 255, 200, 0.4);
    border-color: rgba(0, 255, 200, 0.9);
    box-shadow: 0 0 20px rgba(0, 255, 200, 0.6);
}

.skill-btn.on-cooldown {
    opacity: 0.4;
    background: rgba(100, 100, 100, 0.25);
    border-color: rgba(150, 150, 150, 0.4);
    pointer-events: none;
    cursor: not-allowed;
}

/* Mobile responsive sizing */
/* Mobile and Tablet UI */
@media screen and (max-width: 1024px) {
    #mobile-controls {
        display: block;
        pointer-events: none;
    }

    #joystick-container {
        bottom: 20px;
        left: 20px;
        width: 60px;
        height: 60px;
        background: none;
        pointer-events: auto;
    }

    #joystick-base {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    #joystick-stick {
        width: 25px;
        height: 25px;
    }

    /* Grouped buttons at bottom right: 1, 2, 3, 4, Boost in a row */
    #boost-btn {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 9px;
        letter-spacing: 0;
        z-index: 1002;
    }

    #skill-buttons {
        display: flex !important;
        flex-direction: row;
        gap: 6px;
        right: 74px;
        /* 20px base + 44px boost + 10px gap */
        bottom: 20px;
        pointer-events: auto;
        z-index: 1001;
    }

    .skill-btn {
        width: 36px;
        height: 36px;
        font-size: 11px;
        border-width: 1px;
        box-shadow: none;
    }
}

/* Hide mobile controls on desktop */
@media screen and (min-width: 1025px) {
    #mobile-controls {
        display: none !important;
    }

    #skill-buttons {
        display: none !important;
    }
}