/* system.css - стабильная версия */

/* УДАЛЕНО старое правило для звезды */
/* .system-star circle {
    filter: drop-shadow(0 0 20px #ff0) drop-shadow(0 0 40px #ff0);
} */

/* Планеты */
.planet-circle {
    stroke: #fff;
    stroke-width: 1px;
    filter: drop-shadow(0 0 5px rgba(0, 170, 255, 0.5));
}

.planet-label {
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    pointer-events: none;
}

/* Станции */
.station-circle {
    stroke: #fff;
    stroke-width: 1px;
    filter: drop-shadow(0 0 3px rgba(0, 255, 0, 0.7));
}

.station-label {
    font-size: 9px !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    pointer-events: none;
}

/* Эффекты при наведении (БЕЗ TRANSFORM!) */
.system-planet:hover .planet-circle {
    fill: #00ddff;
    filter: drop-shadow(0 0 10px #00aaff);
    cursor: pointer;
}

.system-station:hover .station-circle {
    fill: #00ff88;
    filter: drop-shadow(0 0 8px #00ff00);
    cursor: pointer;
}

/* Выбранные элементы */
.system-planet.selected .planet-circle {
    fill: #ff5500;
    stroke: #ffaa00;
    stroke-width: 2px;
}

.system-station.selected .station-circle {
    fill: #ffff00;
    stroke: #ffaa00;
    stroke-width: 2px;
}

/* Орбиты */
.system-orbit {
    fill: none;
    stroke: rgba(100, 150, 255, 0.2);
    stroke-width: 1;
    stroke-dasharray: 5,5;
}

/* Легенда */
.system-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(10, 10, 18, 0.9);
    border: 1px solid var(--cyber-blue);
    border-radius: 6px;
    padding: 15px;
    max-width: 200px;
    backdrop-filter: blur(5px);
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-symbol {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-text {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Убедись что нет transition */
.system-planet,
.system-station,
.planet-circle,
.station-circle {
    transition: none !important;
}

/* ========== НОВЫЕ СТИЛИ ДЛЯ ИКОНОК СТАНЦИЙ ========== */

/* Цвета для разных рас */
.station-race-human { color: #00ff00; }
.station-race-tian { color: #ff6600; }
.station-race-aurelian { color: #ffff00; }
.station-race-xenos { color: #ff00ff; }
.station-race-relic { color: #00ffff; }
.station-race-sirian { color: #ff0000; }

/* Эффекты при наведении */
.system-station:hover {
    filter: drop-shadow(0 0 10px currentColor) !important;
    z-index: 10;
}

/* Подпись станции */
.station-label {
    font-size: 9px !important;
    text-shadow: 1px 1px 2px #000, 0 0 4px #000 !important;
    transition: font-weight 0.2s ease;
    pointer-events: none;
}

/* ========== ПОПАП С ДЕТАЛЯМИ СТАНЦИИ ========== */
.station-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.station-details-popup {
    background: var(--bg-dark);
    border: 2px solid;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    overflow: hidden;
    box-shadow: 0 0 30px currentColor;
}

.popup-header {
    padding: 15px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.race-tag {
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: bold;
}

.popup-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.station-large-icon svg {
    filter: drop-shadow(0 0 10px currentColor);
}

.station-info {
    width: 100%;
    color: var(--text-secondary);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-row .label {
    color: #aaa;
}

.info-row .value {
    color: #fff;
    font-weight: bold;
    text-align: right;
    max-width: 60%;
}

.popup-actions {
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ========== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ========== */
.system-list-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
    padding: 15px;
    background: rgba(0, 50, 100, 0.1);
    border-radius: 6px;
}

.system-list-stats div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.planets-list {
    margin-top: 15px;
}

.planet-item {
    padding: 10px;
    margin: 5px 0;
    background: rgba(0, 100, 200, 0.1);
    border-radius: 4px;
    border-left: 3px solid var(--cyber-blue);
}

.planet-name {
    font-weight: bold;
    color: var(--cyber-blue);
}

.planet-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-top: 5px;
}

.planet-race {
    color: var(--text-secondary);
}

.planet-population {
    color: #00ffaa;
}

/* ========== ОТКЛЮЧЕНИЕ АНИМАЦИЙ НА КАРТЕ ========== */

/* 1. Отключаем все SVG-анимации для станций на карте */
.system-station animate,
.system-station animateTransform,
.system-station animateMotion {
    display: none !important;
}

/* 2. Отключаем CSS-анимации для элементов станций */
.system-station circle,
.system-station rect,
.system-station polygon,
.system-station line,
.system-station ellipse {
    animation: none !important;
    transition: none !important;
}

/* 3. Фиксируем размеры и положение чтобы не дергалось */
.system-station {
    transform-box: fill-box;
    transform-origin: center;
    vector-effect: non-scaling-stroke;
}

/* ========== ПОЛНОЕ ОТКЛЮЧЕНИЕ АНИМАЦИЙ ========== */

/* Удаляем анимационные теги из DOM */
.system-station animate,
.system-station animateTransform,
.system-station animateMotion {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
}

/* Отключаем все возможные анимации */
.system-station {
    animation: none !important;
    transition: none !important;
}

.system-station * {
    animation: none !important;
    transition: none !important;
    animation-duration: 0s !important;
    transition-duration: 0s !important;
}

/* Блокируем изменения атрибутов через CSS */
.system-station circle[r],
.system-station circle[cy],
.system-station rect[width],
.system-station rect[height],
.system-station line[transform] {
    animation: none !important;
}

.planet-base {
    stroke: #fff;
    stroke-width: 1px;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

.planet-shade {
    mix-blend-mode: multiply;
    pointer-events: none;
}

.planet-atmosphere {
    pointer-events: none;
}

/* ========== СТИЛИ ДЛЯ ЗВЁЗД (ИСПРАВЛЕННЫЕ) ========== */

/* УДАЛЕНО старое правило starPulse
@keyframes starPulse {
    0% { 
        filter: url(#starGlowFilter) drop-shadow(0 0 20px currentColor);
        opacity: 0.8;
    }
    50% { 
        filter: url(#starGlowFilter) drop-shadow(0 0 40px currentColor);
        opacity: 1;
    }
    100% { 
        filter: url(#starGlowFilter) drop-shadow(0 0 20px currentColor);
        opacity: 0.8;
    }
} */

/* Текстура звезды */
.star-textured {
    mix-blend-mode: overlay;
    opacity: 0.8;
    pointer-events: none; /* клики проходят на system-star */
}

/* Ядро звезды */
.star-core {
    fill: var(--star-color);
}

/* Корона звезды */
.star-corona {
    fill: none;
    stroke: var(--star-color);
    stroke-width: 4;
    opacity: 0.4;
    filter: blur(6px);
}

/* Клики по звезде */
.system-star {
    pointer-events: all;
    cursor: pointer;
}

/* Стили для звезды по типам */
.system-star[data-star-type="O"] .star-core { --star-color: #9bb0ff; }
.system-star[data-star-type="B"] .star-core { --star-color: #aabfff; }
.system-star[data-star-type="A"] .star-core { --star-color: #ffffff; }
.system-star[data-star-type="F"] .star-core { --star-color: #fff4ea; }
.system-star[data-star-type="G"] .star-core { --star-color: #fff4e3; }
.system-star[data-star-type="K"] .star-core { --star-color: #ffd2a1; }
.system-star[data-star-type="M"] .star-core { --star-color: #ffcc99; }

/* Информация о звезде при наведении */
.system-star:hover {
    cursor: help;
}

/* Скрываем подпись звезды */
.star-label {
    display: none;
}

/* ========== СЕКЦИИ В ЛЕГЕНДЕ ========== */
.legend-section {
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0, 170, 255, 0.3);
    padding-bottom: 10px;
}

.legend-section h4 {
    color: var(--cyber-blue);
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* ========== ТУЛТИП ДЛЯ ЗВЕЗДЫ ========== */
.star-info-tooltip {
    position: absolute;
    background: rgba(10, 10, 18, 0.95);
    border: 1px solid var(--cyber-blue);
    border-radius: 6px;
    padding: 10px;
    max-width: 250px;
    backdrop-filter: blur(5px);
    z-index: 100;
    pointer-events: none;
}

.star-info-tooltip .star-type {
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
}

.star-info-tooltip .star-description {
    color: #aaa;
    font-size: 0.9rem;
}

/* ========== ПОПАП ЗВЕЗДЫ ========== */
.star-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.star-details-popup {
    background: var(--bg-dark);
    border: 2px solid;
    border-radius: 10px;
    width: 500px;
    max-width: 90%;
    overflow: hidden;
    box-shadow: 0 0 40px currentColor;
}

.star-type-tag {
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
}

.star-large-icon {
    margin: 20px 0;
}

.star-large-icon svg {
    filter: drop-shadow(0 0 20px currentColor);
}

.star-info-details {
    width: 100%;
    color: var(--text-secondary);
    margin-top: 20px;
}

/* ========== АНИМАЦИИ ЗВЁЗД (ОПЦИОНАЛЬНО) ========== */
@keyframes starGlowPulse {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.25; }
}

@keyframes starCoronaPulse {
    0%, 100% { 
        opacity: 0.4; 
        stroke-width: calc(var(--star-size) * 0.1); 
    }
    50% { 
        opacity: 0.6; 
        stroke-width: calc(var(--star-size) * 0.15); 
    }
}

@keyframes starCorePulse {
    0%, 100% { 
        opacity: 0.6; 
        r: calc(var(--star-size) * 0.3); 
    }
    50% { 
        opacity: 0.8; 
        r: calc(var(--star-size) * 0.4); 
    }
}

/* Применение анимаций (если нужно) */
.star-with-effects .star-outer-glow {
    animation: starGlowPulse 4s infinite ease-in-out;
    filter: blur(15px);
}

.star-with-effects .star-corona {
    animation: starCoronaPulse 3s infinite ease-in-out 0.5s;
    filter: blur(5px);
}

.star-with-effects .star-core {
    animation: starCorePulse 2s infinite ease-in-out;
    filter: blur(3px);
}

.star-with-effects:hover .star-outer-glow {
    opacity: 0.3 !important;
    filter: blur(25px) !important;
}

.star-with-effects:hover .star-corona {
    opacity: 0.8 !important;
    stroke-width: calc(var(--star-size) * 0.18) !important;
}
/* ========== HOVER EFFECTS FOR PLANETS ========== */
.system-planet:hover {
    cursor: pointer !important;
}

.system-planet:hover .planet-base {
    fill: #00ddff !important;
    filter: drop-shadow(0 0 15px #00aaff) !important;
    transform: scale(1.05);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.system-planet:hover .planet-label {
    fill: #ffff00 !important;
    font-weight: bold !important;
    text-shadow: 0 0 10px #ffff00 !important;
}

/* ========== FIXED PLANET POPUP ========== */
.planet-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.planet-details-popup {
    background: linear-gradient(135deg, #0a0a12 0%, #1a1a2e 100%);
    border: 2px solid #00aaff;
    border-radius: 12px;
    width: 500px;
    max-width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 0 50px rgba(0, 170, 255, 0.3);
}

.planet-details-popup .popup-header {
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 170, 255, 0.3);
    background: linear-gradient(90deg, #0066aa 0%, #00aaff 100%);
}

.planet-details-popup h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.planet-tag {
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.popup-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.planet-icon {
    align-self: center;
    margin-bottom: 25px;
}

.planet-icon svg {
    filter: drop-shadow(0 0 20px #00aaff);
}

.planet-info {
    width: 100%;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.planet-info .info-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.planet-info .label {
    color: #88aaff;
    font-size: 0.9rem;
    font-weight: 600;
    padding-right: 15px;
    white-space: nowrap;
}

.planet-info .value {
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
    word-break: break-word;
    text-align: left;
}

.planet-info .value.description {
    font-style: italic;
    color: #cccccc;
    font-size: 0.9rem;
}

.popup-actions {
    padding: 20px;
    background: rgba(0, 50, 100, 0.2);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    border-top: 1px solid rgba(0, 170, 255, 0.2);
}

/* ========== PLANET CURSOR FIX ========== */
.system-planet {
    cursor: pointer !important;
}

/* Выделение выбранной планеты */
.system-planet.selected .planet-base {
    fill: #ff5500 !important;
    stroke: #ffaa00 !important;
    stroke-width: 3px !important;
    filter: drop-shadow(0 0 20px #ff5500) !important;
}

/* Полоса прокрутки для попапа */
.planet-details-popup::-webkit-scrollbar {
    width: 8px;
}

.planet-details-popup::-webkit-scrollbar-track {
    background: rgba(0, 30, 60, 0.3);
    border-radius: 4px;
}

.planet-details-popup::-webkit-scrollbar-thumb {
    background: #00aaff;
    border-radius: 4px;
}
/* ========== TOOLTIP ПЛАНЕТЫ С РЕСУРСАМИ ========== */
.planet-tooltip {
    position: fixed;
    background: linear-gradient(135deg, #0a0a14 0%, #1a1a2a 100%);
    border: 2px solid #00aaff;
    border-radius: 8px;
    padding: 15px;
    min-width: 250px;
    max-width: 300px;
    color: #fff;
    box-shadow: 0 0 30px rgba(0, 170, 255, 0.3);
    transform: translateX(-50%) translateY(-100%);
    margin-top: -15px;
    z-index: 10000;
    backdrop-filter: blur(5px);
    pointer-events: none;
}

.planet-tooltip::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #00aaff;
}

.planet-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 170, 255, 0.3);
}

.planet-tooltip-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #00aaff;
    text-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
}

.planet-tooltip-orbit {
    font-size: 0.8rem;
    color: #aaa;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 8px;
    border-radius: 12px;
}

.planet-tooltip-population {
    font-size: 0.9rem;
    color: #ddd;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.planet-tooltip-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #00aaff, transparent);
    margin: 10px 0;
}

.planet-tooltip-resources-title {
    font-size: 0.85rem;
    color: #ffaa00;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.planet-tooltip-resources {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tooltip-resource-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border-left: 3px solid #ffaa00;
}

.tooltip-resource-icon {
    font-size: 1rem;
}

.tooltip-resource-name {
    font-weight: bold;
    color: #fff;
    min-width: 80px;
}

.tooltip-resource-desc {
    font-size: 0.8rem;
    color: #aaa;
    font-style: italic;
}

.tooltip-no-resources {
    color: #999;
    font-style: italic;
    padding: 5px;
    text-align: center;
}

.planet-tooltip-line {
    position: fixed;
    width: 2px;
    background: linear-gradient(to bottom, #00aaff, transparent);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 9999;
    opacity: 0.6;
    animation: pulseLine 2s infinite;
}

@keyframes pulseLine {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.tooltip-resource-item[data-resource="Золото"] { border-left-color: #ffd700; }
.tooltip-resource-item[data-resource="Серебро"] { border-left-color: #c0c0c0; }
.tooltip-resource-item[data-resource="Железо"] { border-left-color: #a19d94; }
.tooltip-resource-item[data-resource="Медь"] { border-left-color: #b87333; }
.tooltip-resource-item[data-resource="Уран"] { border-left-color: #3cb043; }
.tooltip-resource-item[data-resource="Редкие элементы"] { border-left-color: #9966cc; }
.tooltip-resource-item[data-resource="Кристаллы"] { border-left-color: #00ffff; }
/* ========== ПОЛОСА ОСТАТКА РЕСУРСА ========== */
.tooltip-resource-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border-left: 3px solid #ffaa00;
    margin-bottom: 5px;
}

.tooltip-resource-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.tooltip-resource-icon {
    font-size: 1rem;
    min-width: 20px;
}

.tooltip-resource-name {
    font-weight: bold;
    color: #fff;
    min-width: 80px;
}

.tooltip-resource-desc {
    font-size: 0.8rem;
    color: #aaa;
    font-style: italic;
    flex: 1;
}

.tooltip-resource-ostatok {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 3px;
    width: 100%;
}

.ostatok-bar {
    flex: 1;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ostatok-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #33cc33);
    border-radius: 3px;
    transition: width 0.3s ease;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.ostatok-value {
    font-size: 0.8rem;
    font-weight: bold;
    color: #00ff00;
    min-width: 45px;
    text-align: right;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

/* Цвета полосы для разных ресурсов */
.tooltip-resource-item[data-resource="Золото"] .ostatok-fill { 
    background: linear-gradient(90deg, #ffd700, #ffaa00);
    box-shadow: 0 0 5px #ffd700;
}
.tooltip-resource-item[data-resource="Серебро"] .ostatok-fill { 
    background: linear-gradient(90deg, #c0c0c0, #a0a0a0);
    box-shadow: 0 0 5px #c0c0c0;
}
.tooltip-resource-item[data-resource="Железо"] .ostatok-fill { 
    background: linear-gradient(90deg, #a19d94, #8a8a8a);
    box-shadow: 0 0 5px #a19d94;
}
.tooltip-resource-item[data-resource="Медь"] .ostatok-fill { 
    background: linear-gradient(90deg, #b87333, #9e5e2e);
    box-shadow: 0 0 5px #b87333;
}
.tooltip-resource-item[data-resource="Уран"] .ostatok-fill { 
    background: linear-gradient(90deg, #3cb043, #2e8b3a);
    box-shadow: 0 0 5px #3cb043;
}
.tooltip-resource-item[data-resource="Редкие элементы"] .ostatok-fill { 
    background: linear-gradient(90deg, #9966cc, #7a4fa3);
    box-shadow: 0 0 5px #9966cc;
}
.tooltip-resource-item[data-resource="Кристаллы"] .ostatok-fill { 
    background: linear-gradient(90deg, #00ffff, #00cccc);
    box-shadow: 0 0 5px #00ffff;
}

/* Если остаток маленький - красный цвет */
.ostatok-fill[style*="width: 2"], 
.ostatok-fill[style*="width: 1"],
.ostatok-fill[style*="width: 0"] {
    background: linear-gradient(90deg, #ff4444, #cc3333) !important;
    box-shadow: 0 0 5px #ff4444 !important;
}

.ostatok-fill[style*="width: 3"],
.ostatok-fill[style*="width: 4"],
.ostatok-fill[style*="width: 5"] {
    background: linear-gradient(90deg, #ff8800, #cc6600) !important;
    box-shadow: 0 0 5px #ff8800 !important;
}

.ostatok-fill[style*="width: 6"],
.ostatok-fill[style*="width: 7"],
.ostatok-fill[style*="width: 8"],
.ostatok-fill[style*="width: 9"],
.ostatok-fill[style*="width: 10"] {
    background: linear-gradient(90deg, #ffaa00, #cc8800) !important;
    box-shadow: 0 0 5px #ffaa00 !important;
}
/* ========== ДОБАВИТЬ В КОНЕЦ ФАЙЛА ========== */

/* Информация о владельце в тултипе планеты */
.planet-tooltip-owner {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 6px 10px;
    background: rgba(0, 170, 255, 0.1);
    border-radius: 6px;
    border-left: 3px solid #00aaff;
}

.owner-race {
    font-size: 0.8rem;
    font-weight: bold;
    color: #00aaff;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(0, 170, 255, 0.5);
}

.owner-name {
    font-size: 0.9rem;
    color: #ffaa00;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 170, 0, 0.5);
}

/* Цвета для разных рас в тултипе планеты */
.planet-tooltip-owner[data-race="Люди"] { border-left-color: #00ff00; }
.planet-tooltip-owner[data-race="Тианцы"] { border-left-color: #ff6600; }
.planet-tooltip-owner[data-race="Аурелиане"] { border-left-color: #ffff00; }
.planet-tooltip-owner[data-race="Ксеносы Нокса"] { border-left-color: #ff00ff; }
.planet-tooltip-owner[data-race="Реликты Ориона"] { border-left-color: #00ffff; }
.planet-tooltip-owner[data-race="Сирианцы"] { border-left-color: #ff0000; }

.planet-tooltip-owner[data-race="Люди"] .owner-race { 
    color: #00ff00; 
    border-color: #00ff00; 
}
.planet-tooltip-owner[data-race="Тианцы"] .owner-race { 
    color: #ff6600; 
    border-color: #ff6600; 
}
.planet-tooltip-owner[data-race="Аурелиане"] .owner-race { 
    color: #ffff00; 
    border-color: #ffff00; 
}
.planet-tooltip-owner[data-race="Ксеносы Нокса"] .owner-race { 
    color: #ff00ff; 
    border-color: #ff00ff; 
}
.planet-tooltip-owner[data-race="Реликты Ориона"] .owner-race { 
    color: #00ffff; 
    border-color: #00ffff; 
}
.planet-tooltip-owner[data-race="Сирианцы"] .owner-race { 
    color: #ff0000; 
    border-color: #ff0000; 
}
/* ========== БАЗА ПОЛЬЗОВАТЕЛЯ ========== */
.system-user-base {
    cursor: pointer !important;
    filter: drop-shadow(0 0 10px #ff6600);
}

.system-user-base:hover {
    filter: drop-shadow(0 0 20px #ffaa00) !important;
}

.system-user-base:hover .base-icon rect {
    fill: #ff8800 !important;
    stroke: #ffff00 !important;
    stroke-width: 3px !important;
}

.base-label {
    text-shadow: 0 0 10px #ff6600;
    font-weight: bold;
    pointer-events: none;
}

/* Попап базы */
.base-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.base-details-popup {
    background: linear-gradient(135deg, #1a1a2e 0%, #2a1a3a 100%);
    border: 2px solid #ff6600;
    border-radius: 12px;
    width: 450px;
    max-width: 90%;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(255, 102, 0, 0.3);
}

.base-details-popup .popup-header {
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 102, 0, 0.3);
}

.base-details-popup h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.base-level-tag {
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: bold;
    border: 1px solid #ffaa00;
    color: #ffaa00;
}

.base-large-icon {
    align-self: center;
    margin: 20px 0;
}

.base-large-icon svg {
    filter: drop-shadow(0 0 20px #ff6600);
}

.base-info {
    width: 100%;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 20px 20px;
}

.base-info .info-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: start;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 102, 0, 0.2);
}

.base-info .label {
    color: #ffaa00;
    font-size: 0.9rem;
    font-weight: 600;
}

.base-info .value {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: bold;
    text-align: right;
}
/* ========== БАЗЫ ДРУГИХ ИГРОКОВ ========== */
.system-base {
    cursor: pointer !important;
    filter: drop-shadow(0 0 5px currentColor);
}

.system-base.own-base {
    filter: drop-shadow(0 0 10px #ff6600);
    z-index: 20;
}

.system-base.enemy-base {
    filter: drop-shadow(0 0 8px #ff3333);
    z-index: 10;
}

.system-base:hover {
    filter: drop-shadow(0 0 15px currentColor) !important;
    z-index: 30;
}

.system-base:hover .base-icon rect {
    fill: currentColor !important;
    stroke: #ffff00 !important;
    stroke-width: 3px !important;
}

/* Базы в легенде */
.legend-item.base-own .legend-symbol {
    background: #ff6600;
    box-shadow: 0 0 10px #ffaa00;
}

.legend-item.base-enemy .legend-symbol {
    background: #ff3333;
    box-shadow: 0 0 10px #ff6666;
}
/* ===== АНИМАЦИИ ЗАХВАТА ПЛАНЕТЫ ===== */

/* Моргающая сетка */
@keyframes gridPulse {
    0% {
        stroke-opacity: 0.3;
        stroke-width: 1;
    }
    25% {
        stroke-opacity: 0.8;
        stroke-width: 2;
    }
    50% {
        stroke-opacity: 0.3;
        stroke-width: 1.5;
    }
    75% {
        stroke-opacity: 0.6;
        stroke-width: 2;
    }
    100% {
        stroke-opacity: 0.3;
        stroke-width: 1;
    }
}

@keyframes gridRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.capture-grid-line {
    animation: gridPulse 2s infinite ease-in-out;
    filter: drop-shadow(0 0 5px #a0ff00);
}

.capture-grid-line.horizontal {
    animation-delay: 0.1s;
}

.capture-grid-line.vertical {
    animation-delay: 0.3s;
}

.capture-grid-line.diagonal {
    animation-delay: 0.5s;
    animation-duration: 3s;
}

.capture-grid-outer {
    animation: gridPulse 2.5s infinite ease-in-out, gridRotate 20s linear infinite;
    transform-origin: center;
}

/* Анимация для градусника */
@keyframes thermometerGlow {
    0% {
        filter: drop-shadow(0 0 2px #a0ff00);
    }
    50% {
        filter: drop-shadow(0 0 10px #a0ff00) drop-shadow(0 0 20px #00ff00);
    }
    100% {
        filter: drop-shadow(0 0 2px #a0ff00);
    }
}

.capture-thermometer {
    animation: thermometerGlow 2s infinite ease-in-out;
    pointer-events: none; /* Чтобы не мешать кликам по планете */
}

.capture-thermometer rect:last-of-type {
    animation: fillPulse 1s infinite ease-in-out;
}

@keyframes fillPulse {
    0% {
        fill: #a0ff00;
    }
    50% {
        fill: #00ff00;
    }
    100% {
        fill: #a0ff00;
    }
}

/* Эффект при наведении на захватываемую планету */
.system-planet.being-captured:hover .planet-base {
    fill: #a0ff00 !important;
    filter: drop-shadow(0 0 20px #a0ff00) !important;
}

.system-planet.being-captured:hover .capture-grid-line {
    stroke: #ffff00;
    animation-duration: 1s;
}
/* Информация о захвате в тултипе */
.planet-tooltip-capture {
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(160, 255, 0, 0.1);
    border: 1px solid #a0ff00;
    border-radius: 6px;
    animation: capturePulse 2s infinite;
}

.capture-warning {
    color: #a0ff00;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.capture-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.capture-attacker {
    color: #a0ff00;
    font-weight: bold;
}

.capture-timer {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 8px;
    border-radius: 12px;
}

.capture-progress-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(160, 255, 0, 0.3);
}

.capture-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #a0ff00, #00ff00);
    border-radius: 3px;
    transition: width 0.3s ease;
}

@keyframes capturePulse {
    0% {
        box-shadow: 0 0 5px rgba(160, 255, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(160, 255, 0, 0.6);
    }
    100% {
        box-shadow: 0 0 5px rgba(160, 255, 0, 0.3);
    }
}
/* ===== УСИЛЕННЫЕ СТИЛИ ДЛЯ ЭФФЕКТОВ ЗАХВАТА ===== */

/* Принудительное отображение сетки */
.capture-grid {
    display: block !important;
    opacity: 0.9 !important;
    pointer-events: none;
    z-index: 100;
}

.capture-grid line,
.capture-grid circle {
    stroke: #a0ff00 !important;
    stroke-width: 2px !important;
    vector-effect: non-scaling-stroke;
}

/* Упрощенная версия сетки для теста */
.capture-grid-simple {
    display: block !important;
}

.capture-grid-simple circle {
    fill: none !important;
    stroke: #ff0000 !important;
    stroke-width: 3px !important;
    stroke-dasharray: 5,5;
    animation: simplePulse 1s infinite alternate;
}

@keyframes simplePulse {
    from { stroke-opacity: 0.3; stroke-width: 2; }
    to { stroke-opacity: 1; stroke-width: 4; }
}

/* Принудительное отображение градусника */
.capture-thermometer {
    display: block !important;
    opacity: 1 !important;
    pointer-events: none;
    z-index: 101;
}

.capture-thermometer rect {
    fill: #111 !important;
    stroke: #a0ff00 !important;
    stroke-width: 1px !important;
}

.capture-thermometer rect:last-of-type {
    fill: #a0ff00 !important;
    animation: thermometerFill 1s infinite alternate !important;
}

@keyframes thermometerFill {
    from { fill: #a0ff00; }
    to { fill: #00ff00; }
}

.capture-thermometer circle {
    fill: #a0ff00 !important;
    stroke: #fff !important;
    animation: thermometerPulse 1s infinite alternate !important;
}

@keyframes thermometerPulse {
    from { r: 4; opacity: 0.7; }
    to { r: 6; opacity: 1; }
}

.capture-thermometer text {
    fill: #a0ff00 !important;
    font-size: 9px !important;
    font-weight: bold !important;
    text-shadow: 0 0 5px #000 !important;
}

/* Подсветка захватываемой планеты */
.system-planet.being-captured .planet-base {
    filter: drop-shadow(0 0 15px #a0ff00) !important;
    transition: filter 0.3s ease;
}

/* Временный тестовый стиль - если планета в захвате, показать красный круг */
.system-planet[data-capturing="true"]::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid red;
    border-radius: 50%;
}
/* ===== СТИЛИ ДЛЯ ФЛОТОВ ===== */

.system-fleet {
    cursor: pointer;
    transition: filter 0.2s ease;
    pointer-events: all;
}

.system-fleet:hover {
    filter: drop-shadow(0 0 15px currentColor);
    z-index: 100;
}

.system-fleet polygon {
    transition: all 0.2s ease;
}

.system-fleet.own-fleet {
    filter: drop-shadow(0 0 5px #4169E1);
}

.system-fleet.enemy-fleet {
    filter: drop-shadow(0 0 5px #DC143C);
}

/* Индикатор движения (пунктирный круг) */
.system-fleet circle[stroke-dasharray="4,4"] {
    animation: fleet-move-pulse 1.5s infinite ease-in-out;
    pointer-events: none;
}

@keyframes fleet-move-pulse {
    0%, 100% {
        opacity: 0.5;
        r: 20;
    }
    50% {
        opacity: 1;
        r: 25;
    }
}

/* Информационные метки (количество кораблей, владелец) */
.fleet-label {
    font-family: 'Share Tech Mono', monospace;
    pointer-events: none;
    text-shadow: 1px 1px 2px #000;
}

/* Выделенный флот */
.system-fleet.selected polygon {
    stroke: #FFD700;
    stroke-width: 3;
    filter: drop-shadow(0 0 10px #FFD700);
}

/* Легенда для флотов */
.legend-item .fleet-own {
    background: #4169E1;
    box-shadow: 0 0 10px #4169E1;
}

.legend-item .fleet-enemy {
    background: #DC143C;
    box-shadow: 0 0 10px #DC143C;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .system-fleet polygon {
        stroke-width: 1.5;
    }
    
    .system-fleet text {
        font-size: 7px;
    }
}