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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
}


#container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Canvas 3D con cursor pointer para indicar que es interactivo */
#container canvas {
    cursor: pointer;
    transition: cursor 0.2s ease;
}


/* Mejoras para dispositivos móviles */
@media (max-width: 768px) {
    /* Hacer que el canvas sea más responsivo para toque */
    #container canvas {
        touch-action: none;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        cursor: pointer;
    }
    
    /* Cursor de arrastre para toque */
    #container canvas.dragging {
        cursor: grab;
    }
    
    /* Cursor de pan para zoom táctil */
    #container canvas.panning {
        cursor: move;
    }
    
    /* Ajustar el header para móviles */
    .user-header {
        padding: 10px;
        font-size: 14px;
    }
    
    .user-resources {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .resource-item {
        font-size: 12px;
    }
    
    
    .ship-info-section {
        margin-bottom: 10px !important;
        padding: 8px !important;
        border: 2px solid rgba(128, 128, 128, 0.3) !important;
        background: #000000 !important;
        border-radius: 3px !important;
        font-family: 'Courier New', monospace !important;
    }
    
    #controls .ship-info-section h3 {
        font-size: 14px !important;
        margin: 0 0 8px 0 !important;
        padding-bottom: 4px !important;
    }
    
    #controls .ship-info-content {
        flex-direction: column !important;
        gap: 6px !important;
        align-items: center !important;
        display: flex !important;
        background: transparent !important;
        padding: 6px !important;
        font-family: 'Courier New', monospace !important;
    }
    
    #controls .ship-image-container {
        width: 50px !important;
        height: 50px !important;
    }
    
    #controls .ship-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }
    
    #controls .ship-stats {
        width: 100% !important;
        gap: 3px !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    #controls .ship-stat {
        font-size: 9px !important;
        padding: 1px 3px !important;
        justify-content: space-between !important;
        display: flex !important;
    }
    
    #controls .ship-stat.combat-power {
        padding: 3px 4px !important;
        margin-top: 3px !important;
        font-size: 10px !important;
    }
    
    #controls .stat-label {
        font-size: 9px !important;
    }
    
    #controls .stat-value {
        font-size: 9px !important;
    }
    
    #controls .stats {
        font-size: 9px !important;
        padding: 3px 6px !important;
        gap: 6px !important;
        display: flex !important;
    }
    
    /* Chat global optimizado para móvil */
    .global-chat {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        z-index: 10003 !important;
        background: rgba(0, 0, 0, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        border: none !important;
        box-shadow: none !important;
        transform: translateY(100vh) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        transition: all 0.3s ease !important;
    }
    
    .global-chat.show {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        display: flex !important;
    }
    
    .global-chat.minimized {
        position: fixed !important;
        top: auto !important;
        left: 20px !important;
        right: auto !important;
        bottom: 20px !important;
        width: 60px !important;
        height: 60px !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: none !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        transition: all 0.3s ease !important;
        pointer-events: auto !important;
        cursor: pointer !important;
    }
    
    .global-chat.minimized .chat-header {
        display: none !important;
    }
    
    .global-chat.minimized .chat-messages,
    .global-chat.minimized .chat-input-container {
        display: none !important;
    }
    
    .global-chat.minimized::before {
        content: "💬" !important;
        font-size: 1.5rem !important;
        color: #ffffff !important;
        text-shadow: none !important;
        filter: none !important;
        pointer-events: auto !important;
    }
    
    .global-chat.minimized:hover::before {
        transform: scale(1.1) !important;
    }
    
    /* Ocultar botón de cerrar en móvil y escritorio */
    .global-chat .chat-close-btn {
        display: none !important;
    }
    
    /* Header del chat en móvil */
    .chat-header {
        padding: 20px !important;
        border-bottom: 2px solid rgba(0, 170, 255, 0.3) !important;
        background: linear-gradient(135deg, #1e3c72, #2a5298) !important;
        flex-shrink: 0 !important;
    }
    
    .chat-header h3 {
        font-size: 1.5rem !important;
        color: #00aaff !important;
        text-align: center !important;
        margin: 0 !important;
        text-shadow: 0 0 10px rgba(0, 170, 255, 0.5) !important;
    }
    
    /* Botones de control del chat en móvil */
    .chat-controls {
        position: absolute !important;
        top: 20px !important;
        right: 20px !important;
        display: flex !important;
        gap: 10px !important;
    }
    
    .chat-minimize-btn,
    .chat-close-btn {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.5rem !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(255, 107, 107, 0.1) !important;
        border: 2px solid rgba(255, 107, 107, 0.3) !important;
        color: #ff6b6b !important;
        transition: all 0.3s ease !important;
        cursor: pointer !important;
    }
    
    .chat-minimize-btn:hover,
    .chat-close-btn:hover {
        background: rgba(255, 107, 107, 0.2) !important;
        border-color: #ff6b6b !important;
        transform: scale(1.1) !important;
        box-shadow: 0 5px 20px rgba(255, 107, 107, 0.3) !important;
    }
    
    /* Mensajes del chat en móvil */
    .chat-messages {
        flex: 1 !important;
        padding: 20px !important;
        overflow-y: auto !important;
        background: rgba(0, 0, 0, 0.3) !important;
        max-height: none !important;
    }
    
    .chat-message {
        margin-bottom: 15px !important;
        padding: 15px !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 12px !important;
        border-left: 3px solid rgba(0, 170, 255, 0.3) !important;
    }
    
    .chat-message-header {
        margin-bottom: 8px !important;
    }
    
    .chat-username {
        font-size: 1rem !important;
        font-weight: 700 !important;
        color: #00aaff !important;
        text-shadow: 0 0 5px rgba(0, 170, 255, 0.3) !important;
    }
    
    .chat-timestamp {
        font-size: 0.9rem !important;
        color: #888 !important;
        margin-left: 10px !important;
    }
    
    .chat-message-text {
        font-size: 1rem !important;
        color: #ffffff !important;
        line-height: 1.5 !important;
    }
    
    /* Input del chat en móvil */
    .chat-input-container {
        padding: 20px !important;
        background: rgba(0, 0, 0, 0.5) !important;
        border-radius: 0 !important;
        gap: 15px !important;
        flex-shrink: 0 !important;
    }
    
    .chat-input {
        flex: 1 !important;
        height: 60px !important;
        font-size: 1.1rem !important;
        padding: 15px !important;
        border-radius: 12px !important;
        border: 2px solid rgba(0, 170, 255, 0.3) !important;
        background: rgba(255, 255, 255, 0.1) !important;
        color: #ffffff !important;
    }
    
    .chat-input:focus {
        border-color: rgba(0, 170, 255, 0.6) !important;
        background: rgba(255, 255, 255, 0.15) !important;
        box-shadow: 0 0 15px rgba(0, 170, 255, 0.3) !important;
    }
    
    .chat-send-btn {
        width: 80px !important;
        height: 60px !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        border-radius: 12px !important;
        background: linear-gradient(135deg, #00aaff, #0088cc) !important;
        border: 2px solid rgba(0, 170, 255, 0.3) !important;
        color: #ffffff !important;
        transition: all 0.3s ease !important;
    }
    
    .chat-send-btn:hover {
        background: linear-gradient(135deg, #0088cc, #006699) !important;
        border-color: #00aaff !important;
        transform: scale(1.05) !important;
        box-shadow: 0 5px 20px rgba(0, 170, 255, 0.3) !important;
    }
    
    /* Ajustar paneles de información */
    .star-info-panel {
        max-width: 90vw;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    /* Panel de información de estrellas en pantalla completa para móvil */
    .floating-star-info {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0 !important;
        padding: 20px !important;
        z-index: 10001 !important;
        background: rgba(0, 0, 0, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        border: none !important;
        box-shadow: none !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Header del panel en móvil */
    .floating-star-info .star-info-header {
        margin-bottom: 20px !important;
        padding-bottom: 15px !important;
        border-bottom: 2px solid rgba(255, 255, 255, 0.2) !important;
    }
    
    .floating-star-info .star-info-header h4 {
        font-size: 1.5rem !important;
        color: #4ecdc4 !important;
        text-align: center !important;
        margin: 0 !important;
    }
    
    /* Botón de cerrar más grande para móvil */
    .floating-star-info .close-info-btn {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.5rem !important;
        border-radius: 50% !important;
        position: absolute !important;
        top: 20px !important;
        right: 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Contenido del panel en móvil */
    .floating-star-info .star-info-content {
        flex: 1 !important;
        font-size: 1.1rem !important;
        line-height: 1.6 !important;
    }
    
    .floating-star-info .star-info-content .info-row {
        margin-bottom: 15px !important;
        padding: 10px !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 8px !important;
        border-left: 3px solid #4ecdc4 !important;
    }
    
    .floating-star-info .star-info-content .info-row .label {
        font-size: 1rem !important;
        margin-bottom: 5px !important;
        color: #4ecdc4 !important;
        font-weight: 700 !important;
    }
    
    .floating-star-info .star-info-content .info-row span:not(.label),
    .floating-star-info .star-info-content .info-row p {
        font-size: 1rem !important;
        color: #ffffff !important;
        line-height: 1.5 !important;
    }
    
    /* Botones de acción en móvil */
    .floating-star-info .star-actions {
        margin-top: 20px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .floating-star-info .star-actions button {
        width: 100% !important;
        height: 60px !important;
        font-size: 1.2rem !important;
        font-weight: 600 !important;
        border-radius: 10px !important;
        border: 2px solid rgba(78, 205, 196, 0.3) !important;
        background: linear-gradient(135deg, rgba(78, 205, 196, 0.1) 0%, rgba(0, 150, 255, 0.1) 100%) !important;
        color: #4ecdc4 !important;
        transition: all 0.3s ease !important;
    }
    
    .floating-star-info .star-actions button:hover {
        background: linear-gradient(135deg, rgba(78, 205, 196, 0.2) 0%, rgba(0, 150, 255, 0.2) 100%) !important;
        border-color: #4ecdc4 !important;
        transform: scale(1.02) !important;
        box-shadow: 0 5px 20px rgba(78, 205, 196, 0.3) !important;
    }
    
    /* Panel de información de estrellas amarillas en pantalla completa para móvil */
    .floating-ystar-info {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0 !important;
        padding: 20px !important;
        z-index: 10001 !important;
        background: rgba(0, 0, 0, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        border: none !important;
        box-shadow: none !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Header del panel de estrellas amarillas en móvil */
    .floating-ystar-info .ystar-info-header {
        margin-bottom: 20px !important;
        padding-bottom: 15px !important;
        border-bottom: 2px solid rgba(255, 255, 0, 0.3) !important;
    }
    
    .floating-ystar-info .ystar-info-header h4 {
        font-size: 1.5rem !important;
        color: #ffd700 !important;
        text-align: center !important;
        margin: 0 !important;
    }
    
    /* Botón de cerrar para estrellas amarillas */
    .floating-ystar-info .close-info-btn {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.5rem !important;
        border-radius: 50% !important;
        position: absolute !important;
        top: 20px !important;
        right: 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Contenido del panel de estrellas amarillas en móvil */
    .floating-ystar-info .ystar-info-content {
        flex: 1 !important;
        font-size: 1.1rem !important;
        line-height: 1.6 !important;
    }
    
    .floating-ystar-info .ystar-info-content .info-row {
        margin-bottom: 15px !important;
        padding: 10px !important;
        background: rgba(255, 255, 0, 0.05) !important;
        border-radius: 8px !important;
        border-left: 3px solid #ffd700 !important;
    }
    
    .floating-ystar-info .ystar-info-content .info-row .label {
        font-size: 1rem !important;
        margin-bottom: 5px !important;
        color: #ffd700 !important;
        font-weight: 700 !important;
    }
    
    .floating-ystar-info .ystar-info-content .info-row span:not(.label),
    .floating-ystar-info .ystar-info-content .info-row p {
        font-size: 1rem !important;
        color: #ffffff !important;
        line-height: 1.5 !important;
    }
    
    /* Botones de acción para estrellas amarillas en móvil */
    .floating-ystar-info .ystar-actions {
        margin-top: 20px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .floating-ystar-info .ystar-actions button {
        width: 100% !important;
        height: 60px !important;
        font-size: 1.2rem !important;
        font-weight: 600 !important;
        border-radius: 10px !important;
        border: 2px solid rgba(255, 215, 0, 0.3) !important;
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 255, 0, 0.1) 100%) !important;
        color: #ffd700 !important;
        transition: all 0.3s ease !important;
    }
    
    .floating-ystar-info .ystar-actions button:hover {
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 255, 0, 0.2) 100%) !important;
        border-color: #ffd700 !important;
        transform: scale(1.02) !important;
        box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3) !important;
    }
    
    /* Panel de progreso optimizado para móvil */
    .progress-panel {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        z-index: 10002 !important;
        background: rgba(0, 0, 0, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        border: none !important;
        box-shadow: none !important;
        transform: translateY(100vh) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        transition: all 0.3s ease !important;
    }
    
    .progress-panel.show {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }
    
    /* Header del progress panel en móvil */
    .progress-header {
        padding: 20px !important;
        border-bottom: 2px solid rgba(78, 205, 196, 0.3) !important;
        background: rgba(78, 205, 196, 0.05) !important;
        flex-shrink: 0 !important;
    }
    
    .progress-header h3 {
        font-size: 1.5rem !important;
        color: #4ecdc4 !important;
        text-align: center !important;
        margin: 0 !important;
        text-shadow: 0 0 10px rgba(78, 205, 196, 0.5) !important;
    }
    
    /* Botón de cerrar del progress panel en móvil */
    .close-progress-btn {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.5rem !important;
        border-radius: 50% !important;
        position: absolute !important;
        top: 20px !important;
        right: 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(255, 107, 107, 0.1) !important;
        border: 2px solid rgba(255, 107, 107, 0.3) !important;
        color: #ff6b6b !important;
        transition: all 0.3s ease !important;
    }
    
    .close-progress-btn:hover {
        background: rgba(255, 107, 107, 0.2) !important;
        border-color: #ff6b6b !important;
        transform: scale(1.1) !important;
        box-shadow: 0 5px 20px rgba(255, 107, 107, 0.3) !important;
    }
    
    /* Contenido del progress panel en móvil */
    .progress-content {
        flex: 1 !important;
        padding: 20px !important;
        overflow-y: auto !important;
        max-height: none !important;
    }
    
    /* Items de progreso en móvil */
    .progress-item {
        margin-bottom: 15px !important;
        padding: 15px !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 12px !important;
        border: 2px solid rgba(78, 205, 196, 0.2) !important;
        transition: all 0.3s ease !important;
    }
    
    .progress-item:hover {
        background: rgba(78, 205, 196, 0.1) !important;
        border-color: rgba(78, 205, 196, 0.4) !important;
        transform: scale(1.02) !important;
        box-shadow: 0 5px 20px rgba(78, 205, 196, 0.2) !important;
    }
    
    .progress-item-info {
        padding: 0 !important;
    }
    
    .progress-item-name {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        color: #4ecdc4 !important;
        margin-bottom: 8px !important;
        text-shadow: 0 0 5px rgba(78, 205, 196, 0.3) !important;
    }
    
    .progress-item-details {
        font-size: 1rem !important;
        color: #ffffff !important;
        line-height: 1.5 !important;
    }
    
    .progress-item.no-activities {
        background: rgba(78, 205, 196, 0.05) !important;
        border: 2px solid rgba(78, 205, 196, 0.2) !important;
        border-radius: 12px !important;
        margin: 20px 0 !important;
        padding: 30px 20px !important;
        text-align: center !important;
    }
    
    .progress-item.no-activities .progress-item-name {
        font-size: 1.2rem !important;
        color: #4ecdc4 !important;
        font-style: italic !important;
    }
    
    .progress-item.no-activities .progress-item-details {
        font-size: 1rem !important;
        color: #888 !important;
        margin-top: 10px !important;
    }
    
    /* Mejorar botones para toque */
    button, .holo-button {
        min-height: 44px; /* Tamaño mínimo recomendado para toque */
        min-width: 44px;
    }
    
    /* Ajustar inputs para móviles */
    .holo-input {
        font-size: 16px; /* Prevenir zoom en iOS */
    }
}

/* Cuando se está arrastrando, cambiar el cursor */
#container canvas.dragging {
    cursor: grab;
}

/* Cuando se está haciendo pan, cambiar el cursor */
#container canvas.panning {
    cursor: move;
}

/* Información de la cámara */
.camera-info {
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.camera-position {
    font-size: 0.8rem;
    color: #b0b0b0;
    text-align: center;
}

.camera-position span {
    font-family: monospace;
    color: #4ecdc4;
}


/* Chat Global MMORPG - Estilo Combat Scanner */
.global-chat {
    --bgcol: rgba(128, 128, 128, 0.3);
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 350px;
    height: 400px;
    border: 2px solid var(--bgcol);
    z-index: 1000;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    user-select: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    visibility: visible;
    opacity: 1;
    background: #000000;
}

.global-chat.minimized {
    height: 50px;
    overflow: hidden;
}

.global-chat.minimized .chat-messages,
.global-chat.minimized .chat-input-container {
    display: none;
}

.chat-header {
    background: #000000;
    color: #ffffff;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move; /* Cursor de arrastre */
    user-select: none;
    border-bottom: 2px solid #333333;
    font-weight: bold;
    position: relative;
    z-index: 3;
}

.chat-header h3 {
    margin: 0;
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chat-controls {
    display: flex;
    gap: 5px;
}

.chat-minimize-btn,
.chat-close-btn {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 3px;
    width: 20px;
    height: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-minimize-btn:hover,
.chat-close-btn:hover {
    background: #ff6666;
    transform: scale(1.1);
}

.chat-messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: transparent;
    color: #ffffff;
    position: relative;
    z-index: 2;
    max-height: 300px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 150, 255, 0.5);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 150, 255, 0.7);
}

.chat-message {
    margin-bottom: 8px;
    padding: 6px 8px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.7);
    border-left: 2px solid #333333;
    word-wrap: break-word;
    animation: messageSlideIn 0.3s ease;
    font-family: 'Courier New', monospace;
    font-size: 11px;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.chat-message.system {
    border-left-color: #ff4444;
    background: rgba(255, 68, 68, 0.2);
    color: #ff6666;
    font-style: italic;
}

.chat-message.player {
    border-left-color: #666666;
    background: rgba(102, 102, 102, 0.2);
}

.chat-message.own {
    border-left-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.chat-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.chat-username {
    font-weight: bold;
    font-size: 11px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-timestamp {
    font-size: 9px;
    color: #666666;
    opacity: 0.8;
    font-family: 'Courier New', monospace;
}

.chat-message-text {
    color: #ffffff;
    font-size: 11px;
    line-height: 1.4;
    font-family: 'Courier New', monospace;
}

.chat-welcome {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 20px;
}

.chat-welcome p {
    margin: 0;
    font-size: 12px;
}

.chat-input-container {
    display: flex;
    padding: 12px;
    background: transparent;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.chat-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #333333;
    border-radius: 3px;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input:focus {
    border-color: #666666;
    background: rgba(0, 0, 0, 0.9);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

.chat-input::placeholder {
    color: #666666;
    font-family: 'Courier New', monospace;
}

.chat-send-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #333333;
    border-radius: 3px;
    color: #ffffff;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-send-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: #666666;
    transform: scale(1.05);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

/* Animaciones para notificaciones del chat */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutToRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Responsive para pantallas pequeñas */
@media (max-width: 768px) {
    .global-chat {
        width: 300px;
        height: 350px;
        bottom: 10px;
        left: 10px;
        font-size: 10px;
    }
    
    .chat-header {
        padding: 6px 10px;
        font-size: 10px;
    }
    
    .chat-header h3 {
        font-size: 10px;
    }
    
    .chat-messages {
        max-height: 250px;
        padding: 8px;
        font-size: 9px;
    }
    
    .chat-message {
        font-size: 9px;
        padding: 4px 6px;
    }
    
    .chat-username {
        font-size: 9px;
    }
    
    .chat-timestamp {
        font-size: 8px;
    }
    
    .chat-message-text {
        font-size: 9px;
    }
    
    .chat-input-container {
        padding: 8px;
    }
    
    .chat-input {
        font-size: 9px;
        padding: 6px 8px;
    }
    
    .chat-send-btn {
        font-size: 9px;
        padding: 6px 10px;
    }
}

/* Icono de progreso de viajes y exploraciones */
.progress-icon {
    position: fixed;
    bottom: 20px;
    right: 80px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.progress-icon:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Botón Menu */
.menu-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.menu-icon .menu-line {
    width: 18px;
    height: 2px;
    background: #ffffff;
    margin: 2px 0;
    transition: all 0.3s ease;
}

.menu-icon:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Panel desplegable del menú - Estilo Combat Scanner */
.menu-panel {
    --bgcol: rgba(128, 128, 128, 0.15);
    position: fixed;
    bottom: 80px;
    right: 0px; /* Sin margen, pegado al borde derecho */
    width: 200px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--bgcol);
    padding: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%); /* Sale desde la derecha */
    transition: all 0.3s ease;
    z-index: 999;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.menu-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0); /* Sale desde la derecha */
}

.menu-panel .menu-item {
    display: block;
    width: 100%;
    padding: 12px 15px;
    margin: 5px 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #ffffff;
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.menu-panel .menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(5px);
}

/* Aplicar estilos sci-fi a los botones del menú */
.menu-panel .menu-item.si-buttons-scifi__style-3__button-1 {
    padding: 15px 20px !important;
    min-height: 30px !important;
    min-width: 70px !important;
    font-size: 14px !important;
    height: auto !important;
    width: 100% !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: none !important;
    transform: none !important;
    margin: 8px 0 !important;
}

.menu-panel .menu-item.si-buttons-scifi__style-3__button-1:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: translateX(5px) !important;
}

.menu-panel .menu-item.si-buttons-scifi__style-3__button-1.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.menu-panel .menu-item.si-buttons-scifi__style-3__button-1.disabled:hover {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: none !important;
}

/* Esquinas para el menú panel - Estilo Combat Scanner */
.menu-panel .window-bracket {
    --color: #ffffff;
    position: absolute;
    height: 5px;
    width: 5px;
    z-index: 4;
}

.menu-panel .window-bracket-top-left {
    border-top: 2px solid var(--color);
    border-left: 2px solid var(--color);
    top: 0;
    left: 0;
}

.menu-panel .window-bracket-top-right {
    border-top: 2px solid var(--color);
    border-right: 2px solid var(--color);
    top: 0;
    right: 0;
}

.menu-panel .window-bracket-bottom-right {
    border-bottom: 2px solid var(--color);
    border-right: 2px solid var(--color);
    bottom: 0;
    right: 0;
}

.menu-panel .window-bracket-bottom-left {
    border-bottom: 2px solid var(--color);
    border-left: 2px solid var(--color);
    bottom: 0;
    left: 0;
}


/* Panel desplegable de progreso de viajes y exploraciones */
.progress-panel {
    position: fixed;
    bottom: 80px;
    right: 40px;
    width: 700px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.progress-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}



.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-header h3 {
    margin: 0;
    color: #4ecdc4;
    font-size: 1.1rem;
}


.close-progress-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-progress-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #4ecdc4;
}


.progress-content {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

/* ========================================
   SISTEMA DE ALIANZAS - ESTILOS
   ======================================== */

/* Icono de alianzas */
.alliance-icon {
    position: fixed;
    bottom: 20px;
    right: 140px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.alliance-icon:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Modal de alianzas - Estilo Combat Scanner */
.alliance-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 500px;
    z-index: 2000;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    user-select: none;
    transition: all 0.3s ease;
    visibility: hidden;
    opacity: 0;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(128, 128, 128, 0.8);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.alliance-modal.show {
    visibility: visible;
    opacity: 1;
}

.alliance-modal-content {
    background: transparent;
    border: none;
    border-radius: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    box-shadow: none;
    transform: none;
    transition: none;
    display: flex;
    flex-direction: column;
}

/* Header del modal - Estilo Combat Scanner */
.alliance-header {
    background: #000000;
    color: #ffffff;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
    border-bottom: 2px solid #333333;
    font-weight: bold;
    position: relative;
    z-index: 3;
}

.alliance-header:active {
    cursor: grabbing;
}

.alliance-header h3 {
    margin: 0;
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.close-alliance-btn {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 3px;
    width: 20px;
    height: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-alliance-btn:hover {
    background: #ff6666;
    transform: scale(1.1);
}

/* Pestañas */
.alliance-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.alliance-tab {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.alliance-tab.active {
    color: #4ecdc4;
    border-bottom-color: #4ecdc4;
    background: rgba(78, 205, 196, 0.1);
}

.alliance-tab:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Submenú de alianzas */
.alliance-submenu {
    margin-top: 10px;
}

.submenu-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
}

.submenu-tab {
    flex: 1;
    padding: 8px 12px;
    background: none;
    border: none;
    color: #cccccc;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.submenu-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.submenu-tab.active {
    background: rgba(0, 255, 255, 0.1);
    color: #00ffff;
    border-bottom-color: #00ffff;
}

.submenu-content {
    display: none;
    padding: 10px 0;
}

.submenu-content.active {
    display: block;
}

/* Tarjetas de overview */
.alliance-overview-card {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.overview-section {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 12px;
}

.overview-section h6 {
    color: #00ffff;
    margin: 0 0 8px 0;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    padding-bottom: 4px;
}

.overview-section p {
    margin: 4px 0;
    font-size: 11px;
    color: #cccccc;
}

.overview-section strong {
    color: #ffffff;
}

/* Botones de acción rápida */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quick-action-btn {
    padding: 6px 10px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 4px;
    color: #00ffff;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-action-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: rgba(0, 255, 255, 0.5);
    transform: translateY(-1px);
}

.alliance-tab-content.active {
    display: block;
}

/* Contenido de las pestañas principales */
.alliance-tab-content {
    display: none;
    padding: 12px;
    background: transparent;
    color: #ffffff;
    flex: 1;
    overflow-y: auto;
}

/* Sección de búsqueda */
.search-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.alliance-search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
}

.alliance-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.alliance-level-filter {
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    min-width: 150px;
}

.alliance-search-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.alliance-search-btn:hover {
    background: linear-gradient(135deg, #44a08d, #4ecdc4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

/* Resultados de búsqueda */
.alliance-search-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.alliance-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(78, 205, 196, 0.3);
    transform: translateY(-2px);
}

.alliance-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.alliance-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4ecdc4;
    margin: 0;
}

.alliance-level {
    background: rgba(78, 205, 196, 0.2);
    color: #4ecdc4;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

.alliance-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
    line-height: 1.4;
}

.alliance-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.alliance-apply-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    border: none;
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.alliance-apply-btn:hover {
    background: linear-gradient(135deg, #ee5a52, #ff6b6b);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(255, 107, 107, 0.3);
}

/* Sección de gestión */
.alliance-user-info {
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.alliance-user-info h4 {
    color: #4ecdc4;
    margin: 0 0 15px 0;
    font-size: 1.2rem;
}

.alliance-info-text {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.alliance-action-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.alliance-action-btn:hover {
    background: linear-gradient(135deg, #44a08d, #4ecdc4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.alliance-leave-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
}

.alliance-leave-btn:hover {
    background: linear-gradient(135deg, #ee5a52, #ff6b6b);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* Formulario de creación */
.alliance-create-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    color: #4ecdc4;
    font-weight: 600;
    font-size: 0.9rem;
}

.alliance-form-input,
.alliance-form-textarea {
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
}

.alliance-form-input::placeholder,
.alliance-form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.alliance-form-textarea {
    resize: vertical;
    min-height: 80px;
}

.alliance-create-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.alliance-create-btn:hover {
    background: linear-gradient(135deg, #44a08d, #4ecdc4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

/* Alliance Applications */
.alliance-application {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #00ffff;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.application-info {
    flex: 1;
}

.application-user {
    font-weight: bold;
    color: #00ffff;
    font-size: 16px;
}

.application-message {
    color: #cccccc;
    margin: 5px 0;
    font-style: italic;
}

.application-date {
    color: #888888;
    font-size: 12px;
}

.application-actions {
    display: flex;
    gap: 10px;
}

.member-action-btn.success {
    background: #00aa00;
    color: white;
}

.member-action-btn.warning {
    background: #ff8800;
    color: white;
}

/* Alliance Chat */
.alliance-chat-messages {
    height: 200px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #00ffff;
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
}

.chat-message {
    margin: 8px 0;
    padding: 8px;
    background: rgba(0, 255, 255, 0.05);
    border-radius: 4px;
}

.message-header {
    display: flex;
    gap: 10px;
    margin-bottom: 4px;
}

.message-user {
    font-weight: bold;
    color: #00ffff;
}

.message-rank {
    color: #ffaa00;
    font-size: 12px;
}

.message-time {
    color: #888888;
    font-size: 11px;
}

.message-content {
    color: #cccccc;
    word-wrap: break-word;
}

.alliance-chat-form {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.alliance-chat-form input {
    flex: 1;
    padding: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00ffff;
    border-radius: 4px;
    color: white;
}

.alliance-chat-form button {
    padding: 8px 15px;
    background: #00ffff;
    color: #000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.alliance-chat-form button:hover {
    background: #00cccc;
}

/* Alliance Management Sections */
#alliance-applications-section,
#alliance-chat-section,
#alliance-members-section {
    margin: 20px 0;
}

#alliance-applications-section h5,
#alliance-chat-section h5,
#alliance-members-section h5 {
    color: #00ffff;
    margin-bottom: 10px;
    font-size: 16px;
    border-bottom: 1px solid #00ffff;
    padding-bottom: 5px;
}

.alliance-member {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 6px;
    margin: 4px 0;
    transition: all 0.3s ease;
}

.alliance-member:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: rgba(0, 255, 255, 0.4);
}

.member-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.member-name {
    color: #00ffff;
    font-weight: bold;
    font-size: 14px;
}

.member-rank {
    color: #ffaa00;
    font-size: 12px;
    font-weight: 500;
}

.member-level {
    color: #888888;
    font-size: 11px;
}

.member-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.member-action-btn {
    padding: 4px 8px;
    font-size: 11px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.member-action-btn:not(.danger):not(.warning):not(.success) {
    background: #00ffff;
    color: #000;
}

.member-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 255, 255, 0.3);
}

.member-action-btn.danger {
    background: #ff4444;
    color: white;
}

.member-action-btn.danger:hover {
    background: #ff2222;
    box-shadow: 0 2px 6px rgba(255, 68, 68, 0.3);
}

.member-action-btn.warning {
    background: #ff8800;
    color: white;
}

.member-action-btn.warning:hover {
    background: #ff6600;
    box-shadow: 0 2px 6px rgba(255, 136, 0, 0.3);
}

.member-action-btn.success {
    background: #00aa00;
    color: white;
}

.member-action-btn.success:hover {
    background: #008800;
    box-shadow: 0 2px 6px rgba(0, 170, 0, 0.3);
}

/* Lista de miembros */
.alliance-members-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 300px;
    overflow-y: auto;
    padding: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .alliance-modal {
        width: 95%;
        height: 80vh;
        font-size: 10px;
    }
    
    .alliance-header {
        padding: 6px 10px;
        font-size: 10px;
    }
    
    .alliance-header h3 {
        font-size: 10px;
    }
    
    .alliance-tab-content {
        padding: 8px;
        font-size: 9px;
    }
    
    .submenu-tabs {
        flex-direction: column;
    }
    
    .submenu-tab {
        padding: 6px 8px;
        font-size: 10px;
    }
    
    .alliance-overview-card {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .overview-section {
        padding: 8px;
    }
    
    .quick-actions {
        gap: 4px;
    }
    
    .quick-action-btn {
        padding: 4px 8px;
        font-size: 9px;
    }
    
    .search-controls {
        flex-direction: column;
    }
    
    .alliance-search-input,
    .alliance-level-filter {
        min-width: auto;
    }
    
    .alliance-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .alliance-stats {
        flex-direction: column;
        gap: 5px;
    }
    
    .alliance-member {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .member-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

.control-section {
    flex: 1;
    margin-bottom: 0;
}

.control-section h4 {
    margin: 0 0 15px 0; /* Aumentado para mejor espaciado */
    color: #4ecdc4;
    font-size: 1rem; /* Aumentado para mejor legibilidad */
    text-align: center;
    padding-bottom: 8px; /* Aumentado para mejor proporción */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}



.control-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0; /* Aumentado para mejor espaciado */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.control-key {
    color: #ffff00;
    font-weight: 600;
    font-size: 0.9rem; /* Aumentado para mejor legibilidad */
}

.control-description {
    color: #ccc;
    font-size: 0.85rem; /* Aumentado para mejor legibilidad */
    text-align: right;
}



.progress-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.progress-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.progress-item:last-child {
    margin-bottom: 0;
}

.progress-item-info {
    flex: 1;
    padding: 15px 20px;
}

.progress-item-info .mission-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    text-align: left;
}

.progress-item-info .mission-details {
    font-size: 0.9rem;
    color: #ccc;
    text-align: left;
    line-height: 1.4;
}

.progress-item-info .no-activities {
    color: #888;
    font-style: italic;
    font-size: 1rem;
    text-align: center;
    padding: 30px 20px;
}

.progress-item.no-activities {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin: 20px 0;
}

.progress-item-name {
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.progress-item-details {
    font-size: 0.8rem;
    color: #ccc;
}

.progress-bar-container {
    width: 200px;
    height: 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    overflow: hidden;
    margin: 0 20px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4, #44a08d);
    border-radius: 6px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
}

.progress-percentage {
    font-size: 1rem;
    color: #4ecdc4;
    font-weight: 700;
    min-width: 50px;
    text-align: right;
    text-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
    flex-shrink: 0;
}

/* Indicador de que las estrellas son clickeables */
.star-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    z-index: 999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.star-hint.show {
    opacity: 1;
}

/* Estilo especial para estrellas amarillas */
.star-hint.yellow-star {
    background: rgba(255, 255, 0, 0.15);
    border: 2px solid rgba(255, 255, 0, 0.6);
    color: #ffff00;
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.3);
}

.star-hint.yellow-star #star-hint-text {
    color: #ffff00;
    font-weight: 600;
}

#controls {
    --bgcol: rgba(128, 128, 128, 0.3);
    position: fixed !important;
    top: 0px !important;
    left: 20px !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: 100vh !important;
    max-width: 320px !important;
    min-width: 300px !important;
    padding: 12px !important;
    font-size: 12px !important;
    border-radius: 0 !important;
    background: #000000 !important;
    border: 2px solid rgba(128, 128, 128, 0.3) !important;
    z-index: 100 !important;
    overflow: visible !important;
    font-family: 'Courier New', monospace !important;
    user-select: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-100vh);
    opacity: 0;
    /* Efecto de bandera colgando */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    border-top: 3px solid #ffffff;
}

#controls.show {
    transform: translateY(0);
    opacity: 1;
}

/* Espacio vacío donde está el header */
#controls::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 85px;
    background: transparent;
    z-index: 10;
    pointer-events: none;
}

/* Contenedor del contenido del menú */
#controls .controls-content {
    position: relative;
    z-index: 1;
    margin-top: 85px;
}


/* Display de FPS en esquina inferior derecha */
.fps-display {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 9px;
    color: #666666;
    font-family: 'Courier New', monospace;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 6px;
    border-radius: 2px;
    border: 1px solid #333333;
}

/* Online Rewards Section */
.online-rewards-section {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(78, 205, 196, 0.3);
    border-radius: 8px;
    margin-top: 15px;
    padding: 12px;
    font-family: 'Courier New', monospace;
}

.online-rewards-header {
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(78, 205, 196, 0.3);
    padding-bottom: 8px;
}

.online-rewards-header h4 {
    color: #4ecdc4;
    font-size: 12px;
    font-weight: bold;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(78, 205, 196, 0.5);
}

.online-rewards-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rewards-progress {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.progress-label {
    color: #cccccc;
    font-size: 10px;
    text-align: center;
}

.progress-bar-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4 0%, #44a08d 100%);
    width: 0%;
    transition: width 1s ease;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
}

.progress-text {
    color: #4ecdc4;
    font-size: 11px;
    font-weight: bold;
    min-width: 35px;
    text-align: center;
}

.rewards-info {
    display: flex;
    justify-content: space-between;
    gap: 5px;
}

.reward-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.reward-icon {
    font-size: 14px;
}

.reward-amount {
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
}

.reward-resource {
    color: #cccccc;
    font-size: 9px;
    text-transform: uppercase;
}

.rewards-status {
    text-align: center;
    padding-top: 5px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.status-text {
    color: #4ecdc4;
    font-size: 10px;
    font-weight: bold;
}

/* Estados de conexión */
.rewards-status.offline .status-text {
    color: #ff6b6b;
}

.rewards-status.offline .status-text::before {
    content: "🔴 ";
}

.rewards-status.online .status-text::before {
    content: "🟢 ";
}

/* Botón de Claim Reward */
.claim-reward-btn {
    width: 100%;
    padding: 12px 20px;
    margin-top: 15px;
    background: linear-gradient(135deg, #00ff88, #00cc66);
    border: none;
    border-radius: 8px;
    color: #000;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
}

.claim-reward-btn:hover {
    background: linear-gradient(135deg, #00ff99, #00dd77);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.4);
}

.claim-reward-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 255, 136, 0.3);
}

.claim-reward-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#controls h1 {
    background: #000000;
    color: #ffffff;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
    border-bottom: 2px solid #333333;
    font-weight: bold;
    position: relative;
    z-index: 2;
    margin-top: 85px;
    margin-bottom: 0;
    margin: 0;
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
}

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

.control-group h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #4ecdc4;
    text-align: center;
}

/* Sección de información de la nave */
.ship-info-section {
    margin: 0;
    background: #000000;
    border-radius: 3px;
    padding: 12px;
    border: 2px solid rgba(128, 128, 128, 0.3);
    font-family: 'Courier New', monospace;
}

.ship-info-section h3 {
    font-size: 12px;
    margin: 0 0 12px 0;
    color: #ffffff;
    text-align: center;
    border-bottom: 2px solid #333333;
    padding-bottom: 8px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
}

.ship-info-content {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    background: transparent;
    padding: 8px;
    font-family: 'Courier New', monospace;
}

.ship-image-container {
    flex-shrink: 0;
}

.ship-image {
    width: 50px;
    height: 50px;
    border-radius: 2px;
    border: 1px solid #444;
    border-left: 2px solid #666;
    object-fit: cover;
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.8);
}

.ship-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ship-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    padding: 6px 10px;
    color: #cccccc;
    background: linear-gradient(90deg, #0f0f0f, #1a1a1a, #0f0f0f);
    border: 1px solid #333;
    border-left: 2px solid #555;
    border-radius: 2px;
}

.ship-stat.combat-power {
    background: linear-gradient(90deg, #1a0a0a, #2a1a1a, #1a0a0a);
    border: 1px solid #444;
    border-left: 2px solid #666;
    border-radius: 2px;
    padding: 6px 8px;
    margin-top: 6px;
    font-weight: 600;
    color: #dddddd;
}

.stat-label {
    color: #aaaaaa;
    font-weight: 500;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    color: #cccccc;
    font-weight: 600;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 11px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}

.ship-stat.combat-power .stat-label {
    color: #dd6666;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}

.ship-stat.combat-power .stat-value {
    color: #ff6666;
    font-size: 11px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Estilos para el botón MORE */
.ship-more-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #333333;
    border-radius: 3px;
    color: #ffffff;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 10px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
    width: 100%;
}

.ship-more-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: #666666;
    transform: scale(1.02);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

.ship-more-btn:active {
    transform: scale(0.98);
}

/* Estilos para stats adicionales */
.ship-stats-additional {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #333333;
}

.ship-stats-additional .ship-stat {
    margin-top: 3px;
}

.control-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.control-info p {
    font-size: 0.8rem;
    margin: 5px 0;
    color: #b0b0b0;
    line-height: 1.3;
}

/* Eliminación completa de líneas verticales */
#controls,
.control-group,
.control-info,
.structures-button {
    border-left: none !important;
    border-right: none !important;
}

#controls::before,
#controls::after,
.control-group::before,
.control-group::after,
.control-info::before,
.control-info::after,
.structures-button::before,
.structures-button::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    border: none !important;
    background: none !important;
}

/* Estilo adicional para cubrir cualquier línea vertical */
.control-info::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 100%;
    background: transparent;
    z-index: -1;
}

/* DEFINICIÓN ÚNICA Y LIMPIA DEL PANEL DE STRUCTURES */
.structures-panel {
    position: fixed !important;
    right: 0 !important;
    left: auto !important;
    top: 80px !important;
    z-index: 99999 !important;
    width: 0;
    height: calc(100vh - 80px);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    border-left: none;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: none;
    opacity: 0;
    transform: translateX(0);
}

/* REGLA AGRESIVA PARA FORZAR EL POSICIONAMIENTO */
.structures-panel,
#controls .structures-panel,
div[id="structures-panel"] {
    position: fixed !important;
    right: 0 !important;
    left: auto !important;
    top: 80px !important;
    z-index: 99999 !important;
    transform: none !important;
}

.control-info strong {
    color: #4ecdc4;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #b0b0b0;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #333;
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

/* ===== ESTILOS PARA LA LISTA DE ESTRELLAS ===== */

.stars-search {
    margin-bottom: 15px;
}

.stars-search-input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.stars-search-input:focus {
    outline: none;
    border-color: #4ecdc4;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.2);
}

.stars-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.stars-list-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stars-list {
    padding: 10px;
}

.star-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.star-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(78, 205, 196, 0.5);
    transform: translateX(5px);
}

.star-item.is-home {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.2), rgba(255, 107, 107, 0.2));
    border-color: #4ecdc4;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.3);
}

.star-item.is-home::before {
    content: "🏠";
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px rgba(78, 205, 196, 0.8));
}

.star-icon {
    font-size: 1.2rem;
    margin-right: 10px;
    min-width: 20px;
    text-align: center;
}

.star-info {
    flex: 1;
    min-width: 0;
}

.star-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.9rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.star-details {
    font-size: 0.75rem;
    color: #b0b0b0;
    line-height: 1.2;
}

.star-type {
    color: #4ecdc4;
}

.star-distance {
    color: #ff6b6b;
}

/* Scrollbar personalizado para la lista */
.stars-list-container::-webkit-scrollbar {
    width: 6px;
}

.stars-list-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.stars-list-container::-webkit-scrollbar-thumb {
    background: rgba(78, 205, 196, 0.5);
    border-radius: 3px;
}

.stars-list-container::-webkit-scrollbar-thumb:hover {
    background: rgba(78, 205, 196, 0.8);
}

.control-group button {
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.control-group button {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-right: 10px;
    margin-bottom: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.control-group button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.stats {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #aaaaaa;
    margin: 0;
    padding: 12px 15px;
    border-top: 1px solid #444;
    border-bottom: 1px solid #222;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    background: linear-gradient(135deg, #0f0f0f, #1a1a1a);
    border-radius: 0;
    font-family: 'Consolas', 'Monaco', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toggle-labels-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.3s ease;
}

.toggle-labels-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.toggle-labels-btn.active {
    background: rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.6);
    color: #4caf50;
}

#info-panel {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    min-width: 300px;
    max-width: 400px;
    transition: all 0.3s ease;
}

#info-panel.hidden {
    opacity: 0;
    transform: translateY(-50%) translateX(100%);
    pointer-events: none;
}

.info-header {
    background: linear-gradient(45deg, #667eea, #764ba2);
    padding: 15px 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: white;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: all 0.3s ease;
}

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

.info-content {
    padding: 20px;
}

.info-row {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.info-row .label {
    font-weight: bold;
    color: #4ecdc4;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.info-row span:not(.label),
.info-row p {
    color: #e0e0e0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.info-row p {
    margin: 0;
    font-style: italic;
}

/* ===== TUTORIAL SYSTEM STYLES ===== */

.tutorial-panel {
    position: fixed !important;
    top: 295px !important; /* Combat Scanner: top 85px + height 200px + margin 10px = 295px */
    right: 20px !important;
    width: 420px !important; /* Aumentado de 350px a 420px para la imagen */
    max-width: calc(100vw - 40px) !important;
    background: rgba(15, 23, 42, 0.98) !important; /* Más opaco */
    backdrop-filter: blur(15px) !important;
    border: 2px solid rgba(59, 130, 246, 0.8) !important; /* Borde más visible */
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.8) !important; /* Sombra más fuerte */
    z-index: 99999 !important; /* Z-index muy alto */
    font-family: 'Orbitron', monospace;
    animation: tutorialSlideInFromRight 0.3s ease-out;
    padding-left: 40px; /* Espacio para la imagen del robot */
    /* Estado por defecto: oculto */
    display: none;
    visibility: hidden;
    opacity: 0;
}

@keyframes tutorialSlideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Imagen del robot tutorial */
.tutorial-robot {
    position: absolute !important;
    left: -105px !important; /* Mitad del desplegable (420px / 2 = 210px, pero sobresale 105px) */
    top: 0 !important; /* Esquina superior izquierda */
    transform: none !important;
    width: 210px !important; /* Mitad del ancho del desplegable */
    height: 210px !important; /* Mismo alto que ancho para mantener proporción */
    z-index: 100000 !important;
    border-radius: 0 !important; /* Sin círculo */
    border: none !important; /* Sin borde */
    box-shadow: none !important; /* Sin sombra */
    background: transparent !important; /* Fondo transparente */
    padding: 0 !important; /* Sin padding */
    animation: none !important; /* Sin animación */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@keyframes robotGlow {
    from {
        box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
        border-color: rgba(59, 130, 246, 0.4);
    }
    to {
        box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
        border-color: rgba(59, 130, 246, 0.6);
    }
}

.tutorial-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 15px 20px !important;
    border-bottom: 2px solid rgba(59, 130, 246, 0.5) !important;
    background: rgba(59, 130, 246, 0.2) !important;
    border-radius: 12px 12px 0 0;
    visibility: visible !important;
    opacity: 1 !important;
}

.tutorial-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.tutorial-minimize-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 4px !important;
    color: #e2e8f0 !important;
    cursor: pointer !important;
    font-size: 16px !important;
    font-weight: bold !important;
    width: 24px !important;
    height: 24px !important;
    display: none !important; /* Oculto por defecto en escritorio */
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    line-height: 1 !important;
}

.tutorial-minimize-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.6) !important;
    color: #f87171 !important;
    transform: scale(1.1) !important;
}

.tutorial-header-right {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 8px !important;
}

.tutorial-language-selector {
    display: flex !important;
    gap: 4px !important;
    align-items: center !important;
}

.language-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 4px !important;
    padding: 4px 6px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    min-width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(59, 130, 246, 0.6) !important;
    transform: scale(1.1) !important;
}

.language-btn.active {
    background: rgba(59, 130, 246, 0.8) !important;
    border-color: rgba(59, 130, 246, 1) !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4) !important;
}

