body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #1a1a2e; color: #e0e0e0; margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; min-height: 100vh; }
.hidden { display: none !important; }
h1, h2, h3, h4, h5 { color: #a29bfe; margin-top: 0; }
h2 { text-align: center; }
h3, h4, h5 { text-align: center; }

#game-container {
    width: 100%;
    max-width: 1600px;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
}

.container { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 20px; align-items: flex-start; margin-top: 20px; }
#central-panel, #exploration-container { display: flex; flex-direction: column; gap: 20px; }

h1 {
    position: relative;
    padding-left: 140px;
    min-height: 70px;
    display: flex;
    align-items: center;
    background-color: #16213e;
    border-radius: 8px;
    border: 2px solid #0f3460;
    margin-bottom: 20px;
    font-size: 1.6em;
}

#main-logo {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    height: 70px;
    width: auto;
    pointer-events: none;
}

#player-stats {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
    align-items: center;
}

.help-button {
    position: fixed;
    bottom: 20px;
    right: 230px; 
    width: 26px;
    height: 26px;
    background-color: #a29bfe;
    color: #16213e;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Georgia', serif;
    font-weight: bold;
    font-size: 16px;
    text-decoration: none;
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 0 10px rgba(162, 155, 254, 0.5);
    transition: all 0.2s ease;
    z-index: 1001;
}

.help-button:hover {
    transform: scale(1.1);
    background-color: #55efc4;
    box-shadow: 0 0 15px #55efc4;
}

.stat-item {
    font-size: 0.85em;
    padding: 5px 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 3px;
    border-radius: 10px;
    background-color: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}
