/**
 * Game Marketing Simulator - Styles
 * Minimal, clean CSS focusing on layout and typography
 * Canvas handles most visualization
 */

/* === Custom Fonts === */
@font-face {
    font-family: 'Vermin Vibes 1989';
    src: local('Vermin Vibes 1989'),
         url('../assets/fonts/vv1989.ttf?v=2') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: block;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* === CSS Variables === */
:root {
    /* Colors - Hot Pink & Dark Grey Palette */
    --color-primary: #ff0052;
    --color-primary-dark: #cc0042;
    --color-primary-light: #ff3377;
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-danger: #EF4444;
    --color-background: #0a0a0a;
    --color-surface: #1a1a1a;
    --color-surface-light: #2a2a2a;
    --color-text: #ffffff;
    --color-text-secondary: #999999;
    --color-border: #333333;
    --color-awareness: #ff0052;
    --color-sentiment: #10B981;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Typography */
    --font-family: 'Play', sans-serif;
    --font-header: 'Cal Sans', sans-serif;
    --font-size-sm: 12px;
    --font-size-base: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* === Custom Scrollbars === */
/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(26, 26, 26, 0.5);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 0, 82, 0.6) 0%, rgba(255, 0, 82, 0.4) 100%);
    border-radius: 6px;
    border: 2px solid rgba(26, 26, 26, 0.5);
    transition: background var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 0, 82, 0.8) 0%, rgba(255, 0, 82, 0.6) 100%);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #ff0052 0%, #cc0042 100%);
}

::-webkit-scrollbar-corner {
    background: rgba(26, 26, 26, 0.5);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 0, 82, 0.6) rgba(26, 26, 26, 0.5);
}

/* === Animations === */
@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes campaignComplete {
    0% {
        transform: scale(1) translateY(0);
        filter: brightness(1) blur(0px);
        opacity: 1;
    }
    30% {
        transform: scale(1.02) translateY(-2px);
        filter: brightness(1.3) blur(0px);
    }
    60% {
        transform: scale(0.98) translateY(0);
        filter: brightness(1.5) blur(1px);
        opacity: 1;
    }
    100% {
        transform: scale(0.8) translateY(20px);
        filter: brightness(2) blur(8px);
        opacity: 0;
    }
}

/* Campaign slide-in animation for new campaigns */
@keyframes campaignSlideIn {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }
    70% {
        transform: translateX(-8px);
        opacity: 1;
    }
    85% {
        transform: translateX(3px);
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.campaign-slide-in {
    animation: campaignSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Post-launch KPI highlight animation - subtle glow */
@keyframes postLaunchHighlight {
    0% {
        transform: scale(0.98);
        opacity: 0;
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
    50% {
        transform: scale(1.01);
        opacity: 1;
        box-shadow: 0 0 8px 2px rgba(16, 185, 129, 0.25);
    }
    100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 4px 1px rgba(16, 185, 129, 0.15);
    }
}

@keyframes postLaunchPulse {
    0%, 100% {
        box-shadow: 0 0 4px 1px rgba(16, 185, 129, 0.15);
    }
    50% {
        box-shadow: 0 0 6px 2px rgba(16, 185, 129, 0.2);
    }
}

.postlaunch-highlight {
    animation: postLaunchHighlight 0.8s ease-out forwards;
}

.postlaunch-pulse {
    animation: postLaunchPulse 2s ease-in-out 3;
}

/* === Reset and Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/bg1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    opacity: 0.1;
    z-index: -1;
}

/* === Icons === */
.icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    stroke-width: 2;
}

.btn .icon {
    margin-right: 6px;
}

.tab-button .icon {
    width: 14px;
    height: 14px;
    margin-right: 4px;
}

/* === Layout === */
.app-container {
    display: none; /* Hidden by default - shown when game starts */
    height: 100vh;
    width: 100vw;
}

.app-container.game-active {
    display: flex;
    flex-direction: column;
}

.app-container .app-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 260px;
    background-color: #1a1a1a00;
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}

.game-info-panel {
    margin-top: auto;
    padding: var(--spacing-sm);
    padding-top: calc(var(--spacing-sm) + 8px);
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid #2A2A2A;
    font-size: 11px;
    position: relative;
}

.game-info-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    border-top: 2px solid #ff0052;
    border-left: 2px solid #ff0052;
}

.game-info-panel::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border-top: 2px solid #ff0052;
    border-right: 2px solid #ff0052;
}

.game-info-title {
    position: absolute;
    top: -10px;
    left: 16px;
    background: #0A0A0A;
    padding: 0 8px;
    color: #ff0052;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 1px solid #2A2A2A;
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-info-icon {
    cursor: help;
}

.game-info-icon .info-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 0, 82, 0.15);
    border: 1px solid rgba(255, 0, 82, 0.4);
    color: #ff0052;
    font-size: 8px;
    font-weight: 700;
    font-style: normal;
    line-height: 1;
    transition: all 0.2s;
}

.game-info-icon:hover .info-circle {
    background: rgba(255, 0, 82, 0.25);
    border-color: #ff0052;
    color: #ff0052;
    transform: scale(1.08);
}

.game-info-subheader {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.game-info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1px 0;
    font-size: 11px;
    gap: 4px;
}

.game-info-label {
    color: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.game-info-value {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    text-align: right;
}

.sidebar-bottom {
    display: flex;
    gap: 4px;
    padding: var(--spacing-sm);
    border-top: 1px solid var(--color-border);
    margin-top: auto;
    flex-shrink: 0;
}

.sidebar-bottom .btn {
    padding: 6px 8px;
    font-size: 11px;
    min-width: auto;
    flex: 1;
}

.budget-value {
    font-size: var(--font-size-sm);
    color: var(--color-success) !important;
    font-weight: 700 !important;
}

.budget-stat-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: var(--spacing-sm);
}

/* Budget display in KPI bar */
.kpi-display-budget {
    position: relative;
}

.kpi-display-budget .kpi-value,
[data-kpi="budget"] .kpi-value {
    font-family: var(--font-header);
    font-size: 24px !important;
    color: #10B981 !important;
}

/* Action Points display */
#action-points-kpi .kpi-value,
#action-points-kpi .ap-value {
    font-family: var(--font-header);
    font-size: 24px !important;
    font-weight: normal;
}

/* Team Energy display */
[data-kpi="teamEnergy"] .kpi-value {
    font-family: var(--font-header);
    font-size: 24px !important;
    font-weight: normal;
}

.budget-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0px;
    overflow: hidden;
    margin-top: var(--spacing-xs);
}

.budget-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    border-radius: 0px;
    transition: width 0.3s ease, background 0.3s ease;
}

/* Change color when budget is low */
.budget-progress-fill.low {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.budget-progress-fill.critical {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.main-content-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
}

.header {
    min-height: 70px;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    flex-shrink: 0;
}

/* KPI Bar */
.kpi-bar {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(10, 10, 10, 0.5);
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
    overflow-x: auto;
    box-sizing: border-box;
}

.kpi-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    flex: 1;
}

.section-title,
.stat-label {
    font-family: var(--font-family);
    font-size: 10px;
    font-weight: normal;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin: 0 0 var(--spacing-xs) 0;
    padding-left: 0;
}

.kpi-section-content {
    display: flex;
    gap: var(--spacing-md);
    flex: 1;
}

.kpi-section-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    flex: 1;
}

.kpi-section-postlaunch {
    margin-top: var(--spacing-xs);
}

/* Tighter spacing for KPIs in compact mode */
.kpis-compact-mode .kpi-section-content {
    gap: var(--spacing-sm);
}

.resources-section {
    border-right: 2px solid rgba(255, 255, 255, 0.1);
    padding-right: var(--spacing-lg);
    flex: 0 0 auto;
}

.kpis-section {
    flex: 2;
}

.kpi-bar .kpi-display {
    flex: 1;
    min-width: 120px;
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(42, 42, 42, 0.5);
    border: 1px solid #2A2A2A;
    text-align: center;
    transition: all var(--transition-fast);
    position: relative;
}

.kpi-bar .kpi-display:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.kpi-bar .kpi-display .kpi-name {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 4px;
}

.kpi-bar .kpi-display .kpi-value {
    font-family: var(--font-header);
    font-size: 33px;
    color: #F3F0E8;
    
}

.kpi-bar .kpi-display .kpi-trend {
    font-size: 11px;
    margin-top: 4px;
}

/* Taller display for energy battery */
.kpi-bar .kpi-display.kpi-display-tall {
    padding-top: var(--spacing-xs);
    padding-bottom: var(--spacing-xs);
}

.kpi-bar .kpi-display.kpi-display-tall .kpi-value {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Action points display styling */
.kpi-bar .kpi-display .ap-display {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 45px;
}

/* Energy display styling */
.kpi-bar .kpi-display .energy-display {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70px;
}

/* KPI with chart background */
.kpi-with-chart {
    position: relative;
    overflow: hidden;
    padding: 0 !important;
    min-height: 100px;
    min-width: 140px;
}

.kpi-chart-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.2;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.kpi-content-overlay {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm);
}