/* Indicador flotante minimizado */
.tutorial-floating-indicator {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(59, 130, 246, 0.6) !important;
    border-radius: 25px !important;
    padding: 8px 16px !important;
    z-index: 99998 !important;
    font-family: 'Orbitron', monospace !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6) !important;
    animation: floatingPulse 2s ease-in-out infinite alternate !important;
}

@keyframes floatingPulse {
    from {
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
        border-color: rgba(59, 130, 246, 0.6);
    }
    to {
        box-shadow: 0 6px 25px rgba(59, 130, 246, 0.6);
        border-color: rgba(59, 130, 246, 0.8);
    }
}

.floating-indicator-content {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.floating-step {
    color: #94a3b8 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
}

.tutorial-maximize-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    border: none !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 15px !important;
    cursor: pointer !important;
    font-family: 'Orbitron', monospace !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.2s ease !important;
}

.tutorial-maximize-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af) !important;
    transform: scale(1.05) !important;
}

.tutorial-header h3 {
    margin: 0;
    color: #60a5fa;
    font-size: 16px;
    font-weight: 600;
}

.tutorial-progress {
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
}

.tutorial-content {
    padding: 20px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.tutorial-content p {
    margin: 0 !important;
    color: #e2e8f0 !important;
    line-height: 1.6 !important;
    font-size: 14px !important;
    white-space: pre-line !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.tutorial-controls {
    display: flex !important;
    gap: 10px !important;
    padding: 15px 20px !important;
    border-top: 2px solid rgba(59, 130, 246, 0.5) !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 0 0 12px 12px;
    visibility: visible !important;
    opacity: 1 !important;
}

.tutorial-btn {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tutorial-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.tutorial-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-1px);
}

.tutorial-btn-secondary {
    background: rgba(71, 85, 105, 0.8);
    color: #e2e8f0;
    border: 1px solid rgba(71, 85, 105, 0.5);
}

.tutorial-btn-secondary:hover {
    background: rgba(71, 85, 105, 1);
    border-color: rgba(71, 85, 105, 0.8);
}

.tutorial-btn-skip {
    background: transparent;
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
    flex: 0.5;
}

.tutorial-btn-skip:hover {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.5);
}

