/* Hollowcore Hub V2 - Morrhollow Security Terminal Style */
/* Glowing, slick, semi-transparent with tight spacing */

:root {
    --hc-gap-xs: 3px;
    --hc-gap-sm: 4px;
    --hc-gap-md: 6px;
    --hc-gap-lg: 8px;
    --hc-pad-xs: 4px;
    --hc-pad-sm: 6px;
    --hc-pad-md: 8px;
    --hc-pad-lg: 12px;

    /* Morrhollow Terminal Colors */
    --hc-bg-dark: rgba(15, 15, 25, 0.95);
    --hc-bg-darker: rgba(8, 8, 15, 0.98);
    --hc-blue-glow: #93C5FD;
    --hc-blue-accent: #00d4ff;
    --hc-gold-accent: rgba(212, 175, 55, 0.9);
    --hc-gold-border: rgba(212, 175, 55, 0.4);
}

.panel-hollowcore {
    position: fixed;
    top: 50px;
    left: 10px;
    width: min(1000px, calc(100vw - 20px));
    max-width: 1000px;
    height: calc(100vh - 100px);
    max-height: 700px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    border-radius: 6px;
    overflow: hidden;
    /* Morrhollow-style multi-layer glow shadow */
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.9),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 40px rgba(147, 197, 253, 0.15),
        0 0 20px rgba(212, 175, 55, 0.1);
    border: 1px solid var(--hc-gold-border);
    font-family: 'RemiliaMincho', serif;
    font-size: 12px;
    color: #E5E7EB;
    user-select: none;
    background: transparent;
    animation: hc-panel-slide-in 0.3s ease-out;
    margin: 0;
    padding: 0;
}

/* CRITICAL: Remove padding from .panel-content wrapper */
.panel-hollowcore .panel-content {
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

/* Hide the auto-generated .panel-close button (we have our own .close-btn in header) */
.panel-hollowcore .panel-close {
    display: none !important;
}

@keyframes hc-panel-slide-in {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.panel-hollowcore::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
        var(--hc-bg-dark) 0%,
        var(--hc-bg-darker) 50%,
        var(--hc-bg-dark) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: -1;
}

/* Glowing border pulse animation */
@keyframes hc-border-glow {
    0%, 100% {
        box-shadow:
            0 4px 30px rgba(0, 0, 0, 0.9),
            inset 0 1px 0 rgba(255, 255, 255, 0.1),
            0 0 40px rgba(147, 197, 253, 0.15),
            0 0 20px rgba(212, 175, 55, 0.1);
    }
    50% {
        box-shadow:
            0 4px 30px rgba(0, 0, 0, 0.9),
            inset 0 1px 0 rgba(255, 255, 255, 0.15),
            0 0 50px rgba(147, 197, 253, 0.25),
            0 0 30px rgba(212, 175, 55, 0.2);
    }
}

/* Header - Compact Single Row */
.hollowcore-hub-header {
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.95) 0%,
        rgba(51, 65, 85, 0.98) 100%);
    min-height: 30px;
    max-height: 30px;
    border-bottom: 1px solid var(--hc-gold-border);
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 2px 10px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(147, 197, 253, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 6px;
    margin: 0;
    flex-shrink: 0;
    position: relative;
    z-index: 20;
    gap: 8px;
}

.hollowcore-hub-header h2 {
    font-size: 11px;
    color: var(--hc-gold-accent);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    opacity: 0.9;
    white-space: nowrap;
    text-shadow:
        0 0 10px rgba(147, 197, 253, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.8);
}