#player-credits { background-color: #fdcb6e; color: #16213e; }
.score-max { opacity: 0.7; font-size: 0.9em; }
.profile-control { display: flex; align-items: center; gap: 5px; background-color: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); padding: 2px 2px 2px 8px; border-radius: 12px; }
#profile-initials-text { font-size: 0.75em; font-weight: bold; color: #dfe6e9; }
.profile-icon-button { width: 24px; height: 24px; border-radius: 50%; background-color: #a29bfe; background-size: cover; background-position: center; color: #16213e; font-size: 1em; border: none; cursor: pointer; display: flex; justify-content: center; align-items: center; padding: 0; line-height: 1; transition: all 0.2s ease; overflow: hidden; }
.profile-icon-button:hover { transform: scale(1.1); box-shadow: 0 0 10px #a29bfe; }
.credits-display { font-size: 0.9em; padding: 6px 14px; background-color: #fdcb6e; color: #16213e; }
.ranking-display, .rewards-display { font-size: 10px; padding: 3px 8px; color: #dfe6e9; background-color: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.1); }
.ranking-display .score-max { opacity: 0.7; }

#player-buffs { display: flex; gap: 5px; background-color: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); padding: 2px 8px; border-radius: 10px;}
.buff-icon { font-size: 1.1em; cursor: help; filter: drop-shadow(0 0 3px #fdcb6e); }

#video-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: #000; z-index: 200; display: flex; justify-content: center; align-items: center; }
#intro-video { max-width: 100%; max-height: 100%; outline: none; border: none; }
#video-controls { position: absolute; bottom: 30px; right: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; background-color: rgba(0, 0, 0, 0.6); padding: 15px; border-radius: 8px; }
.control-option { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 1em; }
#dont-show-again-checkbox { cursor: pointer; transform: scale(1.2); }
#skip-video-button { padding: 10px 20px; border: 2px solid #fff; background-color: rgba(255, 255, 255, 0.1); color: #fff; font-weight: bold; border-radius: 5px; cursor: pointer; transition: background-color .3s, color .3s; font-size: 1em; }
#skip-video-button:hover { background-color: #fff; color: #000; }
#login-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(22, 33, 62, 0.9); display: flex; justify-content: center; align-items: center; z-index: 100; }
#login-box { background-color: #1a1a2e; padding: 30px 40px; border-radius: 10px; border: 2px solid #a29bfe; text-align: center; box-shadow: 0 0 20px rgba(162, 155, 254, 0.5); width: 350px; }
#login-box h2 { margin-top: 0; padding-top: 0; font-size: 24px; }
#login-box input { width: 100%; box-sizing: border-box; padding: 10px; margin-top: 15px; border-radius: 5px; border: 1px solid #0f3460; background-color: #0c1a30; color: #e0e0e0; text-align: center; font-size: 16px; }
.password-wrapper { position: relative; width: 100%; margin-top: 15px; } .password-wrapper input { margin-top: 0; padding-right: 40px; } .toggle-password { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); cursor: pointer; user-select: none; font-size: 1.2em; }
.login-buttons { display: flex; gap: 10px; margin-top: 20px; }
#login-button, #register-button { flex: 1; padding: 12px; font-size: 16px; border: none; border-radius: 5px; color: #16213e; font-weight: bold; cursor: pointer; }
#login-button { background-color: #55efc4; } #register-button { background-color: #74b9ff; }
#login-message { min-height: 20px; color: #fdcb6e; font-weight: bold; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(22, 33, 62, 0.9); display: flex; justify-content: center; align-items: center; z-index: 150; }
.modal-overlay.modal-on-top { z-index: 160; }
/* << NUEVA REGLA PARA ARREGLAR LA SUPERPOSICIÓN >> */
#rescue-confirm-modal { z-index: 160; }
.modal-content { background-color: #1a1a2e; padding: 20px 30px; border-radius: 10px; border: 2px solid #a29bfe; text-align: center; max-width: 80%; max-height: 80%; position: relative; display: flex; flex-direction: column; }
.modal-content.large { width: 90vw; height: auto; max-width: 900px; max-height: 90vh; }
.modal-content.modal-sm { max-width: 400px; max-height: auto; }
.action-buttons { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; }
.action-buttons button, #close-ingredient-action-modal, #close-usable-action-modal, #close-quantity-modal-button, #close-ship-action-modal, #loan-term-modal .cancel-button { width: 100%; padding: 12px; font-size: 1em; border: none; border-radius: 5px; font-weight: bold; cursor: pointer; }
#action-to-cauldron { background-color: #55efc4; color: #16213e; }
#action-use-item { background-color: #55efc4; color: #16213e; }
#action-sell-global, #action-sell-usable-item, #action-sell-ship-global { background-color: #74b9ff; color: #16213e; }
#action-sell-private, #action-sell-ship-private, #action-sell-usable-private { background-color: #a29bfe; color: #16213e; }
#close-ingredient-action-modal, #close-usable-action-modal, #close-quantity-modal-button, #close-ship-action-modal, #loan-term-modal .cancel-button { background-color: #ff7675; color: #16213e; margin-top: 10px; }
#loan-term-modal .cancel-button { margin-top: 0; }
#quantity-action-modal #quantity-input-wrapper { margin: 20px auto; width: 80%; }
#quantity-action-modal #quantity-input { width: 100%; box-sizing: border-box; padding: 10px; border-radius: 5px; border: 1px solid #0f3460; background-color: #0c1a30; color: #e0e0e0; text-align: center; font-size: 1.2em; }
#quantity-action-modal .action-buttons { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 0 0; }
#quantity-action-modal button { width: 100%; max-width: 250px; margin: 0 auto; padding: 12px; font-size: 1em; border: none; border-radius: 5px; font-weight: bold; cursor: pointer; color: #16213e; }
#quantity-action-modal button:not(:first-child) { margin-top: 10px; }
#quantity-action-modal #confirm-quantity-button { background-color: #55efc4; }
#quantity-action-modal #close-quantity-modal-button { background-color: #ff7675; margin-top: 0; }

.profile-modal-content { display: grid; grid-template-columns: 200px 1fr; gap: 15px; text-align: left; max-width: 850px; width: 90%; max-height: 90vh; overflow-y: auto; padding-right: 15px; }
#profile-left-panel, #profile-right-panel { display: flex; flex-direction: column; min-height: 0; }
#profile-left-panel h3, #profile-right-panel h3 { text-align: center; margin-top: 0; font-size: 1.1em; }
#profile-avatar-display { width: 80%; aspect-ratio: 1 / 1; background-color: #0c1a30; border-radius: 10px; border: 3px dashed #0f3460; display: flex; justify-content: center; align-items: center; margin-bottom: 10px; overflow: hidden; margin-left: auto; margin-right: auto; }
#profile-avatar-display img { width: 100%; height: 100%; object-fit: cover; }
#profile-avatar-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; height: 120px; overflow-y: auto; padding: 5px; background-color: rgba(0,0,0,0.1); border-radius: 5px; }
#profile-avatar-gallery img { width: 100%; border-radius: 8px; border: 3px solid #0f3460; cursor: pointer; transition: all 0.2s ease; }
#profile-avatar-gallery img:hover { transform: scale(1.1); border-color: #55efc4; }
#profile-avatar-gallery img.selected-avatar { border-color: #a29bfe; transform: scale(1.05); box-shadow: 0 0 10px #a29bfe; }
.profile-section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.profile-section { background-color: #0c1a30; padding: 10px; border-radius: 8px; margin-bottom: 8px; }
.profile-section h4 { margin-top: 0; border-bottom: 1px solid #0f3460; padding-bottom: 8px; margin-bottom: 8px; font-size: 1em; }
#profile-milestones-list, #profile-stats-list, #profile-sabotage-log, #profile-grimoire-summary { list-style-type: none; padding: 0; margin: 0; overflow-y: auto; }
#profile-stats-list li { margin-bottom: 2px; }
#profile-milestones-list { max-height: 105px; } 
#profile-sabotage-log { max-height: 90px; }
#profile-grimoire-summary { max-height: 90px; }
#profile-milestones-list li, #profile-stats-list li, #profile-sabotage-log li { padding-left: 0; margin-bottom: 5px; display: flex; align-items: center; gap: 8px; font-size: 0.9em; }
#profile-stats-list .stat-label { font-weight: bold; color: #a29bfe; }
#profile-sabotage-log .log-sent { color: #fdcb6e; }
#profile-sabotage-log .log-received { color: #ff7675; }
#profile-grimoire-summary span { display: inline-block; background: #2c3e50; padding: 4px 8px; border-radius: 15px; margin: 2px; font-size: 0.85em; }
.close-modal-corner-button { background: none; border: none; color: #e0e0e0; font-size: 1.5em; cursor: pointer; position: absolute; top: 10px; right: 15px; }
.market-stats-grid { display: grid; grid-template-columns: auto 1fr; gap: 15px; align-items: start; }
.market-stats-grid h4 { font-size: 1em; margin: 0 0 5px 0; }

.modal-content h3 { margin-top: 0; }
.sell-option-group { display: flex; justify-content: center; gap: 20px; margin: 20px 0; }
.sell-option-group label { cursor: pointer; font-size: 1.1em; }
.sell-details-group { display: flex; flex-direction: column; gap: 15px; width: 100%; align-items: center; }
#sell-price-input, #private-sell-target-search { width: 80%; box-sizing: border-box; padding: 10px; border-radius: 5px; border: 1px solid #0f3460; background-color: #0c1a30; color: #e0e0e0; text-align: center; font-size: 16px; }
#private-sell-target-wrapper { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
#confirm-sell-button, #close-sell-modal-button { padding: 10px 20px; font-size: 1em; border: none; border-radius: 5px; color: #16213e; font-weight: bold; cursor: pointer; margin-top: 20px; }
#confirm-sell-button { background-color: #55efc4; }
#close-sell-modal-button { background-color: #ff7675; }
.shop-grid { display: flex; flex-wrap: wrap; gap: 15px; justify-content: center; margin: 20px 0; max-height: 60vh; overflow-y: auto; padding: 10px; }
.drone-option { position: relative; width: 180px; height: auto; border: 3px solid #0f3460; border-radius: 8px; padding: 10px; background-color: #0c1a30; transition: all .2s ease; display: flex; flex-direction: column; justify-content: space-between; align-items: center; }
.mothership-option { position: relative; width: 220px; height: auto; border: 3px solid #0f3460; border-radius: 8px; padding: 10px; background-color: #0c1a30; transition: all .2s ease; display: flex; flex-direction: column; justify-content: space-between; align-items: center; }
.drone-option img, .mothership-option img { width: 100%; height: 100px; object-fit: contain; }
.drone-option .drone-name, .mothership-option .mothership-name { font-weight: bold; margin: 5px 0; }
.mothership-stats { font-size: 0.8em; text-align: left; width: 100%; padding: 5px 10px; background: rgba(0,0,0,0.2); border-radius: 5px; margin-bottom: 10px; }
.mothership-stats span { display: block; }
.drone-option.locked, .mothership-option.locked { border-color: #576574; }
.drone-option.locked img, .mothership-option.locked img { filter: brightness(0.3) grayscale(0.8); }
.drone-option .buy-button-container, .mothership-option .buy-button-container { width: 100%; margin-top: auto; }
.drone-option .buy-button-container button, .mothership-option .buy-button-container button { width: 100%; padding: 8px; border: none; border-radius: 5px; font-weight: bold; cursor: pointer; background-color: #fdcb6e; color: #16213e; }
.drone-option .buy-button-container button.buy-action, .mothership-option .buy-button-container button.buy-action { background-color: #55efc4; }
.drone-option .buy-button-container button:disabled, .mothership-option .buy-button-container button:disabled { background-color: #576574; color: #a4b0be; cursor: not-allowed; }
.drone-option.owned, .mothership-option.owned { cursor: pointer; border-color: #55efc4; }
.drone-option.owned:hover, .mothership-option.owned:hover { transform: scale(1.05); }
.modal-actions { display: flex; justify-content: center; gap: 20px; margin-top: 20px; }
#close-drone-modal-button, #close-mothership-modal-button, #close-scry-modal-button, #close-sabotage-modal-button, #close-full-planet-list-modal-button, #close-route-plan-modal-button, #close-guild-services-modal-button { padding: 10px 20px; font-size: 1em; background-color: #ff7675; border: none; border-radius: 5px; color: #16213e; font-weight: bold; cursor: pointer; margin-top: 20px; }
#center-camera-button, #show-more-planets-button, #route-plan-button { padding: 10px 20px; font-size: 1em; background-color: #a29bfe; border: none; border-radius: 5px; color: #16213e; font-weight: bold; cursor: pointer; }
#show-more-planets-button { width: 100%; margin-top: 10px; }
.scry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 20px 0; max-height: 50vh; overflow-y: auto; padding: 10px; }
.scry-option, .sabotage-option { padding: 15px; background-color: #0c1a30; border-radius: 5px; cursor: pointer; transition: all 0.2s ease; text-align: center; }
.scry-option { border: 2px solid #a29bfe; } .sabotage-option { border: 2px solid #ff7675; }
.scry-option:hover { background-color: #2c3e50; border-color: #55efc4; }
.sabotage-option:hover { background-color: #c0392b; border-color: #fff; }
.scry-option .recipe-name { font-weight: bold; font-size: 1.1em; } .scry-option .discovered-by { font-size: 0.8em; color: #b2bec3; margin-top: 5px; font-style: italic; }
#laboratorio, #central-panel, #exploration-container { background-color: #16213e; border: 2px solid #0f3460; border-radius: 8px; padding: 15px; }

.inventory-section { display: grid; gap: 8px; padding: 10px; min-height: 50px; background-color: #0c1a30; border-radius: 5px; margin-bottom: 10px; overflow-y: auto; }
#inventory-ingredients, #guild-bank-inventory-view, #guild-bank-player-inventory, #guild-bank-guild-inventory {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    max-height: 284px;
}
.inventory-slot { width: 60px; height: 60px; border: 1px solid #0f3460; background-color: rgba(0,0,0,0.2); border-radius: 5px; position: relative; display: flex; justify-content: center; align-items: center; }
.inventory-slot.filled { background-color: #2c3e50; border-color: #a29bfe; cursor: pointer; transition: all .2s ease; }
.inventory-slot.filled:hover { transform: scale(1.1); z-index: 10; }
.inventory-slot .item-emoji { font-size: 28px; line-height: 1; }
.slot-quantity { position: absolute; bottom: 2px; right: 4px; font-size: 12px; font-weight: bold; background-color: rgba(0, 0, 0, 0.7); color: #fdcb6e; padding: 1px 4px; border-radius: 3px; }

#cauldron { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px; min-height: 80px; background-color: #0c1a30; border-radius: 5px; margin-bottom: 15px; position: relative; justify-content: center; align-items: center; }
#cauldron-animation-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; pointer-events: none; z-index: 0; }
#cauldron-animation-container img, #cauldron-animation-container object { width: 120px; height: 120px; }
#cauldron .inventory-slot { z-index: 1; }
#cauldron .inventory-slot.cauldron-item { width: 45px; height: 45px; }
#cauldron .inventory-slot.cauldron-item .item-emoji { font-size: 20px; }
#cauldron .inventory-slot.cauldron-item .slot-quantity { font-size: 10px; padding: 1px 3px; }
#cauldron-result { position: absolute; font-size: 48px; z-index: 2; pointer-events: none; text-shadow: 0 0 10px rgba(255, 255, 255, 0.7); }

#combine-button, #send-drone-button, #autofarm-button { display: block; width: 100%; padding: 10px; margin-top: 10px; border: none; border-radius: 5px; color: #16213e; font-size: 16px; font-weight: bold; cursor: pointer; transition: background-color .3s; }
#combine-button { background-color: #55efc4; }
#send-drone-button { background-color: #74b9ff; }
#autofarm-button { background-color: #a29bfe; }
#autofarm-button.active { background-color: #ff7675; }
#send-drone-button:disabled, #autofarm-button:disabled, #combine-button:disabled { background-color: #576574; cursor: not-allowed; color: #a4b0be; }
.ship-bay { margin-top: 20px; padding-top: 15px; border-top: 1px solid #0f3460; }
#mothership-bay .ship-display { width: 150px; }
.ship-display { position: relative; min-height: 100px; background-color: #0c1a30; border: 2px solid #74b9ff; border-radius: 8px; margin: 0 auto 10px auto; display: flex; justify-content: center; align-items: center; padding: 5px; box-sizing: border-box; }
#drone-bay .ship-display { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 10px; width: 100%; }
.individual-drone { display: flex; flex-direction: column; align-items: center; gap: 5px; background: rgba(0,0,0,0.2); padding: 5px; border-radius: 5px; position: relative; }
.individual-drone.disabled-drone { opacity: 0.5; }
.individual-drone.disabled-drone::after { content: 'X'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 3em; color: #ff7675; font-weight: bold; text-shadow: 0 0 5px black; }
.individual-drone img { width: 100%; max-height: 50px; object-fit: contain; }
.drone-sub-stats { font-size: 0.75em; color: #b2bec3; display: flex; justify-content: space-around; width: 100%;}
#mothership-avatar-img { max-width: 100%; max-height: 100%; object-fit: contain; }
#drone-control-panel { margin-top: 20px; padding-top: 15px; border-top: 1px solid #0f3460; }
#drone-status { background-color: #0c1a30; padding: 10px; border-radius: 5px; text-align: center; margin-bottom: 10px; font-style: italic; color: #dfe6e9; }
#ranking-panel { margin-top: 20px; padding-top: 15px; border-top: 1px solid #0f3460; }
#ranking-list { max-height: 200px; overflow-y: auto; padding-right: 5px; }
.ranking-entry { display: flex; justify-content: space-between; align-items: center; padding: 8px; margin-bottom: 5px; background-color: #0c1a30; border-radius: 5px; border-left: 3px solid transparent; }
.ranking-entry.top-1 { border-left-color: #FFD700; } .ranking-entry.top-2 { border-left-color: #C0C0C0; } .ranking-entry.top-3 { border-left-color: #CD7F32; } .ranking-entry.current-player { background-color: #2c3e50; font-weight: bold; }
.ranking-position { font-weight: bold; color: #a29bfe; min-width: 25px; } .ranking-name { flex-grow: 1; } .ranking-score { font-weight: bold; color: #55efc4; }
#historial-panel, #market-panel, #lanzadera-panel, #potions-x-panel, #guild-panel { background-color: #16213e; border: 2px solid #0f3460; border-radius: 8px; padding: 15px; margin-top: 0; }
#market-panel { display: flex; flex-direction: column; gap: 20px; }

/* ================================================================= */
/* === INICIO: LIMITACIÓN DE ALTURA PARA MERCADOS === */
/* ================================================================= */

#market-listings,
#private-offers-listings {
    max-height: 450px;  /* Altura suficiente para aprox. 10 items */
    overflow-y: auto;   /* Activa el scroll vertical automático */
    padding-right: 5px; /* Espacio para que el texto no toque la barra */
    
    /* Estilos opcionales para enmarcar la lista */
    border: 1px solid #0f3460;
    background-color: rgba(0, 0, 0, 0.2); 
    border-radius: 5px;
    margin-bottom: 15px;
}

/* --- Estilos de la barra de scroll (Personalizados al tema del juego) --- */

#market-listings::-webkit-scrollbar,
#private-offers-listings::-webkit-scrollbar {
    width: 8px;
}

#market-listings::-webkit-scrollbar-track,
#private-offers-listings::-webkit-scrollbar-track {
    background: #0c1a30; 
    border-radius: 4px;
}

#market-listings::-webkit-scrollbar-thumb,
#private-offers-listings::-webkit-scrollbar-thumb {
    background-color: #a29bfe; /* Color violeta del tema */
    border-radius: 4px; 
    border: 2px solid #0c1a30;
}

#market-listings::-webkit-scrollbar-thumb:hover,
#private-offers-listings::-webkit-scrollbar-thumb:hover {
    background-color: #55efc4; /* Color verde al pasar el ratón */
}

/* ================================================================= */
/* === FIN: LIMITACIÓN DE ALTURA PARA MERCADOS === */
/* ================================================================= */

#lanzadera-display, #guild-display { width: 100%; aspect-ratio: 16 / 9; background-color: #000; border-radius: 5px; position: relative; display: flex; justify-content: center; align-items: center; overflow: hidden; }
#drone-travel-video, #guild-video { width: 100%; height: 100%; object-fit: cover; }
#lanzadera-placeholder { color: #576574; font-style: italic; font-size: 1.2em; }
#log-list { list-style: none; padding: 0; max-height: 200px; overflow-y: auto; }
#log-list li { background-color: #0c1a30; margin-bottom: 5px; padding: 8px; border-radius: 3px; border-left: 3px solid #55efc4; }
.recipe-log-title { margin-top: 25px; border-top: 1px solid #0f3460; padding-top: 15px; }
#recipe-log { max-height: 250px; }
.market-item, .private-offer-item { display: flex; align-items: center; justify-content: space-between; background-color: #0c1a30; padding: 8px; border-radius: 5px; margin-bottom: 8px; }
.market-item.drone-listing, .market-item.mothership-listing { border-left: 4px solid #74b9ff; }
.private-offer-item.sent { border-left: 4px solid #fdcb6e; }
.private-offer-item.received { border-left: 4px solid #55efc4; }
.market-item .item-info, .private-offer-item .item-info { display: flex; align-items: center; gap: 10px; }
.market-item .item-emoji, .private-offer-item .item-emoji { font-size: 1.5em; }
.market-item .seller-info, .private-offer-item .offer-party-info { font-size: 0.8em; color: #636e72; }
.market-item .price, .private-offer-item .price { font-weight: bold; color: #fdcb6e; }
.market-item button, .private-offer-item button { padding: 5px 10px; font-size: 0.9em; border: none; border-radius: 5px; cursor: pointer; color: #16213e; font-weight: bold; }
.buy-button { background-color: #55efc4; } .cancel-button { background-color: #ff7675; }
.selection-area { display: flex; gap: 10px; margin-bottom: 15px; } #planet-list, #biome-list { flex: 1; display: flex; flex-direction: column; gap: 8px; } .planet-button, .biome-button { width: 100%; padding: 10px; border: 2px solid #74b9ff; background-color: #0c1a30; color: #dfe6e9; border-radius: 5px; cursor: pointer; transition: all .2s ease; text-align: left; font-size: 1em; } .planet-button:hover, .biome-button:hover { background-color: #2c3e50; } .planet-button.selected, .biome-button.selected { background-color: #74b9ff; color: #16213e; font-weight: bold; } .planet-button.locked { border-color: #576574; background-color: #2c3e50; color: #636e72; cursor: not-allowed; }
#destination-info { background-color: #0c1a30; padding: 15px; border-radius: 5px; min-height: 150px; }
#planet-image-container { width: 100%; height: 150px; border-radius: 5px; overflow: hidden; margin-bottom: 15px; background-color: #000; }
#planet-image { width: 100%; height: 100%; object-fit: cover; }
#destination-text h4 { margin: 0 0 10px 0; color: #55efc4; } #destination-text p { margin: 0; font-size: 0.9em; line-height: 1.4; }
#destination-text .hint, #potions-x-inventory .hint, .modal-content .hint, #planet-list .hint, #biome-list .hint, #private-offers-listings .hint, #exploitation-stats-container .hint { color: #b2bec3; font-style: italic; }
#full-planet-list-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; max-height: 380px; width: 100%; padding: 10px; padding-bottom: 10px; box-sizing: border-box; }

#radar-canvas { position: fixed; bottom: 20px; right: 20px; width: 200px; height: 200px; border: 2px solid #ffffff; border-radius: 50%; background-color: #000; z-index: 1000; box-shadow: 0 0 15px rgba(116, 185, 255, 0.5); cursor: pointer; transition: transform 0.2s ease-in-out; }
#radar-canvas:hover { transform: scale(1.1); }
#map-context-menu {
    position: fixed;
    background-color: #0c1a30; /* Fondo sólido azul oscuro */
    border: 2px solid #a29bfe; /* Borde violeta brillante */
    border-radius: 8px;
    padding: 12px;
    z-index: 2000; /* Muy alto para estar encima de todo */
    min-width: 220px;
    max-width: 300px; /* Evita que sea excesivamente ancho */
    max-height: 80vh; /* Evita que sea más alto que la pantalla */
    overflow-y: auto; /* Scroll si hay demasiados biomas */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8); /* Sombra fuerte para profundidad */
    color: #dfe6e9;
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#map-context-menu h4 {
    margin: 0 0 8px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #0f3460;
    font-size: 1.2em;
    color: #fdcb6e; /* Título dorado */
    text-align: center;
    white-space: normal; /* Permite que el título largo baje de línea */
}

#map-context-menu .hint {
    color: #ff7675;
    font-style: italic;
    text-align: center;
    margin: 5px 0;
}

.map-context-button {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #dfe6e9;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 0.95em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Puntos suspensivos si el texto es muy largo */
}

.map-context-button:hover {
    background-color: #2c3e50;
    color: #55efc4;
    border-color: #55efc4;
}

.map-context-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    text-decoration: line-through;
}

.map-context-button.action-button { font-weight: bold; }

#private-offer-modal .form-group { width: 90%; margin: 15px auto; text-align: left; }
#private-offer-modal .form-group label { display: block; margin-bottom: 5px; font-weight: bold; color: #a29bfe; }
#private-offer-modal #private-offer-price-input { width: 100%; box-sizing: border-box; padding: 10px; border-radius: 5px; border: 1px solid #0f3460; background-color: #0c1a30; color: #e0e0e0; font-size: 1em; }
.player-list-container { max-height: 150px; overflow-y: auto; border: 1px solid #444; border-radius: 4px; padding: 5px; background-color: rgba(0, 0, 0, 0.2); margin-top: 5px; }
.private-offer-player { padding: 8px 12px; margin: 2px 0; background-color: #2d3436; border-radius: 3px; cursor: pointer; transition: background-color 0.2s ease; }
.private-offer-player:hover { background-color: #636e72; }
.private-offer-player.selected { background-color: #00b894; color: #fff; font-weight: bold; }
#confirm-private-offer-button { padding: 10px 20px; font-size: 1em; border: none; border-radius: 5px; color: #16213e; font-weight: bold; cursor: pointer; background-color: #55efc4; }
#confirm-private-offer-button:disabled { background-color: #576574; cursor: not-allowed; color: #a4b0be; }
#close-private-offer-modal-button { padding: 10px 20px; font-size: 1em; border: none; border-radius: 5px; color: #16213e; font-weight: bold; cursor: pointer; background-color: #ff7675; }
.action-button { background-color: #55efc4; color: #16213e; }
.action-button:disabled { background-color: #576574; cursor: not-allowed; color: #a4b0be; }

.profile-market-filters { display: flex; gap: 10px; margin-bottom: 10px; }
.market-filter-button { flex: 1; padding: 8px; border: 1px solid #0f3460; background-color: #0c1a30; color: #e0e0e0; border-radius: 5px; cursor: pointer; transition: all .2s ease; font-weight: bold; }
.market-filter-button:hover { background-color: #2c3e50; }
.market-filter-button.active { background-color: #a29bfe; color: #16213e; border-color: #a29bfe; }
#profile-market-stats-list { list-style-type: none; padding-left: 0; margin: 0; }
#profile-market-stats-list li { margin-bottom: 5px; padding-left: 0; font-size: 0.9em; }
#profile-market-stats-list .stat-label { font-weight: bold; color: #a29bfe; display: inline-block; width: 110px; }
#profile-market-stats-list .stat-value { color: #55efc4; }
#profile-market-stats-list .stat-subvalue { color: #dfe6e9; font-size: 0.9em; }
.chart-container { width: 100%; height: 120px; background-color: #0c1a30; padding: 10px; border-radius: 5px; box-sizing: border-box; }
#profile-sales-chart { width: 100%; height: 100%; }

@keyframes blink { 50% { opacity: 0.5; } }
#route-plan-modal .modal-content.large { max-width: 900px; width: 90%; text-align: left; height: auto; max-height: 90vh; overflow-y: hidden; }
.route-planner-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; margin-top: 20px; max-height: calc(85vh - 150px); overflow: hidden; }
.route-form, .route-list { background-color: #0c1a30; padding: 15px; border-radius: 8px; display: flex; flex-direction: column; }
.route-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-group { display: flex; flex-direction: column; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { margin-bottom: 5px; font-weight: bold; color: #a29bfe; }
.form-group input, .form-group select { padding: 8px; border-radius: 4px; border: 1px solid #0f3460; background-color: #1a1a2e; color: #e0e0e0; }
#route-plan-table { width: 100%; border-collapse: collapse; }
#route-plan-table th, #route-plan-table td { padding: 8px; text-align: left; border-bottom: 1px solid #0f3460; vertical-align: middle; }
#route-plan-table th { color: #a29bfe; }
.route-plan-actions { display: flex; gap: 10px; margin-top: 15px; }
.route-plan-actions button, #add-step-button, #save-route-plan-button { padding: 10px 15px; border: none; border-radius: 5px; font-weight: bold; cursor: pointer; color: #16213e; }
#add-step-button { background-color: #74b9ff; }
#execute-route-plan-button { background-color: #55efc4; flex-grow: 1; }
#abort-route-plan-button { background-color: #ff7675; }
#save-route-plan-button { background-color: #fdcb6e; width: 100%; margin-top: 10px; }
.scrollable-list { flex-grow: 1; overflow-y: auto; min-height: 100px; padding: 5px; border: 1px solid #0f3460; border-radius: 4px; margin-top: 10px; }
.saved-routes-section .scrollable-list { max-height: 150px; }
#saved-routes-list { list-style-type: none; padding: 0; }
#saved-routes-list li { background-color: #1a1a2e; padding: 10px; margin-bottom: 5px; border-radius: 4px; cursor: pointer; transition: background-color .2s; display: flex; justify-content: space-between; align-items: center; }
#saved-routes-list li:hover { background-color: #2c3e50; }
#saved-routes-list li .delete-saved-route { background: none; border: none; color: #ff7675; cursor: pointer; font-size: 1.2em; padding: 0 5px; display: none; }
#saved-routes-list li:hover .delete-saved-route { display: inline; }
#route-plan-table .action-cell button { background: none; border: none; color: #ff7675; cursor: pointer; font-size: 1.2em; }
.status-pending { color: #b2bec3; }
.status-in-progress { color: #fdcb6e; font-weight: bold; animation: blink 1.5s linear infinite; }
.status-completed { color: #55efc4; opacity: 0.7; }

#recipe-log, #log-list, #ranking-list, #profile-avatar-gallery, #profile-milestones-list, #profile-sabotage-log, #profile-grimoire-summary, .profile-modal-content, #full-planet-list-container, .scrollable-list, #refuel-list-container { overflow-y: auto;  padding-right: 5px; scrollbar-width: thin; scrollbar-color: #a29bfe #0c1a30; }
#full-planet-list-container::-webkit-scrollbar, #inventory-ingredients::-webkit-scrollbar, #recipe-log::-webkit-scrollbar, #log-list::-webkit-scrollbar, #ranking-list::-webkit-scrollbar, #profile-avatar-gallery::-webkit-scrollbar, #profile-milestones-list::-webkit-scrollbar, #profile-sabotage-log::-webkit-scrollbar, #profile-grimoire-summary::-webkit-scrollbar, .profile-modal-content::-webkit-scrollbar, .scrollable-list::-webkit-scrollbar, #refuel-list-container::-webkit-scrollbar { width: 8px; }
#full-planet-list-container::-webkit-scrollbar-track, #inventory-ingredients::-webkit-scrollbar-track, #recipe-log::-webkit-scrollbar-track, #log-list::-webkit-scrollbar-track, #ranking-list::-webkit-scrollbar-track, #profile-avatar-gallery::-webkit-scrollbar-track, #profile-milestones-list::-webkit-scrollbar-track, #profile-sabotage-log::-webkit-scrollbar-track, #profile-grimoire-summary::-webkit-scrollbar-track, .profile-modal-content::-webkit-scrollbar-track, .scrollable-list::-webkit-scrollbar-track, #refuel-list-container::-webkit-scrollbar-track { background: #0c1a30; border-radius: 4px; }
#full-planet-list-container::-webkit-scrollbar-thumb, #inventory-ingredients::-webkit-scrollbar-thumb, #recipe-log::-webkit-scrollbar-thumb, #log-list::-webkit-scrollbar-thumb, #ranking-list::-webkit-scrollbar-thumb, #profile-avatar-gallery::-webkit-scrollbar-thumb, #profile-milestones-list::-webkit-scrollbar-thumb, #profile-sabotage-log::-webkit-scrollbar-thumb, #profile-grimoire-summary::-webkit-scrollbar-thumb, .profile-modal-content::-webkit-scrollbar-thumb, .scrollable-list::-webkit-scrollbar-thumb, #refuel-list-container::-webkit-scrollbar-thumb { background-color: #a29bfe; border-radius: 4px; border: 2px solid #0c1a30; }
#full-planet-list-container::-webkit-scrollbar-thumb:hover, #inventory-ingredients::-webkit-scrollbar-thumb:hover, #recipe-log::-webkit-scrollbar-thumb:hover, #log-list::-webkit-scrollbar-thumb:hover, #ranking-list::-webkit-scrollbar-thumb:hover, #profile-avatar-gallery::-webkit-scrollbar-thumb:hover, #profile-milestones-list::-webkit-scrollbar-thumb:hover, .profile-modal-content::-webkit-scrollbar-thumb:hover, .scrollable-list::-webkit-scrollbar-thumb:hover, #refuel-list-container::-webkit-scrollbar-thumb:hover { background-color: #55efc4; }

#inventory-ingredients::-webkit-scrollbar, #recipe-log::-webkit-scrollbar, #log-list::-webkit-scrollbar, #ranking-list::-webkit-scrollbar, #profile-avatar-gallery::-webkit-scrollbar, #profile-milestones-list::-webkit-scrollbar, #profile-sabotage-log::-webkit-scrollbar, #profile-grimoire-summary::-webkit-scrollbar, .profile-modal-content::-webkit-scrollbar { width: 8px; }
#inventory-ingredients::-webkit-scrollbar-track, #recipe-log::-webkit-scrollbar-track, #log-list::-webkit-scrollbar-track, #ranking-list::-webkit-scrollbar-track, #profile-avatar-gallery::-webkit-scrollbar-track, #profile-milestones-list::-webkit-scrollbar-track, #profile-sabotage-log::-webkit-scrollbar-track, #profile-grimoire-summary::-webkit-scrollbar-track, .profile-modal-content::-webkit-scrollbar-track { background: #0c1a30; border-radius: 4px; }
#inventory-ingredients::-webkit-scrollbar-thumb, #recipe-log::-webkit-scrollbar-thumb, #log-list::-webkit-scrollbar-thumb, #ranking-list::-webkit-scrollbar-thumb, #profile-avatar-gallery::-webkit-scrollbar-thumb, #profile-milestones-list::-webkit-scrollbar-thumb, #profile-sabotage-log::-webkit-scrollbar-thumb, #profile-grimoire-summary::-webkit-scrollbar-thumb, .profile-modal-content::-webkit-scrollbar-thumb { background-color: #a29bfe; border-radius: 4px; border: 2px solid #0c1a30; }
#inventory-ingredients::-webkit-scrollbar-thumb:hover, #recipe-log::-webkit-scrollbar-thumb:hover, #log-list::-webkit-scrollbar-thumb:hover, #ranking-list::-webkit-scrollbar-thumb:hover, #profile-avatar-gallery::-webkit-scrollbar-thumb:hover, #profile-milestones-list::-webkit-scrollbar-thumb:hover, #profile-sabotage-log::-webkit-scrollbar-thumb:hover, .profile-modal-content::-webkit-scrollbar-thumb:hover { background-color: #55efc4; }

#exploitation-resources-panel { background-color: #16213e; border: 2px solid #0f3460; border-radius: 8px; padding: 15px; }
#exploitation-stats-container ul { list-style: none; padding: 0; margin: 0; }
#exploitation-stats-container li { margin-bottom: 8px; font-size: 0.9em; }
#exploitation-stats-container .stat-label { font-weight: bold; color: #a29bfe; display: inline-block; min-width: 120px; }
.exploitation-progress-bar { width: 100%; height: 18px; background-color: #0c1a30; border-radius: 9px; border: 1px solid #0f3460; overflow: hidden; margin-top: 5px; }
.exploitation-progress-bar-inner { height: 100%; background-color: #55efc4; border-radius: 9px; transition: width 0.5s ease; text-align: center; color: #16213e; font-weight: bold; font-size: 0.8em; line-height: 18px; }
#exploitation-availability-list { margin-top: 15px; max-height: 150px; overflow-y: auto; padding-right: 5px; scrollbar-width: thin; scrollbar-color: #a29bfe #0c1a30; }
#exploitation-availability-list::-webkit-scrollbar { width: 8px; }
#exploitation-availability-list::-webkit-scrollbar-track { background: #0c1a30; border-radius: 4px; }
#exploitation-availability-list::-webkit-scrollbar-thumb { background-color: #a29bfe; border-radius: 4px; border: 2px solid #0c1a30; }
#exploitation-availability-list::-webkit-scrollbar-thumb:hover { background-color: #55efc4; }

#exploitation-availability-list { max-height: 270px; overflow-y: auto; padding-right: 5px; }
#exploitation-resources-panel { flex-grow: 1; }

.ship-stats-display { font-size: 0.8em; color: #b2bec3; background-color: rgba(15, 52, 96, 0.3); border-radius: 5px; padding: 8px; margin-top: 8px; text-align: left; }
.ship-stats-display span { display: block; margin-bottom: 4px; }
.ship-stats-display .stat-label { font-weight: bold; color: #74b9ff; min-width: 80px; display: inline-block; }
#potions-x-panel { align-self: start; }

#profile-right-panel { overflow-y: auto; min-height: 0; padding-right: 10px; scrollbar-width: thin; scrollbar-color: #a29bfe #0c1a30; }
#profile-right-panel::-webkit-scrollbar { width: 8px; }
#profile-right-panel::-webkit-scrollbar-track { background: #0c1a30; border-radius: 4px; }
#profile-right-panel::-webkit-scrollbar-thumb { background-color: #a29bfe; border-radius: 4px; border: 2px solid #0c1a30; }
#profile-right-panel::-webkit-scrollbar-thumb:hover { background-color: #55efc4; }

.ship-controls { display: flex; justify-content: space-around; align-items: center; gap: 8px; margin-top: 10px; }
.ship-controls button { flex-grow: 1; padding: 8px 5px; font-size: 0.9em; border: none; border-radius: 5px; font-weight: bold; cursor: pointer; background-color: #74b9ff; color: #16213e; transition: background-color 0.2s ease; }
.ship-controls button:hover { background-color: #a29bfe; }
#sell-mothership-button { background-color: #fdcb6e; }
.fleet-label { font-weight: bold; color: #74b9ff; white-space: nowrap; }
.fleet-size-controls { display: flex; gap: 5px; }
.fleet-button { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #dfe6e9; font-size: 1.1em; font-weight: bold; cursor: pointer; display: flex; justify-content: center; align-items: center; line-height: 1; padding-bottom: 2px; }
.fleet-button.add { background-color: #55efc4; color: #16213e; }
.fleet-button.sell { background-color: #ff7675; color: #16213e; }
.fleet-button:disabled, .ship-controls button:disabled { background-color: #576574; border-color: #a4b0be; cursor: not-allowed; color: #a4b0be; }
.sell-fleet-container { margin: 15px 0; }
#sell-fleet-button { width: 100%; padding: 12px 10px; font-size: 1.1em; font-weight: bold; color: #ffffff; background: linear-gradient(145deg, #a29bfe, #74b9ff); border: none; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(130, 123, 255, 0.3); text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4); white-space: nowrap; }
#sell-fleet-button:hover { background: linear-gradient(145deg, #b1a9ff, #83c1ff); box-shadow: 0 6px 20px rgba(130, 123, 255, 0.5); transform: translateY(-2px); }
#sell-fleet-button:active { transform: translateY(0); box-shadow: 0 2px 10px rgba(130, 123, 255, 0.3); }
#sell-fleet-button:disabled { background: #576574; border-color: #a4b0be; cursor: not-allowed; color: #a4b0be; box-shadow: none; transform: none; text-shadow: none; }

.item-emoji-group { display: flex; align-items: center; gap: 2px; }
.item-emoji-small { width: 20px; height: 20px; object-fit: contain; }

.route-list-header { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.fleet-display-icons { display: flex; align-items: center; gap: 8px; }
.fleet-display-icons img { height: 32px; width: auto; object-fit: contain; }
.drone-icon-container { position: relative; display: flex; align-items: center; }
#route-plan-drone-count { position: absolute; bottom: -4px; right: -6px; font-size: 12px; font-weight: bold; background-color: #fdcb6e; color: #16213e; padding: 1px 5px; border-radius: 6px; border: 1px solid #16213e; line-height: 1.2; }

.route-list-header { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.fleet-display-icons { display: flex; align-items: center; gap: 18px; }
.fleet-display-icons img { height: 128px !important; width: auto !important; object-fit: contain; }
.drone-icon-container { position: relative; display: flex; align-items: center; }
#route-plan-drone-count { position: absolute; bottom: -5px; right: -8px; font-size: 14px !important; font-weight: bold; background-color: #fdcb6e; color: #16213e; padding: 1px 7px; border-radius: 8px; border: 1.5px solid #1a1a2e; line-height: 1.2; z-index: 5; }

.fuel-gauge { display: flex; align-items: center; gap: 8px; width: 100%; }
.fuel-label { font-size: 1.5em; }
.fuel-bar-outer { flex-grow: 1; height: 12px; background-color: #0c1a30; border: 1px solid #0f3460; border-radius: 6px; padding: 2px; }
.fuel-bar-inner { height: 100%; border-radius: 4px; transition: width 0.5s ease-in-out, background-color 0.5s ease-in-out; }

#guild-services-button { display: block; width: 100%; padding: 12px; margin-top: 10px; border: none; border-radius: 8px; color: #16213e; font-size: 1.1em; font-weight: bold; cursor: pointer; background: linear-gradient(145deg, #fdcb6e, #ffeaa7); box-shadow: 0 4px 15px rgba(253, 203, 110, 0.3); text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2); transition: all 0.3s ease; }
#guild-services-button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(253, 203, 110, 0.5); }
#guild-services-button:disabled { background: #576574; cursor: not-allowed; color: #a4b0be; box-shadow: none; transform: none; text-shadow: none; }
#guild-tabs-container { display: flex; flex-wrap: wrap; border-bottom: 1px solid #0f3460; margin-bottom: 20px; }
.guild-tab-button { background: none; border: none; color: #b2bec3; padding: 10px 15px; font-size: 0.9em; font-weight: bold; cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.2s ease; position: relative; }
.guild-tab-button:hover { color: #fff; }
.guild-tab-button.active { color: #fdcb6e; border-bottom-color: #fdcb6e; }
.guild-tab-content { display: none; text-align: left; max-height: 60vh; overflow-y: auto; padding-right: 10px; }
.guild-tab-content.active { display: block; }
.finance-section, .news-item { background-color: #0c1a30; padding: 20px; border-radius: 8px; text-align: left; margin-bottom: 15px; }
.finance-section h5, .news-item h5 { color: #a29bfe; margin-top: 0; text-align: left; }
.finance-section p, .news-item p { margin: 5px 0 15px 0; }
.finance-section strong { color: #fdcb6e; }
.stat-row { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed #16213e; }
.stat-key { color: #b2bec3; }
.stat-value { font-weight: bold; color: #e0e0e0; }
.highlight-value { color: #55efc4; font-size: 1.1em; text-align: center; margin-bottom: 10px; }
.status-blocked { color: #ff7675; font-weight: bold; }
.error { color: #ff7675; }
.news-date { font-size: 0.8em; color: #636e72; font-style: italic; display: block; text-align: right; }
.refuel-region { display: inline-block; padding: 2px 6px; border-radius: 10px; font-size: 0.8em; color: #16213e; font-weight: bold; }
.refuel-region.rojo { background-color: #ff6b6b; }
.refuel-region.verde { background-color: #55efc4; }
.refuel-region.azul { background-color: #74b9ff; }
.refuel-region.hub { background-color: #fdcb6e; }

/* Nuevos Estilos */
.notification-dot { position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; background-color: #ff7675; border-radius: 50%; box-shadow: 0 0 5px #ff7675; }
.energy-item { display: grid; grid-template-columns: 1.5fr 1fr 1fr; align-items: center; gap: 15px; padding: 15px; background-color: #0c1a30; border-radius: 8px; margin-bottom: 10px; }
.energy-info { display: flex; align-items: center; gap: 10px; text-align: left; }
.energy-item-image { width: 50px; height: 50px; object-fit: contain; }
.energy-info h4 { margin: 0; font-size: 1em; }
.energy-info .price-per-unit { font-size: 0.8em; color: #b2bec3; }
.energy-purchase-controls { display: flex; gap: 10px; justify-content: flex-end; }
.energy-purchase-controls input[type="number"] {
    width: 80px;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #0f3460;
    background-color: #1a1a2e;
    color: #e0e0e0;
    text-align: center;
    font-size: 1em;
}
.energy-divider { border: none; height: 1px; background-color: #0f3460; margin: 15px 0; }
.refuel-location { background-color: #0c1a30; padding: 15px; border-radius: 8px; margin-bottom: 10px; border-left: 4px solid #74b9ff; }
.refuel-location-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.refuel-location-header h5 { margin: 0; text-align: left; }
.refuel-location-details { display: flex; gap: 20px; font-size: 0.9em; color: #b2bec3; margin-bottom: 10px; }
.refuel-location .prices { display: flex; gap: 20px; font-weight: bold; }
.action-button-small { padding: 5px 12px; font-size: 0.9em; background-color: #a29bfe; color: #16213e; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; }
#refuel-list-container { max-height: 45vh; }
.depreciation-table { width: 100%; font-size: 0.9em; border-collapse: collapse; margin-top: 10px;}
.depreciation-table td, .depreciation-table th { padding: 6px; border: 1px solid #0f3460; }
.depreciation-table thead { background-color: rgba(162, 155, 254, 0.2); }
.depreciation-table.compact td { padding: 4px; }
.depreciation-bar-outer { width: 100%; height: 10px; background-color: #0c1a30; border-radius: 5px; border: 1px solid #0f3460; overflow: hidden; margin-top: 5px; }
.depreciation-bar-inner { height: 100%; background-color: #ff7675; border-radius: 5px; }
.finance-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.fleet-management-section { margin-bottom: 20px; }
/* N_N: Se ha añadido más espacio para los elementos */
.drone-management-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 15px; }
.drone-management-item { display: flex; align-items: center; justify-content: space-between; background-color: #1a1a2e; padding: 10px; border-radius: 5px; }
.toggle-switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ff7675; transition: .4s; border-radius: 26px; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #55efc4; }
input:checked + .slider:before { transform: translateX(24px); }
.guild-finance-table { width: 100%; border-collapse: collapse; }
.guild-finance-table td { padding: 8px; border-bottom: 1px solid #2c3e50; }
.guild-finance-table .value { text-align: right; font-weight: bold; }
.guild-finance-table .income { color: #55efc4; }
.guild-finance-table .expenses { color: #ff7675; }
.guild-finance-table .neutral { color: #fdcb6e; }
.guild-finance-table .balance-row { background-color: rgba(0,0,0,0.2); font-size: 1.1em; }
#personal-space-tab { max-height: 65vh; }
.personal-message { border-left-width: 4px; border-left-style: solid; margin-bottom: 10px; background-color: #0c1a30; border-radius: 0 5px 5px 0; }
.personal-message.type-refuel_receipt { border-left-color: #74b9ff; }
.personal-message.type-rescue_receipt { border-left-color: #55efc4; }
.personal-message.type-loan_contract { border-left-color: #fdcb6e; }
.personal-message.type-loan_payment_due { border-left-color: #ff7675; }
.personal-message.type-embargo_notice { border-left-color: #d63031; }
.personal-message.type-loan_paid_off { border-left-color: #55efc4; }
.personal-message.type-loan_granted_old { border-left-color: #fdcb6e; }
.personal-message.type-debt_repaid { border-left-color: #55efc4; }
.personal-message.type-transfer_receipt_sent { border-left-color: #a29bfe; }
.personal-message.type-transfer_receipt_received { border-left-color: #55efc4; }
.personal-message.unread { box-shadow: 0 0 10px rgba(253, 203, 110, 0.5); }
.message-header { display: flex; justify-content: space-between; padding: 8px 12px; background-color: rgba(0,0,0,0.2); font-size: 0.9em; color: #b2bec3; }
.message-body { padding: 15px; }
.message-body h5 { text-align: left; margin: 0 0 10px 0; color: #fff; }
.message-body ul { list-style: none; padding-left: 0; }
.message-body li { margin-bottom: 5px; }
.message-body .label { color: #a29bfe; font-weight: bold; }
.installment-table { width: 100%; font-size: 0.9em; margin-top: 10px; }
.installment-table th, .installment-table td { padding: 5px; text-align: left; }
.installment-table .status-paid { color: #55efc4; }
.installment-table .status-overdue { color: #ff7675; }
.buy-energy-btn {
    padding: 8px 15px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: #16213e;
    font-weight: bold;
    background-color: #55efc4;
}
.buy-energy-btn:disabled { background-color: #576574; cursor: not-allowed; color: #a4b0be; }

#loan-term-modal .cancel-button {
    margin-top: 10px;
    background-color: #ff7675;
    color: #16213e;
}

/* N_N: Estilos para el nuevo header de la pestaña Energía */
.energy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.energy-header h4 {
    margin: 0;
    text-align: left;
}

/* N_N: Estilos añadidos para el indicador de dron deshabilitado y mejoras en la pestaña de flota */
.individual-drone {
    transition: opacity 0.3s ease;
}
.individual-drone.is-disabled {
    opacity: 0.6;
}
.drone-disable-overlay {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background-color: #d63031;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 14px;
    line-height: 1;
    border: 2px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 5px rgba(214, 48, 49, 0.8);
    user-select: none;
}
.individual-drone.disabled-drone::after {
    content: none !important;
}
#sell-fleet-to-guild-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    background: linear-gradient(145deg, #a29bfe, #74b9ff);
    box-shadow: 0 4px 15px rgba(130, 123, 255, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}
#sell-fleet-to-guild-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(130, 123, 255, 0.5);
}
#sell-fleet-to-guild-btn:disabled {
    background: #576574;
    cursor: not-allowed;
    color: #a4b0be;
    box-shadow: none;
    transform: none;
    text-shadow: none;
}
.fleet-summary {
    background-color: #1a1a2e;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
    border: 1px solid #0f3460;
}

/* Estilos para el Modal de Rescate */
.rescue-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    margin-top: 15px;
    max-height: 60vh;
    overflow-y: auto;
}
.rescue-options, .rescue-summary {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.supply-type-options {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
}
.supply-type-options label {
    cursor: pointer;
    font-size: 1em;
}
#rescue-cost-breakdown .cost-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed #2c3e50;
}
#rescue-cost-breakdown .cost-row.total {
    font-weight: bold;
    font-size: 1.1em;
    color: #55efc4;
    border-top: 1px solid #a29bfe;
    margin-top: 10px;
    padding-top: 10px;
}

@keyframes blinking-dot {
    0% { opacity: 1; }
    50% { opacity: 0.2; }
    100% { opacity: 1; }
}

/* --- INICIO: NUEVOS ESTILOS PARA TRANSFERENCIA CC --- */
#transfer-cc-modal {
    z-index: 170; /* Superior al modal de servicios del gremio */
}

#transfer-cc-modal .modal-content.modal-sm {
    max-width: 450px;
}

#transfer-cc-modal h4 {
    text-align: left;
    border-bottom: 1px solid #0f3460;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

#transfer-cc-modal .form-group input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #0f3460;
    background-color: #0c1a30;
    color: #e0e0e0;
    font-size: 1em;
}

#transfer-recipient-list {
    max-height: 200px;
}

.action-button-secondary {
    background-color: #fdcb6e;
    color: #16213e;
}

.cancel-button {
    background-color: #ff7675;
    color: #16213e;
}

#transfer-summary-details {
    padding: 15px;
    margin-top: 10px;
    text-align: left;
}

#transfer-summary-details p {
    margin: 0;
}
/* --- FIN: NUEVOS ESTILOS PARA TRANSFERENCIA CC --- */

/* --- INICIO: NUEVOS ESTILOS PARA SOLICITUD DE TRANSFERENCIA CC --- */
#request-transfer-modal {
    z-index: 170; /* Mismo nivel alto para superponerse */
}
/* --- FIN: NUEVOS ESTILOS PARA SOLICITUD DE TRANSFERENCIA CC --- */

/* --- INICIO: ESTILOS CORREGIDOS PERFIL Y PIONEROS --- */
.profile-modal-content {
    grid-template-columns: 200px 1fr;
}
#profile-left-panel h3 {
    margin-bottom: 5px;
}
#profile-avatar-display {
    width: 80%; 
    margin-left: auto;
    margin-right: auto;
}
#profile-avatar-gallery {
    height: 120px;
}
.pioneer-container {
    margin-top: 15px;
}
.pioneer-container h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1em;
    color: #fdcb6e;
    text-align: left;
}
.pioneer-table-wrapper {
    max-height: 96px; /* << AJUSTE CLAVE: Altura para 3 filas exactas */
    border: none;
    padding: 0;
}
.pioneer-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}
.pioneer-table th, .pioneer-table td {
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid #0f3460;
    white-space: nowrap; 
}
.pioneer-table th {
    color: #a29bfe;
    background-color: #0c1a30; /* << CAMBIO CLAVE: De rgba(0,0,0,0.2) a un color sólido */
    position: sticky;
    top: 0; 
}
.pioneer-table .pioneer-planet {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px; 
}
.pioneer-table .pioneer-date { color: #b2bec3; }
.pioneer-table .pioneer-planet { font-weight: bold; }
.pioneer-table .pioneer-coords { color: #74b9ff; }
.pioneer-table .pioneer-region { text-align: right; text-transform: capitalize; font-weight: bold; }
/* --- FIN: ESTILOS CORREGIDOS PERFIL Y PIONEROS --- */

/* === INICIO: NUEVOS ESTILOS PARA EL LOCALIZADOR DE RECURSOS === */
#resource-locator-panel {
    background-color: #16213e;
    border: 2px solid #0f3460;
    border-radius: 8px;
    padding: 15px;
    position: relative;
}
.resource-search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
#resource-search-input {
    flex-grow: 1;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #0f3460;
    background-color: #0c1a30;
    color: #e0e0e0;
    font-size: 1em;
}
#resource-search-button {
    flex-shrink: 0;
    width: 40px;
    border: 1px solid #0f3460;
    background-color: #a29bfe;
    color: #16213e;
    border-radius: 4px;
    font-size: 1.2em;
    cursor: pointer;
}
#resource-results-header {
    font-weight: bold;
    color: #fdcb6e;
    text-align: center;
    background-color: #16213e;
    padding-bottom: 10px;
    position: relative; /* <-- AÑADIDO: Para que z-index funcione */
    z-index: 2;         /* <-- AÑADIDO: Para ponerlo por encima del th */
}
#resource-table-wrapper {
    max-height: 126px; /* Altura para 3 filas (3 * (28px row + 2*4px padding)) */
    overflow-y: auto;
    margin-top: 0;
    position: relative;
    z-index: 1;
    background-color: #16213e; /* <-- AÑADE ESTA LÍNEA */
}
#resource-results-table {
    width: 100%;
    border-collapse: collapse;
}
#resource-results-table th, 
#resource-results-table td {
    padding: 8px 8px;
    text-align: left;
    border-bottom: 1px solid #0f3460;
}
#resource-results-table th {
    color: #a29bfe;
    font-size: 0.9em;
    position: relative; /* sticky;*/
    top: 0;
    background-color: #16213e;
    z-index: 1;
}
#resource-results-table td {
    font-size: 0.85em;
}
#resource-results-table td:nth-child(2),
#resource-results-table td:nth-child(3),
#resource-results-table th:nth-child(2),
#resource-results-table th:nth-child(3) {
    text-align: right;
}
/* === FIN: NUEVOS ESTILOS PARA EL LOCALIZADOR DE RECURSOS === */

/* === INICIO: NUEVA REGLA PARA EL MODAL DE PAGO === */

#early-payoff-modal {
    z-index: 170;
}
/* FIN:NUEVA REGLA PARA EL MODAL DE PAGO */

/* --- INICIO: NUEVOS ESTILOS PARA PESTAÑAS DE LOG/CHAT --- */
.log-tabs {
    display: flex;
    border-bottom: 1px solid #0f3460;
    margin-bottom: 10px;
}
.log-tab-button {
    background: none;
    border: none;
    color: #b2bec3;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-weight: bold;
}
.log-tab-button.active {
    color: #55efc4;
    border-bottom-color: #55efc4;
}
.log-tab-content {
    display: none;
}
.log-tab-content.active {
    display: block;
}
/* --- FIN: NUEVOS ESTILOS PARA PESTAÑAS DE LOG/CHAT --- */

/* === INICIO: NUEVOS ESTILOS PARA LA PESTAÑA "MI GREMIO" === */

.guild-join-create-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.guild-action-box {
    background-color: #0c1a30;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #0f3460;
}

.guild-action-box h4 {
    margin-top: 0;
    text-align: left;
    color: #a29bfe;
}

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

#create-guild-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9em;
}

#create-guild-form input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #0f3460;
    background-color: #1a1a2e;
    color: #e0e0e0;
}

.creation-requirements {
    font-size: 0.9em;
    background-color: rgba(0,0,0,0.2);
    padding: 10px;
    border-radius: 5px;
    margin: 15px 0;
}
.creation-requirements h5 {
    margin: 0 0 5px 0;
    color: #fdcb6e;
    text-align: left;
}
.creation-requirements ul {
    margin: 0;
    padding-left: 20px;
}

#create-guild-button {
    width: 100%;
    padding: 12px;
}

#guild-list-container {
    height: 250px;
    border: none;
    padding: 0;
}

.guild-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #1a1a2e;
    border-radius: 5px;
    margin-bottom: 8px;
}

.my-guild-header {
    text-align: center;
    margin-bottom: 20px;
}
.my-guild-header h3 {
    margin: 0;
    font-size: 1.5em;
    color: #fdcb6e;
}
.my-guild-header p {
    margin: 5px 0 0 0;
    color: #b2bec3;
}

.my-guild-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

#guild-bank-inventory {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    max-height: 200px;
}

#guild-member-list {
    height: 250px;
    border: none;
    padding: 0;
}

.guild-member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background-color: #1a1a2e;
    border-radius: 5px;
    margin-bottom: 5px;
}

.member-role {
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8em;
}
.member-role.leader {
    background-color: #fdcb6e;
    color: #16213e;
}
.member-role.officer {
    background-color: #74b9ff;
    color: #16213e;
}
.member-role.member {
    background-color: #576574;
    color: #dfe6e9;
}
/* === FIN: NUEVOS ESTILOS PARA LA PESTAÑA "MI GREMIO" === */

/* EN: style.css -> AL FINAL DEL ARCHIVO */

/* === INICIO: NUEVOS ESTILOS PARA EL MODAL DEL BANCO DEL GREMIO === */
#guild-bank-modal .modal-content.large {
    max-width: 1000px;
}
.guild-bank-interface {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 15px;
    align-items: start;
    margin: 20px 0;
}
.guild-bank-panel {
    background-color: #0c1a30;
    padding: 15px;
    border-radius: 8px;
}
.guild-bank-panel h4 {
    margin-top: 0;
    text-align: center;
}
.guild-bank-panel .inventory-section {
    height: 40vh;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
}
.guild-bank-transfer-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}
.guild-bank-transfer-controls input {
    width: 100%;
    margin-bottom: 10px;
}
.guild-bank-transfer-controls button {
    width: 100%;
}
#guild-bank-player-credits, #guild-bank-guild-credits {
    text-align: center;
    font-weight: bold;
    margin-bottom: 10px;
    color: #fdcb6e;
}
/* === FIN: NUEVOS ESTILOS PARA EL MODAL DEL BANCO DEL GREMIO === */

/* EN: style.css -> AÑADIR AL FINAL */
#guild-bank-modal {
    z-index: 160; /* Superior al modal principal de servicios */
}

/* EN: style.css -> AÑADIR AL FINAL, con los otros estilos de gremio */
.guild-management-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}
#guild-invite-input {
    flex-grow: 1;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #0f3460;
    background-color: #1a1a2e;
    color: #e0e0e0;
}

/* EN: style.css -> AÑADIR AL FINAL */

/* === INICIO: REGLA DE SUPERPOSICIÓN PARA MODALES DE ACCIÓN === */
#quantity-action-modal {
    z-index: 170; /* Superior al modal del banco y al de servicios */
}
/* === FIN: REGLA DE SUPERPOSICIÓN === */
/* EN: style.css -> AÑADIR AL FINAL */

/* === INICIO: ESTILOS PARA SUB-PESTAÑAS Y PROYECTOS DE GREMIO === */
.my-guild-tabs-container {
    display: flex;
    border-bottom: 1px solid #2c3e50;
    margin-bottom: 15px;
}
.guild-sub-tab-button {
    background: none;
    border: none;
    color: #b2bec3;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-weight: bold;
}
.guild-sub-tab-button.active {
    color: #74b9ff;
    border-bottom-color: #74b9ff;
}
.guild-sub-tab-content {
    display: none;
}
.guild-sub-tab-content.active {
    display: block;
}
.project-requirement {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.9em;
}
.progress-bar-container {
    height: 20px;
    background-color: #1a1a2e;
    border-radius: 10px;
    border: 1px solid #0f3460;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background-color: #55efc4;
    color: #16213e;
    font-weight: bold;
    text-align: center;
    line-height: 20px;
    font-size: 0.8em;
    transition: width 0.5s ease;
}
.hint.success {
    color: #55efc4;
    font-weight: bold;
}
/* === FIN: ESTILOS === */

/* EN: style.css -> AL FINAL DEL ARCHIVO */

/* --- INICIO: ESTILOS PARA INTERACCIÓN DE PROYECTOS --- */
.project-requirement-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 5px;
    padding: 5px;
    margin-left: -5px;
    margin-right: -5px;
}

.project-requirement-item:hover {
    background-color: #2c3e50;
}
/* --- FIN: ESTILOS --- */

/* EN: style.css -> AL FINAL DEL ARCHIVO */

/* === INICIO: ESTILOS PARA DESPLIEGUE DE CIUDADELA === */
#citadel-deployment-list {
    height: 200px;
    border: none;
    padding: 0;
}
.deployment-planet-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #1a1a2e;
    border-radius: 5px;
    margin-bottom: 8px;
}
/* === FIN: ESTILOS === */

/* EN: style.css -> AÑADIR AL FINAL */

/* === INICIO: ESTILOS PARA LA CIUDADELA VISUAL === */
.citadel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
/* --- INICIO DEL REEMPLAZO --- */
.title-emblem {
    width: 32px;      /* <-- TAMAÑO REDUCIDO */
    height: 32px;     /* <-- TAMAÑO REDUCIDO */
    object-fit: contain;
    border-radius: 50%;
    background-color: #0c1a30;
    padding: 2px;
    border: 1px solid #74b9ff; /* <-- AÑADIDO: Un borde sutil para definirlo mejor */
    flex-shrink: 0;   /* <-- AÑADIDO: Evita que el emblema se encoja */
}
/* --- FIN DEL REEMPLAZO --- */

.citadel-title h4 {
    margin: 0;
    text-align: left;
}
/* === FIN: ESTILOS === */
/* EN: style.css -> AÑADIR AL FINAL */

/* === INICIO: ESTILOS PARA EMBLEMA EN CABECERA DE GREMIO === */
.guild-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}
.guild-header-emblem {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background-color: #0c1a30;
    border-radius: 50%;
    border: 2px solid #a29bfe;
}
/* === FIN: ESTILOS === */
/* EN: style.css -> AÑADIR AL FINAL */

/* === INICIO: ESTILOS PARA DIPLOMACIA Y ASEDIOS === */
.diplomacy-actions {
    background-color: #1a1a2e;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}
.diplomacy-actions h5 {
    margin-top: 0;
    text-align: left;
}
.active-sieges-list h5 {
    margin-top: 0;
    text-align: left;
    border-top: 1px solid #2c3e50;
    padding-top: 15px;
}
.siege-status-item {
    margin-bottom: 10px;
}
.siege-participants {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    margin-bottom: 5px;
}
.siege-participants .attacker {
    color: #ff7675;
}
.siege-participants .defender {
    color: #74b9ff;
}
/* === FIN: ESTILOS === */
/* EN: style.css -> AÑADIR AL FINAL */
.deployment-search-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 15px 0;
}
#deployment-planet-search {
    flex-grow: 1;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #0f3460;
    background-color: #1a1a2e;
    color: #e0e0e0;
}
#deployment-selection-info.error {
    color: #ff7675;
}
/* EN: style.css -> AÑADIR AL FINAL */
#guild-customization-modal { z-index: 160; }
.clickable { cursor: pointer; transition: transform 0.2s ease; }
.clickable:hover { transform: scale(1.1); }
.guild-header-citadel-img { width: 50px; height: 50px; object-fit: contain; }
.customization-option { padding: 10px; background-color: #0c1a30; border-radius: 8px; cursor: pointer; }
.customization-option:hover { background-color: #2c3e50; }
.customization-option img { width: 100px; height: 100px; object-fit: contain; }
/* EN: style.css -> AÑADIR AL FINAL */

/* === INICIO: ESTILOS PARA ESTADO DE CIUDADELA === */
.citadel-status-info {
    background-color: #1a1a2e;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    border: 1px solid #0f3460;
}
.citadel-status-info span {
    display: block;
    margin-bottom: 8px;
    font-size: 1.1em;
}
.citadel-status-info strong {
    color: #fdcb6e;
}
.citadel-status-info .sector-rojo { color: #ff6b6b; text-transform: capitalize; }
.citadel-status-info .sector-verde { color: #55efc4; text-transform: capitalize; }
.citadel-status-info .sector-azul { color: #74b9ff; text-transform: capitalize; }
/* === FIN: ESTILOS === */

/* EN: style.css -> AÑADIR AL FINAL */
.recipe-entry.war-recipe {
    border-left-color: #ff7675; /* Borde rojo para recetas de guerra */
}

/* EN: style.css -> AÑADIR AL FINAL DEL ARCHIVO */

/* ========================================================================= */
/* === INICIO: ESTILOS MILITARES Y DE ASEDIOS === */
/* ========================================================================= */
.my-guild-tabs-container {
    display: flex;
    border-bottom: 1px solid #2c3e50;
    margin-bottom: 15px;
    flex-wrap: wrap; /* Para que quepan las pestañas */
}

.military-interface {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.military-arsenal {
    background-color: #0c1a30;
    padding: 15px;
    border-radius: 8px;
}

.military-arsenal h5 {
    margin-top: 0;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #2c3e50;
}
.military-arsenal.attack h5 { color: #ff7675; }
.military-arsenal.defense h5 { color: #55efc4; }

.military-inventory {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
    height: 320px; /* 4 filas de 70px + 3 gaps de 10px */
    overflow-y: auto;
}
.military-inventory .inventory-slot {
    width: 100%;
    height: 70px;
}

.military-inventory .inventory-slot .item-emoji {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.military-inventory .attack .item-emoji {
    border: 2px solid #ff7675;
    box-shadow: 0 0 8px #d63031;
}
.military-inventory .defense .item-emoji {
    border: 2px solid #55efc4;
    box-shadow: 0 0 8px #00b894;
}

.military-commands {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}
#launch-attack-btn, #activate-defense-btn {
    flex: 1;
    padding: 15px;
    font-size: 1.2em;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s ease;
}
#launch-attack-btn { background-color: #d63031; color: white; }
#activate-defense-btn { background-color: #00b894; color: white; }
#launch-attack-btn:hover { background-color: #ff4757; }
#activate-defense-btn:hover { background-color: #00cec9; }

/* Modal de Ataque */
#military-attack-modal .modal-content.large {
    max-width: 700px;
}
.attack-step {
    text-align: left;
}
.attack-step h4 {
    text-align: center;
}
.attack-target-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}
.attack-param {
    font-size: 1.1em;
    margin: 8px 0;
}
.attack-param .label {
    font-weight: bold;
    color: #a29bfe;
    display: inline-block;
    width: 150px;
}
.attack-param .value {
    color: #fdcb6e;
    font-weight: bold;
}
.attack-param .value.warning {
    color: #ff7675;
}
#attack-fire-btn, #attack-abort-btn {
    padding: 20px;
    font-size: 2em;
    font-weight: bold;
    border-radius: 10px;
    border: none;
    color: white;
    cursor: pointer;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    transition: all 0.2s ease;
}
#attack-fire-btn { background: linear-gradient(145deg, #ff4757, #d63031); }
#attack-abort-btn { background: linear-gradient(145deg, #636e72, #2d3436); }
#attack-fire-btn:hover { transform: scale(1.05); }
#attack-abort-btn:hover { transform: scale(1.05); }

.attack-countdown-display {
    text-align: center;
    position: relative; /* Para posicionar el punto del radar */
}
.attack-countdown-display .countdown-number {
    font-size: 8em;
    font-weight: bold;
    color: #ff7675;
    text-shadow: 0 0 20px #d63031;
}
.attack-in-flight-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.mini-radar {
    width: 200px;
    height: 200px;
    background-color: #0c1a30;
    border: 3px solid #55efc4;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    margin: 10px auto;
}
.mini-radar-sweep {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform-origin: 0% 0%;
    background: linear-gradient(45deg, rgba(85, 239, 196, 0.4) 0%, rgba(85, 239, 196, 0) 50%);
    animation: radar-sweep 3s linear infinite;
}
#mini-radar-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background-color: #ff4757;
    border-radius: 50%;
    box-shadow: 0 0 8px #d63031;
    transform: translate(-50%, -50%); /* Centrado inicial */
    transition: transform 0.1s linear; /* Transición suave */
}

@keyframes radar-sweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.war-effect {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    pointer-events: none;
    z-index: 500;
}

/* EN: style.css -> REEMPLAZA EL BLOQUE DE ESTILOS MILITARES */

/* === INICIO: ESTILOS MILITARES (V4 - DIRECTO Y SIMPLE) === */

/* Z-INDEX ALTO PARA EL MODAL DE ATAQUE */
#military-attack-modal {
    z-index: 180; /* Muy alto para estar siempre por encima */
}

/* Contenedor principal del modal de ataque */
.attack-preparation-container {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Espacio entre cada sección */
    text-align: left;
}

/* Lupa y campo de búsqueda */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}
.input-with-icon::before {
    content: '🔍';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #a29bfe;
}
.input-with-icon input {
    padding-left: 35px !important; 
    width: 100%;
    box-sizing: border-box;
}

/* Panel de parámetros (la lista vertical) */
.attack-params-panel {
    background-color: #0c1a30;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}
.attack-param {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #2c3e50;
    font-size: 1.1em;
}
.attack-param:last-child {
    border-bottom: none;
}
.attack-param .label {
    font-weight: bold;
    color: #a29bfe;
}
.attack-param .value {
    color: #fdcb6e;
    font-weight: bold;
}
.attack-param .value.warning {
    color: #ff7675;
}

/* Contenedor de botones FIRE y ABORT */
.attack-final-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 25px;
}

/* Estilo para los botones FIRE y ABORT */
#attack-fire-btn, #attack-abort-btn {
    padding: 20px;
    font-size: 2em;
    font-weight: bold;
    border-radius: 10px;
    border: none;
    color: white;
    cursor: pointer;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    transition: all 0.2s ease;
}

#attack-fire-btn { 
    background: linear-gradient(145deg, #e55039, #b71540); /* Rojo más intenso */
}
#attack-fire-btn:hover { 
    background: linear-gradient(145deg, #ff6b81, #e55039);
    transform: scale(1.05);
}
#attack-fire-btn:disabled {
    background: #576574;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

#attack-abort-btn { 
    background: linear-gradient(145deg, #636e72, #2d3436); /* Gris oscuro */
}
#attack-abort-btn:hover { 
    background: linear-gradient(145deg, #8395a7, #636e72);
    transform: scale(1.05);
}
/* === FIN: ESTILOS MILITARES === */

/* ========================================================================= */
/* === INICIO: ESTILOS PARA EFECTOS VISUALES DE GUERRA === */
/* ========================================================================= */
.war-effect {
    position: fixed; /* Usamos fixed para que se posicione relativo a la ventana del mapa */
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    pointer-events: none; /* Imprescindible para no bloquear el mapa */
    z-index: 100; /* Asegura que esté por encima del canvas */
    opacity: 0;
    animation: fade-in-out 2s ease-in-out forwards;
}

.war-effect[src*="defensa.svg"] {
    animation: fade-in-out-long 4s ease-in-out forwards;
}

@keyframes fade-in-out {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    25% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
}

@keyframes fade-in-out-long {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.2); }
}

/* ========================================================================= */
/* === INICIO: CORRECCIONES DE Z-INDEX PARA MODALES MILITARES === */
/* ========================================================================= */

#military-attack-modal, #military-defense-modal {
    z-index: 180; /* Superior al modal de servicios (150) y otros modales (160-170) */
}

/* --- FIN: CORRECCIONES DE Z-INDEX --- */

/* === INICIO: ESTILOS PARA INFO DEL GREMIO EN PANEL PRINCIPAL === */
#player-guild-info-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #0f3460;
    text-align: center;
}

#player-guild-name {
    margin-bottom: 10px;
    font-size: 1.2em;
    color: #fdcb6e;
    font-weight: bold;
}

.guild-info-visuals {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

#player-guild-emblem, #player-guild-citadel-img {
    height: 64px;
    width: 64px;
    object-fit: contain;
    background-color: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 5px;
}

#player-guild-emblem {
    border-radius: 50%; /* Los emblemas son redondos */
    border: 2px solid #a29bfe;
}

#player-guild-citadel-img {
    border: 2px solid #74b9ff;
}
/* === FIN: ESTILOS === */
/* ========================================================================= */
/* === INICIO: CORRECCIONES DE Z-INDEX PARA MODALES MILITARES === */
/* ========================================================================= */

#military-attack-modal, #military-defense-modal {
    z-index: 180; /* Superior al modal de servicios (150) y otros modales (160-170) */
}

/* --- AÑADE ESTA NUEVA REGLA --- */
#quantity-action-modal {
    z-index: 190; /* El más alto de todos para que siempre esté al frente */
}

/* --- FIN: CORRECCIONES DE Z-INDEX --- */

/* style.css -> al final del archivo */

/* ========================================================================= */
/* === INICIO: ESTILOS PARA CHAT DE GREMIO === */
/* ========================================================================= */

#guild-log-content {
    display: flex;
    flex-direction: column;
    height: 100%; /* Ocupar todo el espacio de su contenedor */
}

#guild-chat-list {
    flex-grow: 0; /* La lista de mensajes ocupa el espacio disponible */
    list-style: none;
    padding: 10px;
    margin: 0;
    overflow-y: auto;
    background-color: #0c1a30;
    border-radius: 5px;
/* --- LÍNEAS AÑADIDAS PARA EL SCROLL --- */
    max-height: 250px; /* Límite de altura (aprox 5 mensajes) */
    min-height: 200px; /* Altura mínima para que no se vea vacío */
    border: 1px solid #0f3460; /* Opcional: Borde para definir el área */
    margin-bottom: 10px; /* Separación con el input */
    /* -------------------------------------- */
}

#guild-chat-list li {
    padding: 6px 8px;
    margin-bottom: 5px;
    border-radius: 4px;
    word-wrap: break-word; /* Evita que mensajes largos rompan el layout */
}

.chat-sender {
    font-weight: bold;
    color: #a29bfe;
    margin-right: 8px;
}

.chat-message {
    color: #dfe6e9;
}

/* Estilo para los mensajes del propio jugador */
#guild-chat-list li.is-self {
    background-color: rgba(85, 239, 196, 0.15); /* Fondo verde translúcido */
}

#guild-chat-list li.is-self .chat-sender {
    color: #55efc4; /* Nombre del remitente en verde */
}

#guild-chat-form {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-shrink: 0; /* Evita que el formulario se encoja */
}

#guild-chat-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #0f3460;
    background-color: #0c1a30;
    color: #e0e0e0;
    border-radius: 5px;
    font-size: 1em;
}

#guild-chat-send {
    padding: 10px 20px;
    border: none;
    background-color: #55efc4;
    color: #16213e;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
}
/* ========================================================================= */
/* === INICIO: ESTILOS PARA EL HERALDO CÓSMICO (DISEÑO MEJORADO) === */

#guild-news-tab {
    padding: 0;
}


.cosmic-herald-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 4px double var(--yellow-accent);
}

.cosmic-herald-header h1 {
    font-family: 'Cinzel', serif;
    color: var(--yellow-accent);
    margin: 0;
    font-size: 2.5em;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.herald-logo {
    max-height: 50px;
    vertical-align: middle;
}

.cosmic-herald-header span {
    font-style: italic;
    color: var(--text-color);
    font-size: 1em;
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.news-article {
    background-color: var(--inner-box-bg);
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid var(--container-border);
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.news-article h4 {
    margin-top: 0;
    text-align: left;
    border-bottom: 1px solid var(--container-border);
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: var(--link-color);
    font-size: 1.4em;
}

.news-article h5 {
    color: var(--header-color);
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.1em;
    text-align: left;
}

.headline-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.headline-list li {
    margin-bottom: 12px;
    border-left: 3px solid var(--accent-color);
    padding-left: 10px;
    font-size: 1.05em;
}

.news-tag {
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 8px;
    font-size: 0.8em;
    color: var(--primary-bg);
    display: inline-block;
}

.news-tag.war { background-color: var(--red-region); }
.news-tag.peace { background-color: var(--accent-color); }

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

.stat-card {
    background-color: var(--secondary-bg);
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    border: 1px solid var(--container-border);
}

.stat-card .stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--yellow-accent);
    display: block;
}

.stat-card .stat-label {
    font-size: 0.85em;
    color: var(--text-color);
    text-transform: uppercase;
}

.market-watch-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.market-watch-item {
    font-size: 0.95em;
    padding: 10px;
    background-color: rgba(0,0,0,0.2);
    border-radius: 4px;
    border-left: 2px solid var(--link-color);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
}
.market-live-price { font-weight: bold; color: var(--yellow-accent); }
.market-live-item { font-weight: 500; }
.market-live-seller { font-style: italic; color: #888; text-align: right; }

.community-list {
    list-style-type: '✧ ';
    padding-left: 20px;
    margin: 0;
}

.community-list li {
    margin-bottom: 8px;
    font-size: 1em;
}

.trade-table {
    width: 100%;
    font-size: 0.9em;
    border-collapse: collapse;
}
.trade-table th, .trade-table td {
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid var(--container-border);
}
.trade-table th { color: var(--header-color); }
.trade-table td:last-child { text-align: right; color: var(--accent-color); font-weight: bold; }


.most-traded-list {
    list-style: none;
    padding: 0;
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.most-traded-list li {
    background-color: var(--table-header-bg);
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: bold;
}
/* nuevo estilo localizador de recursos */
.locator-summary {
    margin-top: 20px;
    padding: 15px;
    background-color: var(--inner-box-bg);
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
}

.locator-summary h4 {
    margin-top: 0;
    color: var(--accent-color);
    border: none;
}

.copyable-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

input.copyable-input {
    flex-grow: 1;
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid var(--container-border);
    background-color: var(--primary-bg);
    color: var(--text-color);
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.9em;
}

button.copy-button {
    padding: 8px 15px;
    font-size: 0.9em;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: var(--link-color);
    color: var(--primary-bg);
    transition: background-color 0.2s;
}

button.copy-button:hover {
    background-color: var(--accent-color);
}

.locator-summary .form-group {
    display: flex;
    align-items: center;
    gap: 10px; /* Espacio entre "Planeta:" y el input */
}

.locator-summary .form-group label {
    white-space: nowrap; /* Evita que "Planeta:" se parta en dos líneas */
}

.copyable-input-wrapper {
    width: 100%; /* El contenedor del input y el botón ocupa el resto del espacio */
}

button.copy-button-icon {
    padding: 6px 10px; /* Más compacto */
    font-size: 1.1em; /* Tamaño del icono */
    line-height: 1; /* Alineación vertical del icono */
    background-color: var(--link-color);
    color: var(--primary-bg);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

button.copy-button-icon:hover {
    background-color: var(--accent-color);
    transform: scale(1.1);
}

button.copy-button-icon.copied {
    background-color: var(--green-region);
}
/* del periódico */

.cosmic-herald-container .news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.cosmic-herald-container .news-column .news-article {
    margin-bottom: 20px;
    background-color: var(--inner-box-bg);
    padding: 15px 20px;
    border-radius: 8px;
}
.cosmic-herald-container h4 {
    color: var(--accent-color);
    border-bottom: 1px solid var(--container-border);
    padding-bottom: 8px;
    margin-bottom: 15px;
}
.news-tag {
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 8px;
    font-size: 0.8em;
    color: var(--primary-bg);
}
.news-tag.war { background-color: var(--red-region); }
.news-tag.peace { background-color: var(--blue-region); }
.news-tag.system { background-color: var(--yellow-accent); }
.headline-list { list-style: none; padding: 0; }
.headline-list li { margin-bottom: 10px; }

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}
.ranking-table th, .ranking-table td {
    padding: 8px 5px;
    text-align: left;
    border-bottom: 1px solid var(--container-border);
}
.ranking-table th { color: var(--header-color); }
.ranking-table td:nth-child(1) { width: 30px; text-align: center; }
.ranking-table td:last-child { text-align: right; font-weight: bold; color: var(--yellow-accent); }
.ranking-table tr:last-child td { border-bottom: none; }

.trends-list {
    list-style: none;
    padding: 0;
}
.trends-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}
.trends-list .item-name {
    display: flex;
    align-items: center;
    gap: 10px;
}
.trends-list .item-count {
    font-style: italic;
    color: #a4b0be;
}
/* nuevos estilos del periodico */
.cosmic-herald-container .news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    align-items: flex-start;
}
.cosmic-herald-container .news-column .news-article {
    margin-bottom: 20px; background-color: var(--inner-box-bg); padding: 15px 20px;
    border-radius: 8px; border-top: 3px solid var(--accent-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}
.cosmic-herald-container h4 {
    font-family: 'Cinzel', serif; color: var(--accent-color);
    border-bottom: 1px solid var(--container-border); padding-bottom: 8px;
    margin-bottom: 15px; font-size: 1.4em;
}
.news-tag.system-dash { color: var(--green-region); font-weight: bold; margin-right: 8px; }

.war-chronicle-item { padding: 10px 0; border-bottom: 1px dashed var(--container-border); }
.war-chronicle-item:last-child { border-bottom: none; }
.war-participants { display: flex; justify-content: space-between; align-items: center; font-weight: bold; }
.war-participants .attacker { color: var(--red-region); }
.war-participants .defender { color: var(--blue-region); }
.war-health-bar { height: 10px; background-color: var(--primary-bg); border-radius: 5px; margin-top: 8px; }
.war-health-bar-inner { height: 100%; background-color: var(--red-region); border-radius: 5px; transition: width 0.5s ease; }
.war-commentary { font-style: italic; font-size: 0.85em; color: #a4b0be; margin-top: 10px; padding: 8px; background: #0c1a30; border-radius: 4px; }

.guild-directory-item { padding: 10px 0; border-bottom: 1px dashed var(--container-border); }
.guild-directory-item:last-child { border-bottom: none; }
.guild-dir-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.guild-dir-emblem { width: 40px; height: 40px; }
.guild-dir-name-block { flex-grow: 1; }
.guild-dir-name { font-weight: bold; }
.guild-dir-leader { font-size: 0.8em; color: #a4b0be; }
.guild-dir-citadel-img { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; }
.guild-dir-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 15px; font-size: 0.85em; margin-top: 8px; }
.guild-dir-info-grid span { background: #0c1a30; padding: 4px 8px; border-radius: 4px; }
.guild-dir-info-grid .stat-value { font-weight: bold; color: var(--yellow-accent); margin-left: 5px; }

.guild-bank-stats { list-style: none; padding: 0; }
.guild-bank-stats li { display: flex; justify-content: space-between; padding: 6px 0; }
#guild-bank-sales-chart-container { height: 150px; margin-top: 15px; }

.data-table-compact { width: 100%; border-collapse: collapse; font-size: 0.9em; }
.data-table-compact td { padding: 8px 5px; text-align: left; border-bottom: 1px solid var(--container-border); }
.data-table-compact td:last-child { text-align: right; font-weight: bold; color: var(--yellow-accent); }
.scrollable-table { max-height: 250px; overflow-y: auto; }
/* === INICIO: ESTILOS PARA EL HERALDO CÓSMICO (MEJORAS) === */

/* Crónicas de Guerra */
.war-chronicle-item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}
.war-chronicle-item {
    background: #0c1a30;
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid #ff7675;
}
.war-chronicle-item .war-participants {
    justify-content: space-around;
}
.health-display {
    display: block;
    font-size: 0.8em;
    font-weight: normal;
    margin-top: 3px;
}
.health-attacker { color: #ff7675; }
.health-defender { color: #74b9ff; }
.war-status {
    text-align: center;
    font-weight: bold;
    color: #55efc4;
    margin-top: 8px;
    font-size: 0.9em;
}

/* Gremios de la Galaxia */
.leader-name {
    color: #fdcb6e;
    font-style: italic;
}

/* Novedades de la Galaxia */
.headline-list.compact li {
    font-size: 0.9em; /* Letra más pequeña */
    margin-bottom: 8px;
}

/* Pioneros de la Galaxia */
.pioneers-table td:nth-child(3) { /* Columna de descubrimientos */
    max-width: 150px;
}
.scrollable-cell {
    max-height: 60px; /* Altura para unas 3-4 líneas */
    overflow-y: auto;
    white-space: normal; /* Permite que el texto se divida en líneas */
    scrollbar-width: thin;
    scrollbar-color: #a29bfe #0c1a30;
}
.scrollable-cell::-webkit-scrollbar { width: 5px; }
.scrollable-cell::-webkit-scrollbar-track { background: #0c1a30; }
.scrollable-cell::-webkit-scrollbar-thumb { background-color: #a29bfe; }

/* Nueva Sección: Comunidad */
.community-welcome {
    font-style: italic;
    text-align: center;
    margin-bottom: 15px !important;
}
.community-stats {
    display: flex;
    justify-content: space-around;
    background: #0c1a30;
    padding: 10px;
    border-radius: 5px;
}
.community-stats .stat-value {
    font-size: 1.2em;
    font-weight: bold;
}
.community-stats .positive { color: #55efc4; }
.community-stats .negative { color: #ff7675; }

/* === FIN: ESTILOS PARA EL HERALDO CÓSMICO === */


/* ========================================================================= */
/* === INICIO: ESTILOS DEFINITIVOS PARA BARRA DE ENERGÍA DE DRONES === */
/* ========================================================================= */

/* Asegura que el contenedor de cada dron tenga espacio */
.individual-drone {
    padding-bottom: 10px; /* Un poco de espacio extra abajo */
    display: flex; /* Asegura un layout consistente */
    flex-direction: column;
    gap: 5px; /* Espacio entre imagen, barra y stats */
}

/* El contenedor principal de la barra de energía (emoji + barra) */
.individual-drone .fuel-gauge {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 95%; /* Ocupa casi todo el ancho */
    margin: 0 auto; /* Centrado */
    height: 18px;
}

/* La etiqueta del emoji */
.individual-drone .fuel-label {
    font-size: 1.5em;
    flex-shrink: 0; /* Evita que el emoji se encoja */
}

/* El contenedor exterior de la barra (el fondo) */
.individual-drone .fuel-bar-outer {
    flex-grow: 1; /* Ocupa el espacio restante */
    height: 12px;
    background-color: #0c1a30;
    border: 1px solid #0f3460;
    border-radius: 6px;
    padding: 2px;
}

/* La barra interior de color que representa la energía */
.individual-drone .fuel-bar-inner {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease-in-out, background-color 0.5s ease-in-out;
}

/* Las estadísticas de autonomía y distancia */
.individual-drone .drone-sub-stats {
    font-size: 0.75em;
    color: #b2bec3;
    display: flex;
    justify-content: space-around;
    width: 100%;
}
/* === FIN: ESTILOS DEFINITIVOS === */

/* ESTILOS PARA EL NUEVO CHAT GLOBAL */
#global-chat-content {
    display: flex;
    flex-direction: column;
    height: 100%; /* Ocupar todo el espacio de su contenedor */
}

#global-chat-list {
    flex-grow: 0; 
    list-style: none;
    padding: 10px;
    margin: 0;
    overflow-y: auto;
    background-color: #0c1a30;
    border-radius: 5px;
/* --- LÍNEAS AÑADIDAS PARA EL SCROLL --- */
    max-height: 250px; /* Límite de altura */
    min-height: 200px; /* Altura mínima */
    border: 1px solid #0f3460;
    margin-bottom: 10px;
    /* -------------------------------------- */

}

#global-chat-list li {
    padding: 6px 8px;
    margin-bottom: 5px;
    border-radius: 4px;
    word-wrap: break-word;
}

/* Estilo para los mensajes del propio jugador (reutilizamos el de gremio) */
#global-chat-list li.is-self {
    background-color: rgba(85, 239, 196, 0.15);
}
#global-chat-list li.is-self .chat-sender {
    color: #55efc4;
}

#global-chat-form {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-shrink: 0;
}

#global-chat-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #0f3460;
    background-color: #0c1a30;
    color: #e0e0e0;
    border-radius: 5px;
    font-size: 1em;
}

#global-chat-send {
    padding: 10px 20px;
    border: none;
    background-color: #74b9ff; /* Un color diferente para distinguirlo */
    color: #16213e;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
}


/* === INICIO: ESTILOS PARA GESTIÓN DE ARMAMENTO (LÍDER) === */

.leader-armament-panel {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
    background-color: #0c1a30;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #a29bfe;
}

.missile-crafting-section h4, .missile-assignment-section h4 {
    margin-top: 0;
    text-align: left;
    color: #fdcb6e;
    border-bottom: 1px solid #2c3e50;
    padding-bottom: 10px;
}

.missile-stockpile-status {
    font-size: 1.1em;
    text-align: center;
    background-color: #1a1a2e;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}
.missile-stockpile-status strong {
    color: #55efc4;
    font-size: 1.2em;
}

#missile-member-list {
    height: 250px;
    padding: 0;
    border: none;
}

.missile-member-item {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 10px;
    align-items: center;
    background-color: #1a1a2e;
    padding: 8px 12px;
    border-radius: 5px;
    margin-bottom: 8px;
}
.missile-member-item .member-name {
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.missile-member-item .missile-count {
    font-size: 0.9em;
    color: #b2bec3;
}
.assign-controls {
    display: flex;
    gap: 5px;
}
.assign-controls .assign-quantity-input {
    width: 50px;
    padding: 5px;
    text-align: center;
    background-color: #0c1a30;
    border: 1px solid #0f3460;
    color: #fff;
    border-radius: 4px;
}
/* Oculta el toggle si el miembro no tiene misiles */
.auth-controls.hidden {
    visibility: hidden;
}

/* Ajusta el título del arsenal personal */
.military-interface h5 {
    font-size: 1.2em;
}

/* EN style.css, al final del archivo */
.diplomacy-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.diplomacy-guild-info {
    display: flex;
    flex-direction: column;
}

/* === INICIO: ESTILOS PARA PESTAÑA Y PANEL DE COMBATE === */
#missile-launch-panel {
    z-index: 190; /* Por encima de otros modales */
}

#missile-target-list {
    height: 300px;
    border: none;
    padding: 0;
}

.missile-target-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 15px;
    align-items: center;
    padding: 10px 15px;
    background-color: #1a1a2e;
    border-radius: 5px;
    margin-bottom: 8px;
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: background-color 0.2s, border-color 0.2s;
}

.missile-target-item:hover {
    background-color: #2c3e50;
}

.missile-target-item.selected {
    background-color: #0c1a30;
    border-left-color: #55efc4;
}

.target-type {
    font-weight: bold;
    font-size: 0.9em;
    padding: 3px 8px;
    border-radius: 4px;
    color: #16213e;
}
.target-type-Nave { background-color: #fdcb6e; }
.target-type-Ciudadela { background-color: #a29bfe; }

.target-name {
    font-weight: bold;
}
.target-guild {
    font-size: 0.8em;
    color: #b2bec3;
}

.target-distance {
    font-size: 0.9em;
    font-style: italic;
    color: #dfe6e9;
}

#combat-status-indicator {
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.2em;
}

#combat-status-indicator.authorized {
    background-color: rgba(85, 239, 196, 0.2);
    color: #55efc4;
    border: 1px solid #55efc4;
}
#combat-status-indicator.unauthorized {
    background-color: rgba(255, 118, 117, 0.2);
    color: #ff7675;
    border: 1px solid #ff7675;
}
/* === FIN DE ESTILOS === */

/* --- INICIO: ESTILOS PARA INTERACCIÓN DE FABRICACIÓN DE MISILES --- */
.missile-crafting-section .project-requirement-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 5px;
    padding: 5px;
    margin-left: -5px;
    margin-right: -5px;
}

.missile-crafting-section .project-requirement-item:hover {
    background-color: #2c3e50;
}
/* --- FIN: ESTILOS --- */

/* === INICIO: ESTILOS PARA PANEL DE LANZAMIENTO MEJORADO === */

/* Ajusta el grid para dar espacio a los nuevos controles */
.missile-target-item {
    grid-template-columns: auto 1fr auto auto;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #0c1a30;
    border-radius: 5px;
    padding: 5px;
    border: 1px solid #0f3460;
}

.quantity-display {
    font-weight: bold;
    font-size: 1.1em;
    min-width: 20px;
    text-align: center;
    color: #fdcb6e;
}

.quantity-btn-minus, .quantity-btn-plus {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    color: #16213e;
}

.quantity-btn-minus { background-color: #ff7675; }
.quantity-btn-plus { background-color: #55efc4; }

.launch-summary {
    text-align: center;
    font-weight: bold;
    font-size: 1.2em;
    padding: 10px;
    margin-top: 15px;
    background-color: #0c1a30;
    border-radius: 5px;
}
.launch-summary.invalid {
    color: #ff7675;
}
/* === FIN: ESTILOS === */

/* style.css -> Añade esto al final del archivo */

/* Ajusta el contenedor visual del gremio para alinear los elementos */
.guild-info-visuals {
    display: flex;
    align-items: center;
    gap: 15px; /* Espacio entre las imágenes y el texto */
    margin-top: 10px;
}

/* Estilos para el nuevo bloque de texto de detalles */
.guild-details-text {
    font-size: 0.85em;
    color: #dfe6e9;
    line-height: 1.6;
}

.guild-details-text ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guild-details-text strong {
    color: #a29bfe; /* Color violeta para las etiquetas */
    margin-right: 5px;
}

.guild-details-text .status-active {
    color: #55efc4; /* Verde para activo */
    font-weight: bold;
}

.guild-details-text .status-inactive {
    color: #fdcb6e; /* Amarillo para inactivo */
    font-weight: bold;
}

/* --- INICIO: CÓDIGO PARA ANIMACIÓN DE INVENTARIO ("LEVITACIÓN ENERGÉTICA") --- */

/* --- INICIO: CÓDIGO PARA ANIMACIÓN DE INVENTARIO Y EFECTO HOVER --- */

/* 1. Animaciones de levitación y pulso para el emoji (Sin cambios) */
@keyframes levitate {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes pulseGlow {
  0%, 100% { filter: drop-shadow(0 0 1px rgba(116, 185, 255, 0.4)); }
  50% { filter: drop-shadow(0 0 4px rgba(116, 185, 255, 0.8)); }
}

/* 2. Aplicamos las animaciones al emoji (Sin cambios) */
.inventory-slot.filled .item-emoji.animated-ingredient {
  animation: 
    levitate 4s ease-in-out infinite,
    pulseGlow 3s ease-in-out infinite;
}

/* 3. Preparamos el slot para el nuevo efecto de marco de energía */
.inventory-slot.filled {
  position: relative; /* Necesario para posicionar el pseudo-elemento */
  overflow: hidden;   /* Evita que el brillo se salga de los bordes redondeados */
}

/* 4. Creamos el marco de energía usando un pseudo-elemento (::before) */
.inventory-slot.filled::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 5px; /* Mismo redondeo que el slot */
  
  /* El efecto de brillo (inicialmente invisible) */
  box-shadow: 
    inset 0 0 8px 2px rgba(85, 239, 196, 0.7),  /* Brillo interior */
    0 0 8px 2px rgba(85, 239, 196, 0.7);       /* Brillo exterior */
  
  opacity: 0; /* Lo hacemos invisible por defecto */
  transition: opacity 0.3s ease-in-out; /* Transición suave para aparecer/desaparecer */
}

/* 5. Al pasar el cursor sobre el slot, hacemos visible el marco de energía */
.inventory-slot.filled:hover::before {
  opacity: 1;
}

/* 6. Anulamos el zoom del slot completo para que solo aparezca el marco */
.inventory-slot.filled:hover {
   transform: none;
}

/* --- FIN: CÓDIGO PARA ANIMACIÓN DE INVENTARIO Y EFECTO HOVER --- */
/* --- FIN: CÓDIGO PARA ANIMACIÓN DE INVENTARIO --- */

/* --- INICIO: CÓDIGO PARA ANIMACIÓN DEL CALDERO --- */

/* 
  Reutilizamos la animación 'levitate' que ya existe, 
  pero la aplicamos al contenedor del caldero.
*/
#cauldron-animation-container {
  animation: levitate 6s ease-in-out infinite; /* Una levitación más lenta y majestuosa */
}

/* --- FIN: CÓDIGO PARA ANIMACIÓN DEL CALDERO --- */


/* --- INICIO: CÓDIGO PARA ANIMACIÓN DE NAVES Y DRONES --- */

/* 1. Creamos una clase genérica para aplicar las animaciones a los componentes de la flota. */
.animated-ship-component {
  animation: 
    levitate ease-in-out infinite,
    pulseGlow ease-in-out infinite;
}

/* 2. Asignamos duraciones específicas para cada tipo de componente para darles más personalidad. */

/* La Nave Nodriza tendrá un movimiento muy lento y majestuoso, como corresponde a su tamaño. */
#mothership-avatar-img.animated-ship-component {
  animation-duration: 8s, 5s; /* 8s para levitar, 5s para el pulso de brillo. */
}

/* --- FIN: CÓDIGO PARA ANIMACIÓN DE NAVES Y DRONES --- */
/* --- INICIO: CORRECCIÓN DEFINITIVA PARA ANIMACIÓN ERRÁTICA en los drones --- */

/* 
  Esta regla anula cualquier 'transition' en los componentes animados,
  forzando al navegador a usar únicamente la duración de la 'animation'.
  El !important asegura que esta regla gane cualquier conflicto.
*/
.animated-ship-component,
.animated-ingredient {
  transition: none !important;
}

/* 
  Restauramos la transición SÓLO para la interacción con el ratón,
  para que el efecto de zoom al pasar el cursor siga siendo suave.
*/
.inventory-slot.filled:hover .item-emoji.animated-ingredient {
  transition: transform 0.2s ease, filter 0.2s ease !important;
}

/* --- FIN: CORRECCIÓN DEFINITIVA --- */

#map-container, .window-content {
    position: relative; /* Asegura que el posicionamiento absoluto funcione dentro */
}
#galactic-map-canvas, #starfield-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
#starfield-canvas { z-index: 0; }
#galactic-map-canvas { z-index: 1; background-color: transparent; } /* Hacemos el canvas del juego transparente */


/* ================================================================= */
/* === INICIO: CORRECCIÓN DE VISIBILIDAD DE LA INTERFAZ === */
/* ================================================================= */

/* Le decimos a los elementos de la interfaz que deben tener
   una posición relativa para que podamos asignarles una capa. */
.modal-actions, 
#info-panel, 
p.hint, 
#map-context-menu {
    position: relative; /* Imprescindible para que z-index funcione */
    z-index: 2;         /* Un valor superior al z-index del canvas del juego (1) */
}

/* ================================================================= */
/* === FIN: CORRECCIÓN DE VISIBILIDAD DE LA INTERFAZ === */
/* ================================================================= */

/* ============================================= */
/* === NUEVOS ESTILOS PARA EL SALÓN DE LA FAMA === */
/* ============================================= */

/* Contenedor principal de la sección */
.hall-of-fame-section {
    padding: 10px;
}

/* Estilo base para ambas tablas */
.hall-of-fame-section table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-family: 'Segoe UI', sans-serif; /* Asegura una fuente más moderna */
}

/* Estilo para las filas */
.hall-of-fame-section tr {
    border-bottom: 1px solid rgba(15, 52, 96, 0.6); /* Separador sutil */
}

.hall-of-fame-section tr:last-child {
    border-bottom: none; /* Sin borde en la última fila */
}

/* Estilo para las celdas */
.hall-of-fame-section td {
    padding: 12px 8px;
    vertical-align: middle;
}

/* Columna de la Posición (#) */
.hof-position {
    width: 40px;
    font-size: 1.1em;
    font-weight: bold;
    color: #74b9ff; /* Azul claro para los números */
}

/* Columna del Nombre */
.hof-name {
    font-weight: 500;
    color: #dfe6e9; /* Blanco suave */
}

/* Columna de Puntuación / Créditos */
.hof-score {
    text-align: right;
    font-weight: bold;
    color: #b2bec3; /* Un gris claro para el valor */
    white-space: nowrap;
}

/* --- ESTILOS ESPECIALES PARA EL TOP 3 --- */

/* Puesto #1 (Oro) */
.hall-of-fame-section .rank-1 .hof-position {
    color: #FFD700;
    text-shadow: 0 0 5px #FFD700;
}
.hall-of-fame-section .rank-1 .hof-position::before {
    content: '👑';
    margin-right: 5px;
}

/* Puesto #2 (Plata) */
.hall-of-fame-section .rank-2 .hof-position {
    color: #c0c0c0;
}
.hall-of-fame-section .rank-2 .hof-position::before {
    content: '🥈';
    margin-right: 5px;
}

/* Puesto #3 (Bronce) */
.hall-of-fame-section .rank-3 .hof-position {
    color: #cd7f32;
}
.hall-of-fame-section .rank-3 .hof-position::before {
    content: '🥉';
    margin-right: 5px;
}
/* ============================================= */
/* === MEJORAS VISUALES PARA EL SALÓN DE LA FAMA === */
/* ============================================= */

/* Contenedor principal de la sección */
.hall-of-fame-section {
    background: radial-gradient(ellipse at top, #1a2a47, #0f1c2e); /* Fondo degradado sutil */
    border: 1px solid #2c3e50;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
    box-shadow: 0 0 25px rgba(116, 185, 255, 0.08); /* Brillo de fondo muy suave */
}

/* Transición suave para el efecto hover */
.hall-of-fame-section tr {
    transition: background-color 0.3s ease, border-left 0.3s ease;
}

/* Efecto al pasar el cursor por cualquier fila (excepto el top 3) */
.hall-of-fame-section tr:not(.rank-1):not(.rank-2):not(.rank-3):hover {
    background-color: rgba(44, 62, 80, 0.4);
}

/* Estilo para las celdas */
.hall-of-fame-section td {
    padding: 14px 10px; /* Más espaciado vertical */
}

/* Puntuación y Créditos con fuente de terminal */
.hof-score {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 1.1em;
}

/* --- ESTILOS DE NEÓN Y DESTAQUE PARA EL TOP 3 --- */

/* Puesto #1 (Oro) */
.hall-of-fame-section .rank-1 {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0) 70%);
    border-left: 3px solid #FFD700;
}
.hall-of-fame-section .rank-1 .hof-position {
    text-shadow: 0 0 8px #FFD700, 0 0 12px rgba(255, 215, 0, 0.5);
}

/* Puesto #2 (Plata) */
.hall-of-fame-section .rank-2 {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.1) 0%, rgba(192, 192, 192, 0) 70%);
    border-left: 3px solid #c0c0c0;
}
.hall-of-fame-section .rank-2 .hof-position {
    text-shadow: 0 0 6px #c0c0c0;
}

/* Puesto #3 (Bronce) */
.hall-of-fame-section .rank-3 {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.1) 0%, rgba(205, 127, 50, 0) 70%);
    border-left: 3px solid #cd7f32;
}
.hall-of-fame-section .rank-3 .hof-position {
    text-shadow: 0 0 5px #cd7f32;
}

/* ================================================= */
/* === ESTILO PARA TABLAS DE DATOS EMBELLECIDAS === */
/* ================================================= */

.data-table-enhanced {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(180deg, rgba(30, 45, 66, 0.3) 0%, rgba(15, 28, 46, 0.3) 100%);
    border-radius: 4px;
    overflow: hidden; /* Para que el borde redondeado se aplique a las filas */
}

.data-table-enhanced tr {
    border-bottom: 1px solid rgba(15, 52, 96, 0.6);
    transition: background-color 0.3s ease;
}

.data-table-enhanced tr:last-child {
    border-bottom: none;
}

.data-table-enhanced tr:hover {
    background-color: rgba(44, 62, 80, 0.5);
}

.data-table-enhanced td {
    padding: 12px 10px;
    vertical-align: middle;
}

.data-table-enhanced .td-seller {
    color: #74b9ff;
    font-weight: 500;
}

.data-table-enhanced .td-item {
    color: #dfe6e9;
}

.data-table-enhanced .td-price {
    text-align: right;
    font-weight: bold;
    color: #b2bec3;
    font-family: 'Consolas', 'Courier New', monospace;
    white-space: nowrap;
}
/* ============================================================== */
/* === ESTILOS ADICIONALES PARA LA TABLA DE PIONEROS (CORRECCIÓN) === */
/* ============================================================== */

/* Nueva celda para la lista de planetas */
.hof-discoveries {
    max-width: 250px; /* Ancho máximo para la celda de planetas */
    font-size: 0.9em;
    color: #b2bec3;
    overflow: hidden; /* Oculta cualquier desbordamiento */
}

/* Contenedor scrollable dentro de la celda */
.hof-discoveries .scrollable-cell {
    overflow-x: auto; /* Scroll horizontal si el contenido es muy largo */
    white-space: nowrap; /* Evita que la lista de planetas se rompa en varias líneas */
    padding: 5px 0; /* Espacio para que la barra de scroll no se pegue al texto */
    scrollbar-width: thin; /* Para Firefox */
    scrollbar-color: #74b9ff #0f1c2e; /* Color del scroll para Firefox */
}

/* Estilo de la barra de scroll para navegadores WebKit (Chrome, Safari, Edge) */
.hof-discoveries .scrollable-cell::-webkit-scrollbar {
    height: 6px;
}
.hof-discoveries .scrollable-cell::-webkit-scrollbar-track {
    background: #0f1c2e;
    border-radius: 10px;
}
.hof-discoveries .scrollable-cell::-webkit-scrollbar-thumb {
    background-color: #74b9ff;
    border-radius: 10px;
}

.hof-discoveries .scrollable-cell strong {
    color: #dfe6e9; /* Resalta el contador de planetas */
}
/* ========================================================= */
/* === MEJORA VISUAL PARA LA TABLA DE VENTAS CERRADAS === */
/* ========================================================= */

/* Aplicamos el fondo y borde premium a la tabla de ventas */
.data-table-enhanced {
    background: radial-gradient(ellipse at top, #1a2a47, #0f1c2e);
    border: 1px solid #2c3e50;
    box-shadow: 0 0 15px rgba(116, 185, 255, 0.05); /* Brillo de fondo muy sutil */
}

/* Resaltamos el nombre del vendedor con un color de neón */
.data-table-enhanced .td-seller {
    color: #74b9ff;
    text-shadow: 0 0 4px rgba(116, 185, 255, 0.4);
}

/* Damos un color más brillante al precio para mayor contraste */
.data-table-enhanced .td-price {
    color: #dfe6e9; /* Blanco suave en lugar de gris */
}
/* ================================================= */
/* === ESTILOS PARA EL ESTADO DE USUARIO EN LOGIN === */
/* ================================================= */

/* Estilo base para el texto de estado del usuario */
.user-status {
    min-height: 20px; /* Evita que el diseño salte cuando aparece el texto */
    font-size: 0.85em;
    font-weight: 500;
    text-align: center;
    margin-top: 15px;
    margin-bottom: 0;
    transition: color 0.3s ease;
}

/* Estado: ACTIVO */
.user-status.active {
    color: #55efc4; /* Verde neón */
}

/* Estado: BLOQUEADO */
.user-status.blocked {
    color: #ff7675; /* Rojo */
    font-weight: bold;
}

/* Estado: INACTIVO */
.user-status.inactive {
    color: #fdcb6e; /* Amarillo/Naranja */
}

/* === ESTILO PARA EL MENSAJE DE ERROR DE LOGIN === */

#login-message.error {
    color: #fdcb6e; /* Amarillo/Naranja */
    font-weight: bold;
}

/* ========================================================================= */
/* === INICIO: ESTILOS PARA LAS NOTICIAS DEL HERALDO (ADMIN) === */
/* ========================================================================= */

/* Contenedor principal de la noticia del admin */
.herald-admin-news-container {
    background: linear-gradient(145deg, rgba(22, 33, 62, 0.8), rgba(12, 23, 42, 0.8));
    border: 1px solid #74b9ff;
    border-radius: 8px;
    padding: 20px 25px;
    margin: 25px 0;
    text-align: center;
    box-shadow: 0 0 15px rgba(116, 185, 255, 0.3), inset 0 0 10px rgba(116, 185, 255, 0.1);
}

/* Título de la noticia */
.herald-admin-news-container h4 {
    margin: 0 0 10px 0;
    font-size: 1.8em;
    color: #fdcb6e;
    text-shadow: 0 0 8px rgba(253, 203, 110, 0.5);
    border-bottom: none;
    padding-bottom: 0;
}

/* Párrafo de descripción */
.herald-admin-news-container p {
    margin: 0;
    font-size: 1.1em;
    color: #dfe6e9;
    line-height: 1.6;
}

/* Enlace del titular */
.herald-link {
    color: inherit; /* Hereda el color del h4 */
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
}
.herald-link:hover {
    color: #ffeaa7;
    text-shadow: 0 0 12px #ffeaa7;
}

/* Sección de ampliación */
.herald-expansion-section {
    border-top-color: #fdcb6e; /* Destaca que es una noticia especial */
    margin-top: 20px;
}
.herald-expansion-desc {
    font-style: italic;
    color: #b2bec3;
}
.herald-expansion-text {
    line-height: 1.7;
    margin: 15px 0;
}
.herald-expansion-media {
    max-width: 100%;
    border-radius: 5px;
    margin-top: 15px;
    border: 1px solid #0f3460;
}

/* === FIN: ESTILOS === */