/* Tutorial video link */
.tutorial-video-link {
    text-align: right;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0 0 12px 12px;
}

.tutorial-video-btn {
    color: #60a5fa;
    text-decoration: none;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid rgba(96, 165, 250, 0.3);
    background: rgba(96, 165, 250, 0.1);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tutorial-video-btn:hover {
    background: rgba(96, 165, 250, 0.2);
    border-color: rgba(96, 165, 250, 0.5);
    color: #93c5fd;
    transform: translateY(-1px);
}

/* Tutorial completion message */
.tutorial-completion-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    animation: tutorialFadeIn 0.5s ease-out;
}

.completion-content {
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(34, 197, 94, 0.4);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    max-width: 400px;
}

.completion-content h3 {
    color: #22c55e;
    margin: 0 0 15px 0;
    font-size: 20px;
}

.completion-content p {
    color: #e2e8f0;
    margin: 10px 0;
    line-height: 1.5;
}

@keyframes tutorialFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Tutorial activo - mostrar */
.tutorial-panel.tutorial-active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateX(0) !important;
}

/* Tutorial cerrado - override forzado */
.tutorial-panel.tutorial-closed,
.tutorial-panel[data-closed="true"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -9999 !important;
    transform: translateX(100%) !important;
}


/* Responsive tutorial - Estos estilos se aplicarán por JavaScript para mejor control */
@media (max-width: 768px) {
    .tutorial-panel {
        padding-left: 15px !important; /* Padding normal sin robot */
        padding-top: 0 !important; /* Sin espacio extra arriba */
        overflow-y: auto !important;
        /* Posición y tamaño controlados por JavaScript para mejor adaptación */
    }
    
    .tutorial-robot {
        display: none !important; /* Ocultar robot completamente en móvil */
    }
    
    .tutorial-header {
        padding: 12px 15px !important;
        padding-left: 15px !important; /* Sin espacio para robot en móvil */
        flex-wrap: wrap !important;
        margin-top: 0 !important;
    }
    
    .tutorial-header-left {
        flex: 1 !important;
        min-width: 150px !important;
    }
    
    .tutorial-header-right {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: flex-end !important;
    }
    
    .tutorial-language-selector {
        order: 2 !important;
    }
    
    .tutorial-progress {
        order: 1 !important;
        font-size: 12px !important;
    }
    
    .language-btn {
        min-width: 22px !important;
        height: 22px !important;
        font-size: 11px !important;
        padding: 2px 4px !important;
    }
    
    .tutorial-minimize-btn {
        display: flex !important; /* Mostrar solo en móvil */
        width: 20px !important;
        height: 20px !important;
        font-size: 14px !important;
    }
    
    .tutorial-content {
        padding: 15px !important;
        padding-left: 15px !important; /* Sin espacio para robot en móvil */
        padding-top: 15px !important; /* Padding normal */
        font-size: 13px !important;
        line-height: 1.5 !important;
        max-height: 35vh !important; /* Limitar altura del contenido */
        overflow-y: auto !important;
    }
    
    .tutorial-controls {
        flex-direction: row !important; /* Mantener horizontal en móvil */
        padding: 12px 15px !important;
        padding-left: 15px !important; /* Sin espacio para robot en móvil */
        gap: 8px !important;
    }
    
    .tutorial-btn {
        flex: 1 !important;
        padding: 10px 8px !important;
        font-size: 10px !important;
        min-height: 36px !important; /* Altura mínima para touch */
    }
    
    .tutorial-btn-skip {
        flex: 0.8 !important;
    }
    
    /* Indicador flotante en móvil */
    .tutorial-floating-indicator {
        bottom: 80px !important; /* Más arriba para evitar interferir con chat */
        right: 10px !important;
        padding: 6px 12px !important;
        border-radius: 20px !important;
    }
    
    .floating-step {
        font-size: 11px !important;
    }
    
    .tutorial-maximize-btn {
        padding: 4px 8px !important;
        font-size: 9px !important;
        border-radius: 12px !important;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    #controls {
        top: 0px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        max-width: none !important;
        padding: 20px !important;
        font-size: 14px !important;
        border-radius: 0 !important;
        position: fixed !important;
        z-index: 100 !important;
        background: #000000 !important;
        border: 2px solid rgba(128, 128, 128, 0.3) !important;
        overflow-y: auto !important;
        font-family: 'Courier New', monospace !important;
    }
    
    /* FPS display en móvil */
    .fps-display {
        bottom: 20px !important;
        right: 20px !important;
        font-size: 10px !important;
        padding: 4px 8px !important;
    }
    
    /* Estado minimizado del panel - completamente oculto */
    #controls.minimized {
        display: none !important;
    }
    
    #controls h1 {
        background: #000000 !important;
        color: #ffffff !important;
        padding: 8px 12px !important;
        border-bottom: 2px solid #333333 !important;
        font-size: 12px !important;
        font-weight: bold !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        font-family: 'Courier New', monospace !important;
        margin: 0 !important;
    }
    
    /* Botón rojo independiente para abrir panel de controles en móvil */
    #mobile-controls-toggle {
        position: fixed !important;
        top: 70px !important;
        left: 10px !important;
        width: 40px !important;
        height: 40px !important;
        background: #ff4444 !important;
        border: 2px solid #ffffff !important;
        border-radius: 50% !important;
        color: #ffffff !important;
        font-size: 18px !important;
        font-weight: bold !important;
        display: flex !important; /* Mostrar por defecto en móvil */
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        z-index: 10001 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
        transition: all 0.3s ease !important;
        pointer-events: auto !important;
    }
    
    #mobile-controls-toggle:hover {
        background: #ff6666 !important;
        transform: scale(1.1) !important;
    }
    
    #mobile-controls-toggle.hidden {
        display: none !important;
    }
}