@keyframes hc-title-pulse {
    0%, 100% {
        text-shadow:
            0 0 10px rgba(147, 197, 253, 0.3),
            0 1px 2px rgba(0, 0, 0, 0.8);
    }
    50% {
        text-shadow:
            0 0 15px rgba(147, 197, 253, 0.5),
            0 0 5px rgba(212, 175, 55, 0.3),
            0 1px 2px rgba(0, 0, 0, 0.8);
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MOBILE PORTRAIT MODE - HOLLOWCORE HUB V2 OPTIMIZATIONS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 900px) and (orientation: portrait) {
    /* Panel goes fullscreen */
    .panel-hollowcore {
        position: fixed !important;
        top: var(--header-height) !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: calc(100vh - var(--header-height)) !important;
        max-height: none !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border-left: none;
        border-right: none;
        animation: none;
        transform: none !important;
    }

    /* Header becomes sticky and taller for touch */
    .hollowcore-hub-header {
        position: sticky;
        top: 0;
        z-index: 100;
        min-height: 48px;
        max-height: 48px;
        padding: 8px 12px;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        gap: 12px;
        flex-wrap: nowrap;
    }

    .hollowcore-hub-header h2 {
        font-size: 16px;
        flex-shrink: 0;
    }

    .header-companion-display {
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .companion-icon-img,
    .companion-icon {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    .companion-name-compact {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 14px;
    }

    .header-actions {
        display: flex;
        gap: 8px;
        flex-shrink: 0;
    }

    .icon-btn {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        padding: 0;
    }

    /* Tabs - horizontal scroll on mobile */
    .hollowcore-hub-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 8px 12px;
        gap: 8px;
        flex-wrap: nowrap;
        min-height: 56px;
        position: sticky;
        top: 48px;
        z-index: 99;
    }

    .hollowcore-hub-tabs::-webkit-scrollbar {
        display: none;
    }

    .hub-tab {
        flex-shrink: 0;
        min-width: 90px;
        min-height: 44px;
        padding: 10px 16px;
        font-size: 13px;
        gap: 6px;
        flex-direction: column;
        justify-content: center;
        border-radius: 8px;
    }

    .hub-tab .tab-icon {
        font-size: 20px;
    }

    .hub-tab .tab-text {
        font-size: 11px;
        font-weight: 600;
    }

    /* Body content */
    .hollowcore-hub-body {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 16px;
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }

    /* ===== STATS/PROFILE TAB MOBILE ===== */

    .stats-container,
    .profile-container {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .stats-grid,
    .profile-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        grid-template-columns: none !important;
    }

    .stat-card,
    .profile-card {
        min-height: 72px;
        padding: 16px;
        border-radius: 12px;
    }

    .stat-label {
        font-size: 12px;
        margin-bottom: 8px;
    }

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

    /* Resource bars */
    .resource-bar {
        height: 8px;
        border-radius: 4px;
        margin-top: 8px;
    }

    /* ===== CHAT TAB MOBILE ===== */

    .chat-container {
        display: flex;
        flex-direction: column;
        height: 100%;
        gap: 0;
    }

    .chat-messages {
        flex: 1;
        overflow-y: auto;
        padding: 12px;
        margin-bottom: 12px;
        min-height: 300px;
    }

    .chat-message {
        margin-bottom: 12px;
        padding: 12px;
        border-radius: 12px;
        max-width: 85%;
        font-size: 15px;
        line-height: 1.5;
    }

    .chat-message.user {
        margin-left: auto;
    }

    .chat-message.assistant {
        margin-right: auto;
    }

    .chat-input-area {
        position: sticky;
        bottom: 0;
        background: linear-gradient(to top,
            var(--hc-bg-darker) 80%,
            transparent);
        padding: 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid var(--hc-gold-border);
        z-index: 10;
    }

    .chat-input-container {
        display: flex;
        gap: 8px;
        align-items: flex-end;
    }

    .chat-input {
        flex: 1;
        min-height: 48px;
        max-height: 120px;
        font-size: 16px;
        padding: 12px 16px;
        border-radius: 24px;
        resize: none;
    }

    .chat-send-btn {
        min-width: 48px;
        min-height: 48px;
        border-radius: 24px;
        font-size: 20px;
        flex-shrink: 0;
    }

    /* ===== CARE TAB MOBILE ===== */

    .care-container {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .care-actions-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        grid-template-columns: none !important;
    }

    .care-action-card {
        min-height: 80px;
        padding: 16px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .care-action-icon {
        font-size: 32px;
        flex-shrink: 0;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

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

    .care-action-title {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 4px;
    }

    .care-action-desc {
        font-size: 13px;
        opacity: 0.8;
        line-height: 1.4;
    }

    .care-action-btn {
        min-width: 80px;
        min-height: 44px;
        font-size: 14px;
        padding: 10px 16px;
        border-radius: 12px;
        flex-shrink: 0;
    }

    .care-action-cooldown {
        font-size: 11px;
        text-align: right;
    }

    /* Battery display in care tab */
    .care-battery-display {
        padding: 16px;
        border-radius: 12px;
        text-align: center;
        margin-bottom: 16px;
    }

    .care-battery-value {
        font-size: 32px;
        font-weight: 700;
        margin: 8px 0;
    }

    /* ===== IMPACTS TAB MOBILE ===== */

    .impacts-container {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .impacts-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .impact-card {
        min-height: 100px;
        padding: 16px;
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.2s;
    }

    .impact-card:active {
        transform: scale(0.98);
    }

    .impact-header {
        display: flex;
        justify-content: space-between;
        align-items: start;
        margin-bottom: 12px;
    }

    .impact-title {
        font-size: 16px;
        font-weight: 600;
        flex: 1;
    }

    .impact-cost {
        font-size: 13px;
        flex-shrink: 0;
        padding: 4px 12px;
        border-radius: 8px;
        background: rgba(0, 0, 0, 0.3);
    }

    .impact-description {
        font-size: 14px;
        line-height: 1.5;
        opacity: 0.9;
        margin-bottom: 12px;
    }

    .impact-rewards {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        font-size: 12px;
    }

    .impact-reward-badge {
        padding: 4px 10px;
        border-radius: 8px;
        background: rgba(0, 212, 255, 0.15);
        border: 1px solid rgba(0, 212, 255, 0.3);
    }

    /* ===== SUMMON TAB MOBILE ===== */

    .summon-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding-bottom: 20px;
    }

    .summon-hero {
        text-align: center;
        padding: 24px 16px;
        border-radius: 12px;
        background: linear-gradient(135deg,
            rgba(212, 175, 55, 0.08),
            rgba(147, 197, 253, 0.05));
        border: 1px solid var(--hc-gold-border);
    }

    .summon-hero-icon {
        font-size: 64px;
        margin-bottom: 16px;
    }

    .summon-hero-title {
        font-size: 20px;
        font-weight: 700;
        color: var(--hc-gold-accent);
        margin-bottom: 8px;
    }

    .summon-hero-subtitle {
        font-size: 14px;
        opacity: 0.8;
        line-height: 1.6;
    }

    .summon-stats {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .summon-stat-card {
        padding: 16px;
        border-radius: 12px;
        background: rgba(0, 0, 0, 0.2);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .summon-stat-label {
        font-size: 13px;
        opacity: 0.8;
    }

    .summon-stat-value {
        font-size: 18px;
        font-weight: 700;
        color: var(--hc-gold-accent);
    }

    .summon-action-btn {
        width: 100%;
        min-height: 56px;
        font-size: 18px;
        font-weight: 700;
        border-radius: 16px;
        margin-top: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .summon-info-box {
        padding: 16px;
        border-radius: 12px;
        background: rgba(147, 197, 253, 0.08);
        border: 1px solid rgba(147, 197, 253, 0.2);
        font-size: 13px;
        line-height: 1.6;
    }

    /* ===== GENERAL MOBILE IMPROVEMENTS ===== */

    /* All buttons full width by default */
    .hollowcore-hub-body button:not(.icon-btn):not(.hub-tab):not(.chat-send-btn) {
        width: 100%;
        min-height: 48px;
        font-size: 16px;
        padding: 12px 20px;
        border-radius: 12px;
        margin: 8px 0;
    }

    /* Info boxes */
    .info-box,
    .warning-box,
    .error-box {
        padding: 16px;
        border-radius: 12px;
        font-size: 14px;
        line-height: 1.6;
        margin: 12px 0;
    }

    /* Loading states */
    .loading-spinner {
        width: 48px;
        height: 48px;
        margin: 40px auto;
    }

    .empty-state {
        text-align: center;
        padding: 60px 20px;
        font-size: 15px;
    }

    .empty-state-icon {
        font-size: 64px;
        opacity: 0.4;
        margin-bottom: 16px;
    }

    /* Forms */
    .hollowcore-hub-body input,
    .hollowcore-hub-body select,
    .hollowcore-hub-body textarea {
        width: 100%;
        min-height: 48px;
        font-size: 16px;
        padding: 12px 16px;
        border-radius: 12px;
        margin: 8px 0;
    }

    /* Grids to columns */
    .two-column-grid,
    .three-column-grid,
    .four-column-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    /* Horizontal scrollers for small cards */
    .horizontal-scroller {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 12px;
        padding: 8px 0;
        margin: 0 -16px;
        padding-left: 16px;
        padding-right: 16px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .horizontal-scroller::-webkit-scrollbar {
        display: none;
    }

    .horizontal-scroller > * {
        flex-shrink: 0;
        min-width: 200px;
    }
}

.hollowcore-hub-header .wallet-actions {
    display: flex;
    gap: 2px;
    align-items: center;
}

/* Tabs - Morrhollow Terminal Button Style */
.hollowcore-hub-tabs {
    display: flex;
    gap: var(--hc-gap-sm);
    padding: var(--hc-pad-sm) var(--hc-pad-sm);
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.2) 100%);
    border-bottom: 1px solid var(--hc-gold-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    min-height: 2.25rem;
}

.hub-tab {
    flex: 1;
    padding: var(--hc-pad-sm) var(--hc-pad-md);
    background: linear-gradient(135deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.4) 100%);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 4px;
    color: rgba(186, 166, 116, 0.8);
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--hc-gap-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

/* Morrhollow sweep effect */
.hub-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(147, 197, 253, 0.15),
        transparent);
    transition: left 0.5s ease;
}

.hub-tab:hover {
    background: linear-gradient(135deg,
        rgba(30, 41, 59, 0.5) 0%,
        rgba(51, 65, 85, 0.6) 100%);
    border-color: var(--hc-blue-glow);
    color: #ffffff;
    box-shadow:
        0 0 10px rgba(147, 197, 253, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.hub-tab:hover::before {
    left: 100%;
}

.hub-tab.active {
    background: linear-gradient(135deg,
        rgba(147, 197, 253, 0.15) 0%,
        rgba(147, 197, 253, 0.25) 100%);
    border-color: var(--hc-blue-glow);
    color: var(--hc-blue-glow);
    box-shadow:
        0 0 15px rgba(147, 197, 253, 0.4),
        inset 0 0 10px rgba(147, 197, 253, 0.1);
}

/* Glowing active underline */
.hub-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 4px;
    right: 4px;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        var(--hc-blue-glow),
        transparent);
    animation: hc-tab-glow 1.5s ease-in-out infinite;
}

@keyframes hc-tab-glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Body - FIXED HEIGHT, NO SCROLL */
.hollowcore-hub-body {
    flex: 1;
    overflow: hidden;
    background: transparent;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* ===== TAB 1: CHAT VIEW ===== */

.chat-view-v2 {
    display: grid;
    grid-template-columns: 240px 1fr;
    height: 100%;
    gap: var(--hc-gap-md);
    padding: var(--hc-pad-xs);
    overflow: hidden;
    min-width: 0;
}

/* Companion Card - Morrhollow Terminal Style */
.chat-companion-card {
    display: flex;
    flex-direction: column;
    gap: var(--hc-gap-sm);
    background: linear-gradient(180deg,
        var(--hc-bg-dark) 0%,
        var(--hc-bg-darker) 100%);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 6px;
    padding: var(--hc-pad-sm);
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 0;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 10px rgba(147, 197, 253, 0.1);
}

.companion-portrait-large {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid var(--hc-blue-glow);
    box-shadow:
        0 0 15px rgba(147, 197, 253, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: hc-portrait-glow 3s ease-in-out infinite;
}

@keyframes hc-portrait-glow {
    0%, 100% {
        box-shadow:
            0 0 15px rgba(147, 197, 253, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow:
            0 0 25px rgba(147, 197, 253, 0.5),
            0 0 10px rgba(212, 175, 55, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
}

.companion-portrait-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.companion-stage-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.9), rgba(186, 166, 116, 0.9));
    color: rgba(30, 41, 59, 1);
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.companion-identity {
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    margin: calc(var(--hc-pad-xs) * -1) 0 var(--hc-pad-xs) 0;
}

.companion-name {
    font-size: 14px;
    font-weight: 700;
    color: rgba(212, 175, 55, 1);
    margin: 0 0 2px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.companion-archetype {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.7);
    margin-bottom: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.companion-affinity,
.companion-temperament {
    font-size: 8px;
    color: rgba(186, 166, 116, 0.6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.companion-vital-stats {
    display: flex;
    flex-direction: column;
    gap: var(--hc-gap-sm);
}

.vital-bar {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 100%;
    min-width: 0;
}

.vital-label {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.6);
    text-transform: uppercase;
}

.vital-bar-container {
    height: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.vital-bar-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.vital-value {
    font-size: 9px;
    color: rgba(212, 175, 55, 0.9);
    font-weight: 600;
    text-align: right;
}

.chat-economy-info {
    padding-top: var(--hc-pad-sm);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    margin-top: var(--hc-gap-sm);
}

.economy-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
    font-size: 8px;
    min-width: 0;
}

.economy-item .label {
    color: rgba(186, 166, 116, 0.6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.economy-item .value {
    color: rgba(212, 175, 55, 0.9);
    font-weight: 600;
    flex-shrink: 0;
}

/* Chat Area - Morrhollow Terminal Style */
.chat-main-area {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 100%);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 6px;
    overflow: hidden;
    min-width: 0;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 10px rgba(147, 197, 253, 0.1);
}

.chat-messages-compact {
    flex: 1;
    padding: var(--hc-pad-md);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: var(--hc-gap-md);
    min-width: 0;
}

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

.chat-messages-compact::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.chat-messages-compact::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 2px;
}

.chat-welcome {
    text-align: center;
    padding: 32px 16px;
    color: rgba(186, 166, 116, 0.6);
}

.welcome-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.welcome-text {
    font-size: 12px;
    margin-bottom: 16px;
    color: rgba(212, 175, 55, 0.8);
}

.quick-starts {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

.quick-start-btn {
    padding: 6px 12px;
    background: linear-gradient(180deg,
        rgba(212, 175, 55, 0.1) 0%,
        rgba(212, 175, 55, 0.05) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    color: rgba(212, 175, 55, 0.9);
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.quick-start-btn:hover {
    background: linear-gradient(180deg,
        rgba(212, 175, 55, 0.2) 0%,
        rgba(212, 175, 55, 0.1) 100%);
    border-color: rgba(212, 175, 55, 0.5);
}

.chat-msg-compact {
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 4px;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

.chat-msg-compact.user {
    background: linear-gradient(180deg,
        rgba(212, 175, 55, 0.15) 0%,
        rgba(212, 175, 55, 0.08) 100%);
    border-left: 3px solid rgba(212, 175, 55, 0.6);
    margin-left: 20px;
}

.chat-msg-compact.assistant {
    background: linear-gradient(180deg,
        rgba(59, 130, 246, 0.1) 0%,
        rgba(59, 130, 246, 0.05) 100%);
    border-left: 3px solid rgba(59, 130, 246, 0.5);
    margin-right: 20px;
}

.chat-msg-compact.system {
    background: rgba(250, 166, 26, 0.1);
    border-left: 3px solid rgba(250, 166, 26, 0.5);
    color: rgba(250, 166, 26, 0.9);
    font-style: italic;
    text-align: center;
    font-size: 10px;
}

.msg-author {
    font-size: 9px;
    font-weight: 600;
    color: rgba(186, 166, 116, 0.7);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.msg-content {
    font-size: 11px;
    color: rgba(229, 231, 235, 0.95);
    line-height: 1.4;
    word-wrap: break-word;
    word-break: break-word; /* Ensure long words break */
    overflow-wrap: break-word;
    max-width: 100%;
}

.chat-input-zone {
    padding: var(--hc-pad-sm);
    background: rgba(30, 41, 59, 0.5);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.chat-cost-indicator {
    font-size: 8px;
    color: rgba(212, 175, 55, 0.7);
    text-align: center;
    min-height: 10px;
    margin-bottom: var(--hc-gap-xs);
}

.chat-input-row {
    display: flex;
    gap: var(--hc-gap-sm);
}

.chat-input-compact {
    flex: 1;
    padding: var(--hc-pad-sm) var(--hc-pad-md);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    color: rgba(229, 231, 235, 0.95);
    font-size: 10px;
    font-family: 'RemiliaMincho', serif;
}

.chat-input-compact:focus {
    outline: none;
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(0, 0, 0, 0.4);
}

.chat-input-compact:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-send-compact {
    padding: 8px 16px;
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.3) 0%,
        rgba(212, 175, 55, 0.2) 100%);
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 4px;
    color: rgba(212, 175, 55, 1);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.chat-send-compact:hover:not(:disabled) {
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.4) 0%,
        rgba(212, 175, 55, 0.3) 100%);
    transform: translateY(-1px);
}

.chat-send-compact:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== TAB 2: CARE VIEW ===== */

.care-view-v2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    height: 100%;
    gap: var(--hc-gap-md);
    padding: var(--hc-pad-xs);
    overflow: hidden;
}

.care-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 120px;
    gap: var(--hc-gap-sm);
    align-content: start;
    overflow-y: auto;
    padding-right: 2px;
}

.care-actions-grid::-webkit-scrollbar {
    width: 4px;
}

.care-actions-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.care-actions-grid::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 2px;
}

.care-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--hc-gap-xs);
    padding: var(--hc-pad-sm);
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    transition: all 0.15s ease;
}

.care-action-card:hover {
    border-color: rgba(212, 175, 55, 0.5);
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.5) 0%,
        rgba(30, 41, 59, 0.7) 100%);
}

.action-icon {
    font-size: 28px;
}

.action-name {
    font-size: 12px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.9);
}

.action-desc {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.6);
    text-align: center;
    flex: 1;
}

.action-stats {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-change {
    font-size: 9px;
    padding: 2px 6px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 3px;
    color: rgba(34, 197, 94, 0.9);
}

.action-cost {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 8px;
    color: rgba(186, 166, 116, 0.7);
    text-align: center;
}

.cost-item {
    font-size: 8px;
    color: rgba(186, 166, 116, 0.8);
}

.cost-item.free {
    color: rgba(34, 197, 94, 0.9);
    font-weight: 600;
}

.stat-change {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
}

.stat-change.positive {
    color: rgba(34, 197, 94, 0.9);
}

.stat-change.negative {
    color: rgba(239, 68, 68, 0.9);
}

.stat-note {
    font-size: 7px;
    color: rgba(186, 166, 116, 0.5);
    font-style: italic;
}

.condition.neutral {
    background: rgba(147, 197, 253, 0.1);
    border: 1px solid rgba(147, 197, 253, 0.3);
    color: rgba(147, 197, 253, 0.9);
}

.action-btn {
    padding: 6px 16px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    border-radius: 4px;
    color: white;
    font-family: 'RemiliaMincho', serif;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
}

.action-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-1px);
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.care-status-panel {
    display: flex;
    flex-direction: column;
    gap: var(--hc-gap-sm);
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    padding: var(--hc-pad-sm);
}

.status-header {
    padding-bottom: var(--hc-pad-sm);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.status-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.9);
    margin: 0 0 4px 0;
}

.status-timestamp {
    font-size: 8px;
    color: rgba(186, 166, 116, 0.5);
}

.status-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-conditions {
    padding-top: 8px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.condition-title {
    font-size: 10px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.9);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.conditions-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.condition {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
}

.condition.positive {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: rgba(34, 197, 94, 0.9);
}

.condition.negative {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: rgba(239, 68, 68, 0.9);
}

/* ===== ENHANCED CARE VIEW ===== */

.care-enhanced {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    height: 100%;
    overflow-y: auto;
}

/* Care Recommendations */
.care-recommendations {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 12px;
}

.recommendations-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.recommendations-icon {
    font-size: 20px;
}

.recommendations-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.95);
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.recommendation-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    transition: all 0.2s ease;
}

.recommendation-item.critical {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: rgba(255, 150, 150, 0.95);
    animation: pulse-critical 2s infinite;
}

.recommendation-item.moderate {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.4);
    color: rgba(251, 191, 36, 0.95);
}

.recommendation-item.info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: rgba(147, 197, 253, 0.95);
}