.kpi-content-left {
    flex: 0;
    width: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-content-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.kpi-with-chart .kpi-name,
.kpi-with-chart .kpi-value,
.kpi-with-chart .kpi-trend {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 3;
}

.kpi-chart-split {
    width: 100%;
    height: 80px;
    opacity: 1;
    pointer-events: auto;
}

/* Hover state - show full chart, hide values */
.kpi-with-chart:hover .kpi-chart-background {
    opacity: 1;
    z-index: 10;
}

.kpi-with-chart:hover .kpi-content-right {
    opacity: 0;
}

.kpi-with-chart:hover .kpi-content-left {
    display: none;
}

/* Compact mode for main KPIs when post-launch is enabled */
.kpis-compact-mode .kpi-display {
    padding: 4px 8px;
    min-height: 40px;
    max-height: 50px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    text-align: left;
    min-width: 160px;
}

.kpis-compact-mode .kpi-display:hover {
    transform: translateY(-1px);
}

/* Override chart styles in compact mode */
.kpis-compact-mode .kpi-with-chart {
    min-height: 50px;
    max-height: 60px;
}

.kpis-compact-mode .kpi-with-chart .kpi-chart-background {
    opacity: 0.15 !important;
}

.kpis-compact-mode .kpi-with-chart:hover .kpi-chart-background {
    opacity: 0.3 !important;
}

/* Hide split charts in compact mode */
.kpis-compact-mode .kpi-content-left {
    display: none !important;
}

/* Adjust content layout in compact mode */
.kpis-compact-mode .kpi-content-overlay {
    padding: 4px 8px;
}

.kpis-compact-mode .kpi-content-right {
    flex-direction: row !important;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}

.kpis-compact-mode .kpi-display .kpi-name {
    font-size: 0.7rem;
    margin-bottom: 0;
    text-align: left;
    flex-shrink: 0;
    min-width: 60px;
}

.kpis-compact-mode .kpi-display .kpi-value {
    font-size: 0.85rem;
    margin-bottom: 0;
    font-weight: 600;
    text-align: left;
    flex: 1;

}

.kpis-compact-mode .kpi-display .kpi-trend {
    font-size: 0.7rem;
    margin-left: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.kpi-bar .kpi-display-compact {
    padding: 4px 8px;
    min-height: 40px;
    max-height: 50px;
    min-width: 160px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
}

.kpi-bar .kpi-display-compact .kpi-name {
    font-size: 0.7rem;
    margin-bottom: 0;
    text-align: left;
    flex-shrink: 0;
    min-width: 60px;
}

.kpi-bar .kpi-display-compact .kpi-value {
    font-size: 0.85rem;
    margin-bottom: 0;
    font-weight: 600;
    flex: 1;
    text-align: left;
    min-width: 50px;
}

.kpi-bar .kpi-display-compact .kpi-trend {
    font-size: 0.7rem;
    margin-left: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.kpi-bar .kpi-display-compact:hover {
    transform: translateY(-1px);
}

.kpi-bar .kpi-name {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.kpi-bar .kpi-value {
    font-size: var(--font-size-lg);
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 2px;
}

.kpi-bar .kpi-trend {
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.dashboard {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    overflow: visible;
}

.dashboard-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.dashboard-right {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.right-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    min-width: 0;
}

.right-panel .tabbed-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    background-color: var(--color-surface);
    border-radius: 8px;
    overflow: hidden;
}

.right-panel .tab-nav {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-surface-light);
}

.right-panel .tab-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.right-panel .tab-pane {
    display: none;
    flex: 1;
    overflow: hidden;
}

.right-panel .tab-pane.active {
    display: flex;
    flex-direction: column;
}

/* === Charts (Sparklines) === */
.charts-container {
    display: none; /* Hidden - charts now in KPI cards */
    background-color: var(--color-surface);
    border-radius: 8px;
    padding: var(--spacing-md);
    flex: 1;
    min-width: 0;
    height: 100%;
    /* display: flex; */
    flex-direction: row;
    gap: var(--spacing-sm);
    overflow: hidden;
}

.sparkline-chart {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background-color: var(--color-surface-light);
    border-radius: 8px;
    padding: var(--spacing-sm);
}

.chart-title {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin: 0 0 var(--spacing-xs) 0;
    font-weight: 600;
    white-space: nowrap;
}

.chart-box {
    width: 100%;
    height: 100px;
    flex: 1;
}

/* === Cards and Panels === */
.card {
    background-color: var(--color-surface);
    border-radius: 8px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text);
}

.card-body {
    color: var(--color-text-secondary);
}

/* === Game Info (Inline in KPI Bar) === */
.game-info-section {
    flex: 0 0 245px;
    width: 245px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-right: var(--spacing-lg);
    border-right: 2px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
}

.game-title-inline {
    font-family: var(--font-header);
    font-size: 46px;
    font-weight: bold;
    margin: 0;
    color: var(--color-primary);
    line-height: 1;
}

.game-stats-inline {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.stat-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.stat-label-inline {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-value-inline {
    font-family: var(--font-header);
    font-size: 18px;
    font-weight: normal;
    color: var(--color-text);
}

.stat-value-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Legacy game-info styles */
.game-info {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
    box-sizing: border-box;
}

.game-title {
    font-family: var(--font-header);
    font-size: 28px;
    font-weight: normal;
    margin: 0 0 var(--spacing-xs) 0;
    color: var(--color-primary);
    letter-spacing: 2px;
    text-align: left;
    font-style: normal;
}

/* Force h1 to use header font */
h1.game-title,
h1.game-title-inline {
    font-family: var(--font-header);
}

.game-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.game-stats .stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    background-color: var(--color-surface-light);
    border-radius: 4px;
}

.game-stats .stat-label {
    font-size: 11px;
    color: var(--color-text-secondary);
}

.game-stats .stat-value {
    font-family: var(--font-header);
    font-size: 16px;
    font-weight: normal;
    color: var(--color-text);
}

/* === Phase Tooltip === */
.phase-info-icon {
    transition: all 0.2s ease;
}

.phase-info-icon:hover {
    background: rgba(255, 0, 82, 0.3) !important;
    border-color: rgba(255, 0, 82, 0.6) !important;
    transform: scale(1.1);
}

.phase-tooltip {
    position: fixed;
    transform: translateY(-50%);
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.98) 0%, rgba(10, 10, 10, 0.98) 100%);
    border: 1px solid rgba(255, 0, 82, 0.4);
    border-radius: 8px;
    padding: 12px 16px;
    min-width: 280px;
    max-width: 350px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.phase-tooltip.show {
    opacity: 1;
    pointer-events: auto;
}

.phase-tooltip.new-phase {
    animation: pulse-border 2s ease-in-out;
}

@keyframes pulse-border {
    0%, 100% {
        border-color: rgba(255, 0, 82, 0.4);
    }
    50% {
        border-color: rgba(255, 0, 82, 0.8);
        box-shadow: 0 8px 24px rgba(255, 0, 82, 0.3);
    }
}

.phase-tooltip-title {
    font-size: 14px;
    font-weight: 700;
    color: #ff3377;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.phase-tooltip-content {
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-text-secondary);
}

.phase-tooltip::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid rgba(255, 0, 82, 0.4);
}

.phase-tooltip::after {
    content: '';
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-right: 5px solid rgba(10, 10, 10, 0.98);
}

/* === Turn Counter === */
#turn-counter {
    font-size: var(--font-size-xl);
    font-weight: 700;
}

#phase-indicator {
    display: inline-block;
    font-size: var(--font-size-xl);
    font-weight: 700;
    text-transform: capitalize;
    color: var(--color-text);
}

/* Marketing Funnel Phases */
#phase-indicator.phase-awareness {
    color: var(--color-awareness);
}

#phase-indicator.phase-interest {
    color: var(--color-primary);
}

#phase-indicator.phase-action {
    color: var(--color-warning);
}

#phase-indicator.phase-conversion {
    color: var(--color-success);
}

/* Legacy phases (keep for compatibility) */
#phase-indicator.phase-pre-launch {
    background-color: rgba(255, 0, 82, 0.2);
    color: var(--color-primary);
}

#phase-indicator.phase-launch {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--color-success);
}

#phase-indicator.phase-post-launch {
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--color-warning);
}

/* === Action Points === */
#action-points {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.ap-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.ap-value {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: #fbbf24 !important; /* Yellow/gold color for action points */
}

#action-points.ap-depleted .ap-value {
    color: var(--color-danger);
}

/* === Budget Display === */
#budget-display {
    text-align: right;
}

.budget-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.budget-amount {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-text);
}