/* Estilos del botón en escritorio */
@media (min-width: 769px) {
    #mobile-controls-toggle {
        display: none !important;
    }
    
    
    /* Restaurar estilos originales de escritorio para #controls */
    #controls {
        position: fixed !important;
        top: 0px !important;
        left: 20px !important;
        right: auto !important;
        bottom: auto !important;
        width: auto !important;
        height: 100vh !important;
        max-width: 320px !important;
        min-width: 300px !important;
        padding: 12px !important;
        font-size: 12px !important;
        border-radius: 0 !important;
        background: #000000 !important;
        border: 2px solid rgba(128, 128, 128, 0.3) !important;
        z-index: 100 !important;
        overflow: visible !important;
        font-family: 'Courier New', monospace !important;
    }
    
    #controls h1 {
        background: #000000 !important;
        color: #ffffff !important;
        padding: 8px 12px !important;
        border-bottom: 2px solid #333333 !important;
        font-size: 12px !important;
        font-weight: bold !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        font-family: 'Courier New', monospace !important;
        margin: 0 !important;
    }
    
    #controls .ship-info-section {
        margin-bottom: 10px !important;
        padding: 8px !important;
        background: #000000 !important;
        border: 2px solid rgba(128, 128, 128, 0.3) !important;
        border-radius: 3px !important;
        font-family: 'Courier New', monospace !important;
    }
    
    #controls .ship-info-section h3 {
        font-size: 12px !important;
        margin: 0 0 5px 0 !important;
        padding-bottom: 3px !important;
        text-align: left !important;
        border-bottom: 1px solid #333 !important;
    }
    
    #controls .ship-info-content {
        flex-direction: row !important;
        gap: 8px !important;
        align-items: flex-start !important;
        background: transparent !important;
        padding: 6px !important;
        font-family: 'Courier New', monospace !important;
    }
    
    #controls .ship-image-container {
        width: 40px !important;
        height: 40px !important;
    }
    
    #controls .ship-stats {
        width: 100% !important;
        gap: 2px !important;
        flex-direction: column !important;
    }
    
    #controls .ship-stat {
        font-size: 10px !important;
        padding: 2px 4px !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
    }
    
    #controls .ship-stat.combat-power {
        padding: 3px 4px !important;
        margin-top: 3px !important;
        font-size: 11px !important;
        background: rgba(255, 0, 0, 0.1) !important;
        border: 1px solid rgba(255, 0, 0, 0.3) !important;
    }
    
    /* Botón MORE en móvil */
    .ship-more-btn {
        font-size: 8px !important;
        padding: 4px 8px !important;
        margin-top: 6px !important;
    }
    
    /* Stats adicionales en móvil */
    .ship-stats-additional {
        margin-top: 6px !important;
        padding-top: 6px !important;
    }
    
    .ship-stats-additional .ship-stat {
        margin-top: 2px !important;
        font-size: 8px !important;
        padding: 1px 2px !important;
    }
    
    #controls .stat-label {
        font-size: 10px !important;
        font-weight: normal !important;
    }
    
    #controls .stat-value {
        font-size: 10px !important;
        color: #00ff00 !important;
    }
    
    #controls .stats {
        font-size: 10px !important;
        padding: 4px 6px !important;
        gap: 4px !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        justify-content: space-between !important;
    }
    
    /* Estado minimizado del panel - completamente oculto */
    #controls.minimized {
        display: none !important;
    }
    
    /* Estado expandido del panel - asegurar que todo sea visible */
    #controls:not(.minimized) {
        height: auto !important;
        overflow: visible !important;
    }
    
    #controls:not(.minimized) .ship-info-section,
    #controls:not(.minimized) .stats {
        display: block !important;
    }
    
    #controls:not(.minimized) h1 {
        font-size: 14px !important;
        margin: 0 !important;
        padding: 8px 12px !important;
    }
    
    /* Estilos para elementos de la nave en móvil */
    #controls .ship-info-section {
        margin-bottom: 30px !important;
        padding: 20px !important;
        display: block !important;
        background: #000000 !important;
        border-radius: 3px !important;
        border: 2px solid rgba(128, 128, 128, 0.3) !important;
        font-family: 'Courier New', monospace !important;
    }
    
    #controls .ship-info-section h3 {
        font-size: 20px !important;
        margin: 0 0 15px 0 !important;
        padding-bottom: 8px !important;
        text-align: center !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    }
    
    #controls .ship-info-content {
        flex-direction: column !important;
        gap: 15px !important;
        align-items: center !important;
        display: flex !important;
        background: transparent !important;
        padding: 8px !important;
        font-family: 'Courier New', monospace !important;
    }
    
    #controls .ship-image-container {
        width: 80px !important;
        height: 80px !important;
    }
    
    #controls .ship-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }
    
    #controls .ship-stats {
        width: 100% !important;
        gap: 8px !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    #controls .ship-stat {
        font-size: 14px !important;
        padding: 8px 12px !important;
        justify-content: space-between !important;
        display: flex !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 5px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    #controls .ship-stat.combat-power {
        padding: 10px 12px !important;
        margin-top: 8px !important;
        font-size: 16px !important;
        background: rgba(255, 0, 0, 0.1) !important;
        border: 1px solid rgba(255, 0, 0, 0.3) !important;
    }
    
    #controls .stat-label {
        font-size: 14px !important;
        font-weight: bold !important;
    }
    
    #controls .stat-value {
        font-size: 14px !important;
        color: #00ff00 !important;
    }
    
    #controls .stats {
        font-size: 14px !important;
        padding: 15px 20px !important;
        gap: 10px !important;
        display: flex !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 10px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        justify-content: center !important;
    }
    
    #info-panel {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    .control-group button {
        width: 100%;
        margin-right: 0;
        margin-bottom: 8px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

#info-panel:not(.hidden) {
    animation: fadeIn 0.3s ease-out;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #45b7d1, #4ecdc4);
}

    .control-button {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
        padding: 10px 20px;
        border-radius: 25px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 600;
        transition: all 0.3s ease;
        margin-top: 10px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
    .control-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }
    
    .control-button:active {
        transform: translateY(0);
    }

/* Panel flotante de información de estrellas */
.floating-star-info {
    position: fixed;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px;
    max-width: 280px;
    z-index: 10000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-out;
    font-size: 0.9rem;
}

.floating-ystar-info {
    position: fixed;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 0, 0.6);
    border-radius: 12px;
    padding: 15px;
    max-width: 280px;
    z-index: 10000;
    box-shadow: 0 8px 32px rgba(255, 255, 0, 0.3);
    animation: fadeIn 0.3s ease-out;
    font-size: 0.9rem;
}

.star-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.star-info-header h4 {
    margin: 0;
    color: #4ecdc4;
    font-size: 1.1rem;
    font-weight: 600;
}

.close-info-btn {
    background: none;
    border: none;
    color: #ff6b6b;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-info-btn:hover {
    background: rgba(255, 107, 107, 0.1);
    color: #ff8e8e;
}

.star-info-content {
    color: #e0e0e0;
}

.star-info-content .info-row {
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
}

.star-info-content .info-row .label {
    font-weight: 600;
    color: #4ecdc4;
    font-size: 0.8rem;
    margin-bottom: 2px;
}

.star-info-content .info-row span:not(.label),
.star-info-content .info-row p {
    color: #ffffff;
    font-size: 0.85rem;
    line-height: 1.3;
}

.star-info-content .info-row p {
    margin: 0;
    font-style: italic;
    color: #b0b0b0;
}

/* Responsive para el panel flotante */
@media (max-width: 768px) {
    .floating-star-info {
        max-width: 250px;
        padding: 12px;
        font-size: 0.8rem;
    }
    
    .star-info-header h4 {
        font-size: 1rem;
    }
}

/* ===== SISTEMA DE AUTENTICACIÓN ===== */

/* Estilos holográficos para el sistema de autenticación */

/* FONDO DEL LOGIN - NUEVO */
body.login-active {
    background-image: url('public/img/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

/* Degradado del footer para el login */
body.login-active::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Efecto de partículas para el login */
body.login-active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(0, 150, 255, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(0, 195, 255, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(0, 150, 255, 0.3), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(0, 195, 255, 0.2), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: particle-float 20s linear infinite;
    pointer-events: none;
    z-index: 2;
}

/* Animación de partículas mejorada */
@keyframes particle-float {
    0% {
        transform: translateY(100vh);
    }
    100% {
        transform: translateY(-100px);
    }
}

/* Animaciones para notificaciones */
@keyframes slideDown {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px);
        opacity: 0;
    }
}



/* Header */
.header {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 40px;
    height: 60px;
    pointer-events: none;
}

.logo {
    height: 100px;
    width: auto;
}

/* Contenedor de autenticación */
#auth-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    background: transparent;
    overflow-y: auto;
}

/* Cuando el contenedor de autenticación está oculto */
#auth-container.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    z-index: -1 !important;
    pointer-events: none !important;
}


/* Asegurar que el universo esté visible cuando se muestra */
#universe-container {
    position: relative;
    z-index: 1;
}



.content {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    color: white;
    padding: 80px 20px 40px 20px;
    overflow-y: auto;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 500px;
    padding: 40px;
    margin-bottom: 40px;
}

.login-logo {
    height: 120px;
    width: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(0, 195, 255, 0.6));
    transition: all 0.3s ease;
}

.login-logo:hover {
    filter: drop-shadow(0 0 30px rgba(0, 195, 255, 0.8));
    transform: scale(1.05);
}

.login-subtitle {
    font-size: 1.2rem;
    color: rgba(0, 150, 255, 0.8);
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: 1px;
}

.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-height: auto;
}

.register-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-height: auto;
    padding-bottom: 20px;
}

.form-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

/* Estilos holográficos para inputs */
.input-container {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.input-field-container {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
}

.holo-input {
    width: 100%;
    height: 60px;
    background: rgba(0, 0, 0, 0.9);
    border: none;
    outline: none;
    padding: 0 60px 0 20px;
    color: white;
    font-family: "Orbitron", sans-serif;
    font-size: 18px;
    letter-spacing: 1px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 4px;
    box-shadow:
        0 0 15px rgba(0, 140, 255, 0.3),
        inset 0 0 10px rgba(0, 0, 0, 0.8);
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(0, 160, 255, 0.7);
    z-index: 1;
}

.holo-input::placeholder {
    color: rgba(0, 110, 200, 0.4);
    transition: all 0.3s ease;
}

.input-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border: 1px solid rgba(0, 150, 255, 0.4);
    border-radius: 4px;
    z-index: 2;
}

.input-border::before,
.input-border::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(0, 150, 255, 0.7);
    z-index: 2;
    transition: all 0.3s ease;
}

.input-border::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.input-border::after {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

.holo-scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 150, 255, 0.5) 20%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(0, 150, 255, 0.5) 80%,
        rgba(0, 0, 0, 0) 100%
    );
    top: 0;
    left: 0;
    opacity: 0;
    filter: blur(1px);
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.input-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 150, 255, 0.1) 0%,
        rgba(0, 0, 0, 0) 70%
    );
    opacity: 0;
    border-radius: 4px;
    z-index: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.input-active-indicator {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(0, 150, 255, 0.7);
    border-radius: 50%;
    right: 20px;
    top: 25px;
    opacity: 0.3;
    box-shadow: 0 0 10px rgba(0, 150, 255, 0.5);
    transition: all 0.3s ease;
    z-index: 2;
}

.input-label {
    position: absolute;
    top: -30px;
    left: 0;
    color: rgba(0, 150, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    pointer-events: none;
    text-shadow: 0 0 5px rgba(0, 150, 255, 0.5);
}

.input-data-visualization {
    position: absolute;
    width: calc(100% - 40px);
    height: 3px;
    bottom: 12px;
    left: 20px;
    display: flex;
    justify-content: space-between;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.data-segment {
    width: 4%;
    height: 100%;
    background: rgba(0, 150, 255, 0.3);
    transition: all 0.5s ease;
}

.data-segment:nth-child(even) {
    height: 5px;
    transform: translateY(-1px);
}

.input-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
    border-radius: 4px;
}

.input-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(0, 150, 255, 0.7);
    border-radius: 50%;
    opacity: 0;
    filter: blur(1px);
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(0, 150, 255, 0.7);
}

.input-holo-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: linear-gradient(
        90deg,
        rgba(0, 150, 255, 0.05) 25%,
        rgba(0, 150, 255, 0.02) 50%,
        rgba(0, 150, 255, 0.05) 75%
    );
    background-size: 8px 100%;
    opacity: 0.5;
    pointer-events: none;
    z-index: 4;
    mix-blend-mode: overlay;
}

.interface-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 2;
}

.interface-line {
    position: absolute;
    background: rgba(0, 150, 255, 0.3);
    transition: all 0.3s ease;
}

.interface-line:nth-child(1) {
    width: 20px;
    height: 1px;
    top: 15px;
    right: 15px;
}

.interface-line:nth-child(2) {
    width: 1px;
    height: 20px;
    top: 15px;
    right: 15px;
}

.interface-line:nth-child(3) {
    width: 1px;
    height: 20px;
    bottom: 15px;
    left: 15px;
}

.interface-line:nth-child(4) {
    width: 20px;
    height: 1px;
    bottom: 15px;
    left: 15px;
}

.hex-decoration {
    position: absolute;
    width: 30px;
    height: 34px;
    background: transparent;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    border: 1px solid rgba(0, 150, 255, 0.3);
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    transition: all 0.3s ease;
    z-index: 2;
}

.input-status {
    position: absolute;
    bottom: -25px;
    right: 0;
    font-size: 12px;
    color: rgba(0, 150, 255, 0.5);
    letter-spacing: 1px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    text-transform: uppercase;
}

@keyframes scan-animation {
    0% {
        top: 0;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

@keyframes data-pulse {
    0% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(1.8);
    }
    100% {
        transform: scaleY(1);
    }
}

@keyframes particle-float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.holo-input:focus {
    background: rgba(0, 0, 0, 0.95);
    box-shadow:
        0 0 20px rgba(0, 150, 255, 0.4),
        inset 0 0 15px rgba(0, 0, 0, 0.9);
    color: white;
}

.holo-input:focus::placeholder {
    color: rgba(0, 150, 255, 0.3);
    transform: translateX(10px);
}

.holo-input:focus ~ .input-border {
    border-color: rgba(0, 180, 255, 0.7);
}

.holo-input:focus ~ .input-border::before,
.holo-input:focus ~ .input-border::after {
    border-color: rgba(0, 180, 255, 1);
    width: 30px;
    height: 30px;
}

.holo-input:focus ~ .holo-scan-line {
    opacity: 1;
    animation: scan-animation 2s infinite ease-in-out;
}

.holo-input:focus ~ .input-glow {
    opacity: 1;
}

.holo-input:focus ~ .input-active-indicator {
    opacity: 1;
    background: rgba(0, 200, 255, 1);
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.7);
    transform: scale(1.2);
}

.holo-input:focus ~ .input-label {
    color: rgba(0, 200, 255, 1);
    text-shadow: 0 0 10px rgba(0, 200, 255, 0.7);
    transform: translateY(-5px);
}

.holo-input:focus ~ .input-data-visualization {
    opacity: 1;
}

.holo-input:focus ~ .input-data-visualization .data-segment {
    animation: data-pulse 2s infinite;
    animation-delay: calc(var(--index) * 0.1s);
}

.holo-input:focus ~ .input-status {
    opacity: 1;
}

.holo-input:focus ~ .interface-lines .interface-line {
    background: rgba(0, 200, 255, 0.6);
}

