/* ============================================================
   base.css — Стили для страницы боевой базы
   Версия: очищенная, без дублей, компактные вкладки
   ============================================================ */

/* ===== КОНТЕЙНЕР БАЗЫ ===== */
.base-container {
    padding: 20px 25px;
    width: 100%;
    min-height: 100%;
    margin: 0;
    box-sizing: border-box;
    animation: fadeIn 0.5s ease-out;
}

/* ===== ФОН ДЛЯ ГЛАВНОЙ СТРАНИЦЫ БАЗЫ ===== */
.base-container.has-bg-image {
    position: relative;
    width: 100%;
    min-height: 100%;
    background-image: url('/assets/images/space-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.base-container.has-bg-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 25, 0.45);  /* было 0.75, стало 0.45 — фон ярче */
    pointer-events: none;
    z-index: 0;
}

.base-container.has-bg-image > * {
    position: relative;
    z-index: 1;
}

/* ===== ЗАГОЛОВОК БАЗЫ ===== */
.base-header {
    background: linear-gradient(135deg,
        rgba(0, 243, 255, 0.15),
        rgba(0, 255, 157, 0.1));
    border: 2px solid var(--cyber-blue);
    border-radius: 12px;
    padding: 25px 35px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.base-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 243, 255, 0.2),
        transparent
    );
    animation: scan 8s infinite;
}

.base-title {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.base-title h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--cyber-blue);
    display: flex;
    align-items: center;
    gap: 15px;
    text-shadow: 0 0 15px var(--cyber-blue);
}

.base-title h1 i {
    font-size: 2rem;
}

.base-level {
    background: rgba(0, 243, 255, 0.2);
    border: 1px solid var(--cyber-blue);
    border-radius: 20px;
    padding: 8px 20px;
    font-weight: bold;
    color: var(--cyber-blue);
    text-shadow: 0 0 5px var(--cyber-blue);
}

.base-stats {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
}

.stat-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 12px !important;
    border-radius: 8px;
    border: 1px solid rgba(0, 243, 255, 0.3);
    white-space: nowrap !important;
}

.stat-item i {
    font-size: 1.1rem;
    color: var(--cyber-blue);
}

.stat-info {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
}

.stat-label {
    font-size: 0.75rem !important;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 0.95rem !important;
    font-weight: bold;
    color: var(--text-primary);
}

/* ===== ВКЛАДКИ ===== */
.base-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0, 243, 255, 0.3);
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.base-tab {
    padding: 10px 20px;
    background: rgba(0, 243, 255, 0.05);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 6px 6px 0 0;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    border-bottom: none;
    overflow: hidden;
}

.base-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 243, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
    z-index: 0;
}

.base-tab:hover::before { left: 100%; }

.base-tab:hover {
    background: rgba(0, 243, 255, 0.15);
    color: var(--cyber-blue);
    border-color: var(--cyber-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.3);
}

.base-tab.active {
    background: rgba(0, 243, 255, 0.15);
    border-color: var(--cyber-blue);
    color: var(--cyber-blue);
    box-shadow: 0 -2px 10px rgba(0, 243, 255, 0.2);
}

.base-tab.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 243, 255, 0.4);
}

.base-tab i {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.base-tab:hover i { transform: scale(1.1); }

.tab-badge {
    background: var(--cyber-blue);
    color: #000;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
    position: relative;
    z-index: 1;
}

.base-content {
    min-height: 500px;
    transition: opacity 0.2s ease;
}

.base-content.fade { opacity: 0.5; }

/* ============================================================
   ОБЗОР (НЕ ТРОГАЕМ — оставлено как есть)
   ============================================================ */
.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 25px;
}

@media (max-width: 1200px) {
    .overview-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .overview-grid { grid-template-columns: 1fr; }
}

.overview-section {
    background: linear-gradient(135deg,
        rgba(26, 26, 46, 0.8),
        rgba(18, 18, 32, 0.9));
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.overview-section h3 {
    color: var(--cyber-blue);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 243, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.resource-item:hover {
    background: rgba(0, 243, 255, 0.05);
    border-color: var(--cyber-blue);
    transform: translateY(-2px);
}

.resource-item.rare { border-left: 3px solid #9966cc; }
.resource-item.bio  { border-left: 3px solid #228b22; }

.resource-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #000;
}

.resource-info { flex: 1; }

.resource-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.resource-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-primary);
}

.status-bars { margin-bottom: 25px; }
.status-bar { margin-bottom: 15px; }

.bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.bar-fill.armor   { background: linear-gradient(90deg, #ffaa00, #ff6600); }
.bar-fill.shields { background: linear-gradient(90deg, #00aaff, #0066ff); }

.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.quick-stat {
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.quick-stat i {
    font-size: 1.5rem;
    color: var(--cyber-blue);
    margin-bottom: 5px;
}

.quick-stat .stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-primary);
}

.quick-stat .stat-label { font-size: 0.7rem; }

.modules-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.module-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.module-item i {
    color: var(--cyber-blue);
    font-size: 1rem;
}

.module-name {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}

.module-level {
    font-size: 0.8rem;
    color: var(--cyber-green);
    background: rgba(0, 255, 157, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

.no-modules {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-secondary);
}

.no-modules i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--text-muted);
    opacity: 0.5;
}

.no-modules p { margin-bottom: 20px; }

/* ============================================================
   ВОЕННЫЙ ТЕРМИНАЛ — ФЛОТ (компактный)
   ============================================================ */
.fleet-container {
    padding: 12px;
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid #333;
    font-family: 'Share Tech Mono', monospace;
}

.fleet-subtabs {
    display: flex;
    gap: 2px;
    margin-bottom: 12px;
    border-bottom: 1px solid #333;
    flex-wrap: wrap;
}

.fleet-subtab {
    background: #111;
    border: 1px solid #333;
    border-bottom: none;
    color: #0af;
    padding: 7px 16px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fleet-subtab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 170, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.fleet-subtab:hover::before { left: 100%; }

.fleet-subtab.active {
    background: #1a1a1a;
    color: #0f0;
    border-color: #0f0;
}

.fleet-subtab:hover {
    background: #222;
    border-color: #0af;
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.3);
}

.fleet-content { min-height: 400px; }

/* Военные рамки — компактные */
.mil-frame {
    border: 1px solid #333;
    background: #0f0f0f;
    margin-bottom: 10px;
    padding: 10px 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mil-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 170, 255, 0.1),
        transparent
    );
    transition: left 0.5s ease;
    z-index: 0;
    pointer-events: none;
}

.mil-frame:hover::before { left: 100%; }

.mil-frame:hover {
    border-color: #0af;
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.2);
    background: #121212;
}

.mil-frame-header {
    color: #0af;
    font-size: 0.95rem;
    padding-bottom: 4px;
    border-bottom: 1px solid #333;
    letter-spacing: 1.5px;
    position: relative;
    z-index: 1;
}

.mil-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 6px;
    border-bottom: 1px solid #222;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
    font-size: 0.85rem;
}

.mil-row:hover {
    background: #1a1a1a;
    border-color: #0af;
}

.mil-label {
    color: #888;
    font-size: 0.8rem;
}

.mil-value {
    color: #0af;
    font-weight: bold;
    font-size: 0.85rem;
}