.budget-total {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

/* === KPI Display === */
.kpi-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.kpi-display {
    padding: 12px;
    background: rgba(42, 42, 42, 0.5);
    border: 1px solid #2A2A2A;
    border-radius: 0;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
}

.kpi-display:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.kpi-display.kpi-changed {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
    /* Slower fade-out transition */
    transition: transform 0.2s ease,
                box-shadow 0.2s ease,
                border-left 1.5s ease-out;
}

.kpi-display.kpi-increased {
    border-left: 3px solid var(--color-success);
}

.kpi-display.kpi-decreased {
    border-left: 3px solid var(--color-danger);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.kpi-name {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 4px;
}

.kpi-value {
    font-family: var(--font-header);
    font-size: 24px;
    font-weight: normal;
    color: #F3F0E8;
}

.kpi-trend {
    font-size: 11px;
    font-weight: normal;
    margin-top: 4px;
}

.kpi-trend.trend-up,
.kpi-trend.trend-positive {
    color: #10B981;
}

.kpi-trend.trend-down,
.kpi-trend.trend-negative {
    color: #ff0052;
}

.kpi-trend.trend-neutral {
    color: #666;
}

/* === Action Buttons === */
.actions-panel {
    padding: var(--spacing-md) var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.actions-title {
    font-size: 10px;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #666;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-button,
.category-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10px;
    background-color: #0c0c0cc9;
    border: 1px solid var(--color-border);
    border-radius: 1px;
    color: var(--color-text);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.action-label {
    flex: 1;
    font-family: var(--font-header);
    font-weight: 300;
    text-transform: uppercase;
    line-height: 1.4;
    letter-spacing: 0.05em;
}

.action-cost {
    font-size: var(--font-size-sm);
    color: var(--color-warning);
    font-weight: 600;
    background: rgba(245, 158, 11, 0.15);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 4px;
}

.action-button:hover:not(:disabled),
.category-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #ff0052 0%, #cc0042 100%);
    border-color: var(--color-primary);
    transform: translateX(4px);
    box-shadow: 0 0 15px rgba(255, 0, 82, 0.4);
}

.action-button:active:not(:disabled),
.category-button:active:not(:disabled) {
    transform: translateX(2px);
}

.action-button:disabled,
.category-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-button.hovered {
    border-color: var(--color-primary);
}

/* === Buttons === */
.btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: 6px;
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.btn-primary {
    font-family: var(--font-header);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, #ff0052 0%, #cc0042 100%);
    color: white;
    border: none;
}

/* End Turn button in sidebar - compact */
.actions-panel .btn-primary,
#end-turn-button {
    padding: 10px 12px;
    font-size: 13px;
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    gap: 6px;
}

#end-turn-button .icon {
    margin-right: 0;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff3377 0%, #ff0052 100%);
    box-shadow: 0 0 20px rgba(255, 0, 82, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    font-family: var(--font-header);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 0;
    transition: all 0.15s ease;
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: #F3F0E8;
    border-color: var(--color-primary);
}

.btn-danger {
    background: linear-gradient(135deg, #ff0052 0%, #cc0042 100%);
    color: white;
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff3377 0%, #ff0052 100%);
    box-shadow: 0 0 20px rgba(255, 0, 82, 0.5);
}

.btn-small {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-sm);
}

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

/* === Menu Buttons === */
.menu-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

/* === Modals === */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
}

.modal-container.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    position: relative;
    background: linear-gradient(135deg, rgb(16 16 16 / 80%) 0%, rgb(15 13 13 / 98%) 100%);
    border: 1px solid rgba(255, 0, 82, 0.3);
    border-radius: 3px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
    transition: all var(--transition-base);
    color: #e0e0e0;
}

.modal.show {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.modal.small {
    width: 400px;
}

.modal.medium {
    width: 600px;
}

.modal.large {
    width: 800px;
}

.modal.xlarge {
    width: 1200px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
}

.modal-title {
    font-family: var(--font-header);
    font-size: var(--font-size-2xl);
    font-weight: normal;
    text-transform: uppercase;
}

.modal-close {
    background: none;
    border: none;
    font-size: var(--font-size-2xl);
    color: var(--color-text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background-color: var(--color-surface-light);
    color: var(--color-text);
}

.modal-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
    flex: 1;
}

.modal-body li {
    color: #ffffff;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    border-top: 1px solid var(--color-border);
}

/* === Action Picker Modal === */
.action-picker {
    display: flex;
    gap: var(--spacing-lg);
}

.action-category {
    margin-bottom: var(--spacing-lg);
}

.action-category h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
}

.action-list {
    display: grid;
    gap: var(--spacing-md);
}

.action-card {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background-color: var(--color-surface-light);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.action-card:hover:not(.disabled) {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-card.disabled {
    opacity: 0.6;
}

.action-icon {
    font-size: var(--font-size-2xl);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-surface);
    border-radius: 8px;
}

.action-details {
    flex: 1;
}

.action-name {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

/* Affinity Badge */
.affinity-badge {
    display: inline-block;
    background: linear-gradient(135deg, #B8860B 0%, #CD7F32 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 8px;
    margin-bottom: 0;
    vertical-align: middle;
    box-shadow: 0 2px 4px rgba(184, 134, 11, 0.3);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 2px 4px rgba(184, 134, 11, 0.3); }
    50% { box-shadow: 0 2px 8px rgba(184, 134, 11, 0.6); }
}

.affinity-info {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.15) 100%);
    border-left: 3px solid #FFD700;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 4px;
    font-size: var(--font-size-sm);
}

.affinity-info .affinity-star {
    font-size: 18px;
    margin-right: 6px;
}

/* Action Badges Container */
.action-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

/* Risk Badge */
.risk-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    vertical-align: middle;
}

.risk-info {
    font-size: var(--font-size-sm);
    margin-bottom: 12px;
}

.action-description {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-sm);
}