.holo-input:focus ~ .hex-decoration {
    border-color: rgba(0, 200, 255, 0.6);
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.3);
    transform: translateY(-50%) rotate(30deg);
}

.holo-input:focus ~ .input-particles .input-particle {
    opacity: 1;
    animation: particle-float 3s infinite ease-in-out;
    animation-delay: calc(var(--index) * 0.2s);
}

.holo-input:hover {
    background: rgba(0, 0, 0, 0.85);
}

.holo-input:hover ~ .input-active-indicator {
    opacity: 0.6;
}

.holo-input:hover ~ .hex-decoration {
    border-color: rgba(0, 180, 255, 0.5);
}

.power-indicator {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        rgba(0, 180, 255, 0.7) 0%,
        rgba(0, 180, 255, 0.3) 100%
    );
    bottom: 0;
    left: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: 3;
}

.holo-input:focus ~ .power-indicator {
    transform: scaleX(1);
}

.input-decoration {
    position: absolute;
    top: 50%;
    left: -30px;
    transform: translateY(-50%);
    width: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    opacity: 0.7;
    transition: all 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.decoration-dot {
    width: 4px;
    height: 4px;
    background: rgba(0, 150, 255, 0.7);
    border-radius: 50%;
    margin: 3px 0;
}

.decoration-line {
    width: 15px;
    height: 1px;
    background: rgba(0, 150, 255, 0.5);
    margin: 3px 0;
}

.holo-input:focus ~ .input-decoration {
    opacity: 1;
    transform: translateY(-50%) translateX(-5px);
}

.holo-input:focus ~ .input-decoration .decoration-dot {
    background: rgba(0, 200, 255, 1);
    box-shadow: 0 0 5px rgba(0, 200, 255, 0.7);
}

.holo-input:focus ~ .input-decoration .decoration-line {
    background: rgba(0, 200, 255, 0.7);
    box-shadow: 0 0 3px rgba(0, 200, 255, 0.5);
}

/* Estilos para botones holográficos */
.holo-button {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(0, 150, 255, 0.6);
    color: white;
    padding: 15px 30px;
    font-family: "Orbitron", sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 4px;
    box-shadow:
        0 0 15px rgba(0, 140, 255, 0.3),
        inset 0 0 10px rgba(0, 0, 0, 0.8);
    text-shadow: 0 0 5px rgba(0, 160, 255, 0.7);
    position: relative;
    overflow: hidden;
}

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

.holo-button:hover {
    background: rgba(0, 0, 0, 0.95);
    border-color: rgba(0, 180, 255, 0.8);
    color: white;
    box-shadow:
        0 0 25px rgba(0, 150, 255, 0.5),
        inset 0 0 15px rgba(0, 0, 0, 0.9);
    transform: translateY(-2px);
}

.holo-button:hover::before {
    left: 100%;
}

.holo-button:active {
    transform: translateY(0);
    box-shadow:
        0 0 15px rgba(0, 150, 255, 0.3),
        inset 0 0 10px rgba(0, 0, 0, 0.8);
}

/* Discord Section Styles */
.discord-section {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.discord-divider {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 15px;
    margin-bottom: 10px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
    position: relative;
}

.divider-line::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
    filter: blur(1px);
}

.divider-text {
    color: #00d4ff;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.discord-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.1), rgba(88, 101, 242, 0.05));
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.discord-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(88, 101, 242, 0.2), transparent);
    transition: left 0.5s ease;
}

.discord-link:hover::before {
    left: 100%;
}

.discord-link:hover {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.2), rgba(88, 101, 242, 0.1));
    border-color: rgba(88, 101, 242, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.3);
}

.discord-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #5865f2;
    transition: all 0.3s ease;
}

.discord-link:hover .discord-icon {
    color: #7289da;
    transform: scale(1.1);
}

.discord-text {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.discord-link:hover .discord-text {
    color: #00d4ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Responsive */
@media (max-width: 1200px) {
    .login-container {
        max-width: 450px;
        padding: 30px;
    }
    
    .login-logo {
        height: 100px;
    }
    
    /* Discord responsive para tablets */
    .discord-link {
        padding: 10px 20px;
        gap: 10px;
    }
    
    .discord-icon {
        width: 28px;
        height: 28px;
    }
    
    .discord-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
        height: 80px;
    }
    
    .logo {
        height: 60px;
    }
    
    .content {
        height: calc(100vh - 80px);
        padding: 20px;
    }
    
    .login-container {
        max-width: 100%;
        padding: 20px;
    }
    
    .login-logo {
        height: 80px;
        margin-bottom: 15px;
    }
    
    .login-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .login-form, .register-form {
        gap: 25px;
    }
    
    .input-container {
        margin-bottom: 25px;
    }
    
    .holo-input {
        height: 50px;
        font-size: 16px;
        padding: 0 50px 0 15px;
    }
    
    .form-buttons {
        flex-direction: column;
        gap: 15px;
        margin-top: 15px;
    }
    
    .holo-button {
        padding: 12px 25px;
        font-size: 14px;
        width: 100%;
    }
    
    .input-label {
        font-size: 12px;
        top: -25px;
    }
    
    .input-status {
        font-size: 10px;
        bottom: -20px;
    }
    
    /* Discord responsive para móvil */
    .discord-section {
        margin-top: 20px;
        gap: 10px;
    }
    
    .discord-divider {
        gap: 10px;
        margin-bottom: 8px;
    }
    
    .divider-text {
        font-size: 0.7rem;
    }
    
    .discord-link {
        padding: 8px 16px;
        gap: 8px;
        width: 100%;
        justify-content: center;
    }
    
    .discord-icon {
        width: 24px;
        height: 24px;
    }
    
    .discord-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 10px 15px;
        height: 70px;
    }
    
    .logo {
        height: 50px;
    }
    
    .content {
        height: calc(100vh - 70px);
        padding: 15px;
    }
    
    .login-container {
        padding: 15px;
    }
    
    .login-logo {
        height: 70px;
        margin-bottom: 10px;
    }
    
    .login-subtitle {
        font-size: 0.9rem;
        margin-bottom: 25px;
    }
    
    .login-form, .register-form {
        gap: 20px;
    }
    
    .input-container {
        margin-bottom: 20px;
    }
    
    .holo-input {
        height: 45px;
        font-size: 14px;
        padding: 0 45px 0 12px;
    }
    
    .holo-button {
        padding: 10px 20px;
        font-size: 12px;
        letter-spacing: 1px;
    }
    
    .input-label {
        font-size: 11px;
        top: -22px;
    }
    
    .input-status {
        font-size: 9px;
        bottom: -18px;
    }
    
    /* Discord responsive para móviles pequeños */
    .discord-section {
        margin-top: 15px;
        gap: 8px;
    }
    
    .discord-divider {
        gap: 8px;
        margin-bottom: 6px;
    }
    
    .divider-text {
        font-size: 0.65rem;
        letter-spacing: 0.5px;
    }
    
    .discord-link {
        padding: 6px 12px;
        gap: 6px;
        border-radius: 6px;
    }
    
    .discord-icon {
        width: 20px;
        height: 20px;
    }
    
    .discord-text {
        font-size: 0.75rem;
        letter-spacing: 0.5px;
    }
    
    .input-active-indicator {
        width: 8px;
        height: 8px;
        right: 15px;
        top: 18px;
    }
    
    .hex-decoration {
        width: 25px;
        height: 28px;
        right: -12px;
    }
    
    .input-decoration {
        left: -25px;
        width: 15px;
    }
    
    .decoration-dot {
        width: 3px;
        height: 3px;
    }
    
    .decoration-line {
        width: 12px;
    }
}

@media (max-width: 360px) {
    .login-logo {
        height: 60px;
    }
    
    .login-subtitle {
        font-size: 0.8rem;
    }
    
    .holo-input {
        height: 40px;
        font-size: 13px;
    }
    
    .holo-button {
        padding: 8px 15px;
        font-size: 11px;
    }
}