.mil-value.warning { color: #ff0; }
.mil-value.danger  { color: #f00; }
.mil-value.success { color: #0f0; }

/* Кнопки — компактные */
.mil-action {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--cyber-blue);
    color: var(--cyber-blue);
    padding: 5px 10px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.mil-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 243, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
    z-index: -1;
}

.mil-action:hover::before { left: 100%; }

.mil-action:hover {
    background: rgba(0, 243, 255, 0.2);
    border-color: var(--cyber-blue);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.mil-action:disabled {
    background: rgba(100, 100, 100, 0.1);
    border-color: #444;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
}

.mil-action:disabled::before { display: none; }

.mil-action.danger {
    background: rgba(255, 0, 60, 0.1);
    border-color: var(--cyber-red);
    color: var(--cyber-red);
}

.mil-action.danger::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 0, 60, 0.3),
        transparent
    );
}

.mil-action.danger:hover {
    background: rgba(255, 0, 60, 0.2);
    box-shadow: 0 0 10px rgba(255, 0, 60, 0.3);
}

.mil-action.success {
    background: rgba(0, 255, 157, 0.1);
    border-color: var(--cyber-green);
    color: var(--cyber-green);
}

.mil-action.success::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 157, 0.3),
        transparent
    );
}

.mil-action.success:hover {
    background: rgba(0, 255, 157, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

.mil-action.small {
    padding: 3px 7px;
    font-size: 0.75rem;
}

.mil-action.return {
    background: rgba(255, 170, 0, 0.15);
    border-color: #ffaa00;
    color: #ffaa00;
}

.mil-action.return:hover {
    background: rgba(255, 170, 0, 0.3);
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.3);
}

.mil-select {
    background: #111;
    border: 1px solid #333;
    color: #0af;
    padding: 3px 6px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.mil-select:hover {
    border-color: #0af;
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.2);
}

.progress-symbol {
    font-family: 'Share Tech Mono', monospace;
    color: #0f0;
    letter-spacing: 2px;
}

.resource-bar {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(17, 17, 17, 0.9);
    border: 1px solid #333;
    color: #ff0;
    text-align: right;
    font-size: 0.8rem;
}

.two-column {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.dev-placeholder {
    color: #666;
    text-align: center;
    padding: 50px;
    font-style: italic;
}

/* ===== ВЕРФЬ ===== */
.shipyard-container .mil-frame { margin-bottom: 12px; }
.shipyard-container .mil-row { border-bottom: none; }

.level-nav-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.level-nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 170, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
    z-index: 0;
}

.level-nav-btn:hover::before { left: 100%; }

.level-nav-btn:hover {
    border-color: #0af !important;
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.3);
    transform: translateX(2px);
    background: #1a1a1a !important;
}

.level-nav-btn.active:hover {
    border-color: #0f0 !important;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

/* Карточки кораблей — компактные */
.ship-card {
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
    padding: 8px 10px !important;
    margin-bottom: 8px !important;
}

.ship-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 170, 255, 0.1),
        transparent
    );
    transition: left 0.5s ease;
    z-index: 0;
    pointer-events: none;
}

.ship-card:hover::before { left: 100%; }

.ship-card:hover {
    border-color: #0af;
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.2);
    background: #151515;
}

.ship-card img {
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.ship-card:hover img {
    transform: scale(1.05);
    filter: brightness(1.2);
}

/* ===== АНГАР (компактный) ===== */
.hangar-container {
    display: grid;
    grid-template-columns: minmax(500px, 1fr) 320px;
    gap: 12px;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.hangar-fleets {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.hangar-right {
    width: 320px;
    flex-shrink: 0;
}

.fleet-card {
    padding: 8px 12px !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fleet-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 170, 255, 0.1),
        transparent
    );
    transition: left 0.5s ease;
    z-index: 0;
    pointer-events: none;
}

.fleet-card:hover::before { left: 100%; }

.fleet-card:hover {
    border-color: #0af;
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.2);
    background: #151515;
}

.fleet-ships-list {
    border-right: 1px solid #333;
    padding-right: 15px;
}

.fleet-ship-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px;
    border-bottom: 1px solid #222;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.fleet-ship-row:hover {
    background: #1a1a1a;
    border-color: #0af;
}

.fleet-admiral-panel { min-height: 100%; }
.fleet-admiral-panel .mil-action { margin-top: 5px; }

/* Свободные корабли */
.free-ship-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid #222;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.free-ship-row:hover {
    background: #1a1a1a;
    border-color: #0af;
}

.free-ship-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.free-ship-actions {
    display: flex;
    gap: 5px;
}

/* ===== СТАТУС ФЛОТА ===== */
.fleet-status {
    margin: 6px 0;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid transparent;
    font-size: 0.85rem;
}

.fleet-status.in-transit {
    border-left-color: #ffaa00;
    background: rgba(255, 170, 0, 0.1);
}

.fleet-status.docked {
    border-left-color: #00ff00;
    background: rgba(0, 255, 0, 0.05);
}

.fleet-status-icon {
    font-size: 1rem;
    margin-right: 8px;
}

.fleet-status-text {
    font-weight: bold;
    font-size: 0.85rem;
}

.fleet-status-location {
    color: #888;
    font-size: 0.75rem;
    margin-left: 10px;
}

.fleet-return-btn {
    background: rgba(255, 170, 0, 0.15);
    border: 1px solid #ffaa00;
    color: #ffaa00;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.fleet-return-btn:hover {
    background: rgba(255, 170, 0, 0.3);
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.3);
}

/* ===== АДМИРАЛЫ (компактные) ===== */
.admirals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 10px;
    padding: 5px;
}

.admirals-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 1400px) {
    .admirals-two-column { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .admirals-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 3px;
    }
}

.admiral-frame {
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    padding: 8px 12px !important;
    width: 100%;
    border: 1px solid #333;
    background: #0f0f0f;
    box-sizing: border-box;
    margin-bottom: 0 !important;
}

.admiral-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 170, 255, 0.15),
        transparent
    );
    transition: left 0.5s ease;
    z-index: 0;
    pointer-events: none;
}

.admiral-frame:hover::before { left: 100%; }

.admiral-frame:hover {
    border-color: #0af;
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.2);
    background: #151515;
}

.admiral-frame.same-race:hover {
    border-color: #0af;
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.3);
}

.admiral-card {
    display: flex;
    gap: 10px;
    position: relative;
    z-index: 1;
}