.action-costs {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.cost-ap,
.cost-budget {
    font-size: var(--font-size-sm);
    font-weight: 600;
    padding: var(--spacing-xs) var(--spacing-sm);
    background-color: var(--color-surface);
    border-radius: 4px;
}

.action-effects {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    font-size: var(--font-size-sm);
}

.action-info-panel {
    width: 300px;
    padding: var(--spacing-lg);
    background-color: var(--color-surface);
    border-radius: 8px;
}

/* === Event Modal === */
.event-notification {
    text-align: center;
}

/* Event modal type colors */
.modal.event-modal-positive {
    background: linear-gradient(135deg, #1a3a2e 0%, #0f1f1a 100%) !important;
    border: 2px solid #10b981 !important;
}

.modal.event-modal-negative {
    background: linear-gradient(135deg, #3a1a1a 0%, #1f0f0f 100%) !important;
    border: 2px solid #ef4444 !important;
}

.modal.event-modal-decision {
    background: linear-gradient(135deg, #3a2e1a 0%, #1f1a0f 100%) !important;
    border: 2px solid #f59e0b !important;
}

.event-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-md);
}

.event-image {
    margin: 0 auto var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-image img {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.event-image.error::after {
    content: attr(data-fallback-icon);
    font-size: 48px;
}

.event-image[data-fallback-type="positive"].error::after {
    color: #22c55e;
}

.event-image[data-fallback-type="negative"].error::after {
    color: #ef4444;
}

.event-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.event-description {
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
}

.event-effects {
    text-align: left;
    margin-bottom: var(--spacing-lg);
}

.event-choices {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.event-choice {
    padding: var(--spacing-lg);
    background-color: var(--color-surface-light);
    border: 2px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.event-choice:hover {
    border-color: var(--color-primary);
    background-color: var(--color-surface);
}

.choice-text {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    text-align: left;
}

.choice-effect {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

/* === Save/Load Modal === */
.save-load-tabs {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
}

.tab-button {
    padding: var(--spacing-md) var(--spacing-lg);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--color-text-secondary);
    font-family: var(--font-header);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.tab-button.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Effects badge */
.effects-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 8px;
    background: linear-gradient(135deg, #ff0052 0%, #cc0042 100%);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 0, 82, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 4px rgba(255, 0, 82, 0);
    }
}

.tab-button.new-effect {
    animation: pulse-tab 2s ease-in-out 3;
}

@keyframes pulse-tab {
    0%, 100% {
        background: none;
    }
    50% {
        background: rgba(255, 0, 82, 0.1);
    }
}

.tab-content {
    display: block;
}

.tab-content.hidden {
    display: none;
}

.save-input {
    width: 100%;
    padding: var(--spacing-md);
    background-color: var(--color-surface-light);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text);
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-md);
}

.save-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.save-slot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background-color: var(--color-surface-light);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-bottom: var(--spacing-sm);
}

.save-slot:hover {
    background-color: rgba(255, 0, 82, 0.1);
    border: 1px solid var(--color-primary);
}

.save-load-container {
    min-width: 500px;
}

.save-slots {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.slot-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 600;
    font-size: var(--font-size-md);
    margin-bottom: var(--spacing-xs);
}

.slot-info {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.save-slot-info h4 {
    margin-bottom: var(--spacing-xs);
}

.save-date,
.save-details {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.save-slot-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* === Notifications === */
.notifications-container {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    pointer-events: none;
}

.notification {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: var(--color-surface);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateX(100%);
    transition: all var(--transition-base);
    pointer-events: auto;
    max-width: 400px;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-icon {
    font-size: var(--font-size-xl);
}

.notification-message {
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: var(--font-size-xl);
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-info {
    border-left: 3px solid var(--color-primary);
}

.notification-success {
    border-left: 3px solid var(--color-success);
}

.notification-warning {
    border-left: 3px solid var(--color-warning);
}

.notification-error {
    border-left: 3px solid var(--color-danger);
}

/* === Tooltip === */
.tooltip {
    position: fixed;
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: var(--font-size-sm);
    color: var(--color-text);
    box-shadow: var(--shadow-md);
    pointer-events: none;
    z-index: 3000;
    max-width: 300px;
    display: none;
}

/* === Settings Modal === */
.settings {
    min-width: 500px;
}

.settings-section {
    margin-bottom: var(--spacing-xl);
}

.settings-section h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
}

.setting-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    cursor: pointer;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.setting-item input[type="range"] {
    flex: 1;
}

.setting-item select {
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--color-surface-light);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text);
}

/* === Help Modal === */
.help {
    max-width: 700px;
}

.help-section {
    margin-bottom: var(--spacing-xl);
}

.help-section h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
}

.help-section ul {
    list-style-position: inside;
    color: var(--color-text-secondary);
}

.help-section li {
    margin-bottom: var(--spacing-sm);
}

kbd {
    padding: var(--spacing-xs) var(--spacing-sm);
    background-color: var(--color-surface-light);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: monospace;
    font-size: var(--font-size-sm);
}

/* === Utility Classes === */
.hidden {
    display: none !important;
}

.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

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

.text-right {
    text-align: right;
}

/* === Responsive Design === */
@media (max-width: 1280px) {
    .sidebar {
        width: 240px;
    }

    .dashboard-right {
        width: 280px;
    }
}

@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }

    .dashboard {
        flex-direction: column;
    }

    .dashboard-right {
        width: 100%;
    }
}

/* === Animations === */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

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

.animate-fade-in {
    animation: fadeIn var(--transition-base);
}

.animate-slide-in {
    animation: slideInRight var(--transition-base);
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* === Game End Modal === */
.game-end-modal {
    text-align: center;
}

.game-end-reason {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.final-stats {
    background: var(--color-surface-light);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.final-stats h3 {
    font-size: var(--font-size-xl);
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.final-stats .stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.final-stats .stat-row:last-child {
    border-bottom: none;
}

.final-stats .stat-label {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
}

.final-stats .stat-value {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text);
}

/* === Content Split (Timeline + Social Feed) === */
.content-split {
    display: flex;
    gap: var(--spacing-md);
    flex: 1;
    min-height: 0;
}

/* === Timeline Section === */
.timeline-section {
    padding: var(--spacing-md);
    background-color: var(--color-surface);
    border-radius: 8px;
    margin: 0;
    flex: 2;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* === Action Panel (slides out from sidebar) === */
.action-panel {
    width: 0;
    min-width: 0;
    overflow: hidden;
    transition: width 0.25s ease, min-width 0.25s ease;
    background: linear-gradient(180deg, #6B1028 0%, #3D0A17 100%);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 0, 82, 0.3);
}

.action-panel.open {
    width: 420px;
    min-width: 420px;
}

/* Countdown bar at top - fills when mouse leaves */
.action-panel-countdown {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.action-panel-countdown::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff0052 0%, #ff4d7d 100%);
    transition: none;
}

.action-panel-countdown.counting::after {
    width: 100%;
    transition: width 2.5s linear;
}

/* Stretch before snap - grows slightly then collapses */
.action-panel.stretching {
    width: 440px !important;
    min-width: 440px !important;
    transition: width 0.12s cubic-bezier(0.34, 1.2, 0.64, 1), min-width 0.12s cubic-bezier(0.34, 1.2, 0.64, 1) !important;
}

/* Quick snap-close after stretch */
.action-panel.snapping {
    width: 0 !important;
    min-width: 0 !important;
    transition: width 0.08s cubic-bezier(0.55, 0, 1, 0.45), min-width 0.08s cubic-bezier(0.55, 0, 1, 0.45) !important;
}

/* Category buttons "pushed" animation when panel snaps */
@keyframes buttonsPushed {
    0% {
        transform: translateX(0);
    }
    15% {
        transform: translateX(-12px);
    }
    35% {
        transform: translateX(-14px);
    }
    55% {
        transform: translateX(4px);
    }
    70% {
        transform: translateX(-2px);
    }
    85% {
        transform: translateX(1px);
    }
    100% {
        transform: translateX(0);
    }
}

.action-buttons.pushed .category-button {
    animation: buttonsPushed 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Stagger the animation for each button */
.action-buttons.pushed .category-button:nth-child(1) { animation-delay: 0ms; }
.action-buttons.pushed .category-button:nth-child(2) { animation-delay: 15ms; }
.action-buttons.pushed .category-button:nth-child(3) { animation-delay: 30ms; }
.action-buttons.pushed .category-button:nth-child(4) { animation-delay: 45ms; }
.action-buttons.pushed .category-button:nth-child(5) { animation-delay: 60ms; }
.action-buttons.pushed .category-button:nth-child(6) { animation-delay: 75ms; }

.action-panel-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 6px 8px;
    background: transparent;
    flex-shrink: 0;
}

.action-panel-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.action-panel-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.action-panel-close svg {
    width: 14px;
    height: 14px;
}

.action-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
}

/* Action Cards - Collapsed by default, expand on hover */
/* SINGLE COLUMN LAYOUT: All rows take full width */
.action-card {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px 10px;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.action-card:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 0, 82, 0.6);
}

.action-card.disabled {
    opacity: 0.5;
    pointer-events: auto;
    cursor: pointer;
}

/* Collapsed header - always visible (single column, full width) */
.action-card-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

/* Row 1: Title + info icon */
.action-card-top-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.action-card-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    text-align: left;
}

.action-card-info {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 0, 82, 0.2);
    border: 1px solid rgba(255, 0, 82, 0.4);
    border-radius: 50%;
    color: #ff0052;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: help;
    flex-shrink: 0;
    transition: all 0.2s;
}

.action-card-info:hover {
    background: rgba(255, 0, 82, 0.4);
    transform: scale(1.1);
}

/* Row 2: Tags (risk, costs, affinity, status) - all together, full width */
.action-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    width: 100%;
}

.action-card-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.3);
}