/* Responsive Discord Section */
@media (max-width: 768px) {
    .discord-section {
        margin-top: 25px;
    }
    
    .discord-link {
        padding: 10px 20px;
        gap: 10px;
    }
    
    .discord-icon {
        width: 28px;
        height: 28px;
    }
    
    .discord-text {
        font-size: 0.8rem;
    }
    
    .divider-text {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .discord-section {
        margin-top: 20px;
    }
    
    .discord-link {
        padding: 8px 16px;
        gap: 8px;
    }
    
    .discord-icon {
        width: 24px;
        height: 24px;
    }
    
    .discord-text {
        font-size: 0.75rem;
    }
    
    .divider-text {
        font-size: 0.65rem;
    }
}

/* ===== HEADER DEL USUARIO ===== */

.user-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    font-size: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.username {
    color: #4ecdc4;
    font-weight: 600;
    font-size: 1.1rem;
}

.user-email {
    color: #b0b0b0;
    font-size: 0.9rem;
}

/* ===== RECURSOS DEL USUARIO ===== */
.user-resources {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: auto;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 10px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.resource-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.resource-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.resource-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Colores específicos para cada recurso */
.metal-circle {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    border: 1.5px solid #654321;
}

.crystal-circle {
    background: linear-gradient(135deg, #4169E1, #1E90FF);
    border: 1.5px solid #000080;
}

.deuterium-circle {
    background: linear-gradient(135deg, #32CD32, #228B22);
    border: 1.5px solid #006400;
}

/* UEC Container - Combat Scanner Style */
.uec-container {
    display: flex;
    align-items: center;
}

.uec-box {
    position: relative;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(128, 128, 128, 0.8);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    min-width: 60px;
    min-height: 30px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uec-content {
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
    position: relative;
}

.uec-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    overflow: hidden;
}

.uec-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.uec-label {
    color: #4ecdc4;
    font-size: 8px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1px;
    line-height: 1;
}

.uec-amount {
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(78, 205, 196, 0.5);
    line-height: 1;
}

/* Window Brackets for UEC Box */
.uec-box .window-bracket {
    position: absolute;
    width: 8px;
    height: 8px;
    border: 1px solid #4ecdc4;
}

.uec-box .window-bracket.top-left {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.uec-box .window-bracket.top-right {
    top: -1px;
    right: -1px;
    border-left: none;
    border-bottom: none;
}

.uec-box .window-bracket.bottom-left {
    bottom: -1px;
    left: -1px;
    border-right: none;
    border-top: none;
}

.uec-box .window-bracket.bottom-right {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}



.resource-amount {
    color: #e0e0e0;
    font-weight: 500;
    font-size: 0.85rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Contador de jugadores online */
.players-online-counter {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 20px;
    padding: 6px 12px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #00ff00;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 255, 0, 0.2);
    transition: all 0.3s ease;
}

.players-online-counter:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(0, 255, 0, 0.5);
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3);
    transform: translateY(-1px);
}

.online-icon {
    font-size: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.online-text {
    color: #cccccc;
    font-weight: normal;
}

.online-count {
    color: #00ff00;
    font-weight: bold;
    font-size: 16px;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

/* Contador específico para el login */
.login-counter {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 255, 0, 0.4);
    box-shadow: 0 4px 20px rgba(0, 255, 0, 0.3);
}

.tutorial-button {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-right: 10px;
}

.tutorial-button:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.logout-button {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.logout-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Ajustar el contenedor principal para el header */
#universe-container {
    padding-top: 80px; /* Espacio para el header fijo */
    width: 100vw; /* Ancho completo de la ventana */
    height: 100vh; /* Altura completa de la ventana */
    position: relative; /* Posicionamiento relativo para el canvas */
    overflow: hidden; /* Evitar scroll horizontal */
}

/* Asegurar que el canvas 3D ocupe todo el contenedor */
#universe-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    position: relative;
    z-index: 1;
    z-index: 10;
}

/* Responsive para autenticación */
@media (max-width: 768px) {
    .auth-wrapper {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .auth-header h1 {
        font-size: 2rem;
    }
    
    .user-header {
        padding: 10px 15px;
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .username {
        font-size: 1rem;
    }
    
    .user-email {
        font-size: 0.8rem;
    }
    
    .logout-button {
        padding: 6px 12px !important;
        font-size: 0.75rem !important;
        border-radius: 15px !important;
    }
    
    .ships-button {
        padding: 6px 12px !important;
        font-size: 0.75rem !important;
        border-radius: 15px !important;
        margin-right: 8px !important;
    }
    
    .notifications-button {
        padding: 6px 10px !important;
        font-size: 1rem !important;
        border-radius: 6px !important;
        margin-right: 8px !important;
    }
    
    .header-actions {
        gap: 6px !important;
    }
    
    /* Responsive para recursos */
    .user-resources {
        gap: 8px;
        margin-left: 15px;
    }
    
    .resource-item {
        padding: 5px 8px;
        gap: 5px;
    }
    
    .resource-icon {
        width: 10px;
        height: 10px;
    }
    
    .resource-amount {
        font-size: 0.8rem;
    }
}

/* Estilos para el botón Structures */
.structures-button {
    width: 100%;
    height: 100%;
    border: none !important;
    outline: none !important;
    background: linear-gradient(135deg, #4ecdc4, #45b7d1);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.structures-button:hover {
    background: linear-gradient(135deg, #45b7d1, #4ecdc4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Asegurar que no haya líneas verticales en el botón */
.structures-button:focus,
.structures-button:active {
    outline: none;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.structures-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Panel desplegable de Structures - DEFINICIÓN ELIMINADA (duplicada) */

.structures-panel.open {
    width: 400px; /* Se expande hacia la izquierda */
    overflow-y: auto; /* Mostrar scroll cuando esté abierto */
    border-left: 2px solid rgba(255, 255, 255, 0.2); /* Borde solo cuando está abierto */
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5); /* Sombra solo cuando está abierto */
    opacity: 1; /* Completamente visible cuando esté abierto */
    right: 0 !important; /* Mantener en el borde derecho absoluto */
    transform: translateX(0) !important; /* Sin transformaciones */
}

.structures-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.structures-header h3 {
    color: #4ecdc4;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.close-structures-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.close-structures-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.structures-content {
    padding: 20px;
}

.structure-category {
    margin-bottom: 30px;
}

.structure-category h4 {
    color: #45b7d1;
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.structure-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.structure-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.structure-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.structure-icon {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.structure-name {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 5px;
}

.structure-cost {
    color: #ccc;
    font-size: 0.85rem;
    text-align: center;
    opacity: 0.8;
}

/* El overlay ya no es necesario para este comportamiento */

/* Responsive para el panel de Structures */
@media (max-width: 768px) {
    #controls {
        max-width: 250px; /* Menú más pequeño en móviles */
    }
    
    .structures-panel {
        right: 0; /* Siempre desde el borde derecho */
        width: 0;
    }
    
    .structures-panel.open {
        width: 350px; /* Ancho fijo en móviles */
    }
    
    .structures-header {
        padding: 15px;
    }
    
    .structures-header h3 {
        font-size: 1.3rem;
    }
    
    .structures-content {
        padding: 15px;
    }
    
    .structure-grid {
        gap: 10px;
    }
    
    .structure-item {
        padding: 12px;
    }
    
    .structure-icon {
        font-size: 1.5rem;
    }
    
    .structure-name {
        font-size: 0.9rem;
    }
    
    .structure-cost {
        font-size: 0.8rem;
    }
}

/* Panel de Naves - Estilo igual a Structures */
.ships-panel {
    position: fixed;
    top: 80px; /* Posicionar debajo del header */
    right: -400px;
    width: 400px;
    height: calc(100% - 80px); /* Altura total menos el header */
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.ships-panel.open {
    right: 0;
}

.ships-header {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    padding: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ships-header h3 {
    font-size: 1.5rem;
    color: #4ecdc4;
    margin: 0;
}

.close-ships-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: all 0.3s ease;
}

.close-ships-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.ships-content {
    padding: 20px;
}

.ships-category {
    margin-bottom: 30px;
}

.ships-category h4 {
    color: #4ecdc4;
    font-size: 1.2rem;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(78, 205, 196, 0.3);
    padding-bottom: 8px;
}

.ships-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.ship-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ship-item:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.ship-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(69, 183, 209, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ship-item:hover::before {
    opacity: 1;
}

.ship-image {
    margin-bottom: 15px;
}

.ship-img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid rgba(78, 205, 196, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.ship-img:hover {
    transform: scale(1.05);
    border-color: rgba(78, 205, 196, 0.6);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}

/* Estilos para la imagen de la nave del usuario */
.user-ship-image {
    margin-bottom: 15px;
    text-align: center;
}

.user-ship-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid rgba(78, 205, 196, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    max-width: 100%;
    max-height: 100%;
}

.user-ship-img:hover {
    transform: scale(1.05);
    border-color: rgba(78, 205, 196, 0.6);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}

.ship-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #4ecdc4;
    margin-bottom: 10px;
}

.ship-description {
    color: #cccccc;
    margin-bottom: 15px;
    line-height: 1.4;
    font-size: 0.9rem;
}





.ship-costs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ship-cost {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ship-cost.metal {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    border-color: rgba(139, 69, 19, 0.4);
}

.ship-cost.crystal {
    background: linear-gradient(135deg, #4169E1, #1E90FF);
    border-color: rgba(65, 105, 225, 0.4);
}

.ship-cost.deuterium {
    background: linear-gradient(135deg, #32CD32, #228B22);
    border-color: rgba(50, 205, 50, 0.4);
}

.purchase-ship-btn {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    z-index: 10;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.purchase-ship-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.5);
}

.purchase-ship-btn:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Información de la nave del usuario */
.user-ship-info {
    background: rgba(78, 205, 196, 0.1);
    border: 2px solid rgba(78, 205, 196, 0.3);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.user-ship-info h4 {
    color: #4ecdc4;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.user-ship-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #4ecdc4;
    margin-bottom: 15px;
}

.user-ship-details {
    text-align: left;
    padding: 0 10px;
}

.user-ship-details p {
    color: #cccccc;
    margin: 8px 0;
    font-size: 0.9rem;
    line-height: 1.4;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-ship-details strong {
    color: #4ecdc4;
    margin-right: 10px;
}

/* Contador de naves estacionadas */
.ships-counter {
    color: #ffd700;
    font-weight: bold;
    cursor: help;
    transition: all 0.3s ease;
}

.ships-counter:hover {
    color: #ffed4e;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Botón Ships en el header */
.ships-button {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ships-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(78, 205, 196, 0.4);
}

.ships-button:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive para el panel de Naves */
@media (max-width: 768px) {
    .ships-panel {
        width: 100%;
        right: -100%;
        top: 60px !important;
        height: calc(100% - 60px) !important;
        background: rgba(0, 0, 0, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        border-radius: 0 !important;
        z-index: 10000 !important;
    }
    
    .ships-panel.open {
        right: 0;
    }
    
    .ships-header {
        padding: 12px 15px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .ships-header h3 {
        font-size: 1.2rem !important;
        margin: 0 !important;
    }
    
    .close-ships-btn {
        width: 35px !important;
        height: 35px !important;
        font-size: 18px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .ships-content {
        padding: 15px !important;
    }
    
    .ships-category {
        margin-bottom: 20px !important;
    }
    
    .ships-category h4 {
        font-size: 1rem !important;
        margin-bottom: 10px !important;
        padding-bottom: 5px !important;
    }
    
    .ships-grid {
        gap: 10px !important;
    }
    
    .ship-item {
        padding: 12px !important;
        border-radius: 10px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .ship-image {
        width: 50px !important;
        height: 50px !important;
        margin: 0 auto 8px !important;
    }
    
    .ship-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }
    
    .ship-name {
        font-size: 14px !important;
        margin-bottom: 6px !important;
    }
    
    .ship-description {
        font-size: 11px !important;
        margin-bottom: 8px !important;
        line-height: 1.3 !important;
    }
    
    .ship-costs {
        margin-bottom: 10px !important;
        gap: 4px !important;
    }
    
    .ship-cost {
        font-size: 10px !important;
        padding: 2px 6px !important;
        border-radius: 8px !important;
    }
    
    .purchase-ship-btn {
        width: 100% !important;
        padding: 8px 12px !important;
        font-size: 12px !important;
        border-radius: 8px !important;
    }
    
    .user-ship-info {
        padding: 10px !important;
        border-radius: 8px !important;
        margin-top: 15px !important;
    }
    
    .user-ship-info h4 {
        font-size: 1rem !important;
        margin-bottom: 8px !important;
    }
}

/* ========================================
   📢 SISTEMA DE NOTIFICACIONES
   ======================================== */

/* Botón de notificaciones en el header */
.notifications-button {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.notifications-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Contador de notificaciones no leídas */
.notification-counter {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    border: 2px solid #000;
}

/* Panel desplegable de notificaciones */
.notifications-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 400px;
    max-height: 600px;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Header del panel de notificaciones */
.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px 12px 0 0;
}

.notifications-header h3 {
    color: #ffffff;
    font-size: 1.1rem;
    margin: 0;
}

.notifications-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mark-all-read-btn {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.5);
    color: #4caf50;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.mark-all-read-btn:hover {
    background: rgba(76, 175, 80, 0.3);
}

.close-notifications-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.close-notifications-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Contenido de notificaciones */
.notifications-content {
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

/* Scrollbar personalizada para notificaciones */
.notifications-content::-webkit-scrollbar {
    width: 6px;
}

.notifications-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.notifications-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.notifications-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ===========================================
   COMBAT SCANNER WINDOW
   =========================================== */

.combat-scanner-window {
    --bgcol: rgba(128, 128, 128, 0.15);
    position: fixed;
    top: 85px;
    right: 0px;
    width: 250px;
    height: 200px;
    border: 2px solid var(--bgcol);
    z-index: 1000;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    user-select: none;
    transition: all 0.3s ease;
    display: block;
    visibility: visible;
    opacity: 1;
    background: var(--bgcol);
    background-color: -webkit-linear-gradient(
        -45deg,
        transparent 25%,
        var(--bgcol) 25%,
        var(--bgcol) 50%,
        transparent 50%,
        transparent 75%,
        var(--bgcol) 75%
    );
    background: -moz-linear-gradient(
        -45deg,
        transparent 25%,
        var(--bgcol) 25%,
        var(--bgcol) 50%,
        transparent 50%,
        transparent 75%,
        var(--bgcol) 75%
    );
    background: -o-linear-gradient(
        -45deg,
        transparent 25%,
        var(--bgcol) 25%,
        var(--bgcol) 50%,
        transparent 50%,
        transparent 75%,
        var(--bgcol) 75%
    );
    background: linear-gradient(
        -45deg,
        transparent 25%,
        var(--bgcol) 25%,
        var(--bgcol) 50%,
        transparent 50%,
        transparent 75%,
        var(--bgcol) 75%
    );
    background-size: 47px 47px;
    -webkit-animation: barberpole 7s infinite linear;
    animation: barberpole 7s infinite linear;
}

@keyframes diagonal-stripes {
    from {
        background-position: 0%;
    }
    to {
        background-position: 100%;
    }
}

@keyframes barberpole {
    from {
        background-position: 0%;
    }
    to {
        background-position: 100%;
    }
}

.combat-scanner-header {
    background: #000000;
    color: #ffffff;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move; /* Cursor de arrastre */
    user-select: none;
    border-bottom: 2px solid #333333;
    font-weight: bold;
    position: relative;
    z-index: 3;
}

.combat-scanner-header:active {
    cursor: grabbing; /* Cursor mientras se arrastra */
}

.combat-scanner-header h3 {
    margin: 0;
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.combat-scanner-minimize {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 3px;
    width: 20px;
    height: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.combat-scanner-minimize:hover {
    background: #ff6666;
    transform: scale(1.1);
}

/* Botón de toggle para abrir Combat Scanner - SOLO MÓVIL */
.combat-scanner-toggle {
    display: none;
}


/* Estado normal - ventana completa visible */
.combat-scanner-window {
    height: 200px;
    width: 250px;
    top: 85px;
    right: 0px;
    left: auto;
    position: fixed;
    z-index: 1000;
}

.combat-scanner-window .combat-scanner-content {
    display: block;
}

/* Estilos móviles para Combat Scanner - Mismo estilo que escritorio pero más pequeño */
@media (max-width: 768px) {
    .combat-scanner-window {
        /* Usar los mismos estilos que escritorio pero más pequeño */
        height: 120px !important; /* Más pequeño que escritorio (200px) */
        width: 150px !important; /* Más pequeño que escritorio (250px) */
        top: 85px !important; /* Misma posición que escritorio */
        right: 10px !important; /* Pequeño margen de la derecha */
        left: auto !important;
        position: fixed !important;
        z-index: 1000 !important;
        font-size: 10px !important; /* Fuente más pequeña */
    }
    
    .combat-scanner-header {
        padding: 8px 12px !important; /* Más pequeño */
        font-size: 12px !important; /* Más pequeño */
        border-bottom: 1px solid #ff0000 !important; /* Borde más fino */
    }
    
    .combat-scanner-header h3 {
        font-size: 10px !important; /* Más pequeño */
        margin: 0 !important;
    }
    
    .combat-scanner-content {
        padding: 8px !important; /* Más pequeño */
        font-size: 9px !important; /* Más pequeño */
    }
    
    .scan-button {
        width: 100% !important;
        padding: 6px !important; /* Más pequeño */
        font-size: 9px !important; /* Más pequeño */
        margin-bottom: 8px !important; /* Más pequeño */
    }
    
    .scan-progress-container {
        margin-top: 10px !important; /* Más pequeño */
    }
    
    .scan-progress-header {
        font-size: 10px !important; /* Más pequeño */
        margin-bottom: 8px !important; /* Más pequeño */
    }
    
    .scan-progress-bar {
        height: 6px !important; /* Más pequeño */
        margin-bottom: 8px !important; /* Más pequeño */
    }
    
    .cancel-scan-button {
        width: 100% !important;
        padding: 8px !important; /* Más pequeño */
        font-size: 9px !important; /* Más pequeño */
    }
    
    
    
    
    
}

.combat-scanner-window.waiting .combat-scanner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #ff0000;
    text-transform: uppercase;
    font-weight: bold;
}

.combat-scanner-content {
    padding: 12px;
    background: transparent;
    color: #ffffff;
    position: relative;
    z-index: 2;
}

.scan-button {
    --primary: 71 29% 59%;
    --accent: 171 100% 30%;
    --warn: 18 65% 45%;
    --padding-x: 0.75em;
    --padding-y: 0.5em;
    --color: var(--primary);
    
    display: inline-block;
    background: rgba(0, 0, 0, 0.7);
    color: hsl(var(--color));
    border: 0px solid hsl(var(--color));
    font-variant: small-caps;
    letter-spacing: 0.10em;
    padding: var(--padding-y) var(--padding-x);
    position: relative;
    cursor: pointer;
    margin: 0;
    width: 100%;
    font-size: 12px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    box-shadow: 0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);
}

.scan-button div {
    position: absolute;
    box-sizing: border-box;
    transition: 
        width 200ms ease-in,
        height 200ms ease-in;
}

.scan-button div.top {
    border-top: 1px solid;
    top: 0;
    left: 0;
    width: 15px;
    height: 1px;
}

.scan-button div.left {
    border-left: 1px solid;
    left: 0;
    top: 0;
    width: 1px;
    height: 15px;
}

.scan-button div.bottom {
    border-bottom: 1px solid;
    bottom: 0;
    right: 0;
    width: 15px;
    height: 1px;
}

.scan-button div.right {
    border-right: 1px solid;
    right: 0;
    bottom: 0;
    width: 1px;
    height: 15px;
}

.scan-button:hover div.top {
    width: calc(100% - 20px);
}

.scan-button:hover div.left {
    height: calc(100% - 20px);
}

.scan-button:hover div.bottom {
    width: calc(100% - 20px);
}

.scan-button:hover div.right {
    height: calc(100% - 20px);
}

.scan-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, hsl(var(--color) / 0.2) 0%, hsl(var(--color) / 0.4) 50%, hsl(var(--color) / 0.6) 100%);
    opacity: 0;
    transition: opacity 150ms ease-out;
}

.scan-button:active::before {
    opacity: 0.3;
}

.scan-button:disabled,
.scan-button.disabled {
    --color: 0 0% 50%;
    cursor: not-allowed;
    opacity: 0.5;
    background: rgba(0, 0, 0, 0.9);
    color: #666666;
}

.scan-button:disabled div,
.scan-button.disabled div {
    border-color: #666666;
    transition: none;
}

.scan-button:disabled:hover div,
.scan-button.disabled:hover div {
    width: 15px;
    height: 15px;
}

/* Esquinas de la ventana */
.window-bracket {
    --color: #ffffff;
    position: absolute;
    height: 5px;
    width: 5px;
    z-index: 4;
}

.window-bracket-top-left {
    border-top: 2px solid var(--color);
    border-left: 2px solid var(--color);
    top: 0;
    left: 0;
}

.window-bracket-top-right {
    border-top: 2px solid var(--color);
    border-right: 2px solid var(--color);
    top: 0;
    right: 0;
}

.window-bracket-bottom-right {
    border-bottom: 2px solid var(--color);
    border-right: 2px solid var(--color);
    bottom: 0;
    right: 0;
}

.window-bracket-bottom-left {
    border-bottom: 2px solid var(--color);
    border-left: 2px solid var(--color);
    bottom: 0;
    left: 0;
}

/* Esquinas para el menú controls */
#controls .window-bracket {
    --color: #ffffff;
    position: absolute;
    height: 5px;
    width: 5px;
    z-index: 4;
}

#controls .window-bracket-top-left {
    border-top: 2px solid var(--color);
    border-left: 2px solid var(--color);
    top: 0;
    left: 0;
}

#controls .window-bracket-top-right {
    border-top: 2px solid var(--color);
    border-right: 2px solid var(--color);
    top: 0;
    right: 0;
}

#controls .window-bracket-bottom-right {
    border-bottom: 2px solid var(--color);
    border-right: 2px solid var(--color);
    bottom: 0;
    right: 0;
}

#controls .window-bracket-bottom-left {
    border-bottom: 2px solid var(--color);
    border-left: 2px solid var(--color);
    bottom: 0;
    left: 0;
}

/* Esquinas para el chat global */
.global-chat .window-bracket {
    --color: #ffffff;
    position: absolute;
    height: 5px;
    width: 5px;
    z-index: 4;
}

.global-chat .window-bracket-top-left {
    border-top: 2px solid var(--color);
    border-left: 2px solid var(--color);
    top: 0;
    left: 0;
}

.global-chat .window-bracket-top-right {
    border-top: 2px solid var(--color);
    border-right: 2px solid var(--color);
    top: 0;
    right: 0;
}

.global-chat .window-bracket-bottom-right {
    border-bottom: 2px solid var(--color);
    border-right: 2px solid var(--color);
    bottom: 0;
    right: 0;
}

.global-chat .window-bracket-bottom-left {
    border-bottom: 2px solid var(--color);
    border-left: 2px solid var(--color);
    bottom: 0;
    left: 0;
}

/* Item individual de notificación */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Notificación no leída */
.notification-unread {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid #2196f3;
}

/* Notificación leída */
.notification-read {
    background: rgba(255, 255, 255, 0.01);
    opacity: 0.7;
}

/* Tipos de notificaciones */
.notification-travel {
    border-left-color: #ffffff;
}

.notification-exploration {
    border-left-color: #ffc107;
}

/* Contenido de la notificación */
.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: bold;
    color: #ffffff;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.notification-message {
    color: #b0b0b0;
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 6px;
}

.notification-time {
    color: #666666;
    font-size: 0.7rem;
}

/* Indicador de no leída */
.notification-unread-indicator {
    color: #2196f3;
    font-size: 1rem;
    font-weight: bold;
    margin-top: 2px;
}

/* Estados especiales */
.notifications-loading,
.notifications-error,
.no-notifications {
    text-align: center;
    padding: 20px;
    color: #b0b0b0;
}

.notifications-error {
    color: #ff4444;
}

.notifications-error button {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid rgba(255, 68, 68, 0.5);
    color: #ff4444;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.notifications-error button:hover {
    background: rgba(255, 68, 68, 0.3);
}

/* Responsive para notificaciones */
@media (max-width: 768px) {
    .notifications-panel {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
        top: 70px;
        max-height: calc(100vh - 100px);
    }
    
    .notifications-header {
        padding: 12px 15px;
    }
    
    .notifications-header h3 {
        font-size: 1rem;
    }
    
    .mark-all-read-btn {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
}

/* ===== EFECTOS ANIMADOS PARA ANOMALÍAS ===== */

/* Efectos de brillo animados por rareza */
.anomaly-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.anomaly-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.anomaly-card:hover::before {
    animation: shine 1.5s ease-in-out;
}

/* Animaciones específicas por rareza */
.common-card {
    animation: commonGlow 3s ease-in-out infinite;
}

.epic-card {
    animation: epicGlow 2s ease-in-out infinite;
    position: relative;
}

.legendary-card {
    animation: legendaryGlow 1.5s ease-in-out infinite, legendaryPulse 3s ease-in-out infinite;
}

/* Keyframes para animaciones */
@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

@keyframes commonGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(128, 128, 128, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(128, 128, 128, 0.5);
    }
}

@keyframes epicGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(111, 66, 193, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(111, 66, 193, 0.8);
    }
}

@keyframes legendaryGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.6);
    }
    50% {
        box-shadow: 0 0 35px rgba(255, 193, 7, 0.9);
    }
}

/* Efectos de partículas para legendarias */
.legendary-card::after {
    content: '✨';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 16px;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Efectos de borde animado para épicas */
.epic-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #6f42c1, #9c27b0, #6f42c1);
    border-radius: 10px;
    z-index: -1;
    animation: borderGlow 2s linear infinite;
}

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

/* Efectos de pulso para legendarias */
@keyframes legendaryPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Efectos adicionales para épicas */
.epic-card .anomaly-title {
    animation: epicTitleGlow 2s ease-in-out infinite;
}

@keyframes epicTitleGlow {
    0%, 100% {
        text-shadow: 0 0 5px currentColor;
    }
    50% {
        text-shadow: 0 0 15px currentColor, 0 0 25px currentColor;
    }
}

/* Efectos de partículas adicionales para legendarias */
.legendary-card .anomaly-title {
    animation: legendaryTitleGlow 1.5s ease-in-out infinite;
}

@keyframes legendaryTitleGlow {
    0%, 100% {
        text-shadow: 0 0 10px currentColor;
    }
    50% {
        text-shadow: 0 0 20px currentColor, 0 0 30px currentColor, 0 0 40px currentColor;
    }
}

/* Efectos de hover mejorados */
.anomaly-card:hover {
    transform: translateY(-8px);
}

.common-card:hover {
    box-shadow: 0 15px 40px rgba(128, 128, 128, 0.4);
}

.epic-card:hover {
    box-shadow: 0 15px 40px rgba(111, 66, 193, 0.6);
}

.legendary-card:hover {
    box-shadow: 0 20px 50px rgba(255, 193, 7, 0.8);
    transform: translateY(-10px);
}

/* Efectos de brillo en hover para todas las tarjetas */
.anomaly-card:hover::before {
    animation: shine 1.5s ease-in-out;
}

/* Efectos de rotación sutil en hover */
.legendary-card:hover {
    animation: legendaryGlow 1.5s ease-in-out infinite, legendaryPulse 3s ease-in-out infinite, legendaryHover 0.5s ease-in-out;
}

@keyframes legendaryHover {
    0% {
        transform: translateY(-10px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(1deg);
    }
    100% {
        transform: translateY(-10px) rotate(0deg);
    }
}

/* ===== BOTÓN HOLOGRÁFICO DE INVESTIGAR ===== */
.hologram-btn {
    position: relative;
    padding: 0.25rem 0.5rem;
    font-size: 0.35rem;
    font-weight: 600;
    color: #fff;
    background: none;
    border: 1px solid rgba(0, 255, 255, 0.5);
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 7px rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s ease;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hologram-btn:hover {
    border-color: rgba(0, 255, 255, 0.8);
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.5);
    transform: translateY(-1px);
}

.hologram-btn span {
    position: relative;
    display: inline-block;
    text-shadow: 0 0 4px rgba(0, 255, 255, 0.5);
}

.hologram-btn span::before,
.hologram-btn span::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    opacity: 0;
    filter: blur(1px);
    transition: all 0.3s ease;
}

.hologram-btn span::before {
    top: -2px;
    color: #ff00ff;
    transform: translateX(0);
    animation: glitch 2s infinite;
}

.hologram-btn span::after {
    bottom: -2px;
    color: #00ffff;
    transform: translateX(0);
    animation: glitch 2s infinite reverse;
}

.hologram-btn .scan-line {
    position: absolute;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(0, 255, 255, 0.8),
        transparent
    );
    top: 0;
    animation: scan 2s linear infinite;
    filter: blur(0.5px);
}

@keyframes glitch {
    0%, 100% { transform: translateX(0); opacity: 0.3; }
    20% { transform: translateX(-5px); opacity: 0.5; }
    40% { transform: translateX(5px); opacity: 0.7; }
    60% { transform: translateX(-3px); opacity: 0.5; }
    80% { transform: translateX(3px); opacity: 0.3; }
}

@keyframes scan {
    0% { top: -10%; }
    100% { top: 110%; }
}

/* Barra de progreso del escaneo */
.scan-progress-container {
    margin-top: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    border-radius: 4px;
}

.scan-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: #ffffff;
}

.scan-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    border-radius: 4px;
    overflow: hidden;
}

.scan-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff0000, #ff6666);
    width: 0%;
    transition: width 0.5s ease-out;
    border-radius: 2px;
}

.scan-progress-controls {
    margin-top: 8px;
    text-align: center;
}

.cancel-scan-button {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff0000;
    color: #ffffff;
    padding: 4px 12px;
    font-size: 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
}

.cancel-scan-button:hover {
    background: rgba(255, 0, 0, 0.4);
    border-color: #ff4444;
    transform: scale(1.05);
}

.cancel-scan-button:active {
    transform: scale(0.95);
}

/* Resultados del escaneo */
.scan-results {
    position: fixed;
    top: 85px;
    right: 250px; /* Pegado a la izquierda de la ventana del Combat Scanner */
    width: 250px;
    height: 200px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #ff0000;
    border-radius: 4px;
    z-index: 10;
    user-select: none; /* Prevent text selection while dragging */
    display: none; /* Oculto por defecto */
    overflow: hidden; /* Evitar desbordamiento */
}

.scan-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid #333;
    cursor: move; /* Cursor de arrastre */
}

.scan-results-header:active {
    cursor: grabbing; /* Cursor mientras se arrastra */
}

.scan-results-header h4 {
    margin: 0;
    font-size: 12px;
    color: #ffffff;
}

.close-scan-results {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-scan-results:hover {
    background: rgba(255, 0, 0, 0.3);
    border-radius: 50%;
}

.scan-results-list {
    padding: 8px;
    height: calc(100% - 40px); /* Altura total menos el header */
    overflow-y: auto;
}

.scan-ship-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px; /* Reducido para que quepa mejor */
    margin-bottom: 3px; /* Reducido */
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #444;
    border-radius: 3px;
    font-size: 10px; /* Reducido */
    color: #ffffff;
    min-height: 20px; /* Altura mínima consistente */
}

.scan-ship-item:last-child {
    margin-bottom: 0;
}

.scan-ship-name {
    font-weight: bold;
    color: #ffff00;
}

.scan-ship-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 9px; /* Reducido */
    color: #cccccc;
    line-height: 1.2; /* Interlineado más compacto */
}

.scan-ship-level {
    color: #00ff00;
}

.scan-ship-spy {
    color: #ff6666;
}

/* Botón de espionaje */
.scan-ship-spy-button {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff0000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 8px;
    flex-shrink: 0;
}

.scan-ship-spy-button:hover {
    background: rgba(255, 0, 0, 0.4);
    border-color: #ff4444;
    transform: scale(1.1);
}

.scan-ship-spy-button:active {
    transform: scale(0.95);
}

.scan-ship-spy-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(100, 100, 100, 0.2);
    border-color: #666666;
}

.scan-ship-spy-button.disabled:hover {
    transform: none;
    background: rgba(100, 100, 100, 0.2);
    border-color: #666666;
}

.spy-icon {
    font-size: 12px;
    color: #ffffff;
}

/* Contenedor de acciones */
.scan-ship-actions {
    display: flex;
    gap: 6px;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Botón de ataque */
.scan-ship-attack-button {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 100, 0, 0.2);
    border: 1px solid #ff6400;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.scan-ship-attack-button:hover {
    background: rgba(255, 100, 0, 0.4);
    border-color: #ff8800;
    transform: scale(1.1);
}

.scan-ship-attack-button:active {
    transform: scale(0.95);
}

.scan-ship-attack-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(100, 100, 100, 0.2);
    border-color: #666666;
}

