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

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: "Arial", sans-serif;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

#gameCanvas {
    border: 2px solid #00ffff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    background: #000011;
}

.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.top-ui {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.player-stats {
    /* Fijado en parte superior - VERSIÓN HORIZONTAL */
    position: fixed;
    top: 5px;
    left: 5px;
    right: 130px; /* Espacio para el minimapa reducido (112px + margen) */
    z-index: 1000;

    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    background: rgba(0, 0, 0, 0.9);
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #00ff88;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
    backdrop-filter: blur(3px);
    pointer-events: auto;
    font-size: 8px;
}

.stat {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 0;
    line-height: 1.2;
    white-space: nowrap;
}

.stat-label {
    font-size: 9px;
    color: #00ff88;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-value {
    font-size: 9px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 2px rgba(0, 255, 136, 0.3);
}

.item {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid #ff6b35;
    padding: 8px;
    border-radius: 5px;
    margin-bottom: 5px;
    font-size: 12px;
    color: #ff6b35;
}

.abilities {
    margin: 20px;
    margin-bottom: 20px;
}

.ability {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #00ffff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.ability-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 255, 0.2);
    border-radius: 50%;
}

.ability-name {
    font-weight: bold;
    color: #00ffff;
    font-size: 14px;
    margin-bottom: 5px;
}

.ability-description {
    font-size: 11px;
    color: #999999;
    margin-bottom: 5px;
    line-height: 1.3;
}

.ability-cooldown {
    font-size: 12px;
    color: #cccccc;
}

.game-menu,
.ship-selector {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    margin: 0;
    padding: 0;
}

.menu-content,
.selector-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #00ffff;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    margin: 0 auto;
}

.menu-content h1 {
    font-size: 36px;
    color: #00ffff;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    text-align: center;
}

.selector-content h2 {
    font-size: 24px;
    color: #00ffff;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.menu-content p {
    font-size: 16px;
    color: #cccccc;
    margin-bottom: 20px;
    text-align: center;
}

.menu-button {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    border: none;
    color: white;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    margin: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.menu-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.menu-button:disabled {
    background: linear-gradient(45deg, #666666, #999999);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.menu-button:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.instructions {
    margin-top: 20px;
    text-align: left;
}

.instructions h3 {
    color: #00ffff;
    margin-bottom: 10px;
    font-size: 16px;
}

.instructions ul {
    list-style: none;
    color: #cccccc;
    font-size: 14px;
}

.instructions li {
    margin-bottom: 6px;
    padding-left: 20px;
    position: relative;
}

.instructions li:before {
    content: "▶";
    color: #ff6b35;
    position: absolute;
    left: 0;
}

.ships-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.ship-option {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #00ffff;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.ship-option:hover {
    background: rgba(0, 255, 255, 0.2);
    transform: scale(1.05);
}

.ship-option.selected {
    background: rgba(255, 107, 53, 0.2);
    border-color: #ff6b35;
}

.ship-option.locked {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #666;
}

.ship-option.locked:hover {
    transform: none;
    background: rgba(0, 255, 255, 0.1);
}

.clan-selector {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    pointer-events: auto;
}

.clans-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 15px 0;
}

.clan-option {
    background: rgba(0, 255, 255, 0.3);
    border: 3px solid #00ffff;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.clan-option:hover {
    background: rgba(0, 255, 255, 0.2);
    transform: scale(1.05);
}

.clan-option.selected {
    background: rgba(255, 107, 53, 0.2);
    border-color: #ff6b35;
}

.clan-option::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.clan-option:hover::before {
    transform: translateX(100%);
}

.clan-icon {
    font-size: 48px;
    margin-bottom: 15px;
    text-shadow: 0 0 10px currentColor;
}

.clan-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 0 5px currentColor;
}

.clan-description {
    font-size: 14px;
    color: #cccccc;
    margin-bottom: 10px;
}

.clan-base-info {
    font-size: 12px;
    color: #999999;
    font-style: italic;
}

.ship-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.ship-name {
    font-size: 18px;
    font-weight: bold;
    color: #00ffff;
    margin-bottom: 10px;
}

.ship-description {
    font-size: 14px;
    color: #cccccc;
    margin-bottom: 10px;
}

.ship-requirements {
    font-size: 12px;
    color: #ff6b35;
}

/* Animaciones */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    }
    100% {
        box-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    }
}

.glow {
    animation: glow 2s infinite;
}