/* Аватар — уменьшили с 150 до 90 */
.admiral-avatar {
    width: 90px !important;
    height: 90px !important;
    background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
    border: 2px solid #0af;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #0af;
    flex-shrink: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.admiral-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.admiral-card:hover .admiral-avatar {
    transform: scale(1.05);
    box-shadow: 0 0 15px currentColor;
}

.admiral-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admiral-race-level {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.admiral-race {
    color: #888;
    font-size: 0.8rem;
}

.admiral-level {
    color: #0f0;
    font-size: 0.8rem;
}

.admiral-trait {
    color: #ff0;
    font-size: 0.8rem;
    line-height: 1.3;
    word-wrap: break-word;
}

.admiral-name-under {
    font-size: 0.9rem;
    font-weight: bold;
    color: #0af;
    margin-top: 5px;
    margin-bottom: 2px;
    text-align: left;
    word-wrap: break-word;
}

.admiral-status-under {
    color: #888;
    text-align: left;
    margin-bottom: 0;
    font-size: 0.8rem;
}

.admiral-status-under span {
    color: #ff0;
    font-weight: bold;
}

.admiral-button-container {
    text-align: right;
    margin-top: -18px;
}

@media (max-width: 768px) {
    .admiral-frame { padding: 8px 10px !important; }
    .admiral-card { gap: 8px; }
    .admiral-avatar {
        width: 70px !important;
        height: 70px !important;
        font-size: 2rem;
    }
    .admiral-button-container {
        margin-top: 5px;
        text-align: left;
    }
}

.admiral-button {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid #0af;
    color: #0af;
    padding: 3px 9px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.admiral-button:hover {
    background: rgba(0, 243, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.admiral-button.danger {
    border-color: #f00;
    color: #f00;
}

.admiral-button.danger:hover {
    background: rgba(255, 0, 0, 0.2);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.admiral-button.success {
    border-color: #0f0;
    color: #0f0;
}

.admiral-button.success:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.admiral-frame.same-race { border-color: #0af; }

.hire-cost {
    color: #ff0;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 0, 0.1);
    padding: 3px 8px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 0, 0.2);
}

.admiral-select {
    background: #111;
    border: 1px solid #333;
    color: #0af;
    padding: 3px 6px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 110px;
}

.admiral-select:hover {
    border-color: #0af;
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.2);
    background: #1a1a1a;
}

/* ===== РАЗВИТИЕ (компактное) ===== */
.development-container { padding: 5px; }

.base-info-panel {
    background: #0f0f0f;
    border: 1px solid #333;
    padding: 15px;
}

.module-card {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #111;
    border: 1px solid #333;
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 170, 255, 0.1),
        transparent
    );
    transition: left 0.5s ease;
    z-index: 0;
    pointer-events: none;
}

.module-card:hover::before { left: 100%; }

.module-card:hover {
    border-color: #0af;
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.2);
    background: #151515;
}

.module-card.installed { border-color: #0f0; background: #0f1f0f; }

.module-card.installed:hover {
    border-color: #0f0;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
}

.module-image {
    width: 45px;
    height: 45px;
    background: #1a1a1a;
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.module-card:hover .module-image {
    border-color: #0af;
    transform: rotate(5deg) scale(1.05);
}

.module-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.module-name {
    color: #0af;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 3px;
    transition: all 0.3s ease;
}

.module-card:hover .module-name {
    color: #0af;
    text-shadow: 0 0 8px rgba(0, 170, 255, 0.5);
}

.module-description {
    color: #888;
    font-size: 0.75rem;
    margin-bottom: 6px;
}

.module-cost {
    font-size: 0.75rem;
    color: #ff0;
}

.cost-item { margin-right: 8px; }

.module-action {
    display: flex;
    align-items: center;
    min-width: 90px;
    justify-content: flex-end;
    position: relative;
    z-index: 1;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.installed-badge {
    color: #0f0;
    font-size: 0.75rem;
    padding: 3px 8px;
    border: 1px solid #0f0;
    background: rgba(0, 255, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.installed-badge:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.locked-badge {
    color: #666;
    font-size: 0.75rem;
}

/* ===== НЕТ ФЛОТА / НЕТ АДМИРАЛОВ ===== */
.no-fleet,
.no-admirals {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg,
        rgba(26, 26, 46, 0.5),
        rgba(18, 18, 32, 0.7));
    border-radius: 10px;
    border: 1px solid rgba(0, 243, 255, 0.3);
}

.no-fleet i,
.no-admirals i {
    font-size: 3rem;
    color: var(--cyber-blue);
    margin-bottom: 15px;
    opacity: 0.7;
}

.no-fleet h4,
.no-admirals h4 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.no-fleet p,
.no-admirals p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ===== КНОПКИ ВНИЗУ ===== */
.base-actions {
    margin-top: 25px;
    padding-top: 18px;
    border-top: 1px solid #333;
}

.base-actions .mil-action {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.base-actions .mil-action i { margin-right: 6px; }

/* ===== ЗАГЛУШКА "В РАЗРАБОТКЕ" ===== */
.coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.coming-soon i {
    font-size: 4rem;
    color: var(--cyber-blue);
    margin-bottom: 15px;
    opacity: 0.5;
}

.coming-soon h3 {
    font-size: 1.6rem;
    color: var(--cyber-blue);
    margin-bottom: 8px;
}

.coming-soon p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.coming-soon-text {
    color: var(--text-muted);
    font-style: italic;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    text-align: center;
}

/* ===== УВЕДОМЛЕНИЯ ===== */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 350px;
}

.notification {
    background: rgba(10, 10, 20, 0.95);
    border-width: 2px;
    border-style: solid;
    padding: 12px 20px;
    border-radius: 8px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
    backdrop-filter: blur(10px);
    transform: translateX(100%);
    opacity: 0;
    animation: notificationSlideIn 0.3s ease-out forwards;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: none;
    position: relative;
    overflow: hidden;
}

.notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 243, 255, 0.2),
        transparent
    );
    animation: notificationScan 8s infinite;
}

.notification-success {
    background: rgba(10, 20, 10, 0.95);
    border-color: #0f0;
    color: #0f0;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.5);
}

.notification-error {
    background: rgba(30, 10, 10, 0.95);
    border-color: #f00;
    color: #f00;
    text-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

.notification i {
    font-size: 1.1rem;
    filter: drop-shadow(0 0 5px currentColor);
}

.notification.fade-out {
    animation: notificationSlideOut 0.3s ease-out forwards;
}

.notification.pulse {
    animation: notificationPulse 2s infinite;
}

@media (max-width: 768px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    .notification {
        padding: 10px 14px;
        font-size: 0.8rem;
    }
}

/* ============================================================
   ОБЩИЙ ЧАТ
   ============================================================ */
.chat-container {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.85);
    border-top: 2px solid var(--cyber-blue);
    max-height: 200px;
    min-height: 120px;
    width: 100%;
    font-family: 'Share Tech Mono', monospace;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 15px;
    background: rgba(0, 243, 255, 0.1);
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
    flex-shrink: 0;
}

.chat-title {
    color: var(--cyber-blue);
    font-size: 0.8rem;
    letter-spacing: 2px;
}

.chat-players {
    color: var(--text-secondary);
    font-size: 0.7rem;
}

.chat-toggle {
    background: none;
    border: none;
    color: var(--cyber-blue);
    cursor: pointer;
    padding: 0 5px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 5px 15px;
    min-height: 50px;
    max-height: 120px;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.5);
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.chat-messages::-webkit-scrollbar-thumb {
    background: var(--cyber-blue);
    border-radius: 2px;
}

.chat-message {
    padding: 2px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.chat-message .time {
    color: #666;
    font-size: 0.65rem;
    flex-shrink: 0;
}

.chat-message .name {
    color: var(--cyber-blue);
    font-weight: bold;
    flex-shrink: 0;
}

.chat-message .text {
    color: #ddd;
    word-break: break-word;
}

.chat-welcome {
    color: #888;
    text-align: center;
    padding: 10px 0;
    font-style: italic;
}

.chat-input-line {
    display: flex;
    align-items: center;
    padding: 5px 15px;
    background: rgba(0,0,0,0.5);
    border-top: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}

.chat-prompt {
    color: var(--cyber-blue);
    font-weight: bold;
    margin-right: 5px;
    font-size: 0.9rem;
}

#chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    padding: 5px 10px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    outline: none;
}

#chat-input::placeholder { color: #666; }

.chat-send-btn {
    background: transparent;
    border: none;
    color: var(--cyber-blue);
    cursor: pointer;
    padding: 5px 10px;
    transition: all 0.3s;
}

.chat-send-btn:hover {
    color: #0f0;
    transform: scale(1.1);
}

.chat-container.collapsed .chat-messages,
.chat-container.collapsed .chat-input-line { display: none; }

.chat-container.collapsed {
    min-height: 30px;
    max-height: 30px;
}

/* ============================================================
   АНИМАЦИИ
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes scan {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes notificationSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

@keyframes notificationSlideOut {
    from { transform: translateX(0);    opacity: 1; }
    to   { transform: translateX(100%); opacity: 0; }
}

@keyframes notificationScan {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes notificationPulse {
    0%   { box-shadow: 0 0 20px rgba(0, 243, 255, 0.3); }
    50%  { box-shadow: 0 0 40px rgba(0, 243, 255, 0.6); }
    100% { box-shadow: 0 0 20px rgba(0, 243, 255, 0.3); }
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */
@media (max-width: 1200px) {
    .hangar-container {
        grid-template-columns: 1fr;
    }
    .hangar-right { width: 100%; }
}

@media (max-width: 992px) {
    .development-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .base-container { padding: 15px; }

    .base-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px;
    }

    .base-title h1 { font-size: 1.5rem; }

    .base-stats {
        width: 100%;
        justify-content: space-between;
    }

    .stat-item { flex: 1; }

    .base-tabs { flex-wrap: wrap; }

    .base-tab {
        flex: 1 1 auto;
        padding: 8px 12px;
        font-size: 0.75rem;
    }

    .fleet-header,
    .admirals-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}
/* ===== КОМПАКТНЫЙ РЕЖИМ ДЛЯ ВКЛАДОК (кроме обзора) ===== */
/* zoom убран — размеры выставлены точечно в правилах ниже */

.base-content .overview-grid {
    zoom: 1;
}

/* Узкая правая колонка в ангаре */
.hangar-right {
    width: 280px !important;
}

/* Максимально компактные строки резерва */
.reserve-ship-card {
    padding: 4px 6px !important;
    margin-bottom: 3px !important;
}

.reserve-ship-card select,
.reserve-ship-card input,
.reserve-ship-card button {
    height: 22px !important;
    font-size: 0.7rem !important;
    padding: 1px 4px !important;
}
/* ============================================================
   ВЕРФЬ — АККОРДЕОН УРОВНЕЙ + СПИСОК КОРАБЛЕЙ + ДЕТАЛЬНАЯ ПАНЕЛЬ
   ============================================================ */

/* Сетка: слева аккордеон, справа детали */
.shipyard-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 15px;
    align-items: start;
}

/* -------- Аккордеон уровней -------- */
#shipyard-levels-accordion {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.level-accordion-item {
    width: 100%;
}