.scan-ship-attack-button.disabled:hover {
    transform: none;
    background: rgba(100, 100, 100, 0.2);
    border-color: #666666;
}

.attack-icon {
    font-size: 12px;
    color: #ffffff;
}

.scan-ship-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Resultados del espionaje */
.spy-results {
    font-size: 8px;
    text-align: center;
    line-height: 1.1;
}

.spy-ship-type {
    color: #00ff00;
    font-weight: bold;
    margin-bottom: 2px;
}

.spy-resources {
    color: #ffff00;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.scan-ship-spy-button.completed {
    background: rgba(0, 255, 0, 0.2);
    border-color: #00ff00;
}

.scan-ship-spy-button.completed:hover {
    background: rgba(0, 255, 0, 0.3);
    border-color: #44ff44;
}

/* Resultados del espionaje en la ventana principal */
.spy-results-main {
    padding: 8px;
    color: #ffffff;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 3px;
    border: 1px solid rgba(255, 0, 0, 0.3);
    margin: -10px 0 0 0;
    max-height: 180px;
    overflow-y: auto;
    box-sizing: border-box;
    width: 100%;
}

.spy-results-main h4 {
    margin: 0 0 8px 0;
    color: #ff0000;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: bold;
}

.spy-target-info {
    margin-bottom: 8px;
    font-size: 10px;
    color: #ffff00;
    font-weight: bold;
}

.spy-ship-details {
    margin-bottom: 10px;
}

.spy-ship-type-main {
    margin-bottom: 8px;
    font-size: 10px;
    color: #00ff00;
    font-weight: bold;
}

.spy-cargo-details h5 {
    margin: 0 0 6px 0;
    font-size: 9px;
    color: #ffffff;
    text-transform: uppercase;
    font-weight: bold;
}

.cargo-resources {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.cargo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.cargo-item .resource-icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cargo-item .resource-icon.metal-circle {
    background: linear-gradient(45deg, #c0c0c0, #808080);
    border-color: #a0a0a0;
}

.cargo-item .resource-icon.crystal-circle {
    background: linear-gradient(45deg, #00ffff, #0080ff);
    border-color: #40c0ff;
}

.cargo-item .resource-icon.deuterium-circle {
    background: linear-gradient(45deg, #ffff00, #ff8000);
    border-color: #ffcc00;
}

.cargo-item .resource-icon.uec-circle {
    background: transparent;
    border: none;
}

.cargo-item .resource-amount {
    font-size: 8px;
    font-weight: bold;
    color: #ffffff;
}

.close-spy-results-btn {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff0000;
    color: #ffffff;
    padding: 6px 12px;
    font-size: 8px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    width: 100%;
}

.close-spy-results-btn:hover {
    background: rgba(255, 0, 0, 0.4);
    border-color: #ff4444;
    transform: scale(1.02);
}

/* Scroll personalizado para resultados del espionaje */
.spy-results-main::-webkit-scrollbar {
    width: 4px;
}

.spy-results-main::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
}

.spy-results-main::-webkit-scrollbar-thumb {
    background: rgba(255, 0, 0, 0.5);
    border-radius: 2px;
}

.spy-results-main::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 0, 0, 0.7);
}

/* Resultados del combate en la ventana principal */
.attack-results-main {
    padding: 12px;
    color: #ffffff;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(20, 20, 20, 0.9));
    border-radius: 8px;
    border: 2px solid rgba(255, 100, 100, 0.6);
    margin: -10px 0 0 0;
    max-height: 200px;
    overflow-y: auto;
    box-sizing: border-box;
    width: 100%;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

.attack-results-main h4 {
    margin: 0 0 12px 0;
    color: #ff6666;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 100, 100, 0.8);
    letter-spacing: 1px;
}

.combat-winner {
    margin-bottom: 10px;
    font-size: 13px;
    color: #00ff00;
    font-weight: bold;
    text-shadow: 0 0 6px rgba(0, 255, 0, 0.6);
    padding: 4px 8px;
    background: rgba(0, 255, 0, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.combat-loser {
    margin-bottom: 10px;
    font-size: 13px;
    color: #ff6666;
    font-weight: bold;
    text-shadow: 0 0 6px rgba(255, 100, 100, 0.6);
    padding: 4px 8px;
    background: rgba(255, 100, 100, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(255, 100, 100, 0.3);
}

.combat-resources {
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(255, 255, 0, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 0, 0.3);
}

.combat-resources h5 {
    margin: 0 0 6px 0;
    color: #ffff00;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: bold;
    text-shadow: 0 0 4px rgba(255, 255, 0, 0.6);
}

.combat-resource-item {
    display: inline-block;
    margin: 2px 4px;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    font-size: 10px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.combat-resource-item .resource-icon {
    width: 12px;
    height: 12px;
    margin-right: 3px;
    vertical-align: middle;
}

.combat-close-btn {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(255, 68, 68, 0.4);
}

.combat-close-btn:hover {
    background: linear-gradient(135deg, #ff6666, #ff0000);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 68, 68, 0.6);
}

.combat-close-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 68, 68, 0.4);
}

/* Scroll personalizado para resultados del combate */
.attack-results-main::-webkit-scrollbar {
    width: 6px;
}

.attack-results-main::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.attack-results-main::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.6), rgba(255, 0, 0, 0.8));
    border-radius: 3px;
}

.attack-results-main::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.8), rgba(255, 0, 0, 1));
}

/* Sistema de alerta de espionaje */
.spy-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9998;
    pointer-events: none;
    background: transparent;
}

.spy-alert-border {
    position: absolute;
    background: repeating-linear-gradient(
        45deg,
        #ffaa00 0px,
        #ffaa00 10px,
        transparent 10px,
        transparent 20px
    );
    animation: spyWarning 2s linear infinite;
}

.spy-alert-border-top {
    top: 85px;
    left: 0;
    width: 100%;
    height: 8px;
}

.spy-alert-border-bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
}

.spy-alert-border-left {
    top: 85px;
    left: 0;
    width: 8px;
    height: calc(100vh - 85px);
}

.spy-alert-border-right {
    top: 85px;
    right: 0;
    width: 8px;
    height: calc(100vh - 85px);
}

@keyframes spyWarning {
    0% { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}

.spy-alert-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #ffaa00;
    border-radius: 10px;
    padding: 20px;
    z-index: 9999;
    text-align: center;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.5);
    animation: spyAlertPulse 2s ease-in-out infinite;
}

.spy-alert-window h2 {
    color: #ffaa00;
    font-size: 24px;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 170, 0, 0.8);
}

.spy-alert-window p {
    font-size: 16px;
    margin: 0 0 20px 0;
    color: #ffdd00;
}

.spy-alert-close {
    background: rgba(255, 170, 0, 0.2);
    border: 2px solid #ffaa00;
    color: #ffffff;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.spy-alert-close:hover {
    background: rgba(255, 170, 0, 0.4);
    border-color: #ffdd00;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.6);
}

@keyframes spyAlertPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 170, 0, 0.5);
        border-color: #ffaa00;
    }
    50% { 
        box-shadow: 0 0 30px rgba(255, 170, 0, 0.8);
        border-color: #ffdd00;
    }
}

/* Scroll personalizado para los resultados */
.scan-results-list::-webkit-scrollbar {
    width: 6px;
}

.scan-results-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.scan-results-list::-webkit-scrollbar-thumb {
    background: rgba(255, 0, 0, 0.5);
    border-radius: 3px;
}

.scan-results-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 0, 0, 0.7);
}

/* Sistema de alerta de combate */
.combat-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9998;
    pointer-events: none;
    background: transparent;
}

.combat-alert-border {
    position: absolute;
    background: repeating-linear-gradient(
        45deg,
        #ff0000 0px,
        #ff0000 10px,
        transparent 10px,
        transparent 20px
    );
    animation: combatWarning 2s linear infinite;
}

.combat-alert-border-top {
    top: 85px;
    left: 0;
    width: 100%;
    height: 8px;
}

.combat-alert-border-bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
}

.combat-alert-border-left {
    top: 85px;
    left: 0;
    width: 8px;
    height: calc(100vh - 85px);
}

.combat-alert-border-right {
    top: 85px;
    right: 0;
    width: 8px;
    height: calc(100vh - 85px);
}

@keyframes combatWarning {
    0% { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}

.combat-alert-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #ff0000;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
    min-width: 300px;
}