@keyframes pulse-critical {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.rec-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.rec-text {
    flex: 1;
}

/* Care Status Overview */
.care-status-overview {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.4) 0%, rgba(51, 65, 85, 0.6) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    padding: 14px;
}

.status-main {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-badge.optimal {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: rgba(34, 197, 94, 0.95);
}

.status-badge.stable {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: rgba(147, 197, 253, 0.95);
}

.status-badge.anxious {
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.5);
    color: rgba(251, 191, 36, 0.95);
}

.status-badge.rusty {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: rgba(255, 150, 150, 0.95);
}

.proto-badge-care {
    padding: 4px 10px;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.5);
    border-radius: 12px;
    font-size: 11px;
    color: rgba(196, 181, 253, 0.95);
}

.vitals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.vital-card-enhanced {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    padding: 10px;
}

.vital-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.vital-icon {
    font-size: 18px;
    flex-shrink: 0;
}

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

.vital-name {
    font-size: 12px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.95);
    margin-bottom: 2px;
}

.vital-description {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.6);
    line-height: 1.2;
}

.vital-value {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.vital-value.healthy {
    color: rgba(34, 197, 94, 0.95);
}

.vital-value.warning {
    color: rgba(251, 191, 36, 0.95);
}

.vital-value.critical {
    color: rgba(239, 68, 68, 0.95);
}

.vital-bar-container {
    margin-top: 6px;
}

.vital-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.vital-bar-fill {
    height: 100%;
    transition: width 0.5s ease, background 0.3s ease;
    border-radius: 3px;
}

.vital-bar-fill.critical {
    animation: pulse-bar 1.5s infinite;
}

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

.status-effects-enhanced {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.effects-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.8);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.effect {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
}

.effect.positive {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.effect.negative {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.effect-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.effect-text {
    flex: 1;
    color: rgba(212, 175, 55, 0.95);
}

/* Care Actions Enhanced */
.care-actions-enhanced {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.actions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.actions-title {
    font-size: 15px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.95);
}

.resources-display {
    display: flex;
    gap: 12px;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.95);
}

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

.care-actions-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.care-card-enhanced {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.5) 0%, rgba(51, 65, 85, 0.7) 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    padding: 14px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.care-card-enhanced:hover {
    border-color: rgba(212, 175, 55, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.care-card-enhanced.insufficient {
    opacity: 0.5;
    border-color: rgba(239, 68, 68, 0.4);
}

.care-card-enhanced.insufficient:hover {
    transform: none;
    box-shadow: none;
}

.care-card-enhanced.recommended {
    border-color: rgba(34, 197, 94, 0.6);
    animation: glow-recommended 2s infinite;
}

@keyframes glow-recommended {
    0%, 100% {
        box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
    }
    50% {
        box-shadow: 0 0 16px rgba(34, 197, 94, 0.5);
    }
}

.care-card-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.care-icon-large {
    font-size: 32px;
    flex-shrink: 0;
}

.care-card-title {
    flex: 1;
}

.care-card-title h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.95);
}

.care-description {
    margin: 0;
    font-size: 10px;
    color: rgba(186, 166, 116, 0.7);
    line-height: 1.3;
}

.care-card-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.care-effect-detail,
.care-cost-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.effect-label,
.cost-label {
    color: rgba(186, 166, 116, 0.7);
    font-weight: 500;
}

.effect-value {
    font-weight: 700;
}

.effect-value.positive {
    color: rgba(34, 197, 94, 0.95);
}

.effect-value.coolant {
    color: rgba(59, 130, 246, 0.95);
}

.cost-value {
    color: rgba(212, 175, 55, 0.95);
    font-weight: 600;
}

.care-btn-enhanced {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.8) 0%, rgba(22, 163, 74, 0.9) 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-family: 'RemiliaMincho', serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.care-btn-enhanced:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.9) 0%, rgba(21, 128, 61, 1) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.3);
}

.care-btn-enhanced:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(100, 100, 100, 0.3);
    color: rgba(200, 200, 200, 0.6);
}

/* Care Lore Footer */
.care-lore-footer {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 12px;
}

.lore-text {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 11px;
    color: rgba(186, 166, 116, 0.8);
    line-height: 1.5;
    font-style: italic;
}

.lore-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* Header companion display (non-interactive) */
.header-companion-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
}

.header-companion-display .companion-icon-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.header-companion-display .companion-icon {
    font-size: 20px;
}

.header-companion-display .companion-name-compact {
    font-size: 13px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.95);
}

/* Responsive adjustments for enhanced care */
@media (max-width: 768px) {
    .care-actions-grid-enhanced {
        grid-template-columns: 1fr;
    }

    .vitals-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== TAB 3: STATS VIEW ===== */

.stats-view-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
    gap: var(--hc-gap-md);
    padding: var(--hc-pad-xs);
    overflow: hidden;
}

.stats-column {
    display: flex;
    flex-direction: column;
    gap: var(--hc-gap-sm);
    overflow-y: auto;
    padding-right: 2px;
}

.stats-column::-webkit-scrollbar {
    width: 4px;
}

.stats-column::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.stats-column::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 2px;
}

.stats-section {
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    padding: var(--hc-pad-sm);
}

.stats-section-title {
    font-size: 11px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.9);
    margin: 0 0 var(--hc-gap-sm) 0;
    text-transform: uppercase;
}

.stat-grid {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    background: linear-gradient(90deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.15) 100%);
    border-left: 2px solid;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.stat-card:hover {
    background: linear-gradient(90deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 100%);
    transform: translateX(2px);
}

.stat-icon {
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 0 2px currentColor);
}

.stat-label {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex: 1;
    white-space: nowrap;
}

.stat-value {
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    min-width: 40px;
    text-align: right;
}

.stat-bar-mini {
    flex: 1;
    height: 4px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    max-width: 60px;
}

.stat-bar-fill-mini {
    height: 100%;
    transition: width 0.3s ease;
    position: relative;
    border-radius: 2px;
}

.stat-bar-fill-mini::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.3) 0%,
        transparent 100%);
}

.personality-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.personality-trait {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
}

.trait-label {
    color: rgba(186, 166, 116, 0.6);
}