.level-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.level-accordion-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 170, 255, 0.15),
        transparent
    );
    transition: left 0.5s ease;
    pointer-events: none;
}

.level-accordion-header:hover::before {
    left: 100%;
}

.level-accordion-header:hover {
    background: #1a1a1a !important;
    border-color: #0af !important;
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.2);
}

.level-accordion-header i.fa-chevron-down,
.level-accordion-header i.fa-chevron-right {
    transition: transform 0.2s ease;
}

.level-accordion-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0 4px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 1px solid #333;
    border-right: 1px solid #333;
    border-bottom: 1px solid #333;
    max-height: 320px;
    overflow-y: auto;
    animation: accordionOpen 0.2s ease-out;
}

@keyframes accordionOpen {
    from { opacity: 0; transform: translateY(-3px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* -------- Список кораблей внутри уровня -------- */
.ship-list-item {
    padding: 5px 8px;
    cursor: pointer;
    border-left: 2px solid #888;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
}

.ship-list-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 170, 255, 0.15),
        transparent
    );
    transition: left 0.4s ease;
    pointer-events: none;
}

.ship-list-item:hover::before {
    left: 100%;
}

.ship-list-item:hover {
    background: rgba(0, 170, 255, 0.08);
    border-color: #0af;
}

.ship-list-item.active {
    background: rgba(0, 170, 255, 0.18) !important;
    border-color: #0af !important;
    box-shadow: inset 0 0 8px rgba(0, 170, 255, 0.2);
}

/* -------- Детальная панель корабля -------- */
#ship-detail-panel {
    padding: 15px;
    min-height: 500px;
    animation: detailFadeIn 0.25s ease-out;
}

@keyframes detailFadeIn {
    from { opacity: 0; transform: translateX(5px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Слайдер количества — стилизация ползунка */
.quantity-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #333;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.quantity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #0af, #0f0);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 170, 255, 0.5);
    transition: all 0.2s ease;
}

.quantity-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(0, 170, 255, 0.8);
}

.quantity-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #0af, #0f0);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 170, 255, 0.5);
}

.quantity-slider:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* -------- Адаптивность аккордеона -------- */
@media (max-width: 1100px) {
    .shipyard-container {
        grid-template-columns: 240px 1fr;
    }
}

@media (max-width: 900px) {
    .shipyard-container {
        grid-template-columns: 1fr;
    }

    #ship-detail-panel > div {
        grid-template-columns: 1fr !important;
    }

    #ship-detail-panel > div > div:first-child > div:first-child {
        height: 260px !important;
    }
}
/*****
/* ============================================================
   ПОЛУПРОЗРАЧНЫЕ ПАНЕЛИ ВЕРФИ + ОСЛАБЛЕННЫЙ ФОН
   ============================================================ */

/* 1. Ослабляем затемнение фона базы — теперь космос ярче */
.base-container.has-bg-image::before {
    background: rgba(10, 10, 25, 0.45) !important;
}

/* 2. Контейнеры флота — без сплошного фона */
.fleet-container {
    background: rgba(10, 10, 10, 0.35) !important;
}

.fleet-content {
    background: transparent !important;
}

/* 3. Правая панель — детали корабля */
#ship-detail-panel {
    background: 
        linear-gradient(135deg, 
            rgba(0, 170, 255, 0.04) 0%, 
            rgba(10, 15, 25, 0.5) 30%,
            rgba(10, 15, 25, 0.5) 70%,
            rgba(0, 255, 157, 0.03) 100%) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(0, 170, 255, 0.4) !important;
    box-shadow: 
        0 0 25px rgba(0, 170, 255, 0.1) inset,
        0 4px 20px rgba(0, 0, 0, 0.4);
}

/* 3-b. Правая панель рекрутинга — та же прозрачность, что у верфи */
#recruit-detail-panel {
    background: 
        linear-gradient(135deg, 
            rgba(0, 170, 255, 0.04) 0%, 
            rgba(10, 15, 25, 0.5) 30%,
            rgba(10, 15, 25, 0.5) 70%,
            rgba(0, 255, 157, 0.03) 100%) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(0, 170, 255, 0.4) !important;
    box-shadow: 
        0 0 25px rgba(0, 170, 255, 0.1) inset,
        0 4px 20px rgba(0, 0, 0, 0.4);
}

#recruit-detail-panel,
#recruit-detail-panel .mil-row,
#recruit-detail-panel .mil-frame-header,
#recruit-detail-panel > div,
#recruit-detail-panel > div > div,
#recruit-detail-panel > div > div > div {
    background-color: transparent !important;
}

#recruit-detail-panel button {
    background-color: rgba(0, 243, 255, 0.1) !important;
}

#recruit-detail-panel button.success {
    background-color: rgba(0, 255, 157, 0.15) !important;
}

/* 4. Левая колонка — уровни */
.shipyard-container > div:first-child .mil-frame {
    background: rgba(10, 15, 25, 0.5) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(0, 170, 255, 0.3) !important;
}

/* 5. Все потомки панели деталей — прозрачные */
#ship-detail-panel,
#ship-detail-panel .mil-row,
#ship-detail-panel .mil-frame-header,
#ship-detail-panel > div,
#ship-detail-panel > div > div,
#ship-detail-panel > div > div > div {
    background-color: transparent !important;
}

/* 6. Блок стоимости — лёгкая подсветка */
#ship-detail-panel .ship-costs {
    background-color: rgba(255, 255, 0, 0.06) !important;
    border-left: 3px solid #ff0;
    border-radius: 4px;
    padding: 6px 10px;
}