.combat-alert-window h2 {
    color: #ff0000;
    margin: 0 0 15px 0;
    font-size: 24px;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.combat-alert-window p {
    color: #ffffff;
    margin: 10px 0;
    font-size: 16px;
}

.combat-alert-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.combat-alert-close {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.combat-alert-close:hover {
    background: linear-gradient(135deg, #cc0000 0%, #990000 100%);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

.combat-alert-flee {
    background: linear-gradient(135deg, #ff6600 0%, #cc5500 100%);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.combat-alert-flee:hover {
    background: linear-gradient(135deg, #cc5500 0%, #994400 100%);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 102, 0, 0.5);
}

/* Sistema de resultado de combate */
.combat-result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9998;
    pointer-events: none;
    background: transparent;
}

/* Bordes naranjas ocultos - solo se muestra la ventana */
.combat-result-border {
    display: none;
}

.combat-result-border-top {
    display: none;
}

.combat-result-border-bottom {
    display: none;
}

.combat-result-border-left {
    display: none;
}

.combat-result-border-right {
    display: none;
}

@keyframes combatResultWarning {
    0% { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}

.combat-result-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #ff6600;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 0 30px rgba(255, 102, 0, 0.5);
    min-width: 400px;
    max-width: 600px;
}

.combat-result-window h2 {
    color: #ff6600;
    margin: 0 0 20px 0;
    font-size: 24px;
    text-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
}

.combat-result-content {
    color: #ffffff;
    margin: 15px 0;
    font-size: 16px;
    text-align: left;
}

.combat-result-item {
    margin: 10px 0;
    padding: 10px;
    background: rgba(255, 102, 0, 0.1);
    border-radius: 5px;
    border-left: 3px solid #ff6600;
}

.combat-result-item.winner {
    background: rgba(0, 255, 0, 0.1);
    border-left-color: #00ff00;
    color: #00ff00;
}

.combat-result-item.loser {
    background: rgba(255, 0, 0, 0.1);
    border-left-color: #ff0000;
    color: #ff0000;
}

.combat-result-close {
    background: linear-gradient(135deg, #ff6600 0%, #cc5500 100%);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.combat-result-close:hover {
    background: linear-gradient(135deg, #cc5500 0%, #994400 100%);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 102, 0, 0.5);
}

/* Sistema de notificación de huida del enemigo */
.enemy-fled-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.enemy-fled-window {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #00ff00;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.5);
    min-width: 350px;
    animation: enemyFledSlideIn 0.5s ease-out;
}

@keyframes enemyFledSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-50px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.enemy-fled-window h2 {
    color: #00ff00;
    margin: 0 0 15px 0;
    font-size: 24px;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.enemy-fled-window p {
    color: #ffffff;
    margin: 10px 0;
    font-size: 16px;
}

.enemy-fled-close {
    background: linear-gradient(135deg, #00ff00 0%, #00cc00 100%);
    color: #000000;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.enemy-fled-close:hover {
    background: linear-gradient(135deg, #00cc00 0%, #009900 100%);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

/* Google Sign In Button Styles */
.google-signin-container {
    margin: 20px 0;
    width: 100%;
}

.google-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    width: 100%;
}

.google-divider .divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
}

.google-divider .divider-text {
    margin: 0 15px;
    color: #00d4ff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.google-signin-button {
    width: 100%;
    height: 50px;
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #3c4043;
    position: relative;
    overflow: hidden;
}

.google-signin-button:hover {
    background: #f8f9fa;
    border-color: #c1c7cd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.google-signin-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.google-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.google-text {
    font-size: 14px;
    font-weight: 500;
    color: #3c4043;
}

/* Holographic effect for Google button */
.google-signin-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.google-signin-button:hover::before {
    left: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .google-signin-button {
        height: 45px;
        font-size: 13px;
    }
    
    .google-icon {
        width: 18px;
        height: 18px;
    }
}

/* ===== BOTONES SCI-FI PARA HEADER ===== */

/* Estilo 3 para Ships, Notificaciones y Tutorial */
.si-buttons-scifi__style-3__button-1 {
  /* == BUTTON SETTINGS == */
  --font-family: Jura, monospace;
  --font-size: 16px;
  --color: #ffffff;
  --background-color: #0d0a11;
  --border-color: #ffffff;
  --border-width: 1px;
  --border-cut:4px;
  --button-shape: polygon(0 var(--border-cut), var(--border-cut) 0, calc(50% - var(--border-cut) - 10px) 0%, calc(calc(50% - var(--border-cut) - 10px) + var(--border-cut)) var(--border-cut), calc(calc(50% - var(--border-cut) - 10px) + var(--border-cut) + 20px) var(--border-cut), calc(calc(50% - var(--border-cut) - 10px) + var(--border-cut) + 20px + var(--border-cut)) 0, calc(100% - var(--border-cut)) 0, 100% var(--border-cut), 100% calc(50% - var(--border-cut) - 5px), calc(100% - var(--border-cut)) calc(50% - var(--border-cut) - 5px + var(--border-cut)), calc(100% - var(--border-cut)) calc(50% - var(--border-cut) - 5px + var(--border-cut) + 10px), 100% calc(50% - var(--border-cut) - 5px + var(--border-cut) + 10px + var(--border-cut)), 100% calc(100% - var(--border-cut)), calc(100% - var(--border-cut)) 100%, calc(calc(50% - var(--border-cut) - 10px) + var(--border-cut) + 20px + var(--border-cut)) 100%, calc(calc(50% - var(--border-cut) - 10px) + var(--border-cut) + 20px) calc(100% - var(--border-cut)), calc(calc(50% - var(--border-cut) - 10px) + var(--border-cut)) calc(100% - var(--border-cut)), calc(calc(50% - var(--border-cut) - 10px)) 100%, var(--border-cut) 100%, 0 calc(100% - var(--border-cut)), 0 calc(calc(50% - var(--border-cut) - 5px) + var(--border-cut) + 10px + var(--border-cut)), var(--border-cut) calc(calc(50% - var(--border-cut) - 5px) + var(--border-cut) + 10px), var(--border-cut) calc(calc(50% - var(--border-cut) - 5px) + var(--border-cut)), 0 calc(calc(50% - var(--border-cut) - 5px)));
}

.si-buttons-scifi__style-3__button-1 {
  font-family: var(--font-family);
  font-size: var(--font-size);
  color: var(--color) !important;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  align-self: center;
  vertical-align: middle;
  appearance: none;
  box-sizing: border-box;
  text-decoration: none;
  position: relative;
  word-spacing: 3px;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: 0.3s;
  line-height: initial;
  min-height: 30px;
  min-width: 70px;
  white-space: nowrap;
  z-index: 1;
  user-select: none;
  outline: 0;
  padding: 15px 30px;
  background-color: transparent;
}

.si-buttons-scifi__style-3__button-1:before,
.si-buttons-scifi__style-3__button-1:after{
  content: '';
  inset: 0;
  background: var(--border-color);
  position: absolute;
  z-index: -1;
  clip-path: var(--button-shape);
  box-shadow: inset 0 0 25px -10px var(--border-color);
}

.si-buttons-scifi__style-3__button-1:after{
  inset: var(--border-width);
  background: var(--background-color);
}

.si-buttons-scifi__style-3__button-1 helper-1{
  content: '';
  position: absolute;
  inset: calc(var(--border-cut) /2);
  background: var(--border-color);
  z-index: -2;
}

/* Estilo 8 para Logout */
.si-buttons-scifi__style-8__button-2 {
  /* == BUTTON SETTINGS == */
  --font-family: Jura, monospace;
  --font-size: 16px;
  --color: #ffffff;
  --background-color: #120001;
  --border-color: #aa0406;
  --border-width: 1px;
  --border-cut: 22px;
  --button-shape: polygon(100% 0, 100% 100%, var(--border-cut) 100%, 0 calc(100% - var(--border-cut)), 0 0);
}

/* Sobrescribir estilos de los botones para usar el tamaño sci-fi */
.ships-button.si-buttons-scifi__style-3__button-1,
.tutorial-button.si-buttons-scifi__style-3__button-1 {
  padding: 15px 30px !important;
  min-height: 30px !important;
  min-width: 70px !important;
  font-size: 16px !important;
  height: auto !important;
  width: auto !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.notifications-button.si-buttons-scifi__style-3__button-1 {
  padding: 15px 20px !important;
  min-height: 30px !important;
  min-width: 50px !important;
  font-size: 16px !important;
  height: auto !important;
  width: auto !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.logout-button.si-buttons-scifi__style-8__button-2 {
  padding: 15px 50px !important;
  min-height: 30px !important;
  min-width: 120px !important;
  font-size: 16px !important;
  height: auto !important;
  width: auto !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Sobrescribir también en media queries */
@media (max-width: 768px) {
  .ships-button.si-buttons-scifi__style-3__button-1,
  .tutorial-button.si-buttons-scifi__style-3__button-1 {
    padding: 15px 25px !important;
    font-size: 16px !important;
    border-radius: 0 !important;
    min-width: 60px !important;
    min-height: 30px !important;
  }
  
  .notifications-button.si-buttons-scifi__style-3__button-1 {
    padding: 15px 15px !important;
    font-size: 16px !important;
    border-radius: 0 !important;
    min-width: 45px !important;
    min-height: 30px !important;
  }
  
  .logout-button.si-buttons-scifi__style-8__button-2 {
    padding: 15px 40px !important;
    font-size: 16px !important;
    border-radius: 0 !important;
    min-width: 100px !important;
    min-height: 30px !important;
  }
}

.si-buttons-scifi__style-8__button-2 {
  font-family: var(--font-family);
  font-size: var(--font-size);
  color: var(--color) !important;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  align-self: center;
  vertical-align: middle;
  appearance: none;
  box-sizing: border-box;
  text-decoration: none;
  position: relative;
  word-spacing: 3px;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: 0.3s;
  line-height: initial;
  min-height: 30px;
  min-width: 70px;
  white-space: nowrap;
  z-index: 1;
  user-select: none;
  outline: 0;
  padding: 15px 30px;
  background-color: transparent;
}

.si-buttons-scifi__style-8__button-2:before{
  content: '';
  position: absolute;
  inset: 0 -10px 0 auto;
  width: 5px;
  background: var(--border-color);
}

.si-buttons-scifi__style-8__button-2:after{
  content: '';
  position: absolute;
  height: 6px;
  width: 22px;
  background: var(--border-color);
  clip-path: polygon(5px 0%, calc(100% - 5px) 0%, 100% 100%, 0% 100%);
  transform: rotate(-135deg);
  bottom: 3px;
  left: -5px;
}

.si-buttons-scifi__style-8__button-2 helper-1:after,
.si-buttons-scifi__style-8__button-2 helper-1:before{
  content:'';
  position: absolute;
  inset: var(--border-width);
  background: var(--background-color);
  z-index: -1;
  clip-path: var(--button-shape);
  box-shadow: inset 0 0 25px -10px var(--border-color);
}

.si-buttons-scifi__style-8__button-2 helper-1:before{
  inset: 0;
  background: var(--border-color);
}

[class*='si-buttons-scifi'].disabled,
[class*='si-buttons-scifi']:disabled{
  pointer-events:none;
  opacity:0.5;
  cursor:default;
}

/* Ripple Animation */
[class*='si-buttons-scifi'] ripple {
  inset: 0;
  position: absolute;
  overflow: hidden;
  -webkit-clip-path: var(--button-shape);
          clip-path: var(--button-shape);
}

[class*='si-buttons-scifi'].disabled ripple,
[class*='si-buttons-scifi']:disabled ripple{
  display:none
}

[class*='si-buttons-scifi'] ripple:after {
  content: '';
  --ripple-gradient: rgb(255, 255, 255);
  position: absolute;
  inset: 0 auto 0 -200%;
  width: 200%;
  transform: skewX(-20deg);
  opacity: 0.5;
  background-image: linear-gradient(to right, transparent, var(--ripple-gradient), transparent);
}

[mode*='light'] ripple:after {
  --ripple-gradient: var(--border-color);
}

[class*='si-buttons-scifi']:hover ripple:after {
  left: 200%;
  transition: 1.6s ease;
}

[class*='si-buttons-scifi'] ripple:before {
  content: '';
  --ripple-color: rgb(255, 255, 255);
  position: absolute;
  inset: 50%;
  transform: skewX(-10deg);
  border-radius: 100vh;
}

[mode*='light'] ripple:before {
  --ripple-color: var(--border-color);
}

[class*='si-buttons-scifi']:focus ripple:before {
  animation: ripple-animation 0.7s ease-in-out forwards;
}

[class*='si-buttons-scifi']:active ripple:before {
  animation: unset;
}

@keyframes ripple-animation {
  0% {box-shadow: 0 0 0 0 var(--ripple-color); opacity:0.6}
  100% {box-shadow: 0 0 0 150px var(--ripple-color); opacity:0}
}

/* Shine Animation */
[class*='si-buttons-scifi'] shine {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-clip-path: var(--button-shape);
          clip-path: var(--button-shape);
}

[class*='si-buttons-scifi'].disabled shine,
[class*='si-buttons-scifi']:disabled shine {
  display: none;
}

[class*='si-buttons-scifi'] shine:after {
  content: '';
  position: absolute;
  inset: 0 auto 0 -70px;
  width: 30px;
  opacity: 0.8;
  background: rgb(255, 255, 255);
  transition: all .3s linear;
  transform: skewX(-15deg) translateX(0);
  animation: shine 3.5s ease-in-out infinite;
}

[mode*='light'] shine:after {
  opacity: 0.5;
  background: var(--border-color);
}

[class*='si-buttons-scifi']:hover shine:after {
  animation: unset;
}

@keyframes shine {
  70% {left: -70px}
  100% {left: calc(100% + 70px)}
}

/* ===== FIN MODO ESCRITORIO FORZADO ===== */
/* Estilos específicos para móviles en orientación horizontal */
@media (max-width: 768px) and (orientation: landscape) {
    /* Ajustar el header para landscape */
    .user-header {
        padding: 5px 10px !important;
        font-size: 12px !important;
        height: auto !important;
        min-height: 35px !important;
    }
    
    .user-resources {
        gap: 3px !important;
        flex-wrap: nowrap !important;
    }
    
    .resource-item {
        font-size: 10px !important;
        padding: 2px 4px !important;
    }
    
    /* Panel de controles optimizado para landscape */
    #controls {
        width: 280px !important;
        height: 100vh !important;
        top: 0px !important;
        right: 20px !important;
        bottom: 0 !important;
        left: auto !important;
        transform: translateX(100%) !important;
        transition: transform 0.3s ease !important;
    }
    
    #controls.show {
        transform: translateX(0) !important;
    }
    
    /* Botón toggle optimizado para landscape */
    #mobile-controls-toggle {
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
        top: 20px !important;
        right: 20px !important;
    }
    
    /* Chat global optimizado para landscape */
    .global-chat {
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
    }
    
    .global-chat.minimized {
        width: 50px !important;
        height: 50px !important;
        bottom: 15px !important;
        left: 15px !important;
    }
    
    /* Panel de información de estrella optimizado para landscape */
    .floating-star-info {
        max-width: 300px !important;
        max-height: calc(100vh - 100px) !important;
        top: 50px !important;
        right: 20px !important;
        left: auto !important;
        bottom: auto !important;
        overflow-y: auto !important;
    }
    
    /* Combat Scanner optimizado para landscape */
    .combat-scanner {
        width: 280px !important;
        height: 200px !important;
        top: 20px !important;
        left: 20px !important;
        right: auto !important;
        bottom: auto !important;
    }
    
    /* Tutorial panel optimizado para landscape */
    .tutorial-panel {
        width: 350px !important;
        max-width: calc(100vw - 40px) !important;
        top: 20px !important;
        right: 20px !important;
        left: auto !important;
        bottom: auto !important;
        max-height: calc(100vh - 40px) !important;
        overflow-y: auto !important;
    }
    
    /* Panel de progreso optimizado para landscape */
    .progress-panel {
        width: 300px !important;
        max-width: calc(100vw - 40px) !important;
        top: 20px !important;
        left: 20px !important;
        right: auto !important;
        bottom: auto !important;
        max-height: calc(100vh - 40px) !important;
        overflow-y: auto !important;
    }
    
    /* Notificaciones optimizadas para landscape */
    .notification {
        max-width: 300px !important;
        font-size: 12px !important;
        padding: 8px 12px !important;
    }
    
    /* Botones de navegación optimizados para landscape */
    .nav-button {
        width: 35px !important;
        height: 35px !important;
        font-size: 14px !important;
    }
    
    /* Ajustar espaciado general para landscape */
    .ship-info-section {
        margin-bottom: 8px !important;
        padding: 6px !important;
        border: 2px solid rgba(128, 128, 128, 0.3) !important;
        background: #000000 !important;
        border-radius: 3px !important;
        font-family: 'Courier New', monospace !important;
    }
    
    #controls .ship-info-section h3 {
        font-size: 12px !important;
        margin: 0 0 6px 0 !important;
    }
    
    #controls .ship-info-content {
        gap: 4px !important;
        background: transparent !important;
        padding: 4px !important;
        font-family: 'Courier New', monospace !important;
    }
    
    #controls .ship-image-container {
        width: 40px !important;
        height: 40px !important;
    }
    
    #controls .ship-stats {
        gap: 2px !important;
    }
    
    #controls .ship-stat {
        font-size: 8px !important;
        padding: 1px 2px !important;
    }
    
    #controls .stats {
        font-size: 8px !important;
        padding: 2px 4px !important;
        gap: 4px !important;
    }
    
    /* Optimizar iconos para landscape */
    .terraform-icon,
    .research-icon,
    .shipyard-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
        bottom: 15px !important;
    }
    
    .terraform-icon {
        right: 15px !important;
    }
    
    .research-icon,
    .shipyard-icon {
        left: 15px !important;
    }
    
    /* Ajustar canvas para landscape */
    #container canvas {
        touch-action: none !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
}

/* ===== ORIENTACIÓN PORTRAIT EN MÓVILES ===== */
/* Estilos específicos para móviles en orientación vertical */
@media (max-width: 768px) and (orientation: portrait) {
    /* Mantener los estilos existentes para portrait */
    .user-header {
        padding: 10px !important;
        font-size: 14px !important;
    }
    
    .user-resources {
        gap: 5px !important;
        flex-wrap: wrap !important;
    }
    
    .resource-item {
        font-size: 12px !important;
    }
    
    /* Panel de controles optimizado para portrait */
    #controls {
        width: 100vw !important;
        height: 100vh !important;
        top: 0px !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        transform: translateY(100%) !important;
        transition: transform 0.3s ease !important;
    }
    
    #controls.show {
        transform: translateY(0) !important;
    }
    
    /* Botón toggle optimizado para portrait */
    #mobile-controls-toggle {
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
        top: auto !important;
        right: 20px !important;
        bottom: 20px !important;
    }
    
    /* Panel de información de estrella optimizado para portrait */
    .floating-star-info {
        max-width: calc(100vw - 40px) !important;
        max-height: 60vh !important;
        top: auto !important;
        right: 20px !important;
        left: 20px !important;
        bottom: 20px !important;
        overflow-y: auto !important;
    }
    
    /* Combat Scanner optimizado para portrait */
    .combat-scanner {
        width: calc(100vw - 40px) !important;
        height: 150px !important;
        top: 20px !important;
        left: 20px !important;
        right: 20px !important;
        bottom: auto !important;
    }
    
    /* Tutorial panel optimizado para portrait */
    .tutorial-panel {
        width: calc(100vw - 40px) !important;
        max-width: none !important;
        top: 20px !important;
        right: 20px !important;
        left: 20px !important;
        bottom: auto !important;
        max-height: 70vh !important;
        overflow-y: auto !important;
    }
    
    /* Panel de progreso optimizado para portrait */
    .progress-panel {
        width: calc(100vw - 40px) !important;
        max-width: none !important;
        top: 20px !important;
        left: 20px !important;
        right: 20px !important;
        bottom: auto !important;
        max-height: 60vh !important;
        overflow-y: auto !important;
    }
    
    /* Optimizar iconos para portrait */
    .terraform-icon,
    .research-icon,
    .shipyard-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 24px !important;
        bottom: 20px !important;
    }
    
    .terraform-icon {
        right: 20px !important;
    }
    
    .research-icon,
    .shipyard-icon {
        left: 20px !important;
    }
}

/* Discord Icon Styles */
.discord-icon-universe {
    position: fixed;
    bottom: 20px;
    left: 390px; /* Al lado derecho del chat (350px + 40px de espacio) */
    width: 50px;
    height: 50px;
    background: rgba(114, 137, 218, 0.9); /* Discord purple */
    border: 2px solid rgba(114, 137, 218, 1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(114, 137, 218, 0.5);
}

.discord-icon-universe:hover {
    background: rgba(114, 137, 218, 1);
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(114, 137, 218, 0.8);
}

.discord-icon-universe a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: white;
    text-decoration: none;
}

.discord-icon-universe svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* Responsive Discord Icon */
@media (max-width: 768px) {
    .discord-icon-universe {
        left: 330px; /* Ajustar para móvil */
        width: 45px;
        height: 45px;
    }
    
    .discord-icon-universe svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .discord-icon-universe {
        left: 280px; /* Ajustar para móvil pequeño */
        width: 40px;
        height: 40px;
    }
    
    .discord-icon-universe svg {
        width: 18px;
        height: 18px;
    }
}