.trait-value {
    color: rgba(212, 175, 55, 0.9);
    font-weight: 600;
}

.affinity-display {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.affinity-primary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.affinity-icon {
    font-size: 32px;
}

.affinity-name {
    font-size: 11px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.9);
}

.affinity-level {
    font-size: 8px;
    color: rgba(186, 166, 116, 0.6);
    text-transform: uppercase;
}

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

.affinity-icon-small {
    font-size: 20px;
}

.affinity-name-small {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.7);
}

.affinity-level-small {
    font-size: 7px;
    color: rgba(186, 166, 116, 0.5);
}

.evolution-progress {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.evolution-current {
    text-align: center;
}

.evolution-stage-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(186, 166, 116, 0.15));
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(212, 175, 55, 1);
    text-transform: uppercase;
}

.evolution-stage-name {
    font-size: 14px;
    color: rgba(212, 175, 55, 0.9);
    margin-top: 6px;
}

.evolution-path {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.path-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.path-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    background: rgba(30, 41, 59, 0.5);
    color: rgba(186, 166, 116, 0.5);
}

.path-stage.current .path-dot {
    background: rgba(212, 175, 55, 0.3);
    border-color: rgba(212, 175, 55, 0.8);
    color: rgba(212, 175, 55, 1);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.path-stage.completed .path-dot {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.6);
    color: rgba(34, 197, 94, 1);
}

.path-name {
    font-size: 8px;
    color: rgba(186, 166, 116, 0.6);
}

.path-stage.current .path-name {
    color: rgba(212, 175, 55, 0.9);
    font-weight: 600;
}

.metadata-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metadata-item {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
}

.meta-label {
    color: rgba(186, 166, 116, 0.6);
}

.meta-value {
    color: rgba(212, 175, 55, 0.9);
    font-weight: 600;
    font-family: monospace;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.quick-stat-btn {
    padding: 8px;
    background: linear-gradient(180deg,
        rgba(212, 175, 55, 0.1) 0%,
        rgba(212, 175, 55, 0.05) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    color: rgba(212, 175, 55, 0.9);
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.quick-stat-btn:hover {
    background: linear-gradient(180deg,
        rgba(212, 175, 55, 0.2) 0%,
        rgba(212, 175, 55, 0.1) 100%);
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-1px);
}

.companion-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.companion-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.companion-mini:hover {
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(0, 0, 0, 0.3);
}

.companion-mini.active {
    border-color: rgba(212, 175, 55, 0.8);
    background: rgba(212, 175, 55, 0.1);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.3);
}

.mini-portrait-tiny {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.mini-portrait-tiny img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-name-tiny {
    font-size: 8px;
    color: rgba(186, 166, 116, 0.8);
    text-align: center;
}

/* Personality Matrix */
.personality-matrix {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.matrix-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 2px solid rgba(147, 197, 253, 0.3);
    border-radius: 2px;
    transition: all 0.15s ease;
}

.matrix-row:hover {
    background: rgba(0, 0, 0, 0.3);
    border-left-color: rgba(147, 197, 253, 0.5);
}

.matrix-label {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.matrix-value {
    font-size: 10px;
    color: rgba(147, 197, 253, 0.9);
    font-weight: 600;
}

.matrix-value.archetype {
    color: rgba(212, 175, 55, 0.95);
}

.matrix-value.element {
    color: rgba(139, 92, 246, 0.9);
}

.matrix-value.prime {
    color: rgba(34, 197, 94, 0.9);
}

/* Bonds Mini Grid */
.bonds-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.bond-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    transition: all 0.15s ease;
}

.bond-mini:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-1px);
}

.bond-icon {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

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

.bond-label {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.bond-value {
    font-size: 10px;
    font-weight: 700;
}

/* Metadata Grid Updates */
.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.meta-row:last-child {
    border-bottom: none;
}

.meta-row span:first-child {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 10px;
    color: rgba(147, 197, 253, 0.9);
    font-weight: 600;
}

/* ===== TAB 4: IMPACTS VIEW =====

.impacts-view-v2 {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 12px;
    padding: 8px;
    overflow-y: auto;
}

/* Compact Status Bar */
.impacts-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.7) 100%);
    border: 1px solid rgba(147, 197, 253, 0.25);
    border-radius: 8px;
    padding: 10px 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.status-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.status-indicator.status-positive {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: rgba(34, 197, 94, 1);
}

.status-indicator.status-neutral {
    background: rgba(147, 197, 253, 0.15);
    border: 1px solid rgba(147, 197, 253, 0.4);
    color: rgba(147, 197, 253, 1);
}

.status-indicator.status-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: rgba(245, 158, 11, 1);
}

.status-indicator.status-negative {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: rgba(239, 68, 68, 1);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s ease-in-out infinite;
}

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

.status-message {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-vitals {
    display: flex;
    gap: 10px;
}

.vital-compact {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 8px;
}

.vital-label {
    color: rgba(186, 166, 116, 0.7);
    font-weight: 600;
    min-width: 28px;
}

.vital-bar {
    width: 40px;
    height: 6px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(147, 197, 253, 0.2);
}

.vital-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.vital-value {
    color: rgba(212, 175, 55, 0.9);
    font-weight: 600;
    min-width: 18px;
    text-align: right;
}

.info-toggle-btn {
    padding: 6px;
    background: rgba(147, 197, 253, 0.1);
    border: 1px solid rgba(147, 197, 253, 0.3);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.info-toggle-btn:hover {
    background: rgba(147, 197, 253, 0.2);
    border-color: rgba(147, 197, 253, 0.5);
}

.info-icon {
    font-size: 11px;
    font-weight: bold;
    color: rgba(147, 197, 253, 0.9);
}

/* Explainer Box */
.impacts-explainer {
    animation: slideDown 0.3s ease;
}

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

.explainer-box {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.08) 0%,
        rgba(37, 99, 235, 0.12) 100%);
    border: 1px solid rgba(147, 197, 253, 0.3);
    border-radius: 8px;
    padding: 14px;
}

.explainer-box h4 {
    margin: 0 0 10px 0;
    font-size: 12px;
    color: rgba(147, 197, 253, 0.95);
    font-weight: 600;
}

.explainer-box > p {
    margin: 0 0 12px 0;
    font-size: 9px;
    line-height: 1.5;
    color: rgba(186, 166, 116, 0.85);
}

.explainer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.explainer-item {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(147, 197, 253, 0.15);
    border-radius: 6px;
    padding: 8px;
}

.explainer-item strong {
    display: block;
    font-size: 9px;
    color: rgba(212, 175, 55, 0.95);
    margin-bottom: 4px;
}

.explainer-item p {
    font-size: 8px;
    line-height: 1.4;
    color: rgba(186, 166, 116, 0.75);
    margin: 0;
}

/* Main Content */
.impacts-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

.impacts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.impacts-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.95);
    margin: 0;
}

.impacts-count {
    font-size: 9px;
    color: rgba(147, 197, 253, 0.7);
    padding: 3px 8px;
    background: rgba(147, 197, 253, 0.1);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 10px;
}

.impacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

/* Impact Cards */
.impact-card {
    background: linear-gradient(135deg,
        rgba(30, 41, 59, 0.5) 0%,
        rgba(51, 65, 85, 0.6) 100%);
    border: 1px solid rgba(147, 197, 253, 0.25);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.impact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(147, 197, 253, 0.5) 50%,
        transparent 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.impact-card:hover {
    border-color: rgba(147, 197, 253, 0.5);
    box-shadow: 0 4px 20px rgba(147, 197, 253, 0.15);
    transform: translateY(-2px);
}

.impact-card:hover::before {
    opacity: 1;
}

.impact-card-header {
    display: flex;
    justify-content: flex-start;
}

.impact-difficulty {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid currentColor;
    border-radius: 12px;
    font-size: 9px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.2);
}

.diff-icon {
    font-size: 10px;
}

.impact-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.95);
    line-height: 1.3;
    margin: 0;
}

.impact-desc {
    font-size: 10px;
    color: rgba(186, 166, 116, 0.8);
    line-height: 1.5;
    flex: 1;
}

/* Economy Section - The Key Addition! */
.impact-economy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(147, 197, 253, 0.15);
    border-radius: 6px;
}

.economy-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.economy-item.cost {
    align-items: flex-start;
}

.economy-item.reward {
    align-items: flex-end;
}

.economy-label {
    font-size: 7px;
    text-transform: uppercase;
    color: rgba(147, 197, 253, 0.6);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.economy-value {
    font-size: 11px;
    font-weight: 700;
    color: rgba(212, 175, 55, 0.95);
}

.economy-item.cost .economy-value {
    color: rgba(34, 197, 94, 0.9);
}

.economy-detail {
    font-size: 7px;
    color: rgba(186, 166, 116, 0.7);
}

.economy-divider {
    font-size: 14px;
    color: rgba(147, 197, 253, 0.4);
    font-weight: 300;
}

.impact-themes {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.theme-tag {
    font-size: 7px;
    padding: 3px 7px;
    background: rgba(147, 197, 253, 0.12);
    border: 1px solid rgba(147, 197, 253, 0.25);
    border-radius: 10px;
    color: rgba(147, 197, 253, 0.85);
}

/* Action Button */
.impact-start-btn {
    padding: 10px 16px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: 1px solid rgba(147, 197, 253, 0.4);
    border-radius: 6px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.impact-start-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.impact-start-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 10px;
}

.btn-text {
    font-size: 10px;
}

/* No Impacts State */
.no-impacts-container {
    text-align: center;
    padding: 50px 20px;
    color: rgba(186, 166, 116, 0.6);
}

.no-impacts-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.no-impacts-container h4 {
    font-size: 14px;
    color: rgba(186, 166, 116, 0.85);
    margin: 0 0 8px 0;
}

.no-impacts-container p {
    font-size: 10px;
    margin: 4px 0;
}

.no-impacts-hint {
    color: rgba(147, 197, 253, 0.75);
    font-style: italic;
    margin-top: 6px;
}

/* Resource Error Styling */
.no-impacts-container.resource-error {
    color: rgba(186, 166, 116, 0.9);
}

.refresh-impacts-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.refresh-impacts-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3);
}

/* ===== NEW: CURRENT MISSION SECTION ===== */