/* 7. Кнопки на панели — с полупрозрачным фоном */
#ship-detail-panel button {
    background-color: rgba(0, 243, 255, 0.1) !important;
}

#ship-detail-panel button.success {
    background-color: rgba(0, 255, 157, 0.15) !important;
}

/* 8. Аккордеон уровней — прозрачный */
.level-accordion-body {
    background: rgba(0, 0, 0, 0.2) !important;
}

/* 9. Строки списка кораблей — полупрозрачные */
.ship-list-item {
    background: rgba(255, 255, 255, 0.02) !important;
}

.ship-list-item.active {
    background: rgba(0, 170, 255, 0.18) !important;
    backdrop-filter: blur(4px);
}

/* ============================================================
   КАРТОЧКИ АДМИРАЛОВ — БОЛЬШИЕ С КАРТИНКОЙ
   ============================================================ */

/* Обёртка с горизонтальной прокруткой */
.admirals-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 5px 15px 5px;
    -webkit-overflow-scrolling: touch;
}

.admirals-scroll-track {
    display: flex;
    gap: 15px;
    width: max-content;
    padding-bottom: 8px;
}

/* Кастомный скроллбар */
.admirals-scroll-wrapper::-webkit-scrollbar {
    height: 8px;
}

.admirals-scroll-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.admirals-scroll-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #0af, #0f0);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.5);
}

.admirals-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #0cf, #0f9);
}

/* Сама карточка */
.admiral-card-large {
    position: relative;
    width: 320px;
    height: 520px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 170, 255, 0.35);
    background: rgba(10, 15, 25, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.admiral-card-large:hover {
    border-color: #0af;
    box-shadow: 
        0 0 20px rgba(0, 170, 255, 0.4),
        0 8px 30px rgba(0, 0, 0, 0.6);
    transform: translateY(-4px);
}

/* Картинка адмирала на всю карточку */
.admiral-card-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: rgba(0, 170, 255, 0.3);
    transition: transform 0.5s ease;
}

.admiral-card-large:hover .admiral-card-image {
    transform: scale(1.05);
}

/* Затемняющий градиент снизу — для читаемости текста */
.admiral-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.1) 30%,
        rgba(0, 0, 0, 0.1) 45%,
        rgba(0, 0, 0, 0.75) 75%,
        rgba(5, 10, 20, 0.95) 100%
    );
    pointer-events: none;
}

/* Верхняя полоса: раса + уровень */
.admiral-card-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    z-index: 2;
}

.admiral-card-race {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    color: #0af;
    text-transform: uppercase;
    background: rgba(0, 20, 40, 0.7);
    border: 1px solid rgba(0, 170, 255, 0.5);
    border-radius: 12px;
    padding: 3px 10px;
    backdrop-filter: blur(4px);
}

.admiral-card-level {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    color: #0f0;
    background: rgba(0, 40, 20, 0.7);
    border: 1px solid rgba(0, 255, 100, 0.5);
    border-radius: 12px;
    padding: 3px 10px;
    backdrop-filter: blur(4px);
    font-weight: bold;
}

/* Нижний блок: имя, черта, опыт, статус, кнопки */
.admiral-card-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admiral-card-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.15rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 170, 255, 0.7), 0 2px 4px rgba(0, 0, 0, 0.9);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.admiral-card-trait {
    font-size: 0.8rem;
    color: #ffe066;
    line-height: 1.35;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    font-style: italic;
}

.admiral-card-exp {
    font-size: 0.75rem;
    color: #88aadd;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.admiral-card-exp i {
    color: #ffd700;
    margin-right: 4px;
}

.admiral-card-status {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.admiral-card-status span {
    color: #ff0;
    font-weight: bold;
}

/* Кнопки */
.admiral-card-buttons {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.admiral-card-buttons .admiral-button {
    flex: 1;
    min-width: 70px;
    padding: 5px 10px;
    font-size: 0.75rem;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.admiral-card-buttons .admiral-select {
    flex: 1;
    min-width: 90px;
    padding: 4px 8px;
    font-size: 0.75rem;
    background: rgba(0, 20, 40, 0.8);
    border: 1px solid #0af;
    color: #0af;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .admiral-card-large {
        width: 260px;
        height: 440px;
    }

    .admiral-card-image {
        font-size: 6rem;
    }

    .admiral-card-name {
        font-size: 1rem;
    }

    .admiral-card-trait {
        font-size: 0.75rem;
    }
}
/* ============================================================
   ОСНОВНАЯ ВКЛАДКА «АДМИРАЛЫ» — СРЕДНИЕ КАРТОЧКИ, 4 В РЯД
   ============================================================ */

/* Две колонки: мои / наём */
.admirals-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 1400px) {
    .admirals-two-column {
        grid-template-columns: 1fr;
    }
}

/* Сетка 4 в ряд с вертикальным скроллом */
.admirals-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 8px 0;
    max-height: 620px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Скроллбар */
.admirals-grid-4::-webkit-scrollbar { width: 6px; }
.admirals-grid-4::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}
.admirals-grid-4::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0af, #0f0);
    border-radius: 3px;
}
.admirals-grid-4::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0cf, #0f9);
}

/* Адаптив */
@media (max-width: 1100px) {
    .admirals-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .admirals-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ===== Карточка среднего размера ===== */
.admiral-card-medium {
    position: relative;
    width: 100%;
    aspect-ratio: 220 / 380;
    min-height: 320px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 170, 255, 0.35);
    background: rgba(10, 15, 25, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.admiral-card-medium:hover {
    border-color: #0af;
    box-shadow:
        0 0 20px rgba(0, 170, 255, 0.4),
        0 8px 30px rgba(0, 0, 0, 0.6);
    transform: translateY(-4px);
}

.admiral-card-medium .admiral-card-image {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: rgba(0, 170, 255, 0.3);
    transition: transform 0.5s ease;
}

.admiral-card-medium:hover .admiral-card-image {
    transform: scale(1.05);
}

.admiral-card-medium .admiral-card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.1) 30%,
        rgba(0, 0, 0, 0.1) 45%,
        rgba(0, 0, 0, 0.75) 75%,
        rgba(5, 10, 20, 0.95) 100%
    );
    pointer-events: none;
}

.admiral-card-medium .admiral-card-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    z-index: 2;
    gap: 4px;
}