@keyframes achievementPop {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

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

.skill-cooldown {
    animation: skillCooldown 1s linear infinite;
}

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

.skills-container {
    display: flex;
    gap: 40px;
    margin: 20px 0;
}

.available-skills,
.equipped-skills {
    flex: 1;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.skill-item {
    background: rgba(255, 107, 53, 0.2);
    border: 2px solid #ff6b35;
    border-radius: 8px;
    padding: 15px;
    cursor: grab;
    transition: all 0.3s ease;
}

.skill-item:hover {
    background: rgba(255, 107, 53, 0.4);
    transform: translateY(-2px);
}

.skill-item:active {
    cursor: grabbing;
}

.skill-icon {
    font-size: 24px;
    text-align: center;
    margin-bottom: 8px;
}

.skill-name {
    font-weight: bold;
    color: #ff6b35;
    margin-bottom: 5px;
}

.skill-description {
    font-size: 12px;
    color: #ccc;
    margin-bottom: 5px;
}

.skill-cooldown {
    font-size: 11px;
    color: #888;
    text-align: center;
}

.equipped-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.skill-slot {
    background: rgba(100, 100, 100, 0.2);
    border: 2px solid #666;
    border-radius: 8px;
    padding: 15px;
    min-height: 100px;
    transition: all 0.3s ease;
}

.skill-slot:hover {
    border-color: #ff6b35;
    background: rgba(255, 107, 53, 0.1);
}

.skill-slot.dragover {
    border-color: #ff6b35;
    background: rgba(255, 107, 53, 0.3);
}

.slot-key {
    background: #ff6b35;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 10px;
}

.slot-content {
    text-align: center;
}

.empty-slot {
    color: #888;
    font-style: italic;
    margin-top: 20px;
}

/* Skills Tree Panel */
.skills-tree-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.tree-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #ff6b35;
    border-radius: 15px;
    padding: 30px;
    max-width: 1200px;
    max-height: 800px;
    overflow-y: auto;
    position: relative;
}

.tree-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ff6b35;
}

.tree-header h2 {
    color: #ff6b35;
    margin: 0;
    font-size: 28px;
}

.tree-header p {
    color: #ccc;
    margin: 0;
    font-size: 14px;
}

.skills-tree-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.skills-tier {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid #ff6b35;
    border-radius: 10px;
    padding: 20px;
}

.skills-tier h3 {
    color: #ff6b35;
    margin: 0 0 20px 0;
    text-align: center;
    font-size: 20px;
}

.skills-tree-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.skill-tree-item {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #666;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.skill-tree-item.unlocked {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.skill-tree-item.locked {
    border-color: #666;
    background: rgba(100, 100, 100, 0.3);
    opacity: 0.6;
    cursor: not-allowed;
}

.skill-tree-item.unlocked:hover {
    border-color: #ff6b35;
    background: rgba(255, 107, 53, 0.2);
    transform: translateY(-2px);
}

.skill-tree-item .skill-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.skill-tree-item .skill-name {
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
    font-size: 16px;
}