.current-mission-section {
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-title {
    font-size: 14px;
    font-weight: 700;
    color: rgba(186, 166, 116, 1);
    margin: 0;
    letter-spacing: 0.5px;
}

.section-subtitle {
    font-size: 9px;
    color: rgba(147, 197, 253, 0.6);
    font-weight: 400;
}

.section-count {
    font-size: 9px;
    color: rgba(147, 197, 253, 0.7);
    padding: 3px 8px;
    background: rgba(147, 197, 253, 0.1);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 10px;
}

.current-mission-card-large {
    background: linear-gradient(135deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.7) 100%);
    border: 2px solid rgba(147, 197, 253, 0.4);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(147, 197, 253, 0.2);
}

.current-mission-card-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(147, 197, 253, 0.7) 50%,
        transparent 100%);
}

.mission-header-large {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.mission-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mission-difficulty {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px solid currentColor;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mission-chapter {
    font-size: 9px;
    color: rgba(147, 197, 253, 0.7);
    padding: 4px 10px;
    background: rgba(147, 197, 253, 0.1);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 10px;
}

.mission-title-large {
    font-size: 18px;
    font-weight: 700;
    color: rgba(186, 166, 116, 1);
    margin: 0;
    line-height: 1.3;
}

.mission-desc-large {
    font-size: 11px;
    line-height: 1.6;
    color: rgba(186, 166, 116, 0.8);
    margin: 0;
}

.mission-economy-large {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    border: 1px solid rgba(147, 197, 253, 0.15);
}

.mission-themes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mission-continue-btn {
    padding: 14px 20px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: 1px solid rgba(147, 197, 253, 0.5);
    border-radius: 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.mission-continue-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
    transform: translateY(-2px);
}

.mission-continue-btn:active {
    transform: translateY(0);
}

/* ===== MISSION HISTORY SECTION ===== */

.mission-history-section {
    margin-top: 24px;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.history-card {
    background: linear-gradient(135deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.4) 100%);
    border: 1px solid rgba(147, 197, 253, 0.15);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.history-card:hover {
    border-color: rgba(147, 197, 253, 0.3);
    background: linear-gradient(135deg,
        rgba(30, 41, 59, 0.4) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    transform: translateY(-2px);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-icon {
    font-size: 12px;
    color: #22c55e;
}

.history-date {
    font-size: 8px;
    color: rgba(147, 197, 253, 0.5);
}

.history-title {
    font-size: 11px;
    font-weight: 600;
    color: rgba(186, 166, 116, 0.9);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.history-reward {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(147, 197, 253, 0.08);
    border-radius: 6px;
    align-self: flex-start;
}

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

.reward-amount {
    font-size: 10px;
    font-weight: 600;
    color: rgba(147, 197, 253, 0.9);
}

/* ===== TAB 4: EVOLUTION VIEW (OLD) ===== */

.evolution-view-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
    gap: var(--hc-gap-md);
    padding: var(--hc-pad-xs);
    overflow: hidden;
}

.evolution-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--hc-gap-md);
    padding: var(--hc-pad-sm);
}

.evolution-stage-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--hc-gap-sm);
    padding: var(--hc-pad-sm);
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    flex: 1;
    max-width: 200px;
}

.evolution-stage-card.current {
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.evolution-stage-card.next {
    border-color: rgba(139, 92, 246, 0.4);
}

.stage-header {
    font-size: 9px;
    font-weight: 600;
    color: rgba(186, 166, 116, 0.6);
    text-transform: uppercase;
}

.stage-portrait {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid rgba(212, 175, 55, 0.4);
}

.stage-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stage-portrait.locked {
    background: rgba(0, 0, 0, 0.5);
}

.locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
}

.lock-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.unlock-text {
    font-size: 8px;
    color: rgba(186, 166, 116, 0.7);
    text-align: center;
    padding: 0 8px;
}

.stage-badge {
    font-size: 10px;
    font-weight: 700;
    color: rgba(212, 175, 55, 1);
}

.stage-name {
    font-size: 12px;
    color: rgba(212, 175, 55, 0.9);
}

.stage-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    width: 100%;
}

.mini-stat {
    font-size: 9px;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 3px;
    text-align: center;
    color: rgba(212, 175, 55, 0.9);
}

.mini-stat.projected {
    color: rgba(139, 92, 246, 0.9);
    border-color: rgba(139, 92, 246, 0.3);
}

.evolution-arrow {
    font-size: 32px;
    color: rgba(212, 175, 55, 0.5);
}

.evolution-requirements {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding-right: 4px;
}

.evolution-requirements::-webkit-scrollbar {
    width: 4px;
}

.evolution-requirements::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.evolution-requirements::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 2px;
}

.requirements-section {
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    padding: 8px;
}

.req-title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.9);
    margin: 0 0 6px 0;
    text-transform: uppercase;
}

.requirements-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.requirement-item {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 4px;
}

.requirement-item.met {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.05);
}

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

.req-text {
    font-size: 10px;
    color: rgba(186, 166, 116, 0.8);
}

.req-progress {
    font-size: 9px;
    color: rgba(212, 175, 55, 0.9);
    font-weight: 600;
}

.impacts-section {
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    padding: 8px;
}

.impact-title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.9);
    margin: 0 0 6px 0;
    text-transform: uppercase;
}

.impacts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.impact-card-legacy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.impact-card-legacy:hover {
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(0, 0, 0, 0.3);
}

.impact-icon {
    font-size: 24px;
    text-align: center;
}

.impact-name {
    font-size: 10px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.9);
    text-align: center;
}

.impact-desc {
    font-size: 8px;
    color: rgba(186, 166, 116, 0.6);
    text-align: center;
    flex: 1;
}

.impact-rewards {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
}

.reward-item {
    font-size: 8px;
    padding: 2px 4px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 2px;
    color: rgba(139, 92, 246, 0.9);
}

.impact-btn {
    padding: 4px 10px;
    background: linear-gradient(135deg,
        rgba(139, 92, 246, 0.3) 0%,
        rgba(139, 92, 246, 0.2) 100%);
    border: 1px solid rgba(139, 92, 246, 0.5);
    border-radius: 3px;
    color: rgba(139, 92, 246, 1);
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
}

.impact-btn:hover {
    background: linear-gradient(135deg,
        rgba(139, 92, 246, 0.4) 0%,
        rgba(139, 92, 246, 0.3) 100%);
}

.no-impacts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: rgba(186, 166, 116, 0.5);
    font-size: 10px;
}

.evolution-action {
    padding: 12px;
}

.evolve-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.3) 0%,
        rgba(212, 175, 55, 0.2) 100%);
    border: 1px solid rgba(212, 175, 55, 0.6);
    border-radius: 6px;
    color: rgba(212, 175, 55, 1);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
}

.evolve-btn:hover {
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.4) 0%,
        rgba(212, 175, 55, 0.3) 100%);
    transform: translateY(-1px);
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.4);
}

/* ===== NO COMPANION STATE ===== */

.no-companion-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
    text-align: center;
    color: rgba(186, 166, 116, 0.6);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-companion-state h3 {
    font-size: 18px;
    color: rgba(212, 175, 55, 0.9);
    margin: 0 0 8px 0;
}

.no-companion-state p {
    font-size: 12px;
    margin: 0 0 20px 0;
}

.empty-actions {
    display: flex;
    gap: 12px;
}

.summon-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.3) 0%,
        rgba(212, 175, 55, 0.2) 100%);
    border: 1px solid rgba(212, 175, 55, 0.6);
    border-radius: 6px;
    color: rgba(212, 175, 55, 1);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
}

.summon-btn:hover {
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.4) 0%,
        rgba(212, 175, 55, 0.3) 100%);
    transform: translateY(-1px);
}

.summon-btn.secondary {
    background: linear-gradient(135deg,
        rgba(51, 65, 85, 0.4) 0%,
        rgba(30, 41, 59, 0.6) 100%);
    border-color: rgba(212, 175, 55, 0.3);
    color: rgba(186, 166, 116, 0.9);
}

/* ===== TAB 5: SUMMON VIEW ===== */

.summon-view-v2 {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 100%;
    gap: var(--hc-gap-md);
    padding: var(--hc-pad-xs);
    overflow: hidden;
}

/* Collection Stats Panel */
.collection-stats-panel {
    display: flex;
    flex-direction: column;
    gap: var(--hc-gap-md);
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    padding: var(--hc-pad-sm);
    overflow-y: auto;
}

.stats-header h3 {
    font-size: 14px;
    color: rgba(212, 175, 55, 0.9);
    margin: 0;
    text-transform: uppercase;
}

.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.collection-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 4px;
}

.collection-stat-card .stat-icon {
    font-size: 20px;
}

.collection-stat-card .stat-value {
    font-size: 16px;
    font-weight: 700;
    color: rgba(212, 175, 55, 1);
}

.collection-stat-card .stat-label {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.6);
    text-transform: uppercase;
}