.action-card-tag.ap { color: #fbbf24; }
.action-card-tag.budget { color: #34d399; }
.action-card-tag.energy { color: #f472b6; }
.action-card-tag.insufficient { color: #f87171; background: rgba(239, 68, 68, 0.2); }

.action-card-tag.affinity {
    background: rgba(251, 191, 36, 0.25);
    color: #fbbf24;
}

.action-card-tag.risk {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.action-card-tag.risk-low {
    background: rgba(34, 197, 94, 0.25);
    color: #22c55e;
}

.action-card-tag.risk-medium {
    background: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}

.action-card-tag.status {
    background: rgba(139, 92, 246, 0.25);
    color: #c4b5fd;
}

.action-card-tag.status.running {
    background: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}

/* Expandable content - hidden by default, shown on hover (single column rows) */
.action-card-expand {
    display: flex;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, margin-top 0.3s ease, opacity 0.25s ease;
    transition-delay: 0.35s;
    opacity: 0;
    width: 100%;
}

.action-card:hover .action-card-expand,
.action-card.expanded .action-card-expand,
.action-card.disabled:hover .action-card-expand {
    max-height: 400px;
    margin-top: 8px;
    opacity: 1;
    transition-delay: 0.15s;
}

/* Row 3: Description (full width) */
.action-card-description {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 10px 0;
    line-height: 1.5;
    width: 100%;
}

/* Row 4: Timing (duration/cooldown) - full width */
.action-card-timing {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 0.75rem;
    width: 100%;
}

.action-card-timing .duration { color: #818cf8; }
.action-card-timing .cooldown { color: #c4b5fd; }

/* Row 5: Effects on KPIs - full width */
.action-card-effects {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
    width: 100%;
}

.action-card-effect {
    font-size: 0.7rem;
    padding: 3px 6px;
    border-radius: 3px;
    font-weight: 600;
}

.action-card-effect.positive {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
}

.action-card-effect.negative {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

/* Row 6: Status message (why not executable) - full width */
.action-card-status {
    font-size: 0.75rem;
    margin-bottom: 10px;
    padding: 6px 8px;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

.action-card-status.error {
    color: #f87171;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.action-card-status.warning {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Row 7: Execute button - full width */
.action-card-button-row {
    margin-top: 4px;
    width: 100%;
}

.action-card-execute {
    width: 100%;
    padding: 6px 10px;
    background: linear-gradient(135deg, #ff0052 0%, #cc0042 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.action-card-execute:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 0, 82, 0.4);
}

.action-card-execute:disabled {
    background: rgba(100, 100, 100, 0.3);
    color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.action-card-confirm {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.action-card-confirm span {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
}

.action-card-confirm-yes,
.action-card-confirm-no {
    padding: 4px 12px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
}

.action-card-confirm-yes {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
}

.action-card-confirm-no {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Hide inbox when action panel is open */
.app-body.action-panel-open .social-feed {
    display: none;
}

/* Active state for category buttons - fuse with action panel */
.category-button.active {
    background: linear-gradient(135deg, #ff0052 0%, #cc0042 100%) !important;
    border-color: #ff0052 !important;
    color: #fff !important;
    transform: translateX(12px);
    border-right: none !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    margin-right: -12px;
    z-index: 10;
    position: relative;
}

.category-button.active .action-label {
    color: #fff !important;
}

/* === Social Feed / Inbox === */
.social-feed {
    flex: 1;
    background-color: #141414b3;
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border: 1px solid #ff00526f;
}

.social-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(135deg, #ff0052 0%, #73082b 100%);
}

.social-feed-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-family: var(--font-header);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text);
}

.social-feed-title .icon {
    color: #ffffff;
}

.social-ticker-week {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.7;
}

.social-feed-count {
    background: #ff0052;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.social-feed-header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.social-feed-clear-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
}

.social-feed-header:hover .social-feed-clear-btn {
    opacity: 1;
}

.social-feed-clear-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.social-feed-clear-btn svg {
    width: 12px;
    height: 12px;
}

.social-feed-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.social-feed-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
    padding: var(--spacing-lg);
}

.social-feed-empty-icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--spacing-sm);
    opacity: 0.3;
}

.social-feed-empty p {
    font-size: 14px;
    margin: 0 0 4px 0;
    color: rgba(255, 255, 255, 0.5);
}

.social-feed-empty span {
    font-size: 11px;
}

/* Industry Feed Panel Structure */
.industry-feed-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Industry Browse Button */
.industry-browse-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.industry-browse-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.industry-browse-btn svg {
    width: 12px;
    height: 12px;
}

/* Make button relative for badge positioning */
#industry-back-btn {
    position: relative;
}

/* Inbox back button unread badge */
.inbox-back-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #ff0052;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Industry Panel Header - Purple color scheme */
.social-feed-header.industry-header {
    background: linear-gradient(135deg, #9447e0 0%, #5a2d91 100%);
}

/* Industry Status Content */
.industry-status-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-sm);
}

.industry-section {
    margin-bottom: var(--spacing-md);
}

.industry-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-header);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 var(--spacing-sm) 0;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.industry-section-title svg {
    width: 14px;
    height: 14px;
    color: #9447e0;
}

/* Industry Sub-tabs */
.industry-sub-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.industry-sub-tab {
    font-family: var(--font-header);
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
    padding: 6px 10px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    position: relative;
}

.industry-sub-tab:hover {
    color: rgba(255, 255, 255, 0.7);
}

.industry-sub-tab.active {
    color: #9447e0;
    background: rgba(148, 71, 224, 0.15);
}

.industry-sub-tab.active::after {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 0;
    right: 0;
    height: 2px;
    background: #9447e0;
}

/* Competition tab styling */
.industry-sub-tab.competition-tab {
    color: #e06a47;
}

.industry-sub-tab.competition-tab:hover {
    color: #ff8866;
    background: rgba(224, 106, 71, 0.1);
}

.industry-sub-tab.competition-tab.active {
    color: #ff8866;
    background: rgba(224, 106, 71, 0.2);
}

.industry-sub-tab.competition-tab.active::after {
    background: #ff8866;
}

.industry-competition-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    margin-left: 4px;
    font-size: 10px;
    font-weight: bold;
    background: rgba(224, 106, 71, 0.3);
    border-radius: 8px;
    color: #ff8866;
}

/* Industry Rankings */
.industry-rankings {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.industry-loading {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    text-align: center;
    padding: var(--spacing-md);
}

.industry-rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.industry-rank-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.industry-rank-item.player-game {
    background: rgba(255, 0, 82, 0.1);
    border-color: rgba(255, 0, 82, 0.3);
}

.industry-rank-item.player-game:hover {
    background: rgba(255, 0, 82, 0.15);
    border-color: rgba(255, 0, 82, 0.4);
}

.industry-rank-position {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 32px;
    text-align: center;
}

.industry-rank-position .rank-num {
    font-family: var(--font-header);
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
}

.industry-rank-item:nth-child(1) .rank-num {
    color: #ffd700;
}

.industry-rank-item:nth-child(2) .rank-num {
    color: #c0c0c0;
}

.industry-rank-item:nth-child(3) .rank-num {
    color: #cd7f32;
}

/* Rank change indicators */
.rank-change {
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
}

.rank-change.up {
    color: #22c55e;
}

.rank-change.down {
    color: #ef4444;
}

.rank-change.same {
    color: rgba(255, 255, 255, 0.3);
}

.industry-rank-cover {
    flex-shrink: 0;
    width: 30px;
    height: 40px;
    position: relative;
}

.industry-rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid rgba(148, 71, 224, 0.4);
}

.industry-rank-cover:hover img {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 90px;
    height: 120px;
    z-index: 1000;
    outline: 2px solid rgba(148, 71, 224, 0.6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

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

.industry-rank-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.competitor-tag {
    font-size: 8px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 6px;
    vertical-align: middle;
}

.competitor-tag.competitor {
    color: #ffa500;
    background: rgba(255, 165, 0, 0.2);
    border: 1px solid rgba(255, 165, 0, 0.4);
}

.competitor-tag.rival {
    color: #ff5050;
    background: rgba(255, 80, 80, 0.2);
    border: 1px solid rgba(255, 80, 80, 0.4);
    animation: rival-pulse 2s ease-in-out infinite;
}

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

.industry-rank-meta {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

.industry-rank-score {
    font-family: var(--font-header);
    font-size: 11px;
    font-weight: 500;
    color: #9447e0;
    background: rgba(148, 71, 224, 0.15);
    padding: 2px 8px;
    border-radius: 2px;
}

.industry-rank-item.player-game .industry-rank-score {
    color: #ff0052;
    background: rgba(255, 0, 82, 0.15);
}

.industry-rank-stats {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.industry-rank-launch {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Color-coded launch timing */
.industry-rank-launch.launch-imminent {
    color: #f04444;
    background: rgba(240, 68, 68, 0.15);
}

.industry-rank-launch.launch-soon {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
}

.industry-rank-launch.launch-far {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}

.industry-rank-launch.launch-released {
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.industry-rank-hype {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
}

/* Social Feed Message Item */
.social-message {
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    border-left: 3px solid #555;
    transition: background var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast);
}

/* Only animate NEW messages sliding in - not expand/collapse */
.social-message.slide-in {
    animation: slideInRight 0.3s ease-out;
}

/* Read message styling - consistently faded */
.social-message:not(.unread) {
    opacity: 0.4;
    background: rgba(255, 255, 255, 0.02);
}

.social-message:not(.unread):hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.06);
}

/* Unread message styling - neutral background, more visible */
.social-message.unread {
    background: #0a0306a1;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.social-message.unread:hover {
    background: rgba(218, 28, 101, 0.253);
    border-color: #ff0052a1
}

/* Separator between unread and read messages */
.social-feed-separator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    padding: 0 4px;
}

.social-feed-separator::before,
.social-feed-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}

.social-feed-separator span {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* New message wipe and glow animation */
@keyframes newMessageWipe {
    0% {
        clip-path: inset(0 100% 0 0);
        opacity: 0;
    }
    100% {
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
}

@keyframes newMessageGlow {
    0% {
        box-shadow: 0 0 12px rgba(255, 51, 102, 0.6), 0 0 24px rgba(255, 51, 102, 0.25);
    }
    100% {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    }
}

.social-message.new-message-glow {
    animation: newMessageWipe 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards,
               newMessageGlow 1.2s ease-out 0.8s forwards;
}

/* Message hover menu */
.social-message {
    position: relative;
}

.social-message-actions {
    position: absolute;
    top: 4px;
    right: 4px;
    display: none;
    gap: 4px;
}

.social-message:hover .social-message-actions {
    display: flex;
}

.social-message-action-btn {
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.social-message-action-btn:hover {
    background: rgba(255, 0, 82, 0.8);
    color: white;
}

.social-message-action-btn svg {
    width: 14px;
    height: 14px;
}

/* FROM header - now inline with timestamp */
.social-message-from {
    font-size: 10px;
    font-weight: 700;
    color: #ff0052;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.9;
}

/* Inline expand link after sender - pill button style */
.inline-expand-link {
    font-size: 9px;
    font-weight: 600;
    color: #ff0052;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-left: 6px;
    padding: 2px 6px;
    background: rgba(255, 0, 82, 0.15);
    border-radius: 3px;
    transition: background 0.15s ease;
}

.inline-expand-link:hover {
    background: rgba(255, 0, 82, 0.3);
}

/* Updated message actions - now at bottom */
.social-message .social-message-actions {
    position: static;
    display: none;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.social-message:hover .social-message-actions,
.social-message.expanded .social-message-actions {
    display: flex;
}

/* Action button styling overrides */
.social-message-actions .social-message-action-btn {
    width: auto;
    height: auto;
    padding: 4px 10px;
    gap: 4px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.social-message-action-btn span {
    display: inline;
}

.social-message-action-btn.read-more-btn {
    background: rgba(255, 0, 82, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.social-message-action-btn.read-more-btn:hover {
    background: rgba(255, 0, 82, 0.4);
    color: white;
}

.social-message-action-btn.dismiss-btn {
    margin-left: auto;
}

/* Expanded message state */
.social-message.expanded .social-message-content {
    max-height: none;
}

/* Expand animation - wipe from top with bezier easing */
@keyframes expandWipeDown {
    0% {
        clip-path: inset(0 0 100% 0);
        opacity: 0.5;
    }
    100% {
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
}

.social-message.expanding {
    animation: expandWipeDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Message type colors - LEFT BORDER ONLY
   - success/positive: green
   - error/negative: red
   - warning/choice: yellow
   - advisor: teal
   - info/other: grey (default)
*/

/* Positive events - green border */
.social-message.message-success {
    border-left-color: #10b981;
}

/* Negative events - red border */
.social-message.message-error {
    border-left-color: #ef4444;
}

/* Choice events - yellow border */
.social-message.message-warning,
.social-message.message-choice {
    border-left-color: #f59e0b;
}

/* Info/default - grey border (already default #555) */
.social-message.message-info {
    border-left-color: #555;
}

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

.social-message-time {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

.social-message-content {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.social-message-content strong {
    color: var(--color-text);
}

/* Expand hint - always visible indicator for expandable messages */
.social-message-expand-hint {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 4px 8px;
    font-size: 10px;
    color: #ff0052;
    background: rgba(255, 0, 82, 0.1);
    border: 1px dashed rgba(255, 0, 82, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
    width: fit-content;
}

.social-message-expand-hint:hover {
    background: rgba(255, 0, 82, 0.2);
    border-color: rgba(255, 0, 82, 0.5);
}

.social-message-expand-hint svg {
    width: 12px;
    height: 12px;
}

/* Advisor message type - teal border only */
.social-message.message-advisor {
    border-left-color: #14b8a6;
}

/* Synergy message type - gold/orange with special styling */
.social-message.message-synergy {
    border-left-color: #CD7F32;
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.15) 0%, rgba(205, 127, 50, 0.1) 100%);
    border: 1px solid rgba(184, 134, 11, 0.3);
    border-left-width: 3px;
}

.social-message.message-synergy .social-message-from {
    color: #CD7F32;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.social-message.message-synergy .synergy-name,
.social-message.message-synergy .synergy-name-large {
    color: #B8860B;
    font-weight: 600;
}

.social-message.message-synergy .synergy-name-large {
    font-size: 1.1em;
    display: block;
    padding: 8px 0;
}

/* Choice buttons in inbox messages */
.social-message-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-choice-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 14px;
    background: rgba(255, 0, 82, 0.15);
    border: 1px solid rgba(255, 0, 82, 0.4);
    border-radius: 6px;
    color: var(--color-text);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}

.social-choice-btn:hover {
    background: rgba(255, 0, 82, 0.3);
    border-color: var(--color-primary);
    transform: translateX(4px);
}

.social-choice-btn .choice-label {
    font-weight: 600;
    margin-bottom: 4px;
    font-family: var(--font-family);
}

.social-choice-btn .choice-effects {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.social-choice-btn .choice-effect {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.3);
}

.social-choice-btn .choice-effect.positive {
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.2);
}

.social-choice-btn .choice-effect.negative {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.2);
}

/* Choice made confirmation */
.social-message-choice-made {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0;
    padding: 8px 12px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 6px;
    color: var(--color-success);
    font-size: 11px;
    font-weight: 500;
}

.social-message-choice-made svg {
    width: 14px;
    height: 14px;
    display: inline;
    vertical-align: middle;
    margin-right: 4px;
}

/* Outcome text displayed after choice is made */
.social-message-outcome {
    color: var(--color-text-secondary);
    font-weight: 400;
    font-style: italic;
    padding-top: 4px;
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    margin-top: 2px;
}

/* Action required tag for microevents */
.action-required-tag {
    display: inline-block;
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: action-required-pulse 2s ease-in-out infinite;
}

@keyframes action-required-pulse {
    0%, 100% {
        box-shadow: inset 0 0 4px rgba(245, 158, 11, 0.3), 0 0 4px rgba(245, 158, 11, 0.2);
    }
    50% {
        box-shadow: inset 0 0 10px rgba(245, 158, 11, 0.7), 0 0 8px rgba(245, 158, 11, 0.5);
    }
}

/* Luck Stats Display */
.luck-stat-item {
    cursor: pointer;
    position: relative;
}

.luck-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
}

.luck-indicator .luck-icon {
    font-size: 12px;
}

.luck-indicator .luck-text {
    font-weight: 600;
}

.luck-indicator.luck-bad .luck-text { color: #ef4444; }
.luck-indicator.luck-average .luck-text { color: #f59e0b; }
.luck-indicator.luck-good .luck-text { color: #10b981; }

/* Luck Stats Tooltip */
.luck-stats-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
}

.luck-stat-item:hover .luck-stats-tooltip,
.luck-stats-tooltip:hover {
    display: block;
}

.luck-tooltip-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.luck-tooltip-icon {
    font-size: 16px;
}

.luck-tooltip-title {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.luck-tooltip-content {
    font-size: 12px;
}

.luck-tooltip-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    color: rgba(255, 255, 255, 0.7);
}

.luck-tooltip-row span:last-child {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.luck-tooltip-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

.luck-tooltip-rarity {
    margin-top: 4px;
}

.rarity-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 6px;
}

.rarity-breakdown {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.rarity-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
}

.rarity-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.rarity-item.common .rarity-dot { background: #94a3b8; }
.rarity-item.uncommon .rarity-dot { background: #22c55e; }
.rarity-item.rare .rarity-dot { background: #3b82f6; }
.rarity-item.legendary .rarity-dot { background: #f59e0b; }

.rarity-item.common { color: #94a3b8; }
.rarity-item.uncommon { color: #22c55e; }
.rarity-item.rare { color: #3b82f6; }
.rarity-item.legendary { color: #f59e0b; }

.social-message-expand-hint span {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.social-message-stats {
    display: flex;
    gap: var(--spacing-xs);
    margin-top: 6px;
    flex-wrap: wrap;
}

.social-message-stat {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.05);
}

.social-message-stat.stat-positive {
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.1);
}

.social-message-stat.stat-negative {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.1);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
        max-height: 200px;
        margin-bottom: var(--spacing-sm);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
        max-height: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}

.social-message.removing {
    animation: slideOutLeft 0.25s ease-out forwards;
    overflow: hidden;
    pointer-events: none;
}

/* Responsive: stack on smaller screens */
@media (max-width: 1200px) {
    .content-split {
        flex-direction: column;
    }

    .timeline-section,
    .social-feed {
        flex: none;
    }

    .social-feed {
        max-height: 250px;
    }
}

.timeline-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* === Social Ticker === */
.social-ticker-container {
    display: flex;
    align-items: stretch;
    margin-top: var(--spacing-sm);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 0, 102, 0.2);
}

.social-ticker-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    background: linear-gradient(135deg, rgba(255, 0, 102, 0.3) 0%, rgba(139, 0, 139, 0.2) 100%);
    border-right: 1px solid rgba(255, 0, 102, 0.3);
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.social-ticker-label .icon {
    width: 14px;
    height: 14px;
    color: var(--color-accent);
}

.social-ticker {
    flex: 1;
    height: 32px;
    background: linear-gradient(90deg,
        rgba(255, 0, 102, 0.08) 0%,
        rgba(139, 0, 139, 0.05) 50%,
        rgba(255, 0, 102, 0.08) 100%);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

.social-ticker::before,
.social-ticker::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    z-index: 2;
    pointer-events: none;
}

.social-ticker::before {
    left: 0;
    background: linear-gradient(90deg, rgba(18, 18, 24, 0.9) 0%, transparent 100%);
}

.social-ticker::after {
    right: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(18, 18, 24, 0.9) 100%);
}

.social-ticker-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    padding-left: 30px;
}

.ticker-content {
    display: inline-flex;
    align-items: center;
    padding-right: 60px;
}

.ticker-message {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    font-family: 'Play', sans-serif;
    letter-spacing: 0.3px;
}

.ticker-source {
    color: var(--color-accent);
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    margin-right: 6px;
    opacity: 0.9;
}

.ticker-dot {
    color: var(--color-accent);
    margin: 0 20px;
    font-size: 10px;
    opacity: 0.5;
}

.ticker-separator {
    color: var(--color-accent);
    margin: 0 30px;
    font-size: 11px;
    opacity: 0.4;
    font-weight: bold;
}

.social-ticker-container:hover .social-ticker {
    background: linear-gradient(90deg,
        rgba(255, 0, 102, 0.12) 0%,
        rgba(139, 0, 139, 0.08) 50%,
        rgba(255, 0, 102, 0.12) 100%);
}

.social-ticker-container:hover .ticker-message {
    color: rgba(255, 255, 255, 0.95);
}

.timeline-section .tab-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.timeline-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 var(--spacing-md) 0;
    color: rgba(255, 255, 255, 0.9);
}

.timeline-container {
    margin-top: var(--spacing-lg);
    min-height: 100px;
}

/* === Event Feed === */
.event-feed {
    background-color: var(--color-surface);
    border-radius: 8px;
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.event-feed h3 {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

.event-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.event-placeholder {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    text-align: center;
    padding: var(--spacing-md);
}

/* === Action History === */
.action-history {
    background-color: var(--color-surface);
    border-radius: 8px;
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.action-history h3 {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    padding-right: var(--spacing-xs);
}

.history-placeholder {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    text-align: center;
    padding: var(--spacing-md);
}

/* === Rich Tooltips === */
.rich-tooltip {
    position: fixed;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: var(--spacing-md);
    max-width: 400px;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: opacity 0.2s ease;
}

.rich-tooltip.hidden {
    opacity: 0;
    pointer-events: none;
}

.rich-tooltip .tooltip-header {
    font-size: var(--font-size-lg);
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--color-border);
}

.rich-tooltip .tooltip-body {
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

.rich-tooltip .tooltip-body p {
    margin: 0 0 var(--spacing-sm) 0;
}

.rich-tooltip .tooltip-details {
    font-style: italic;
    color: var(--color-text-secondary);
}

.rich-tooltip .tooltip-section {
    margin-top: var(--spacing-md);
}

.rich-tooltip .tooltip-section strong {
    color: var(--color-primary);
    display: block;
    margin-bottom: var(--spacing-xs);
}

.rich-tooltip .tooltip-section ul {
    margin: var(--spacing-xs) 0 0 var(--spacing-md);
    padding: 0;
}

.rich-tooltip .tooltip-section li {
    margin-bottom: var(--spacing-xs);
    line-height: 1.5;
}

.rich-tooltip .tooltip-insight {
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm);
    background: rgba(255, 0, 82, 0.1);
    border-left: 3px solid var(--color-awareness);
    border-radius: 4px;
}

.rich-tooltip .tooltip-insight strong {
    color: var(--color-awareness);
    display: block;
    margin-bottom: var(--spacing-xs);
}

.rich-tooltip .tooltip-insight p {
    margin: 0;
    font-size: var(--font-size-xs);
}

.rich-tooltip .tooltip-simple {
    padding: 0;
}

.rich-tooltip .tooltip-simple p {
    margin: 0;
    font-size: var(--font-size-sm);
}

/* === Glossary Styles === */
.glossary-section {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 2px solid var(--color-border);
}

.glossary-terms {
    display: grid;
    gap: var(--spacing-md);
}

.glossary-term {
    padding: var(--spacing-md);
    background: rgba(255, 0, 82, 0.05);
    border-left: 3px solid var(--color-primary);
    border-radius: 4px;
}

.glossary-term h4 {
    margin: 0 0 var(--spacing-xs) 0;
    color: var(--color-primary);
    font-size: var(--font-size-md);
}

.glossary-term .term-definition {
    margin: 0 0 var(--spacing-xs) 0;
    line-height: 1.6;
}

.glossary-term .term-example {
    margin: 0;
    color: #777777;
    font-size: var(--font-size-sm);
}

/* === Category Header Styles === */
.category-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.category-info-icon {
    font-size: 0.9rem;
    color: #ff0052;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.category-info-icon:hover {
    opacity: 1;
    color: #ff0052;
}

/* === Category Explanation Styles === */
.category-explanation {
    max-width: 100%;
}

.category-explanation h3 {
    margin: 0 0 var(--spacing-sm) 0;
    color: var(--color-primary);
}

.category-explanation .explanation-section {
    margin-top: var(--spacing-md);
}

.category-explanation .explanation-section strong {
    color: var(--color-primary);
    display: block;
    margin-bottom: var(--spacing-xs);
}

.category-explanation ul {
    margin: var(--spacing-xs) 0 0 var(--spacing-md);
    padding: 0;
}

.category-explanation li {
    margin-bottom: var(--spacing-xs);
    line-height: 1.5;
}

/* === Event Modal Effects Styling === */
.event-effects-section {
    margin-top: var(--spacing-md);
}

.event-effects-section h4 {
    margin: 0 0 var(--spacing-sm) 0;
    color: var(--color-text);
    font-size: var(--font-size-md);
}

.event-effects {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.effect-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 4px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    white-space: nowrap;
}

.effect-badge.effect-positive {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--color-success);
    color: var(--color-success);
}

.effect-badge.effect-negative {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--color-danger);
    color: var(--color-danger);
}

/* === Debug Panel === */
.debug-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 700px;
    max-height: 600px;
    background: rgba(10, 10, 10, 0.98);
    border: 2px solid rgba(255, 0, 82, 0.5);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.debug-panel.minimized {
    transform: translateY(calc(100% - 50px));
}

.debug-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255, 0, 82, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border-bottom: 1px solid rgba(255, 0, 82, 0.3);
    cursor: pointer;
    border-radius: 10px 10px 0 0;
}

.debug-panel-title {
    font-size: 14px;
    font-weight: 700;
    color: #ff3377;
    display: flex;
    align-items: center;
    gap: 8px;
}

.debug-panel-controls {
    display: flex;
    gap: 8px;
}

.debug-tabs {
    display: flex;
    gap: 4px;
}

.debug-tab {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.debug-tab:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

.debug-tab.active {
    background: rgba(255, 0, 82, 0.3);
    color: #ff3377;
    border-bottom: 2px solid #ff3377;
}

.debug-panel-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.2s;
}

.debug-panel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.debug-panel-content {
    overflow-y: auto;
    padding: 12px;
    max-height: 540px;
}

.debug-event-category {
    margin-bottom: 16px;
}

.debug-category-header {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

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

.debug-event-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.5);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.debug-event-btn:hover {
    background: rgba(255, 0, 82, 0.2);
    border-color: rgba(255, 0, 82, 0.6);
    transform: translateX(4px);
}

.debug-event-btn.positive {
    border-left: 3px solid var(--color-success);
}

.debug-event-btn.negative {
    border-left: 3px solid var(--color-danger);
}

.debug-event-btn.decision {
    border-left: 3px solid var(--color-warning);
}

.debug-event-btn.critical {
    border-left: 3px solid #ff0052;
}

.debug-event-btn.high {
    border-left: 3px solid #ef4444;
}

.debug-event-btn.medium {
    border-left: 3px solid #f59e0b;
}

.debug-event-btn.low {
    border-left: 3px solid #10b981;
}

/* Microevent debug styles */
.debug-microevent-group {
    margin-bottom: 12px;
}

.debug-microevent-action {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-accent);
    padding: 4px 8px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 4px;
    margin-bottom: 6px;
}

.debug-microevent-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 12px;
}

.debug-microevent-btn {
    position: relative;
    padding-left: 70px !important;
}

.debug-microevent-btn .rarity-badge {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 8px;
    text-transform: uppercase;
    font-weight: 700;
}

.debug-microevent-btn.rarity-common .rarity-badge {
    background: rgba(156, 163, 175, 0.3);
    color: #9ca3af;
}

.debug-microevent-btn.rarity-uncommon .rarity-badge {
    background: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.debug-microevent-btn.rarity-rare .rarity-badge {
    background: rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

.debug-microevent-btn.rarity-legendary .rarity-badge {
    background: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.debug-event-name {
    flex: 1;
    font-weight: 600;
}

.debug-event-type {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.debug-event-type.positive {
    background: rgba(16, 185, 129, 0.2);
    color: var(--color-success);
}

.debug-event-type.negative {
    background: rgba(239, 68, 68, 0.2);
    color: var(--color-danger);
}

.debug-event-type.decision {
    background: rgba(245, 158, 11, 0.2);
    color: var(--color-warning);
}

.debug-event-type.critical {
    background: rgba(255, 0, 82, 0.2);
    color: #ff0052;
}

.debug-event-type.high {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.debug-event-type.medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.debug-event-type.low {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.effect-badge .effect-label {
    opacity: 0.9;
}

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

.event-insights {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(255, 0, 82, 0.1);
    border-left: 3px solid var(--color-awareness);
    border-radius: 4px;
}

.event-insights h4 {
    margin: 0 0 var(--spacing-xs) 0;
    color: var(--color-awareness);
    font-size: var(--font-size-md);
}

.event-insights p {
    margin: 0;
    line-height: 1.6;
    color: var(--color-text);
}

/* === Active Effects Styling === */
.effects-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.effects-placeholder {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    text-align: center;
    padding: var(--spacing-md);
}

.effect-card {
    background: linear-gradient(135deg, rgba(255, 0, 82, 0.1) 0%, rgba(255, 0, 82, 0.1) 100%);
    border: 1px solid rgba(255, 0, 82, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.2s ease;
}

.effect-card.positive {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

.effect-card.negative {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

.effect-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 82, 0.2);
}

.effect-card.positive:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.effect-card.negative:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.effect-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.effect-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text);
}

.effect-duration {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.effect-description {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.effect-multipliers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.effect-multiplier {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
}

.effect-multiplier.positive {
    color: #10B981;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

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

.effect-multiplier-label {
    opacity: 0.7;
}

.effect-multiplier-value {
    font-weight: 600;
}

/* === Inline Styles Moved from HTML === */

/* Phase tooltip trigger icon */
#phase-tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: rgba(255, 0, 82, 0.2);
    border: 1px solid rgba(255, 0, 82, 0.4);
    border-radius: 50%;
    cursor: help;
    margin-left: 6px;
    position: relative;
    color: #ff0052;
}

#phase-tooltip-trigger i {
    width: 10px;
    height: 10px;
    stroke: #ff0052;
}

/* Game info tooltip trigger */
#game-info-tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: rgba(255, 0, 82, 0.2);
    border: 1px solid rgba(255, 0, 82, 0.4);
    border-radius: 50%;
    cursor: help;
    transition: all 0.2s;
}

#game-info-tooltip-trigger i {
    width: 10px;
    height: 10px;
    stroke: #ff0052;
}

/* End turn button */
#end-turn-button {
    width: 100%;
    margin-top: 24px;
}

/* Sidebar bottom buttons */
.sidebar-bottom .btn {
    flex: 1;
}

/* KPI specific colors */
.kpi-display-budget .kpi-value {
    color: #34d399;
    font-size: 24px !important;
}

.ap-display {
    color: #fbbf24;
}

[data-kpi="teamEnergy"] .kpi-value {
    color: #f472b6;
}

/* Budget progress fill */
#budget-progress-fill-top {
    width: 100%;
}

/* Active effects placeholder */
.active-effects-placeholder {
    color: rgba(255, 255, 255, 0.4);
    padding: 1rem;
    text-align: center;
    font-size: 0.875rem;
}

/* Effects badge */
#effects-badge {
    display: none;
}

/* Modal overlay */
#modals {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#modals.active {
    display: flex;
}

/* Debug panel */
#debug-panel {
    display: none;
}

/* === Enhanced Game End Modal === */

/* Make game end modal extra large */
.modal.game-end-modal-enhanced,
.modal-container .modal.game-end-modal-enhanced {
    width: 85vw !important;
    max-width: 1600px !important;
    max-height: 90vh !important;
}

/* Remove top padding from modal body for game-end modal */
.modal.game-end-modal-enhanced .modal-body {
    padding-top: 0 !important;
}

/* Game end modal container */
.game-end-modal-enhanced {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Compact header with grade badge */
.game-end-header-compact {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: 8px var(--spacing-lg);
    background: linear-gradient(135deg, rgba(255, 0, 82, 0.1) 0%, rgba(255, 0, 82, 0.05) 100%);
    border-radius: 8px;
    border: 1px solid rgba(255, 0, 82, 0.2);
    margin-top: 0;
}

/* Legacy header (fallback) */
.game-end-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, rgba(255, 0, 82, 0.1) 0%, rgba(255, 0, 82, 0.05) 100%);
    border-radius: 8px;
    border: 1px solid rgba(255, 0, 82, 0.2);
}

.grade-badge {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.grade-letter {
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    color: #0a0a0a;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.grade-score {
    font-size: 12px;
    font-weight: 700;
    color: #0a0a0a;
    margin-top: 2px;
}

.headline {
    flex: 1;
}

.headline h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.headline-compact {
    flex: 1;
}

.headline-compact h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.industry-recognition {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0;
}

/* Two-column layout */
.game-end-columns {
    display: flex;
    gap: var(--spacing-lg);
    min-height: 500px;
    max-height: calc(90vh - 200px);
}

.game-end-left-column {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    overflow-y: auto;
    padding-right: var(--spacing-sm);
}

.game-end-right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Campaign story - compact */
.campaign-story {
    padding: var(--spacing-lg);
    background: var(--color-surface);
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.campaign-story p {
    margin: 0;
    line-height: 1.6;
    color: var(--color-text);
}

.campaign-story-compact {
    padding: var(--spacing-md);
    background: var(--color-surface);
    border-radius: 6px;
    border: 1px solid var(--color-border);
}

.campaign-story-compact p {
    margin: 0;
    line-height: 1.5;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

/* Tabbed navigation */
.game-end-tabs {
    display: flex;
    gap: 4px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    padding: var(--spacing-sm) var(--spacing-sm) 0 var(--spacing-sm);
}

.tab-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--color-text);
    background: rgba(255, 0, 82, 0.1);
}

.tab-btn.active {
    color: var(--color-text);
    background: var(--color-surface-light);
    border-bottom: 2px solid var(--color-primary);
}

/* Postmortem modal tab buttons (modal-specific) */
.postmortem-tab-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.postmortem-tab-btn:hover {
    color: var(--color-text);
    background: rgba(255, 0, 82, 0.1);
}

.postmortem-tab-btn.active {
    color: var(--color-text);
    background: var(--color-surface-light);
    border-bottom: 2px solid var(--color-primary);
}

/* Tab content */
.game-end-content {
    flex: 1;
    position: relative;
    overflow-y: auto;
    padding: var(--spacing-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0 0 6px 6px;
}

.tab-content {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* Postmortem modal tab content (modal-specific) */
.postmortem-tab-content {
    display: none;
    animation: fadeIn 0.2s ease;
}

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

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

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    gap: var(--spacing-sm);
    align-items: flex-start;
    transition: all var(--transition-fast);
}

.stat-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 0, 82, 0.2);
}

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

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

.stat-label {
    font-size: 11px;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 2px;
}

.stat-value-large {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.1;
    margin-bottom: 2px;
}

.stat-growth {
    font-size: 11px;
    color: var(--color-success);
    font-weight: 600;
}

/* Performance metrics */
.performance-metrics {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: var(--spacing-md);
}

.performance-metrics h4 {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--color-text);
}

.metric-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(51, 51, 51, 0.3);
    font-size: var(--font-size-sm);
}

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

.metric-value {
    font-weight: 700;
    color: var(--color-primary);
}

/* Strategy assessment */
.strategy-assessment {
    background: rgba(255, 0, 82, 0.05);
    border: 1px solid rgba(255, 0, 82, 0.2);
    border-radius: 6px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.strategy-header h3 {
    margin: 0 0 4px 0;
    font-size: var(--font-size-lg);
    color: var(--color-primary);
}

.strategy-header p {
    margin: 0 0 var(--spacing-sm) 0;
    color: var(--color-text-secondary);
    line-height: 1.5;
    font-size: var(--font-size-sm);
}

.strategy-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.strategy-metric {
    padding: 4px 0;
    font-size: var(--font-size-sm);
}

.strategy-metric strong {
    color: var(--color-text);
}

/* Top actions */
.top-actions {
    background: transparent;
    border: none;
    padding: 0;
}

.top-actions h4 {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: var(--font-size-base);
    font-weight: 700;
}

.action-performance {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    margin-bottom: 6px;
    background: rgba(255, 0, 82, 0.05);
    border: 1px solid rgba(255, 0, 82, 0.1);
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.action-performance:hover {
    background: rgba(255, 0, 82, 0.1);
    border-color: var(--color-primary);
}

.action-rank {
    font-size: 16px;
    font-weight: 900;
    color: var(--color-primary);
    min-width: 28px;
    text-align: center;
}

.action-details {
    flex: 1;
}

.action-name {
    font-weight: 700;
    margin-bottom: 2px;
    text-transform: capitalize;
    font-size: var(--font-size-sm);
}

.action-stats {
    font-size: 11px;
    color: var(--color-text-secondary);
}

.action-stats span {
    margin-right: 6px;
}

/* Key moments */
.key-moments {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.moment-card {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: rgba(255, 0, 82, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.moment-card:hover {
    border-color: var(--color-primary);
    background: rgba(255, 0, 82, 0.08);
}

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

.moment-content {
    flex: 1;
}

.moment-title {
    font-weight: 700;
    font-size: var(--font-size-base);
    margin-bottom: 2px;
    color: var(--color-text);
}

.moment-description {
    color: var(--color-text-secondary);
    line-height: 1.5;
    font-size: var(--font-size-sm);
}

/* Milestones */
.milestones {
    background: transparent;
    border: none;
    padding: 0;
}

.milestones h4 {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: var(--font-size-base);
}

.milestone-item {
    padding: 6px 0;
    border-bottom: 1px solid rgba(51, 51, 51, 0.3);
    font-size: var(--font-size-sm);
}

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

/* Insights */
.insights-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.insight-card {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: rgba(16, 185, 129, 0.05);
    border-left: 3px solid var(--color-success);
    border-radius: 4px;
}

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

.insight-content {
    flex: 1;
}

.insight-title {
    font-weight: 700;
    font-size: var(--font-size-base);
    margin-bottom: 2px;
    color: var(--color-text);
}

.insight-message {
    color: var(--color-text-secondary);
    line-height: 1.5;
    font-size: var(--font-size-sm);
}

/* Connections Tab Styles */
.connections-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.connections-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.connections-section h4 {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 var(--spacing-xs) 0;
}

.connections-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.connection-card {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: rgba(255, 0, 82, 0.05);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.connection-card:hover {
    border-color: #ff0052;
    background: rgba(255, 0, 82, 0.12);
}

.connection-card-success {
    background: rgba(16, 185, 129, 0.05);
    border-left: 3px solid var(--color-success);
}

.connection-card-success:hover {
    background: rgba(16, 185, 129, 0.1);
}

.connection-card-danger {
    background: rgba(239, 68, 68, 0.05);
    border-left: 3px solid var(--color-danger);
}

.connection-card-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.connection-card-neutral {
    background: rgba(245, 158, 11, 0.05);
    border-left: 3px solid #f59e0b;
}

.connection-card-neutral:hover {
    background: rgba(245, 158, 11, 0.1);
}

.connection-card-studio {
    background: rgba(255, 0, 82, 0.08);
    border-left: 3px solid #ff0052;
}

.connection-card-studio:hover {
    background: rgba(255, 0, 82, 0.15);
}

.connections-section-studio h4 {
    color: #ff0052;
}

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

.connection-content {
    flex: 1;
}

.connection-name {
    font-weight: 700;
    font-size: var(--font-size-base);
    margin-bottom: 2px;
    color: var(--color-text);
}

.connection-details {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.no-connections {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--color-text-secondary);
}

.no-connections p {
    margin: 0;
    line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .game-end-columns {
        flex-direction: column;
    }

    .game-end-left-column {
        flex: none;
        max-height: none;
    }

    .game-end-right-column {
        flex: none;
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .modal.game-end-modal-enhanced {
        width: 95vw;
    }

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

    .game-end-header,
    .game-end-header-compact {
        flex-direction: column;
        text-align: center;
    }

    .game-end-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.primary {
    color: var(--color-primary);
}