.skill-tree-item .skill-description {
    color: #ccc;
    font-size: 12px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.skill-tree-item .skill-cooldown {
    color: #ff6b35;
    font-size: 11px;
    margin-bottom: 8px;
}

.skill-tree-item .skill-status {
    font-size: 11px;
    font-weight: bold;
}

.skill-tree-item .skill-status .equipped {
    color: #4caf50;
}

.skill-tree-item .skill-status .available {
    color: #ff6b35;
}

.skill-tree-item .skill-status .locked {
    color: #666;
}

.equipped-skills-section {
    background: rgba(255, 107, 53, 0.15);
    border: 2px solid #ff6b35;
    border-radius: 10px;
    padding: 20px;
}

.equipped-skills-section h3 {
    color: #ff6b35;
    margin: 0 0 20px 0;
    text-align: center;
    font-size: 20px;
}

.equipped-skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.equipped-skill-slot {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #ff6b35;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    position: relative;
    min-height: 100px;
}

.slot-key {
    background: #ff6b35;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 10px;
    font-size: 14px;
}

.slot-content {
    margin-bottom: 10px;
}

.slot-content .skill-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.slot-content .skill-name {
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.empty-slot {
    color: #888;
    font-style: italic;
    margin-top: 20px;
}

.remove-skill {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 12px;
    cursor: pointer;
    position: absolute;
    top: 5px;
    right: 5px;
    transition: background 0.3s ease;
}

.remove-skill:hover {
    background: #cc0000;
}

/* Skill Assignment Modal */
.skill-assignment-modal {
    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: 2000;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #ff6b35;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
}

.modal-content h3 {
    color: #ff6b35;
    margin: 0 0 15px 0;
}

.modal-content p {
    color: #ccc;
    margin: 0 0 25px 0;
}

.key-selection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

.key-selection button {
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.key-selection button:hover {
    background: #e55a2b;
    transform: scale(1.05);
}

.cancel-btn {
    background: #666;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cancel-btn:hover {
    background: #555;
}

/* Bando Selector Styles */
.bando-selector {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.bando-info {
    margin-bottom: 20px;
    text-align: center;
}

.selected-clan-info {
    background: rgba(0, 255, 255, 0.2);
    border: 2px solid #00ffff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20.px;
}

.selected-clan-info span {
    color: #00ffff;
    font-size: 18px;
    font-weight: bold;
}

.bandos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
    max-width: 800px;
}

.bando-option {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #666;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.bando-option:hover {
    border-color: #00ffff;
    background: rgba(0, 255, 255, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 255, 255, 0.3);
}

.bando-option.selected {
    border-color: #00ffff;
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.bando-option::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s;
}

.bando-option:hover::before {
    left: 100%;
}

.bando-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.bando-name {
    font-size: 20px;
    font-weight: bold;
    color: #00ffff;
    margin-bottom: 10px;
}

.bando-description {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 15px;
    line-height: 1.4;
}

.bando-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.bando-stat {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #00ffff;
    border-radius: 5px;
    padding: 8px;
    font-size: 12px;
}

.bando-stat-label {
    color: #00ffff;
    font-weight: bold;
    display: block;
}

.bando-stat-value {
    color: #fff;
    font-size: 14px;
}

.bando-bonus {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid #ffd700;
    border-radius: 5px;
    padding: 10px;
    margin-top: 15px;
    font-size: 12px;
    color: #ffd700;
}

.bando-bonus-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.bando-bonus-description {
    color: #ccc;
    font-size: 11px;
}

.widget,
.widget-panel,
.widget-control,
.widget-draggable,
.widget-static {
    border: 2px solid #00eaff !important;
    box-shadow: 0 0 10px #00eaff44 !important;
}

/* --- Responsive Styles for Mobile --- */
@media (max-width: 768px) {
    /* Make menus and selectors take up more screen width */
    .menu-content,
    .selector-content {
        width: 95%;
        padding: 20px;
        max-height: 95vh;
    }

    .menu-content h1 {
        font-size: 28px;
    }

    /* Stack grids to a single column */
    .ships-grid,
    .clans-grid,
    .bandos-grid {
        grid-template-columns: 1fr;
    }

    /* Improve readability of player stats */
    .player-stats {
        flex-wrap: wrap; /* Allow stats to wrap onto the next line */
        gap: 10px;
        padding: 10px;
    }

    .stat {
        gap: 2px;
    }

    .stat-label {
        font-size: 10px;
    }

    .stat-value {
        font-size: 14px;
    }

    /* Increase button and text sizes for touch */
    .menu-button {
        padding: 15px 25px;
        font-size: 16px;
    }

    .instructions ul {
        font-size: 13px;
    }
}

.game-container { position: fixed; inset: 0; }
.hud-zone { 
    touch-action: none; 
    user-select: none; 
    -webkit-user-select: none; 
    -webkit-touch-callout: none;
    z-index: 10003 !important; /* Higher than skills widget */
}

/* ===== DUAL ZONE JOYSTICK VISUAL INDICATORS ===== */
.hud-joystick {
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
    z-index: 10003 !important; /* Higher than skills widget */
}

.hud-joystick::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.hud-joystick::after {
    content: 'AIM';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    z-index: 2;
    font-family: 'Press Start 2P', monospace;
}

/* Movement zone indicator */
.hud-joystick.movement-zone::after {
    content: 'THRUST';
    color: rgba(255, 255, 0, 0.8);
}

/* Active state */
.hud-joystick.active {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.hud-joystick.movement-zone.active {
    border-color: rgba(255, 255, 0, 0.8);
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.4);
}

/* ===== CONTROLES TÁCTILES - JOYSTICKS ===== */

/* Círculo grande - Joystick izquierdo (Movimiento) */
#move-joystick-container {
    position: fixed;
    bottom: 80px;
    left: 40px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at center, rgba(0, 255, 255, 0.08), rgba(0, 255, 255, 0.02));
    border: 3px solid rgba(0, 255, 255, 0.15);
    border-radius: 50%;
    z-index: 10003 !important;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* Círculo grande - Joystick derecho (Apuntar/Disparar) */
#aim-joystick-container {
    position: fixed;
    bottom: 80px;
    right: 40px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at center, rgba(255, 0, 0, 0.08), rgba(255, 0, 0, 0.02));
    border: 3px solid rgba(255, 0, 0, 0.15);
    border-radius: 50%;
    z-index: 10003 !important;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* Círculo pequeño - Knob del joystick izquierdo (Movimiento) */
#move-joystick-knob {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at center, rgba(0, 255, 255, 0.4), rgba(0, 255, 255, 0.2));
    border: 3px solid rgba(0, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    box-shadow:
        0 0 15px rgba(0, 255, 255, 0.3),
        inset 0 0 10px rgba(255, 255, 255, 0.15);
    transition: transform 0.1s ease-out;
    z-index: 10004;
}

/* Círculo pequeño - Knob del joystick derecho (PUNTO ROJO) */
#aim-joystick-knob {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 68, 68, 0.5), rgba(255, 0, 0, 0.4), rgba(204, 0, 0, 0.3));
    border: 3px solid rgba(255, 51, 51, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    box-shadow:
        0 0 20px rgba(255, 0, 0, 0.4),
        0 0 30px rgba(255, 0, 0, 0.3),
        inset 0 0 15px rgba(255, 100, 100, 0.25);
    transition: transform 0.1s ease-out;
    z-index: 10004;
}

/* Estado activo - Joystick izquierdo */
#move-joystick-container.active {
    background: radial-gradient(circle at center, rgba(0, 255, 255, 0.15), rgba(0, 255, 255, 0.05));
    border-color: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.25);
}