.rarity-distribution {
    padding-top: 8px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.rarity-distribution h4 {
    font-size: 11px;
    color: rgba(212, 175, 55, 0.9);
    margin: 0 0 8px 0;
    text-transform: uppercase;
}

.rarity-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rarity-bar {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.rarity-info {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
}

.rarity-name {
    color: rgba(186, 166, 116, 0.8);
}

.rarity-percent {
    color: rgba(212, 175, 55, 0.9);
    font-weight: 600;
}

.rarity-bar-fill {
    height: 4px;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.recent-summons {
    padding-top: 8px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.recent-summons h4 {
    font-size: 11px;
    color: rgba(212, 175, 55, 0.9);
    margin: 0 0 8px 0;
    text-transform: uppercase;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.recent-summon-item {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 6px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 4px;
    transition: all 0.15s ease;
}

.recent-summon-item:hover {
    border-color: rgba(212, 175, 55, 0.3);
    background: rgba(0, 0, 0, 0.3);
}

.summon-portrait-tiny {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.3);
    flex-shrink: 0;
}

.summon-portrait-tiny img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.summon-details {
    flex: 1;
    min-width: 0;
}

.summon-name {
    font-size: 10px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summon-date {
    font-size: 8px;
    color: rgba(186, 166, 116, 0.6);
}

.no-summons {
    text-align: center;
    padding: 12px;
    color: rgba(186, 166, 116, 0.5);
    font-size: 9px;
    font-style: italic;
}

/* Summon Interface */
.summon-interface {
    display: flex;
    flex-direction: column;
    gap: var(--hc-gap-md);
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    padding: var(--hc-pad-lg);
    overflow-y: auto;
}

.summon-showcase {
    text-align: center;
    padding: 20px 0;
}

.showcase-visual {
    margin-bottom: 16px;
}

.summon-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    position: relative;
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, 0.4);
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-glow {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(212, 175, 55, 0.2), rgba(186, 166, 116, 0.1));
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.circle-icon {
    font-size: 48px;
    position: relative;
    z-index: 1;
    animation: float 3s ease-in-out infinite;
}

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

.summon-title {
    font-size: 20px;
    color: rgba(212, 175, 55, 1);
    margin: 0 0 8px 0;
}

.summon-description {
    font-size: 11px;
    color: rgba(186, 166, 116, 0.7);
    line-height: 1.5;
    margin: 0;
    max-width: 500px;
    margin: 0 auto;
}

.summon-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 6px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
}

.detail-label {
    color: rgba(186, 166, 116, 0.6);
}

.detail-value {
    color: rgba(212, 175, 55, 0.9);
    font-weight: 600;
}

.summon-cost {
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 6px;
}

.cost-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.cost-label {
    color: rgba(186, 166, 116, 0.6);
}

.cost-value {
    color: rgba(212, 175, 55, 1);
    font-weight: 700;
}

.summon-ritual-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.4) 0%,
        rgba(212, 175, 55, 0.3) 100%);
    border: 2px solid rgba(212, 175, 55, 0.6);
    border-radius: 8px;
    color: rgba(212, 175, 55, 1);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.summon-ritual-btn:hover {
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.5) 0%,
        rgba(212, 175, 55, 0.4) 100%);
    border-color: rgba(212, 175, 55, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}

.summon-notice {
    text-align: center;
    font-size: 9px;
    color: rgba(186, 166, 116, 0.6);
    font-style: italic;
    padding: 8px;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 4px;
}

/* ===== COMMON ELEMENTS ===== */

/* Negative margin utilities for ultra-tight layouts */
.-mt-xs { margin-top: calc(var(--hc-gap-xs) * -1); }
.-mt-sm { margin-top: calc(var(--hc-gap-sm) * -1); }
.-mb-xs { margin-bottom: calc(var(--hc-gap-xs) * -1); }
.-mb-sm { margin-bottom: calc(var(--hc-gap-sm) * -1); }
.-my-xs { margin-top: calc(var(--hc-gap-xs) * -1); margin-bottom: calc(var(--hc-gap-xs) * -1); }
.-my-sm { margin-top: calc(var(--hc-gap-sm) * -1); margin-bottom: calc(var(--hc-gap-sm) * -1); }

.refresh-btn, .close-btn {
    padding: var(--hc-pad-xs) var(--hc-pad-sm);
    background: linear-gradient(135deg,
        rgba(30, 41, 59, 0.4) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 3px;
    color: rgba(186, 166, 116, 0.8);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.refresh-btn:hover, .close-btn:hover {
    border-color: var(--hc-blue-glow);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(147, 197, 253, 0.3);
    background: linear-gradient(135deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.7) 100%);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.refresh-btn.spinning {
    animation: spin 1s linear infinite;
}

/* ===== RESPONSIVE - MOBILE FIRST ===== */

/* Mobile: Stack everything vertically */
@media (max-width: 768px) {
    .panel-hollowcore {
        top: 50px;
        left: 5px;
        width: calc(100vw - 10px);
        max-width: 100vw;
        height: calc(100vh - 60px);
        max-height: none;
        border-radius: 6px;
    }

    .hollowcore-hub-header h2 {
        font-size: 0.7rem;
    }

    .hollowcore-hub-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .hollowcore-hub-tabs::-webkit-scrollbar {
        display: none;
    }

    .hub-tab {
        min-width: 60px;
        padding: var(--hc-pad-xs) var(--hc-pad-sm);
        font-size: 8px;
    }

    .hub-tab .tab-text {
        display: none;
    }

    .hub-tab .tab-icon {
        font-size: 14px;
    }

    /* Chat View - Stack vertically */
    .chat-view-v2 {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        gap: var(--hc-gap-sm);
        padding: var(--hc-pad-xs);
    }

    .chat-companion-card {
        max-height: 200px;
        overflow-y: auto;
    }

    .companion-portrait-large {
        max-width: 150px;
        margin: 0 auto;
    }

    /* Care View - Single column */
    .care-view-v2 {
        grid-template-columns: 1fr;
        gap: var(--hc-gap-sm);
    }

    .care-actions-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        max-height: 50vh;
    }

    .care-status-panel {
        position: sticky;
        bottom: 0;
        background: rgba(30, 41, 59, 0.95);
    }

    /* Stats View - Single column */
    .stats-view-v2 {
        grid-template-columns: 1fr;
        gap: var(--hc-gap-sm);
    }

    .stats-column {
        max-height: none;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Evolution View - Stack */
    .evolution-view-v2 {
        grid-template-columns: 1fr;
        gap: var(--hc-gap-sm);
    }

    .evolution-comparison {
        flex-direction: column;
        gap: var(--hc-gap-md);
    }

    .evolution-arrow {
        transform: rotate(90deg);
        font-size: 24px;
    }

    /* Summon View - Stack */
    .summon-view-v2 {
        grid-template-columns: 1fr;
        gap: var(--hc-gap-sm);
    }

    .collection-stats-panel {
        max-height: 200px;
        overflow-y: auto;
    }

    .stat-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet: Slightly wider, still compact */
@media (min-width: 769px) and (max-width: 1024px) {
    .panel-hollowcore {
        top: 50px;
        left: 10px;
        width: calc(100vw - 40px);
        max-width: 800px;
    }

    .chat-view-v2 {
        grid-template-columns: 200px 1fr;
    }

    .care-view-v2,
    .stats-view-v2,
    .evolution-view-v2 {
        grid-template-columns: 1fr;
    }

    .evolution-comparison {
        flex-direction: row;
        gap: var(--hc-gap-md);
    }

    .summon-view-v2 {
        grid-template-columns: 1fr;
    }

    .collection-stats-panel {
        max-height: 250px;
    }
}

/* Desktop: Full layout */
@media (min-width: 1025px) {
    .panel-hollowcore {
        top: 50px;
        left: 10px;
        width: min(1000px, calc(100vw - 40px));
    }

    .chat-view-v2 {
        grid-template-columns: 240px 1fr;
    }

    .care-view-v2 {
        grid-template-columns: 2fr 1fr;
    }

    .stats-view-v2,
    .evolution-view-v2 {
        grid-template-columns: 1fr 1fr;
    }

    .summon-view-v2 {
        grid-template-columns: 300px 1fr;
    }
}

/* ==================== HUB STATUS BAR (NEW) ==================== */

.hub-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--hc-gap-md);
}

.hub-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--hc-pad-md) var(--hc-pad-lg);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(212, 175, 55, 0.05) 100%);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 6px;
    margin-top: var(--hc-gap-md);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.active-drone-info {
    display: flex;
    align-items: center;
    gap: var(--hc-gap-lg);
}

.drone-name-badge {
    display: flex;
    align-items: center;
    gap: var(--hc-gap-sm);
    padding: var(--hc-pad-sm) var(--hc-pad-md);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    border: 1px solid rgba(147, 197, 253, 0.2);
}

.drone-name-badge.prototype {
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.08);
}

.drone-name-badge.nft {
    border-color: rgba(147, 197, 253, 0.4);
    background: rgba(147, 197, 253, 0.08);
}

.drone-icon {
    font-size: 16px;
    filter: drop-shadow(0 0 4px currentColor);
}

.drone-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--hc-blue-glow);
    text-shadow: 0 0 8px rgba(147, 197, 253, 0.5);
}

.prototype-tag {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3) 0%, rgba(251, 191, 36, 0.15) 100%);
    border: 1px solid rgba(251, 191, 36, 0.5);
    border-radius: 3px;
    color: #FCD34D;
    text-shadow: 0 0 6px rgba(251, 191, 36, 0.8);
    animation: prototype-pulse 2s ease-in-out infinite;
}

@keyframes prototype-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.drone-switch-btn {
    background: none;
    border: 1px solid rgba(147, 197, 253, 0.3);
    border-radius: 3px;
    padding: 2px 6px;
    color: var(--hc-blue-glow);
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s ease;
}

.drone-switch-btn:hover {
    background: rgba(147, 197, 253, 0.1);
    border-color: rgba(147, 197, 253, 0.6);
    box-shadow: 0 0 8px rgba(147, 197, 253, 0.3);
}

.hub-resources {
    display: flex;
    gap: var(--hc-gap-lg);
}

.resource-badge {
    display: flex;
    align-items: center;
    gap: var(--hc-gap-sm);
    padding: var(--hc-pad-sm) var(--hc-pad-md);
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    border: 1px solid rgba(147, 197, 253, 0.2);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.resource-badge.battery {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.08);
}

.resource-badge.shard {
    border-color: rgba(168, 85, 247, 0.4);
    background: rgba(168, 85, 247, 0.08);
}

.resource-icon {
    font-size: 14px;
    filter: drop-shadow(0 0 3px currentColor);
}

.resource-text {
    font-weight: 600;
    font-size: 12px;
    color: #E5E7EB;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}

/* ==================== IMPROVED CARE ACTION CARDS ==================== */

.care-action-card.insufficient-resources {
    opacity: 0.6;
    border-color: rgba(239, 68, 68, 0.3);
}

.care-action-card.insufficient-resources .action-icon {
    filter: grayscale(0.5);
}

.action-cost .cost-item.insufficient {
    color: #EF4444;
    text-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
    font-weight: 600;
}

.action-hint {
    font-size: 10px;
    color: #93C5FD;
    text-align: center;
    margin-top: var(--hc-gap-sm);
    padding: var(--hc-pad-xs);
    background: rgba(59, 130, 246, 0.08);
    border-radius: 3px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.prototype-warning {
    font-size: 11px;
    color: #FCD34D;
    font-weight: 600;
    padding: var(--hc-pad-xs) var(--hc-pad-sm);
    background: rgba(251, 191, 36, 0.1);
    border-radius: 3px;
    border: 1px solid rgba(251, 191, 36, 0.3);
    text-shadow: 0 0 6px rgba(251, 191, 36, 0.5);
}

/* ==================== DRONE SWITCHER MODAL ==================== */

.drone-switcher-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modal-fade-in 0.2s ease-out;
}

@keyframes modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modal-slide-in {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.drone-switcher-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.drone-switcher-modal .modal-content {
    position: relative;
    width: min(500px, calc(100vw - 40px));
    max-height: 80vh;
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.98) 0%, rgba(8, 8, 15, 0.98) 100%);
    border: 1px solid var(--hc-gold-border);
    border-radius: 8px;
    box-shadow:
        0 10px 50px rgba(0, 0, 0, 0.9),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 30px rgba(147, 197, 253, 0.2);
    padding: 0;
    font-family: 'RemiliaMincho', serif;
    animation: modal-slide-up 0.3s ease-out;
}