.admiral-card-medium .admiral-card-race {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.8px;
    color: #0af;
    text-transform: uppercase;
    background: rgba(0, 20, 40, 0.7);
    border: 1px solid rgba(0, 170, 255, 0.5);
    border-radius: 10px;
    padding: 2px 7px;
    backdrop-filter: blur(4px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.admiral-card-medium .admiral-card-level {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.8px;
    color: #0f0;
    background: rgba(0, 40, 20, 0.7);
    border: 1px solid rgba(0, 255, 100, 0.5);
    border-radius: 10px;
    padding: 2px 7px;
    backdrop-filter: blur(4px);
    font-weight: bold;
    white-space: nowrap;
}

.admiral-card-medium .admiral-card-bottom {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 8px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.admiral-card-medium .admiral-card-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 170, 255, 0.7), 0 2px 4px rgba(0, 0, 0, 0.9);
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admiral-card-medium .admiral-card-trait {
    font-size: 0.65rem;
    color: #ffe066;
    line-height: 1.25;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 1.6em;
}

.admiral-card-medium .admiral-card-exp {
    font-size: 0.65rem;
    color: #88aadd;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.admiral-card-medium .admiral-card-exp i {
    color: #ffd700;
    margin-right: 3px;
}

.admiral-card-medium .admiral-card-status {
    font-size: 0.65rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    margin-top: 2px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.admiral-card-medium .admiral-card-status span {
    color: #ff0;
    font-weight: bold;
}

.admiral-card-medium .hire-cost {
    color: #ff0;
    font-size: 0.65rem;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(255, 255, 0, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 0, 0.2);
}

.admiral-card-medium .admiral-card-buttons {
    display: flex;
    gap: 4px;
    margin-top: 3px;
    flex-wrap: wrap;
}

.admiral-card-medium .admiral-button {
    flex: 1;
    min-width: 45px;
    padding: 3px 5px;
    font-size: 0.6rem;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.admiral-card-medium .admiral-select {
    flex: 1 1 100%;
    min-width: 80px;
    padding: 2px 5px;
    font-size: 0.6rem;
    background: rgba(0, 20, 40, 0.8);
    border: 1px solid #0af;
    color: #0af;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    margin-top: 2px;
}
/* ============================================================
   КОМПАКТНАЯ ПАНЕЛЬ БАЗЫ (base-header)
   ============================================================ */

/* Сжимаем заголовок базы */
.base-header {
    padding: 12px 20px !important;
    margin-bottom: 15px !important;
    gap: 12px !important;
    border-radius: 8px !important;
}

/* Заголовок h1 внутри базы */
.base-header .base-title h1 {
    font-size: 1.3rem !important;
    gap: 10px !important;
    text-shadow: 0 0 8px var(--cyber-blue) !important;
}

.base-header .base-title h1 i {
    font-size: 1.3rem !important;
}

/* Плашка уровня рядом с заголовком */
.base-header .base-level {
    padding: 4px 12px !important;
    font-size: 0.75rem !important;
    border-radius: 14px !important;
}

/* Блок статистики справа (щиты / броня / система) */
.base-header .base-stats {
    gap: 6px !important;
}

.base-header .stat-item {
    padding: 4px 10px !important;
    gap: 6px !important;
    border-radius: 6px !important;
}

.base-header .stat-item i {
    font-size: 0.9rem !important;
}

.base-header .stat-label {
    font-size: 0.65rem !important;
    letter-spacing: 0.5px !important;
}

.base-header .stat-value {
    font-size: 0.85rem !important;
}

/* Отступ вкладок от сжатой панели */
.base-tabs {
    margin-bottom: 15px !important;
    padding-bottom: 8px !important;
}

/****************
/* ============================================================
   ПРОЗРАЧНЫЕ ПАНЕЛИ АДМИРАЛОВ
   ============================================================ */

/* Обе колонки вкладки «Адмиралы» — полупрозрачные */
.admirals-two-column > div > .mil-frame {
    background: rgba(10, 15, 25, 0.45) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 170, 255, 0.3) !important;
}

/* Строка заголовка внутри панели — чуть плотнее, чтобы читалась */
.admirals-two-column > div > .mil-frame > .mil-frame-header {
    background: rgba(0, 20, 40, 0.35);
    border-radius: 4px;
    padding: 6px 10px;
    margin-bottom: 8px;
}
/* ============================================================
   НОВЫЙ АНГАР — индивидуальные корабли
   ============================================================ */

.hangar-new-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 15px;
    align-items: start;
}

@media (max-width: 1000px) {
    .hangar-new-container { grid-template-columns: 1fr; }
}

/* Аккордеон */
.hangar-new-accordion {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: 600px;
    overflow-y: auto;
}
.hangar-new-accordion::-webkit-scrollbar { width: 5px; }
.hangar-new-accordion::-webkit-scrollbar-thumb {
    background: rgba(0, 170, 255, 0.4);
    border-radius: 3px;
}

.hangar-new-class { width: 100%; }

.hangar-new-class-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: rgba(10, 15, 25, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid #333;
    color: #ccc;
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.8px;
    transition: all 0.2s;
    user-select: none;
}
.hangar-new-class-header:hover {
    background: rgba(0, 170, 255, 0.12);
    border-color: #0af;
}
.hangar-new-class-header.open {
    background: rgba(0, 170, 255, 0.15);
    border-color: #0af;
}
.hangar-new-class-header.empty { opacity: 0.55; }

.hangar-new-class-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0 4px 10px;
    background: rgba(0, 0, 0, 0.25);
    border-left: 1px solid #333;
    border-right: 1px solid #333;
    border-bottom: 1px solid #333;
    animation: hangarAccordion 0.2s ease-out;
}
@keyframes hangarAccordion {
    from { opacity: 0; transform: translateY(-3px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hangar-new-type-item {
    padding: 6px 10px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.78rem;
    color: #ccc;
}
.hangar-new-type-item:hover {
    background: rgba(0, 170, 255, 0.1);
    border-color: #0af;
}
.hangar-new-type-item.active {
    background: rgba(0, 170, 255, 0.2) !important;
    border-color: #0af !important;
    color: #fff;
    box-shadow: inset 0 0 8px rgba(0, 170, 255, 0.2);
}
.hangar-new-type-item.empty { opacity: 0.5; }

.hangar-new-type-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hangar-new-type-count {
    color: #0f0;
    font-weight: bold;
    font-size: 0.75rem;
}
.hangar-new-type-item.empty .hangar-new-type-count { color: #666; }

/* Правая колонка */
.hangar-new-content { min-height: 400px; }

.hangar-new-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 12px;
    padding: 5px 0;
    max-height: 640px;
    overflow-y: auto;
}
.hangar-new-cards-grid::-webkit-scrollbar { width: 6px; }
.hangar-new-cards-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0af, #0f0);
    border-radius: 3px;
}
@media (max-width: 900px) {
    .hangar-new-cards-grid { grid-template-columns: 1fr; }
}

/* ===== Карточки кораблей в ангаре — компактные ===== */

.hangar-new-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    padding: 5px 0;
    max-height: 640px;
    overflow-y: auto;
}
.hangar-new-cards-grid::-webkit-scrollbar { width: 6px; }
.hangar-new-cards-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0af, #0f0);
    border-radius: 3px;
}
@media (max-width: 900px) {
    .hangar-new-cards-grid { grid-template-columns: repeat(2, 1fr); }
}

.hangar-ship-card {
    position: relative;
    width: 100%;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 170, 255, 0.35);
    background: rgba(10, 15, 25, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}
.hangar-ship-card:hover {
    border-color: #0af;
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.4), 0 6px 25px rgba(0, 0, 0, 0.6);
    transform: translateY(-2px);
}

.hangar-ship-card-image {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: rgba(0, 170, 255, 0.25);
    transition: transform 0.5s ease;
}
.hangar-ship-card:hover .hangar-ship-card-image { transform: scale(1.05); }

.hangar-ship-card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(5, 10, 20, 0.88) 0%,
        rgba(5, 10, 20, 0.5) 50%,
        rgba(5, 10, 20, 0.88) 100%
    );
    pointer-events: none;
}

.hangar-ship-card-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 8px;
    z-index: 2;
}

.hangar-ship-card-level,
.hangar-ship-card-exp {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    border-radius: 9px;
    padding: 1px 6px;
    backdrop-filter: blur(4px);
    font-weight: bold;
}
.hangar-ship-card-level {
    color: #0f0;
    background: rgba(0, 40, 20, 0.75);
    border: 1px solid rgba(0, 255, 100, 0.5);
}
.hangar-ship-card-exp {
    color: #ffd700;
    background: rgba(40, 30, 0, 0.75);
    border: 1px solid rgba(255, 200, 0, 0.4);
}