/* Estado activo - Joystick derecho */
#aim-joystick-container.active {
    background: radial-gradient(circle at center, rgba(255, 0, 0, 0.15), rgba(255, 0, 0, 0.05));
    border-color: rgba(255, 0, 0, 0.3);
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.3);
}

/* Zona de movimiento activada (cuando el joystick izquierdo se mueve más allá del centro) */
#move-joystick-container.movement-zone {
    border-color: rgba(255, 255, 0, 0.3);
    box-shadow: 0 0 30px rgba(255, 255, 0, 0.3);
    background: radial-gradient(circle at center, rgba(255, 255, 0, 0.12), rgba(255, 255, 0, 0.04));
}

/* Knob activo - efecto de presión */
#move-joystick-container.active #move-joystick-knob {
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.45),
        inset 0 0 15px rgba(255, 255, 255, 0.25);
}

#aim-joystick-container.active #aim-joystick-knob {
    box-shadow:
        0 0 30px rgba(255, 0, 0, 0.5),
        0 0 40px rgba(255, 0, 0, 0.4),
        inset 0 0 20px rgba(255, 150, 150, 0.35);
}

/* ===== MEDIA QUERIES RESPONSIVE ===== */

/* Pantallas muy pequeñas (celulares en vertical) */
@media (max-width: 480px) {
    #move-joystick-container,
    #aim-joystick-container {
        width: 120px;
        height: 120px;
        bottom: 60px;
    }

    #move-joystick-container {
        left: 20px;
    }

    #aim-joystick-container {
        right: 20px;
    }

    #move-joystick-knob,
    #aim-joystick-knob {
        width: 50px;
        height: 50px;
    }
}

/* Pantallas pequeñas (celulares grandes en vertical) */
@media (min-width: 481px) and (max-width: 768px) {
    #move-joystick-container,
    #aim-joystick-container {
        width: 140px;
        height: 140px;
        bottom: 70px;
    }

    #move-joystick-container {
        left: 30px;
    }

    #aim-joystick-container {
        right: 30px;
    }

    #move-joystick-knob,
    #aim-joystick-knob {
        width: 55px;
        height: 55px;
    }
}

/* Tablets y pantallas horizontales */
@media (min-width: 769px) and (max-width: 1024px) {
    #move-joystick-container,
    #aim-joystick-container {
        width: 180px;
        height: 180px;
        bottom: 100px;
    }

    #move-joystick-container {
        left: 50px;
    }

    #aim-joystick-container {
        right: 50px;
    }

    #move-joystick-knob,
    #aim-joystick-knob {
        width: 70px;
        height: 70px;
    }
}