@keyframes modal-slide-up {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.drone-switcher-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-bottom: 1px solid rgba(147, 197, 253, 0.2);
}

.drone-switcher-modal .modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--hc-blue-glow);
    text-shadow: 0 0 10px rgba(147, 197, 253, 0.5);
}

.drone-switcher-modal .modal-close {
    background: none;
    border: none;
    color: #93C5FD;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.drone-switcher-modal .modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.drone-switcher-modal .drone-list {
    padding: 16px;
    max-height: 60vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drone-switcher-modal .drone-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.drone-switcher-modal .drone-option:hover {
    background: rgba(0, 212, 255, 0.08);
    border-color: rgba(147, 197, 253, 0.4);
    box-shadow: 0 2px 8px rgba(147, 197, 253, 0.15);
}

.drone-switcher-modal .drone-option.active {
    border-color: var(--hc-gold-accent);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.05) 100%);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

.drone-switcher-modal .drone-option .drone-icon {
    font-size: 24px;
    filter: drop-shadow(0 0 6px currentColor);
}

.drone-switcher-modal .drone-option .drone-info {
    flex: 1;
}

.drone-switcher-modal .drone-option .drone-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--hc-blue-glow);
    text-shadow: 0 0 8px rgba(147, 197, 253, 0.5);
    margin-bottom: 2px;
}

.drone-switcher-modal .drone-option .drone-meta {
    font-size: 11px;
    color: #9CA3AF;
}

.drone-switcher-modal .active-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3) 0%, rgba(212, 175, 55, 0.15) 100%);
    border: 1px solid var(--hc-gold-accent);
    border-radius: 4px;
    color: var(--hc-gold-accent);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.8);
}

.drone-switcher-modal .switch-btn {
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 212, 255, 0.1) 100%);
    border: 1px solid rgba(147, 197, 253, 0.4);
    border-radius: 4px;
    color: var(--hc-blue-glow);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 0 0 6px rgba(147, 197, 253, 0.5);
}

.drone-switcher-modal .switch-btn:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.3) 0%, rgba(0, 212, 255, 0.2) 100%);
    border-color: rgba(147, 197, 253, 0.6);
    box-shadow: 0 0 12px rgba(147, 197, 253, 0.4);
    transform: translateY(-1px);
}

/* Scrollbar for drone list */
.drone-switcher-modal .drone-list::-webkit-scrollbar {
    width: 6px;
}

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

.drone-switcher-modal .drone-list::-webkit-scrollbar-thumb {
    background: rgba(147, 197, 253, 0.3);
    border-radius: 3px;
}

.drone-switcher-modal .drone-list::-webkit-scrollbar-thumb:hover {
    background: rgba(147, 197, 253, 0.5);
}

/* ==================== SUMMON TAB IMPROVEMENTS ==================== */

.collection-info-panel {
    margin-top: var(--hc-gap-lg);
    padding: var(--hc-pad-lg);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 6px;
}

.collection-info-panel h4 {
    margin: 0 0 var(--hc-gap-md) 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--hc-blue-glow);
    text-shadow: 0 0 8px rgba(147, 197, 253, 0.5);
}

.collection-info-panel .info-text {
    margin: 0 0 var(--hc-gap-md) 0;
    font-size: 11px;
    color: #D1D5DB;
    line-height: 1.5;
}

.collection-info-panel .feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--hc-gap-md) 0;
}

.collection-info-panel .feature-list li {
    font-size: 11px;
    color: #E5E7EB;
    padding: var(--hc-pad-xs) 0;
    line-height: 1.6;
}

.collection-info-panel .anti-snipe-note {
    font-size: 10px;
    color: #FCD34D;
    padding: var(--hc-pad-sm);
    background: rgba(251, 191, 36, 0.08);
    border-left: 3px solid rgba(251, 191, 36, 0.5);
    border-radius: 3px;
    margin-top: var(--hc-gap-sm);
}

.collection-stat-card.free-mint {
    border-color: rgba(34, 197, 94, 0.4);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

.collection-stat-card.free-mint .stat-value {
    color: #4ADE80;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
}

.cost-item.free-testnet {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.1) 100%);
    border: 1px solid rgba(34, 197, 94, 0.4);
    padding: var(--hc-pad-md);
    border-radius: 6px;
}

.cost-item.free-testnet .cost-value {
    color: #4ADE80;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 0 12px rgba(34, 197, 94, 0.8);
}

.testnet-notice {
    font-size: 10px;
    color: #93C5FD;
    text-align: center;
    margin-top: var(--hc-gap-sm);
    padding: var(--hc-pad-sm);
    background: rgba(59, 130, 246, 0.08);
    border-radius: 4px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    line-height: 1.4;
}

.summon-ritual-btn.sold-out {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(239, 68, 68, 0.15) 100%);
    border-color: rgba(239, 68, 68, 0.5);
    color: #FCA5A5;
    cursor: not-allowed;
    opacity: 0.7;
}

.summon-ritual-btn.sold-out:hover {
    transform: none;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.summon-notice.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
}

/* ========================================
   BIRTH NARRATIVE STYLES
   ======================================== */

/* Chat View - Compact Birth Narrative */
.birth-narrative-compact {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    padding: var(--hc-pad-md);
    margin: var(--hc-gap-md) var(--hc-gap-md) 0;
    font-size: 11px;
}

.narrative-line {
    display: flex;
    gap: var(--hc-gap-sm);
    margin-bottom: var(--hc-gap-xs);
    line-height: 1.5;
}

.narrative-line:last-child {
    margin-bottom: 0;
}

.narrative-label {
    color: #a78bfa;
    font-weight: 600;
    min-width: 70px;
    flex-shrink: 0;
    font-style: italic;
}

.narrative-text {
    color: #e0e7ff;
    flex: 1;
}

.narrative-quirk {
    display: flex;
    align-items: center;
    gap: var(--hc-gap-sm);
    margin-top: var(--hc-gap-md);
    padding-top: var(--hc-gap-md);
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    font-size: 10px;
    font-style: italic;
}

.quirk-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.quirk-text {
    flex: 1;
}

/* Profile View - Birth Portrait Section */
.birth-portrait-section {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.06) 0%, rgba(59, 130, 246, 0.06) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.section-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--hc-gap-md);
}

.view-log-btn {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: #a78bfa;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.view-log-btn:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(59, 130, 246, 0.3) 100%);
    border-color: rgba(139, 92, 246, 0.6);
    color: #c4b5fd;
    transform: translateX(2px);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.birth-portrait-content {
    display: flex;
    flex-direction: column;
    gap: var(--hc-gap-md);
}

.portrait-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--hc-gap-sm);
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
}

.portrait-type {
    color: #c4b5fd;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portrait-founder {
    color: #93c5fd;
    font-size: 10px;
    font-style: italic;
}

.birth-memories {
    display: flex;
    flex-direction: column;
    gap: var(--hc-gap-sm);
}

.memory-line {
    display: flex;
    gap: var(--hc-gap-sm);
    line-height: 1.6;
}

.memory-label {
    color: #a78bfa;
    font-weight: 600;
    font-size: 11px;
    min-width: 70px;
    flex-shrink: 0;
    font-style: italic;
}

.memory-text {
    color: #e0e7ff;
    font-size: 11px;
    flex: 1;
}

.birth-traits {
    display: flex;
    flex-direction: column;
    gap: var(--hc-gap-sm);
    padding-top: var(--hc-gap-sm);
    border-top: 1px solid rgba(139, 92, 246, 0.15);
}

.trait-line {
    display: flex;
    align-items: flex-start;
    gap: var(--hc-gap-sm);
    padding: var(--hc-pad-sm);
    border-radius: 4px;
    font-size: 10px;
    line-height: 1.5;
}

.trait-line.temporal {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.trait-line.promise {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.trait-icon {
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 1px;
}

.trait-line.temporal .trait-icon {
    color: #60a5fa;
}

.trait-line.promise .trait-icon {
    color: #fbbf24;
}

.trait-text {
    flex: 1;
}

.trait-line.temporal .trait-text {
    color: #dbeafe;
    font-style: italic;
}

.trait-line.promise .trait-text {
    color: #fef3c7;
    font-style: italic;
}

.behavioral-quirk {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    padding: var(--hc-pad-sm);
    border-radius: 4px;
    font-size: 10px;
    line-height: 1.5;
}

.quirk-label {
    color: #86efac;
    font-weight: 600;
    margin-right: 4px;
}

.behavioral-quirk .quirk-text {
    color: #d1fae5;
}

/* ═══════════════════════════════════════════════════════════════════════
   CARE ACTION FEEDBACK SYSTEM
   Phase 2 & 3: Floating rewards panel, stat animations, visual feedback
   ═══════════════════════════════════════════════════════════════════════ */

/* Floating Rewards Panel */
.care-rewards-float {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg,
        rgba(15, 15, 25, 0.98) 0%,
        rgba(8, 8, 15, 0.98) 100%);
    border: 2px solid var(--hc-blue-glow);
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 300px;
    max-width: 400px;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.9),
        0 0 60px rgba(147, 197, 253, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 10000;
    animation: rewards-slide-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

@keyframes rewards-slide-in {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) translateY(0);
    }
}

.care-rewards-float.fade-out {
    animation: rewards-fade-out 0.5s ease-out forwards;
}