.hangar-ship-card-bottom {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 5px 8px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hangar-ship-card-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 8px rgba(0, 170, 255, 0.7), 0 2px 4px rgba(0, 0, 0, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hangar-ship-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.65rem;
    color: #ccc;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.hangar-stat { white-space: nowrap; }
.hangar-stat.danger { color: #ff5555; font-weight: bold; }

.hangar-ship-card-rank {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.hangar-ship-card-buttons {
    display: flex;
    gap: 4px;
    margin-top: 2px;
}

.hangar-fleet-select {
    flex: 1;
    padding: 2px 4px;
    background: rgba(0, 20, 40, 0.85);
    border: 1px solid #0af;
    color: #0af;
    border-radius: 3px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
    min-width: 0;
}
.hangar-fleet-select:hover {
    background: rgba(0, 40, 80, 0.9);
    box-shadow: 0 0 8px rgba(0, 170, 255, 0.4);
}
.hangar-fleet-select option { background: #0a1420; color: #0af; }

.hangar-action-btn {
    padding: 2px 6px;
    background: rgba(255, 170, 0, 0.15);
    border: 1px solid #ffaa00;
    color: #ffaa00;
    border-radius: 3px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
    white-space: nowrap;
}
.hangar-action-btn:hover {
    background: rgba(255, 170, 0, 0.3);
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.4);
}
/* ============================================================
   ПРОКРУЧИВАЕМЫЙ СПИСОК ФЛОТОВ
   ============================================================ */

.fleets-scroll-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 400px);  /* высота экрана минус шапка, чат и т.д. */
    min-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;               /* отступ для скроллбара */
    padding-bottom: 5px;
}

/* Скроллбар */
.fleets-scroll-wrapper::-webkit-scrollbar {
    width: 8px;
}
.fleets-scroll-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}
.fleets-scroll-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0af, #0f0);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.5);
}
.fleets-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0cf, #0f9);
}

/* Firefox */
.fleets-scroll-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #0af rgba(0, 0, 0, 0.3);
}

/* Мобильный */
@media (max-width: 768px) {
    .fleets-scroll-wrapper {
        max-height: 400px;
    }
}
/* ============================================================
   ФОРМИРОВАНИЕ ФЛОТОВ — ТРИ КОЛОНКИ
   ============================================================ */

.fleet-forming-container {
    display: grid;
    grid-template-columns: minmax(380px, 440px) 1fr 260px;
    gap: 12px;
    align-items: start;
    width: 100%;
}

@media (max-width: 1500px) {
    .fleet-forming-container {
        grid-template-columns: minmax(360px, 420px) 1fr 240px;
    }
}

@media (max-width: 1200px) {
    .fleet-forming-container {
        grid-template-columns: 1fr;
    }
}

.fleet-forming-left,
.fleet-forming-center,
.fleet-forming-right {
    min-width: 0;
}

/* Карточка флота — курсор и подсветка выбранного */
.fleet-card-wrapper {
    transition: all 0.2s ease;
}
.fleet-card-wrapper:hover {
    transform: translateY(-1px);
}
.fleet-card-wrapper.selected {
    /* Подсветка задаётся инлайн */
}

/* Центральная колонка */
.fleet-forming-center {
    min-height: 400px;
}

.fleet-forming-ships-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

/* Карточка корабля в составе флота */
.fleet-forming-ship-card {
    position: relative;
    width: 100%;
    height: 130px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 170, 255, 0.35);
    background: rgba(10, 15, 25, 0.6);
    backdrop-filter: blur(6px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}
.fleet-forming-ship-card:hover {
    border-color: #0af;
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.4);
    transform: translateY(-2px);
}

/* Правая колонка — резерв */
.fleet-forming-right {
    min-width: 0;
}

.reserve-class-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-bottom: 8px;
    max-height: 90px;
    overflow-y: auto;
}

.reserve-class-tab {
    background: rgba(0, 243, 255, 0.05);
    border: 1px solid rgba(0, 243, 255, 0.2);
    color: #888;
    padding: 3px 7px;
    font-size: 0.65rem;
    font-family: 'Share Tech Mono', monospace;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.reserve-class-tab:hover {
    background: rgba(0, 243, 255, 0.15);
    border-color: #0af;
    color: #0af;
}
.reserve-class-tab.active {
    background: rgba(0, 243, 255, 0.2);
    border-color: #0af;
    color: #0af;
    box-shadow: 0 0 8px rgba(0, 170, 255, 0.3);
}
.reserve-class-tab.empty {
    opacity: 0.4;
}

.reserve-cards-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 3px;
}
.reserve-cards-list::-webkit-scrollbar { width: 5px; }
.reserve-cards-list::-webkit-scrollbar-thumb {
    background: rgba(0, 170, 255, 0.4);
    border-radius: 3px;
}

/* Мини-карточка корабля в резерве */
.reserve-mini-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 7px;
    background: rgba(10, 15, 25, 0.6);
    border: 1px solid rgba(0, 170, 255, 0.25);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    backdrop-filter: blur(4px);
}
.reserve-mini-card:hover {
    background: rgba(0, 170, 255, 0.15);
    border-color: #0af;
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.3);
    transform: translateX(-2px);
}

.reserve-mini-card-img {
    width: 36px;
    height: 36px;
    background-size: cover;
    background-position: center;
    background-color: #0a0a0a;
    border: 1px solid rgba(0, 170, 255, 0.3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: rgba(0, 170, 255, 0.4);
    flex-shrink: 0;
}

.reserve-mini-card-info {
    flex: 1;
    min-width: 0;
}

.reserve-mini-card-name {
    font-size: 0.72rem;
    color: #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Share Tech Mono', monospace;
}

.reserve-mini-card-stats {
    display: flex;
    gap: 6px;
    font-size: 0.65rem;
    color: #888;
    font-family: 'Share Tech Mono', monospace;
    margin-top: 2px;
}
.reserve-mini-card-stats .danger {
    color: #ff5555;
    font-weight: bold;
}
/* Ксеносы: кнопки и вкладки — перебиваем захардкоженные hex'ы */
html[data-race="4"] .mil-action {
    background: rgba(255, 59, 31, 0.1);
    border-color: var(--cyber-blue);
    color: var(--cyber-blue);
}
html[data-race="4"] .mil-action:hover {
    background: rgba(255, 59, 31, 0.22);
    box-shadow: 0 0 10px rgba(255, 59, 31, 0.4);
}
html[data-race="4"] .mil-action.success {
    background: rgba(255, 138, 30, 0.15);
    border-color: var(--cyber-green);
    color: var(--cyber-green);
}
html[data-race="4"] .mil-action.danger {
    background: rgba(212, 26, 10, 0.15);
    border-color: var(--cyber-red);
    color: var(--cyber-red);
}

html[data-race="4"] .base-tab {
    background: rgba(255, 59, 31, 0.06);
    border-color: rgba(255, 59, 31, 0.25);
}
html[data-race="4"] .base-tab:hover {
    background: rgba(255, 59, 31, 0.15);
    border-color: var(--cyber-blue);
}
html[data-race="4"] .base-tab.active {
    background: rgba(255, 59, 31, 0.18);
    border-color: var(--cyber-blue);
}

html[data-race="4"] .fleet-subtab {
    background: rgba(30, 10, 10, 0.6);
    border-color: rgba(255, 59, 31, 0.3);
    color: var(--cyber-blue);
}
html[data-race="4"] .fleet-subtab.active {
    background: rgba(255, 59, 31, 0.15);
    color: var(--cyber-green);
    border-color: var(--cyber-green);
}
/* ===== ВИДЕО В КАРТОЧКЕ АДМИРАЛА ===== */
.admiral-card-image {
    position: relative;
    overflow: hidden;
}

.admiral-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
    background: transparent;
}

.admiral-video.active {
    opacity: 1;
}