/* Pantallas grandes (tablets grandes, laptops) */
@media (min-width: 1025px) {
    #move-joystick-container,
    #aim-joystick-container {
        width: 200px;
        height: 200px;
        bottom: 120px;
    }

    #move-joystick-container {
        left: 60px;
    }

    #aim-joystick-container {
        right: 60px;
    }

    #move-joystick-knob,
    #aim-joystick-knob {
        width: 80px;
        height: 80px;
    }
}

/* ===== BOTONES DE SKILLS MÓVILES ===== */

/* Contenedor de botones de skills - Esquina inferior izquierda */
.mobile-skills-container {
    position: fixed;
    left: 10px;
    bottom: 10px;
    display: flex;
    flex-direction: row;
    gap: 8px;
    z-index: 10002;
    pointer-events: auto;
}

/* Botón individual de skill */
.mobile-skill-button {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at center, rgba(51, 153, 255, 0.25), rgba(0, 0, 0, 0.4));
    border: 2px solid rgba(51, 153, 255, 0.5);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* Icono del skill */
.mobile-skill-icon {
    font-size: 22px;
    margin-bottom: 2px;
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
}

/* Label (tecla) */
.mobile-skill-label {
    font-size: 8px;
    color: #fff;
    font-weight: bold;
    pointer-events: none;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Estado activo (cuando se presiona) */
.mobile-skill-button.skill-active {
    transform: scale(0.95);
    background: radial-gradient(circle at center, rgba(51, 153, 255, 0.5), rgba(0, 100, 200, 0.5));
    border-color: rgba(51, 153, 255, 1);
    box-shadow: 0 0 15px rgba(51, 153, 255, 0.7);
}

/* Estado de cooldown - overlay */
.mobile-skill-cooldown-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 0 0 6px 6px;
    transition: height 0.1s linear;
    pointer-events: none;
    z-index: 3;
}

/* Texto de cooldown */
.mobile-skill-cooldown-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffd700;
    font-size: 11px;
    font-weight: bold;
    text-shadow:
        0 0 4px #000,
        0 0 2px #ffd700;
    pointer-events: none;
    z-index: 4;
}

/* Estado de cooldown - botón opaco */
.mobile-skill-button.on-cooldown {
    opacity: 0.6;
    border-color: rgba(100, 100, 100, 0.5);
}

.mobile-skill-button.on-cooldown .mobile-skill-icon {
    opacity: 0.5;
}

/* Hover effect (para testing en desktop) */
.mobile-skill-button:hover {
    border-color: rgba(51, 153, 255, 0.8);
    box-shadow: 0 0 12px rgba(51, 153, 255, 0.5);
}

.mobile-skill-button.on-cooldown:hover {
    border-color: rgba(100, 100, 100, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ===== MEDIA QUERIES PARA SKILLS ===== */

/* Pantallas muy pequeñas */
@media (max-width: 480px) {
    .mobile-skills-container {
        left: 8px;
        bottom: 8px;
        gap: 5px;
    }

    .mobile-skill-button {
        width: 40px;
        height: 40px;
    }

    .mobile-skill-icon {
        font-size: 18px;
    }

    .mobile-skill-label {
        font-size: 7px;
    }

    .mobile-skill-cooldown-text {
        font-size: 9px;
    }
}

/* Pantallas pequeñas */
@media (min-width: 481px) and (max-width: 768px) {
    .mobile-skills-container {
        left: 10px;
        bottom: 10px;
        gap: 6px;
    }

    .mobile-skill-button {
        width: 45px;
        height: 45px;
    }

    .mobile-skill-icon {
        font-size: 20px;
    }

    .mobile-skill-label {
        font-size: 7.5px;
    }

    .mobile-skill-cooldown-text {
        font-size: 10px;
    }
}

/* Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .mobile-skills-container {
        left: 12px;
        bottom: 12px;
        gap: 8px;
    }

    .mobile-skill-button {
        width: 52px;
        height: 52px;
    }

    .mobile-skill-icon {
        font-size: 24px;
    }

    .mobile-skill-label {
        font-size: 9px;
    }

    .mobile-skill-cooldown-text {
        font-size: 12px;
    }
}

/* Pantallas grandes */
@media (min-width: 1025px) {
    .mobile-skills-container {
        left: 15px;
        bottom: 15px;
        gap: 10px;
    }

    .mobile-skill-button {
        width: 55px;
        height: 55px;
    }

    .mobile-skill-icon {
        font-size: 26px;
    }

    .mobile-skill-label {
        font-size: 9px;
    }

    .mobile-skill-cooldown-text {
        font-size: 13px;
    }
}