@keyframes rewards-fade-out {
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95) translateY(-10px);
    }
}

.rewards-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(147, 197, 253, 0.2);
}

.rewards-pulse {
    font-size: 18px;
    animation: pulse-glow 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
    }
    50% {
        transform: scale(1.2);
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 1));
    }
}

.rewards-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--hc-blue-glow);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rewards-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reward-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    opacity: 0;
    animation: reward-pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes reward-pop-in {
    0% {
        opacity: 0;
        transform: translateX(-20px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.reward-item.cost {
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid #f59e0b;
}

.reward-item.earn {
    background: rgba(34, 197, 94, 0.1);
    border-left: 3px solid #22c55e;
}

.reward-item.rare {
    background: rgba(168, 85, 247, 0.15);
    border-left: 3px solid #a855f7;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.reward-icon {
    font-size: 24px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

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

.reward-amount {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 0 10px currentColor;
}

.reward-label {
    font-size: 10px;
    color: rgba(229, 231, 235, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Stat Pulse Animation */
.vital-card-enhanced {
    position: relative;
    transition: all 0.3s ease;
}

.vital-card-enhanced.stat-pulse {
    animation: stat-pulse-effect 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 0 20px rgba(34, 197, 94, 0.6),
        inset 0 0 10px rgba(34, 197, 94, 0.2);
}

@keyframes stat-pulse-effect {
    0%, 100% {
        transform: scale(1);
        border-color: rgba(147, 197, 253, 0.3);
    }
    50% {
        transform: scale(1.05);
        border-color: rgba(34, 197, 94, 0.8);
    }
}

/* Floating Stat Delta */
.stat-delta {
    position: absolute;
    top: -10px;
    right: 10px;
    font-size: 16px;
    font-weight: 700;
    text-shadow: 0 0 10px currentColor, 0 2px 4px rgba(0, 0, 0, 0.8);
    animation: stat-delta-float 1.5s ease-out forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes stat-delta-float {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translateY(-10px) scale(1.2);
    }
    80% {
        opacity: 1;
        transform: translateY(-30px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-40px) scale(0.8);
    }
}

/* Stat Value Count-Up Enhancement */
.vital-value {
    transition: color 0.3s ease;
}

.vital-card-enhanced.stat-pulse .vital-value {
    color: #22c55e !important;
    text-shadow: 0 0 10px #22c55e;
}

/* Enhanced Care Button Feedback */
.care-btn-enhanced {
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.care-btn-enhanced:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow:
        0 4px 12px rgba(147, 197, 253, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.care-btn-enhanced:not(:disabled):active {
    transform: translateY(0);
    box-shadow:
        0 2px 6px rgba(147, 197, 253, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.care-btn-enhanced::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.care-btn-enhanced:not(:disabled):active::after {
    width: 300px;
    height: 300px;
    opacity: 0;
}

/* Material Drop Sparkle Effect */
@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
}

.reward-item.rare .reward-icon {
    animation: sparkle 2s ease-in-out infinite;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .care-rewards-float {
        min-width: 250px;
        max-width: calc(100vw - 40px);
        padding: 12px 16px;
    }

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

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

/* =================================================================
   MODERN COMBAT LOADOUT - Redesigned for clarity and aesthetics
   ================================================================= */

/* Combat Header Modern */
.combat-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.95) 0%, rgba(30, 20, 40, 0.9) 100%);
    border-bottom: 1px solid var(--hc-gold-border);
    border-radius: 8px 8px 0 0;
    margin-bottom: 20px;
}

.combat-header-modern .header-left h2 {
    font-size: 24px;
    margin: 0;
    font-weight: 600;
    color: var(--hc-blue-glow);
    text-shadow: 0 0 10px rgba(147, 197, 253, 0.5);
}

.combat-header-modern .combat-subtitle {
    font-size: 12px;
    color: #94a3b8;
    margin: 4px 0 0 0;
}

.energy-display {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid rgba(147, 197, 253, 0.2);
}

.energy-icon {
    font-size: 24px;
}

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

.energy-value {
    font-size: 20px;
    font-weight: 700;
    color: #fbbf24;
}

.energy-label {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.energy-regen {
    font-size: 12px;
    color: #10b981;
    font-weight: 600;
}

/* Loadout Grid Modern - 2x2 */
.loadout-grid-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 0 20px;
    margin-bottom: 20px;
}

/* Loadout Slot Modern */
.loadout-slot-modern {
    position: relative;
    background: linear-gradient(145deg, rgba(20, 20, 35, 0.8) 0%, rgba(15, 15, 25, 0.9) 100%);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.loadout-slot-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.1), rgba(212, 175, 55, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
}

.loadout-slot-modern:hover {
    border-color: var(--hc-blue-accent);
    box-shadow: 
        0 8px 32px rgba(0, 212, 255, 0.2),
        0 0 20px rgba(147, 197, 253, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
}

.loadout-slot-modern:hover::before {
    opacity: 1;
}

.loadout-slot-modern.weapon-slot {
    border-color: rgba(239, 68, 68, 0.3);
}

.loadout-slot-modern.weapon-slot:hover {
    border-color: #ef4444;
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.3);
}

.loadout-slot-modern.ability-slot {
    border-color: rgba(168, 85, 247, 0.3);
}

.loadout-slot-modern.ability-slot:hover {
    border-color: #a855f7;
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.3);
}

/* Slot Keybind Badge */
.slot-keybind {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fbbf24;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid rgba(251, 191, 36, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Slot Content */
.slot-content {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.slot-icon-large {
    font-size: 48px;
    min-width: 48px;
    text-align: center;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

.slot-details {
    flex: 1;
    min-width: 0;
}

.slot-name {
    font-size: 16px;
    font-weight: 700;
    color: #e5e7eb;
    margin-bottom: 4px;
    text-shadow: 0 0 8px rgba(229, 231, 235, 0.3);
}

.slot-type,
.slot-effect {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.slot-stats-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.slot-stats-row > span {
    font-size: 11px;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 8px;
    border-radius: 4px;
    color: #cbd5e1;
    font-weight: 600;
}

.stat-damage {
    border-left: 2px solid #ef4444;
}

.stat-energy {
    border-left: 2px solid #fbbf24;
}

.stat-cooldown {
    border-left: 2px solid #3b82f6;
}

.stat-duration {
    border-left: 2px solid #8b5cf6;
}

/* Slot Footer */
.slot-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.slot-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.slot-hint {
    font-size: 10px;
    color: var(--hc-blue-accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loadout-slot-modern:hover .slot-hint {
    opacity: 1;
}

/* Combat Stats Row */
.combat-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0 20px;
    margin-bottom: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 15, 25, 0.6);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: rgba(147, 197, 253, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.stat-card.highlight {
    border-color: var(--hc-gold-border);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(15, 15, 25, 0.6));
}

.stat-icon {
    font-size: 24px;
}

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

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #e5e7eb;
}

.stat-label {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Combat Record Compact */
.combat-record-compact {
    background: rgba(15, 15, 25, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 0 20px 20px 20px;
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.record-header h3 {
    font-size: 16px;
    margin: 0;
    color: var(--hc-blue-glow);
    font-weight: 600;
}

.kda-display {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 600;
}

.kda-value {
    color: #10b981;
    font-size: 18px;
    font-weight: 700;
}

.record-stats-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.record-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

.record-value {
    font-size: 20px;
    font-weight: 700;
    color: #fbbf24;
}

.record-label {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Ability Selection Modal Modern */
.ability-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: modal-fade-in 0.2s ease;
}

.ability-modal-content {
    position: relative;
    width: min(800px, calc(100vw - 40px));
    max-height: 80vh;
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.98) 0%, rgba(8, 8, 15, 0.98) 100%);
    border: 2px solid var(--hc-gold-border);
    border-radius: 16px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: modal-slide-in 0.3s ease;
}

.ability-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-bottom: 1px solid rgba(147, 197, 253, 0.2);
}

.ability-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--hc-blue-glow);
    text-shadow: 0 0 10px rgba(147, 197, 253, 0.5);
}

.modal-close-btn {
    background: none;
    border: none;
    color: #93C5FD;
    font-size: 28px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.ability-modal-body {
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.ability-selection-grid-modern {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 20px;
}

.ability-option-card-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(20, 20, 35, 0.9);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ability-option-card-modern:hover {
    border-color: var(--hc-blue-accent);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.3);
    transform: translateY(-4px);
}

.ability-option-card-modern.weapon-card:hover {
    border-color: #ef4444;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.ability-option-card-modern.ability-card:hover {
    border-color: #a855f7;
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.3);
}

.option-icon-large {
    font-size: 56px;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.4));
}

.option-content {
    width: 100%;
    text-align: center;
}

.option-name {
    font-size: 16px;
    font-weight: 700;
    color: #e5e7eb;
    margin-bottom: 8px;
}

.option-type-badge,
.option-effect-badge {
    display: inline-block;
    background: rgba(0, 0, 0, 0.4);
    color: #94a3b8;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.option-stats-modern {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.option-stats-modern .stat-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    color: #cbd5e1;
    font-weight: 600;
}

.option-desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
    margin-top: 8px;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .loadout-grid-modern {
        grid-template-columns: 1fr;
    }
    
    .combat-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .record-stats-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .combat-header-modern {
        flex-direction: column;
        gap: 12px;
    }
    
    .ability-selection-grid-modern {
        grid-template-columns: 1fr;
    }
    
    .record-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== IMPACT HISTORY IMAGE GALLERY ===== */
/* Shows 3 phase thumbnails for each completed Impact */

.history-image-gallery {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    overflow-x: auto;
    padding: 4px 0;
}

.history-image-thumb {
    position: relative;
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    border: 1.5px solid rgba(212, 175, 55, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.3);
}

.history-image-thumb:hover {
    border-color: rgba(212, 175, 55, 0.7);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.history-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.phase-label {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: rgba(212, 175, 55, 1);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    pointer-events: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .history-image-thumb {
        width: 70px;
        height: 70px;
    }
    
    .history-image-gallery {
        gap: 6px;
    }
}

/* Scrollbar for gallery on desktop */
.history-image-gallery::-webkit-scrollbar {
    height: 4px;
}

.history-image-gallery::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.history-image-gallery::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 2px;
}

.history-image-gallery::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}