/* Оверлей и текст — поверх видео */
.admiral-card-overlay { z-index: 2; }
.admiral-card-top,
.admiral-card-bottom { z-index: 3; }

/* ============================================================
   ЭКОНОМИКА — ТРИ КОЛОНКИ
   ============================================================ */

.economy-container {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    gap: 12px;
    align-items: start;
    width: 100%;
}

@media (max-width: 1400px) {
    .economy-container {
        grid-template-columns: 240px 1fr 260px;
    }
}

@media (max-width: 1100px) {
    .economy-container {
        grid-template-columns: 1fr;
    }
}

/* === Левая колонка === */
.economy-sidebar {
    min-width: 0;
}

.economy-group {
    margin-bottom: 4px;
}

.economy-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: rgba(10, 15, 25, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid #333;
    color: #ccc;
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.8px;
    transition: all 0.2s;
    user-select: none;
}

.economy-group-header:hover {
    background: rgba(0, 170, 255, 0.12);
    border-color: #0af;
}

.economy-group-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0 4px 10px;
    background: rgba(0, 0, 0, 0.25);
    border-left: 1px solid #333;
    border-right: 1px solid #333;
    border-bottom: 1px solid #333;
    max-height: 320px;
    overflow-y: auto;
    animation: economyAccordion 0.2s ease-out;
}

.economy-group-body.hidden {
    display: none;
}

@keyframes economyAccordion {
    from { opacity: 0; transform: translateY(-3px); }
    to   { opacity: 1; transform: translateY(0); }
}

.economy-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.15s;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.78rem;
    color: #ccc;
}

.economy-list-item:hover {
    background: rgba(0, 170, 255, 0.1);
    border-color: #0af;
}

.economy-list-item.active {
    background: rgba(0, 170, 255, 0.2) !important;
    border-color: #0af !important;
    color: #fff;
    box-shadow: inset 0 0 8px rgba(0, 170, 255, 0.2);
}

.economy-item-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.economy-item-sub {
    color: #666;
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}

.economy-empty {
    padding: 10px;
    text-align: center;
    color: #666;
    font-size: 0.75rem;
    font-style: italic;
}

/* === Центральная колонка === */
.economy-main {
    min-width: 0;
    min-height: 500px;
}

.economy-details-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 800px) {
    .economy-details-grid {
        grid-template-columns: 1fr;
    }
}

.economy-details-image {
    width: 100%;
    aspect-ratio: 1;
    background: radial-gradient(circle at 30% 30%, rgba(0, 170, 255, 0.15), rgba(0, 0, 0, 0.6));
    border: 1px solid rgba(0, 170, 255, 0.4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    box-shadow: inset 0 0 40px rgba(0, 170, 255, 0.1);
}

.economy-details-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.economy-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    color: #ddd;
}

.economy-detail-label {
    color: #888;
}

.economy-resource-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.8rem;
    color: #ccc;
}

.economy-resource-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.economy-resource-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* === Правая колонка === */
.economy-summary {
    min-width: 0;
}

.economy-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.economy-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.economy-stat i {
    font-size: 1.3rem;
}

.economy-stat-value {
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    font-family: 'Share Tech Mono', monospace;
}

.economy-stat-label {
    font-size: 0.65rem;
    color: #888;
    letter-spacing: 0.5px;
}

.economy-summary-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: 500px;
    overflow-y: auto;
}

.economy-summary-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 6px;
    align-items: center;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid #0af;
    border-radius: 3px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
}

.economy-summary-name {
    color: #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.economy-summary-total {
    color: #fff;
    font-weight: bold;
}

.economy-summary-rate {
    color: #0f0;
    font-size: 0.7rem;
}

/*******
/* ============================================================
   ПРОЗРАЧНОСТЬ ПАНЕЛЕЙ ЭКОНОМИКИ — как у адмиралов
   ============================================================ */

/* Все три колонки — стеклянный фон */
.economy-container .mil-frame,
.economy-sidebar .mil-frame,
.economy-main .mil-frame,
.economy-summary .mil-frame {
    background: rgba(10, 15, 25, 0.45) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 170, 255, 0.3) !important;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.4),
        inset 0 0 40px rgba(0, 170, 255, 0.05);
}

/* Заголовки внутри панелей — чуть плотнее для читаемости */
.economy-container .mil-frame > .mil-frame-header {
    background: rgba(0, 20, 40, 0.35);
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 10px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Внутренние блоки (детали планеты/астероида) — тоже прозрачные */
.economy-details-image {
    background: radial-gradient(
        circle at 30% 30%,
        rgba(0, 170, 255, 0.15),
        rgba(10, 15, 25, 0.5)
    ) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Аккордеон групп — полупрозрачный фон */
.economy-group-body {
    background: rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Карточки объектов в списке — прозрачные, при наведении чуть ярче */
.economy-list-item {
    background: rgba(255, 255, 255, 0.02) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.economy-list-item:hover {
    background: rgba(0, 170, 255, 0.1) !important;
}

.economy-list-item.active {
    background: rgba(0, 170, 255, 0.2) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Правый столбец — статистические плашки тоже прозрачные */
.economy-stat {
    background: rgba(0, 20, 40, 0.35) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.economy-summary-item {
    background: rgba(0, 20, 40, 0.35) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
/* ============================================================
   КАРТОЧКИ ЮНИТОВ — вертикальные, с картинкой и видео
   ============================================================ */
.unit-card {
    position: relative;
    width: 140px;
    height: 200px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(0, 170, 255, 0.35);
    background: rgba(10, 15, 25, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    flex-shrink: 0;
}
.unit-card:hover {
    border-color: #0af;
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.4), 0 6px 25px rgba(0, 0, 0, 0.6);
    transform: translateY(-2px);
}
.unit-card-image {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: rgba(0, 170, 255, 0.3);
    transition: transform 0.5s ease;
}
.unit-card:hover .unit-card-image { transform: scale(1.05); }

.unit-video {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
    background: transparent;
}
.unit-video.active { opacity: 1; }

.unit-card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.1) 35%,
        rgba(0, 0, 0, 0.75) 70%,
        rgba(5, 10, 20, 0.95) 100%
    );
    pointer-events: none;
    z-index: 2;
}
.unit-card-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    z-index: 3;
    gap: 4px;
}
.unit-card-level,
.unit-card-exp {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    border-radius: 9px;
    padding: 1px 6px;
    font-weight: bold;
}
.unit-card-level {
    color: #0f0;
    background: rgba(0, 40, 20, 0.75);
    border: 1px solid rgba(0, 255, 100, 0.5);
}
.unit-card-exp {
    color: #ffd700;
    background: rgba(40, 30, 0, 0.75);
    border: 1px solid rgba(255, 200, 0, 0.4);
}
.unit-card-bottom {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 8px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.unit-card-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 8px rgba(0, 170, 255, 0.7), 0 2px 4px rgba(0, 0, 0, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.unit-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.65rem;
    color: #ccc;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.unit-card-stats .danger { color: #ff5555; font-weight: bold; }
.unit-card-rank {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.unit-card-buttons {
    display: flex;
    gap: 4px;
    margin-top: 3px;
}
.unit-cards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 5px 0;
}
/* ===== Посадка на корабли: группировка по флотам ===== */
.fleet-forming-left .hangar-new-class-body {
    padding: 6px 0 6px 10px;
    background: rgba(0, 0, 0, 0.25);
    border-left: 1px solid #333;
    border-right: 1px solid #333;
    border-bottom: 1px solid #333;
}
.fleet-forming-left .hangar-new-class-body .fleet-card-wrapper {
    margin: 4px 8px !important;
}