/* ============================================
           MODERN DESIGN SYSTEM - CSS VARIABLES
           ============================================ */
        :root {
            /* Primary - MMT brand */
            --color-primary: #012169;
            --color-primary-light: #003399;
            --color-primary-dark: #000d2e;

            /* Semantic colors */
            --color-success: #10b981;
            --color-warning: #f59e0b;
            --color-danger: #ef4444;
            --color-info: #3b82f6;

            /* Neutrals */
            --color-gray-50: #f9fafb;
            --color-gray-100: #f3f4f6;
            --color-gray-200: #e5e7eb;
            --color-gray-300: #d1d5db;
            --color-gray-400: #9ca3af;
            --color-gray-500: #6b7280;
            --color-gray-600: #4b5563;
            --color-gray-700: #374151;
            --color-gray-800: #1f2937;
            --color-gray-900: #111827;

            /* Spacing system */
            --space-1: 4px;
            --space-2: 8px;
            --space-3: 12px;
            --space-4: 16px;
            --space-6: 24px;
            --space-8: 32px;

            /* Typography */
            --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
            --font-size-xs: 10px;
            --font-size-sm: 12px;
            --font-size-base: 14px;
            --font-size-lg: 16px;
            --font-size-xl: 20px;
            --font-size-2xl: 24px;

            /* Border radius */
            --radius-sm: 4px;
            --radius-md: 6px;
            --radius-lg: 8px;
            --radius-xl: 12px;

            /* Shadows */
            --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
            --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
            --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
        }

        * {
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            margin: 0;
            padding: 0;
            font-family: var(--font-sans);
            font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            overflow: hidden;
            height: 100vh;
            background: linear-gradient(135deg, var(--color-primary) 0%, #C8102E 100%);
        }

        /* ============================================
           PRIMARY STATS - Redesigned HUD with Hierarchy
           ============================================ */
        .primary-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: var(--space-2, 8px);
            margin-bottom: var(--space-2, 8px);
        }

        .primary-stat {
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(1, 33, 105, 0.1);
            border-radius: var(--radius-lg, 8px);
            padding: var(--space-3, 12px) var(--space-4, 16px);
            box-shadow: var(--shadow-md);
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

        .primary-stat::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: var(--radius-lg, 8px);
            background: radial-gradient(circle at center, rgba(1, 33, 105, 0.05), transparent);
            opacity: 0;
            transition: opacity 0.3s;
        }

        .primary-stat:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-lg);
        }

        .primary-stat:hover::before {
            opacity: 1;
        }

        /* Hero stats - Employment and Inflation are primary focus */
        .primary-stat.employment-stat,
        .primary-stat.inflation-stat {
            border-left: 4px solid var(--color-primary);
        }

        .primary-stat.employment-stat {
            border-left-color: var(--color-success);
        }

        .primary-stat.inflation-stat {
            border-left-color: var(--color-warning);
        }

        .primary-stat.services-stat {
            border-left: 4px solid #7c3aed;
        }

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

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

        .primary-stat-value {
            font-size: 18px;
            font-weight: 700;
            color: #1e293b;
            transition: color 0.3s, transform 0.3s;
        }

        .primary-stat-value.good { color: #059669; }
        .primary-stat-value.warning { color: #d97706; }
        .primary-stat-value.bad { color: #dc2626; }

        .primary-stat-value.pulse {
            animation: statPulse 0.5s ease;
        }

        @keyframes statPulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.15); }
            100% { transform: scale(1); }
        }

        /* Employment Progress Bar */
        .progress-bar-container {
            position: relative;
            margin-top: var(--space-1, 4px);
        }

        .progress-bar-track {
            height: 10px;
            background: var(--color-gray-200, #e5e7eb);
            border-radius: 5px;
            position: relative;
            overflow: visible;
            box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
        }

        .progress-bar-fill {
            height: 100%;
            border-radius: 5px;
            transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .progress-bar-fill.employment-fill {
            background: linear-gradient(90deg,
                var(--color-danger, #ef4444) 0%,
                var(--color-warning, #f59e0b) 60%,
                var(--color-success, #10b981) 85%,
                var(--color-success, #10b981) 100%);
            background-size: 200% 100%;
            box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
        }

        .progress-bar-target {
            position: absolute;
            top: -3px;
            width: 3px;
            height: 16px;
            background: var(--color-gray-800, #1f2937);
            border-radius: 2px;
            transform: translateX(-50%);
            z-index: 1;
        }

        .progress-bar-target::after {
            content: '';
            position: absolute;
            top: -5px;
            left: 50%;
            transform: translateX(-50%);
            border-left: 5px solid transparent;
            border-right: 5px solid transparent;
            border-top: 5px solid var(--color-gray-800, #1f2937);
        }

        .progress-target-label {
            font-size: var(--font-size-xs, 10px);
            color: var(--color-gray-400, #9ca3af);
            margin-top: var(--space-1, 4px);
            display: block;
            text-align: right;
            font-weight: 500;
        }

        /* Inflation Zone Indicator */
        .inflation-zone-indicator {
            display: flex;
            gap: 2px;
            border-radius: 4px;
            overflow: hidden;
        }

        .zone {
            flex: 1;
            padding: 4px 6px;
            text-align: center;
            font-size: 9px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            transition: all 0.3s;
        }

        .zone-low {
            background: #dbeafe;
            color: #3b82f6;
        }

        .zone-good {
            background: #d1fae5;
            color: #059669;
        }

        .zone-high {
            background: #fee2e2;
            color: #dc2626;
        }

        .zone.active {
            transform: scaleY(1.1);
            font-weight: 700;
        }

        .zone-low.active {
            background: #3b82f6;
            color: white;
        }

        .zone-good.active {
            background: #059669;
            color: white;
        }

        .zone-high.active {
            background: #dc2626;
            color: white;
        }

        /* Services Score Bar */
        .services-indicator {
            height: 8px;
            background: #e2e8f0;
            border-radius: 4px;
            overflow: hidden;
        }

        .services-bar {
            height: 100%;
            background: linear-gradient(90deg, #7c3aed, #a855f7);
            border-radius: 4px;
            transition: width 0.5s ease;
        }

        /* ============================================
           ADVANCED STATS ACCORDION
           ============================================ */
        .advanced-stats-accordion {
            background: var(--color-gray-50, #f9fafb);
            border-radius: var(--radius-md, 6px);
            overflow: hidden;
            margin-bottom: var(--space-2, 8px);
            border: 1px solid var(--color-gray-200, #e5e7eb);
        }

        .accordion-toggle {
            width: 100%;
            padding: var(--space-2, 8px) var(--space-3, 12px);
            background: transparent;
            border: none;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: var(--font-size-sm, 12px);
            font-weight: 600;
            color: var(--color-gray-500, #6b7280);
            transition: all 0.2s;
        }

        .accordion-toggle:hover {
            background: var(--color-gray-100, #f3f4f6);
            color: var(--color-gray-700, #374151);
        }

        .accordion-icon {
            font-size: 10px;
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .accordion-toggle.expanded .accordion-icon {
            transform: rotate(180deg);
        }

        .accordion-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
            padding: 0 var(--space-3, 12px);
        }

        .accordion-content.expanded {
            max-height: 400px;
            padding: var(--space-2, 8px) var(--space-3, 12px) var(--space-3, 12px);
        }

        /* ============================================
           RECOMMENDED ACTIONS PANEL
           ============================================ */
        .recommended-actions-panel {
            background: linear-gradient(135deg, rgba(254, 243, 199, 0.95) 0%, rgba(253, 230, 138, 0.95) 100%);
            backdrop-filter: blur(10px);
            border-radius: var(--radius-lg, 8px);
            padding: var(--space-3, 12px);
            margin-bottom: var(--space-2, 8px);
            border-left: 4px solid var(--color-warning, #f59e0b);
            box-shadow: var(--shadow-sm);
        }

        .recommended-header {
            display: flex;
            align-items: center;
            gap: var(--space-2, 8px);
            margin-bottom: var(--space-2, 8px);
        }

        .recommended-icon {
            font-size: 16px;
        }

        .recommended-title {
            font-size: var(--font-size-sm, 12px);
            font-weight: 700;
            color: #92400e;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .recommended-list {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: var(--space-2, 8px);
        }

        .recommended-action {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border: 2px solid rgba(245, 158, 11, 0.3);
            border-radius: var(--radius-md, 6px);
            padding: var(--space-2, 8px) var(--space-3, 12px);
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            min-height: 44px;
        }

        .recommended-action:hover {
            border-color: var(--color-warning, #f59e0b);
            transform: translateX(4px);
            box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
        }

        .recommended-action:active {
            transform: translateX(2px) scale(0.98);
            background: var(--color-warning, #f59e0b);
        }

        .recommended-action:active .recommended-action-name,
        .recommended-action:active .recommended-action-preview,
        .recommended-action:active .recommended-arrow {
            color: white;
        }

        .recommended-action-content {
            display: flex;
            flex-direction: column;
            gap: 2px;
            text-align: left;
        }

        .recommended-action-name {
            font-size: 13px;
            font-weight: 600;
            color: #1e293b;
        }

        .recommended-action-preview {
            font-size: 10px;
            color: #64748b;
            font-style: italic;
        }

        .recommended-arrow {
            font-size: 16px;
            color: #f59e0b;
            font-weight: bold;
        }

        /* ============================================
           FLOATING FEEDBACK SYSTEM
           ============================================ */
        .floating-feedback-container {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            pointer-events: none;
            z-index: 1500;
        }

        .floating-feedback {
            position: absolute;
            font-size: 18px;
            font-weight: 700;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
            animation: floatUp 1.5s ease-out forwards;
            white-space: nowrap;
        }

        .floating-feedback.positive {
            color: #059669;
        }

        .floating-feedback.negative {
            color: #dc2626;
        }

        .floating-feedback.neutral {
            color: #3b82f6;
        }

        @keyframes floatUp {
            0% {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
            50% {
                opacity: 1;
                transform: translateY(-30px) scale(1.1);
            }
            100% {
                opacity: 0;
                transform: translateY(-60px) scale(0.9);
            }
        }

        /* Impact Preview Tooltip */
        .action-card {
            position: relative;
        }

        .action-preview-tooltip {
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: #1e293b;
            color: white;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 11px;
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.2s, visibility 0.2s;
            z-index: 100;
            margin-bottom: 8px;
        }

        .action-preview-tooltip::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border-left: 6px solid transparent;
            border-right: 6px solid transparent;
            border-top: 6px solid #1e293b;
        }

        .action-card:hover .action-preview-tooltip {
            opacity: 1;
            visibility: visible;
        }

        .preview-effect {
            display: block;
            margin-top: 2px;
        }

        .preview-effect.positive { color: #4ade80; }
        .preview-effect.negative { color: #f87171; }

        .game-container {
            width: 100vw;
            height: 100vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            transition: opacity 0.3s;
        }

        .game-container.game-over {
            opacity: 0.3;
            pointer-events: none;
        }

        /* UPPER PANEL - Stats and Controls */
        .upper-panel {
            flex-shrink: 0;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px) saturate(180%);
            -webkit-backdrop-filter: blur(20px) saturate(180%);
            border-bottom: 3px solid var(--color-primary, #012169);
            padding: var(--space-2, 8px);
            padding-bottom: 0;
            display: flex;
            flex-direction: column;
            max-height: 42vh;
            overflow: hidden;
        }

        /* Content wrapper - scrollable area */
        .upper-panel-content {
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
            padding-bottom: var(--space-2, 8px);
        }

        .header-compact {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 8px;
            align-items: start;
        }

        .title-welcome-group {
            min-width: 0;
        }

        .title-row {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
        }

        .title {
            font-size: 16px;
            font-weight: bold;
            color: #2d3748;
            margin: 0;
            white-space: nowrap;
        }

        .version-badge {
            display: inline-block;
            font-size: 9px;
            font-weight: normal;
            color: #718096;
            background: #edf2f7;
            padding: 2px 4px;
            border-radius: 3px;
        }

        .day-counter {
            font-size: 11px;
            font-weight: 600;
            color: #012169;
            white-space: nowrap;
        }

        .welcome-text {
            font-size: 9px;
            font-style: italic;
            color: #4a5568;
            line-height: 1.3;
            margin: 2px 0 0 0;
        }

        .highscore-button {
            padding: 8px 10px;
            border-radius: 4px;
            border: 2px solid #f6ad55;
            background: white;
            cursor: pointer;
            font-weight: 600;
            font-size: 10px;
            color: #f6ad55;
            transition: all 0.2s;
            text-align: center;
            line-height: 1.2;
            white-space: nowrap;
            height: fit-content;
        }

        .highscore-button:active {
            background: #f6ad55;
            color: white;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 4px;
            font-size: 11px;
        }

        .stat-box {
            background: #f7fafc;
            padding: 4px 6px;
            border-radius: 4px;
            border-left: 3px solid #718096;
            min-width: 0;
            overflow: hidden;
        }

        .stat-box.employment-box { border-left-color: #059669; background: #ecfdf5; }
        .stat-box.inflation-box { border-left-color: #dc2626; background: #fef2f2; }
        .stat-box.capacity-box { border-left-color: #2563eb; background: #eff6ff; }
        .stat-box.services-box { border-left-color: #7c3aed; background: #f5f3ff; }
        .stat-box.tax-box { border-left-color: #ea580c; background: #fff7ed; }
        .stat-box.policy-box { border-left-color: #0891b2; background: #ecfeff; }
        .stat-box.spending-box { border-left-color: #4338ca; background: #eef2ff; }
        .stat-box.credit-box { border-left-color: #be185d; background: #fdf2f8; }
        .stat-box.demand-box { border-left-color: #ca8a04; background: #fefce8; }

        .stat-label {
            font-size: 8px;
            color: #718096;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            margin-bottom: 1px;
        }

        .stat-value {
            font-weight: 700;
            color: var(--color-gray-800, #1f2937);
            font-size: var(--font-size-base, 14px);
            word-wrap: break-word;
            overflow-wrap: break-word;
            font-variant-numeric: tabular-nums;
            letter-spacing: -0.02em;
        }

        .stat-value.good {
            color: var(--color-success, #10b981);
        }

        .stat-value.warning {
            color: var(--color-warning, #f59e0b);
        }

        .stat-value.bad {
            color: var(--color-danger, #ef4444);
        }

        .action-controls {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: var(--space-2, 8px);
            align-items: stretch;
            flex-shrink: 0;
            padding: var(--space-2, 8px);
            margin: 0 calc(-1 * var(--space-2, 8px));
            margin-bottom: calc(-1 * var(--space-2, 8px));
            background: rgba(255, 255, 255, 0.98);
            border-top: 1px solid var(--color-gray-200, #e5e7eb);
            box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
            z-index: 10;
        }

        .actions-badge {
            background: linear-gradient(135deg, var(--color-danger, #ef4444) 0%, #dc2626 100%);
            color: white;
            padding: var(--space-3, 12px) var(--space-4, 16px);
            border-radius: var(--radius-md, 6px);
            text-align: center;
            font-weight: 700;
            font-size: var(--font-size-base, 14px);
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 44px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
            font-variant-numeric: tabular-nums;
        }

        .next-button {
            padding: var(--space-3, 12px) var(--space-4, 16px);
            color: white;
            border: none;
            border-radius: var(--radius-md, 6px);
            font-size: var(--font-size-base, 14px);
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            background: linear-gradient(135deg, var(--color-primary, #012169) 0%, var(--color-primary-light, #003399) 100%);
            min-height: 44px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(1, 33, 105, 0.3);
        }

        .next-button:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(1, 33, 105, 0.4);
        }

        .next-button:active {
            transform: scale(0.98);
            background: linear-gradient(135deg, var(--color-primary-light, #003399) 0%, var(--color-primary, #012169) 100%);
        }

        /* LOWER PANEL - Actions and Locations */
        .lower-panel {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            padding: 8px;
            background: transparent;
        }

        .policy-indicators {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 6px;
            padding: 8px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            justify-content: center;
        }

        .indicator-btn {
            font-size: 10px;
            padding: 4px 8px;
            border-radius: 4px;
            background: #e2e8f0;
            color: #475569;
            font-weight: 600;
            text-align: center;
            transition: all 0.2s;
        }

        .indicator-btn.active {
            background: #10b981;
            color: white;
        }

        .capacity-indicators-wrapper {
            display: grid;
            grid-template-columns: 1fr 130px;
            gap: 6px;
            margin-bottom: 6px;
        }

        .capacity-section {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            padding: var(--space-2, 8px) var(--space-3, 12px);
            border-radius: var(--radius-md, 6px);
        }

        .capacity-section h3 {
            font-size: var(--font-size-sm, 12px);
            margin: 0 0 var(--space-2, 8px) 0;
            color: var(--color-gray-700, #374151);
            font-weight: 600;
        }

        .capacity-bars {
            display: flex;
            flex-direction: column;
            gap: var(--space-1, 4px);
        }

        .capacity-item {
            display: flex;
            align-items: center;
            gap: var(--space-2, 8px);
        }

        .capacity-label {
            font-size: var(--font-size-xs, 10px);
            font-weight: 600;
            color: var(--color-gray-600, #4b5563);
            min-width: 55px;
        }

        .capacity-bar {
            flex: 1;
            height: 16px;
            background: var(--color-gray-200, #e5e7eb);
            border-radius: var(--radius-sm, 4px);
            overflow: hidden;
            position: relative;
        }

        .capacity-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--color-info, #3b82f6), #2563eb);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: var(--font-size-xs, 10px);
            font-weight: 600;
            transition: width 0.5s ease-out;
            font-variant-numeric: tabular-nums;
        }

        /* Radial Progress Display for Capacity */
        .capacity-radial-display {
            display: flex;
            justify-content: space-around;
            align-items: center;
            padding: var(--space-2, 8px) 0;
        }

        .radial-stat {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }

        .radial-stat svg {
            width: 60px;
            height: 60px;
        }

        .circle-bg {
            fill: none;
            stroke: var(--color-gray-200, #e5e7eb);
            stroke-width: 3;
        }

        .circle-progress {
            fill: none;
            stroke-width: 3;
            stroke-linecap: round;
            transform: rotate(-90deg);
            transform-origin: 50% 50%;
            transition: stroke-dasharray 0.6s ease;
        }

        .circle-progress.energy { stroke: var(--color-warning, #f59e0b); }
        .circle-progress.skills { stroke: var(--color-info, #3b82f6); }
        .circle-progress.logistics { stroke: #8b5cf6; }

        .circle-text {
            font-size: 10px;
            font-weight: 700;
            fill: var(--color-gray-800, #1f2937);
            text-anchor: middle;
            font-variant-numeric: tabular-nums;
        }

        .radial-label {
            font-size: var(--font-size-xs, 10px);
            color: var(--color-gray-500, #6b7280);
            margin-top: var(--space-1, 4px);
            font-weight: 500;
        }

        .content-area-wrapper {
            display: grid;
            grid-template-columns: 100px 1fr;
            gap: 8px;
            min-height: 0;
        }

        .location-buttons {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 6px;
            height: fit-content;
        }

        .location-btn {
            padding: 4px;
            background: rgba(255, 255, 255, 0.95);
            border: 2px solid transparent;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 20px;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            flex-shrink: 1;
            min-width: 0;
        }

        .location-btn:active, .location-btn.active {
            background: white;
            border-color: #012169;
            transform: scale(0.95);
        }

        .location-btn-text {
            font-size: 9px;
            font-weight: 600;
            color: #4a5568;
        }

        .content-panel {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 6px;
            padding: 12px;
            overflow-y: auto;
            max-height: 55vh;
            -webkit-overflow-scrolling: touch;
        }

        .content-panel h2 {
            font-size: 16px;
            margin: 0 0 12px 0;
            color: #2d3748;
        }

        .action-section {
            margin-bottom: 16px;
        }

        .action-section:last-child {
            margin-bottom: 0;
        }

        .action-section h3 {
            font-size: 13px;
            margin: 0 0 8px 0;
            color: #4a5568;
        }

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

        .action-btn {
            padding: 12px;
            border: 2px solid #012169;
            background: white;
            color: #012169;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            text-align: center;
        }

        .action-btn:active {
            transform: scale(0.98);
            background: #012169;
            color: white;
        }

        .action-btn.secondary {
            border-color: #059669;
            color: #059669;
        }

        .action-btn.secondary:active {
            background: #059669;
            color: white;
        }

        .input-group {
            margin-bottom: 12px;
        }

        .input-group label {
            display: block;
            font-size: 12px;
            font-weight: 600;
            color: #2d3748;
            margin-bottom: 6px;
        }

        .input-group input[type="range"] {
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: #e2e8f0;
            outline: none;
            -webkit-appearance: none;
        }

        .input-group input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #012169;
            cursor: pointer;
        }

        .input-group input[type="range"]::-moz-range-thumb {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #012169;
            cursor: pointer;
            border: none;
        }

        .advisor-note {
            background: #fef3c7;
            border-left: 3px solid #f59e0b;
            padding: 8px;
            border-radius: 4px;
            font-size: 11px;
            line-height: 1.4;
            color: #78350f;
            margin-top: 12px;
        }

        .advisor-note strong {
            color: #92400e;
        }

        .two-column-layout {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            margin-bottom: 12px;
        }

        .column-panel {
            background: #f8fafc;
            padding: 10px;
            border-radius: 6px;
            border: 1px solid #e2e8f0;
        }

        /* Chat Styling */
        .chat-toggle {
            position: fixed;
            bottom: 16px;
            right: 16px;
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: linear-gradient(135deg, #012169 0%, #003399 100%);
            color: white;
            border: none;
            font-size: 24px;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            z-index: 999;
            transition: transform 0.2s;
        }

        .chat-toggle:active {
            transform: scale(0.95);
        }

        .chat-panel {
            position: fixed;
            bottom: 0;
            right: 0;
            width: 100%;
            max-width: 400px;
            height: 70vh;
            background: white;
            border-top-left-radius: 12px;
            border-top-right-radius: 12px;
            box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
            transform: translateY(100%);
            transition: transform 0.3s;
            z-index: 1000;
            display: flex;
            flex-direction: column;
        }

        .chat-panel.active {
            transform: translateY(0);
        }

        .chat-header {
            padding: 16px;
            background: linear-gradient(135deg, #012169 0%, #003399 100%);
            color: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-top-left-radius: 12px;
            border-top-right-radius: 12px;
        }

        .chat-header h3 {
            margin: 0;
            font-size: 16px;
        }

        .chat-close {
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
            padding: 0;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .chat-context {
            padding: 8px 16px;
            background: #f1f5f9;
            border-bottom: 1px solid #e2e8f0;
            font-size: 11px;
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
        }

        .context-item {
            display: flex;
            gap: 4px;
        }

        .context-label {
            font-weight: 600;
            color: #64748b;
        }

        .chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .chat-message {
            padding: 10px 12px;
            border-radius: 12px;
            max-width: 85%;
            font-size: 13px;
            line-height: 1.4;
        }

        .chat-message.user {
            align-self: flex-end;
            background: #012169;
            color: white;
        }

        .chat-message.assistant {
            align-self: flex-start;
            background: #f1f5f9;
            color: #1e293b;
        }

        .typing-indicator {
            align-self: flex-start;
            padding: 10px 12px;
            background: #f1f5f9;
            border-radius: 12px;
            display: none;
        }

        .typing-indicator.active {
            display: block;
        }

        .typing-dots {
            display: flex;
            gap: 4px;
        }

        .typing-dots span {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #64748b;
            animation: typing 1.4s infinite;
        }

        .typing-dots span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing-dots span:nth-child(3) {
            animation-delay: 0.4s;
        }

        @keyframes typing {
            0%, 60%, 100% {
                transform: translateY(0);
            }
            30% {
                transform: translateY(-8px);
            }
        }

        .quick-questions {
            padding: 12px 16px;
            border-top: 1px solid #e2e8f0;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }

        .quick-question-btn {
            padding: 8px;
            background: #f1f5f9;
            border: 1px solid #cbd5e1;
            border-radius: 6px;
            font-size: 11px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .quick-question-btn:active {
            background: #e2e8f0;
        }

        .chat-input-container {
            padding: 12px 16px;
            border-top: 1px solid #e2e8f0;
            display: flex;
            gap: 8px;
        }

        .chat-input {
            flex: 1;
            padding: 10px;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            font-size: 13px;
            resize: none;
            font-family: inherit;
        }

        .chat-send {
            padding: 10px 16px;
            background: linear-gradient(135deg, #012169 0%, #003399 100%);
            color: white;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .chat-send:active {
            transform: scale(0.98);
        }

        /* Modal Styling */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 2000;
        }

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

        .modal-content {
            background: white;
            padding: 24px;
            border-radius: 12px;
            max-width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            position: relative;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        }

        .modal-close {
            position: absolute;
            top: 12px;
            right: 12px;
            background: none;
            border: none;
            font-size: 28px;
            cursor: pointer;
            color: #64748b;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .highscore-title {
            margin: 0 0 16px 0;
            color: #2d3748;
            font-size: 20px;
            text-align: center;
        }

        .highscore-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 12px;
        }

        .highscore-table th {
            background: #f1f5f9;
            padding: 8px;
            text-align: left;
            font-size: 12px;
            color: #475569;
            border-bottom: 2px solid #cbd5e1;
        }

        .highscore-table td {
            padding: 8px;
            font-size: 13px;
            border-bottom: 1px solid #e2e8f0;
        }

        .highscore-rank {
            font-weight: bold;
            color: #f59e0b;
            width: 40px;
            text-align: center;
        }

        .highscore-score {
            font-weight: bold;
            color: #059669;
            text-align: right;
            width: 80px;
        }

        .highscore-date {
            color: #64748b;
            font-size: 11px;
            text-align: right;
            width: 90px;
        }

        .highscore-input-container {
            margin: 16px 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
        }

        .highscore-input {
            padding: 10px;
            border: 2px solid #cbd5e1;
            border-radius: 6px;
            font-size: 14px;
            width: 100%;
            max-width: 300px;
            text-align: center;
        }

        .highscore-submit {
            padding: 10px 24px;
            background: linear-gradient(135deg, #059669 0%, #047857 100%);
            color: white;
            border: none;
            border-radius: 6px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .highscore-submit:active {
            transform: scale(0.98);
        }

        /* Content Area */
        .content-area {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 6px;
            padding: 12px;
            overflow-y: auto;
            max-height: 55vh;
            -webkit-overflow-scrolling: touch;
            position: relative;
        }

        .location-content {
            display: none;
        }

        .location-content.active {
            display: block;
        }

        .location-title {
            font-size: 16px;
            margin: 0 0 12px 0;
            color: #2d3748;
        }

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

        .action-card {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border: 2px solid var(--color-gray-200, #e5e7eb);
            border-radius: var(--radius-lg, 8px);
            padding: var(--space-3, 12px);
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: center;
            gap: var(--space-3, 12px);
            text-align: left;
            position: relative;
            overflow: hidden;
        }

        .action-card::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: var(--radius-lg, 8px);
            background: radial-gradient(circle at center, rgba(1, 33, 105, 0.1), transparent);
            opacity: 0;
            transition: opacity 0.3s;
        }

        .action-card:hover {
            border-color: var(--color-primary, #012169);
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(1, 33, 105, 0.15);
        }

        .action-card:hover::after {
            opacity: 1;
        }

        .action-card:active {
            transform: scale(0.96);
            background: var(--color-primary, #012169);
            color: white;
            box-shadow: 0 2px 8px rgba(1, 33, 105, 0.3);
        }

        .action-card:active .action-icon {
            filter: brightness(0) invert(1);
        }

        .action-card:active .action-name,
        .action-card:active .action-desc {
            color: white;
        }

        /* Ripple effect on click */
        @keyframes ripple {
            to {
                transform: scale(4);
                opacity: 0;
            }
        }

        .action-card.clicked::before {
            content: '';
            position: absolute;
            inset: 50% 50%;
            width: 20px;
            height: 20px;
            margin: -10px 0 0 -10px;
            background: rgba(1, 33, 105, 0.4);
            border-radius: 50%;
            animation: ripple 0.6s ease-out;
            z-index: 1;
        }

        .action-icon {
            font-size: 24px;
            flex-shrink: 0;
        }

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

        .action-name {
            font-size: 13px;
            font-weight: 600;
            color: #2d3748;
            margin-bottom: 2px;
        }

        .action-desc {
            font-size: 11px;
            color: #64748b;
        }

        /* Modal Styling */
        .modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 2000;
        }

        .modal.active {
            display: flex;
        }

        .modal-content {
            background: white;
            padding: 24px;
            border-radius: 12px;
            max-width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            position: relative;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        }

        .modal-button {
            padding: 8px 16px;
            background: linear-gradient(135deg, #012169 0%, #003399 100%);
            color: white;
            border: none;
            border-radius: 6px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 13px;
        }

        .modal-button:active {
            transform: scale(0.98);
        }

        /* Economic Advisor Styling */
        .advisor-fab {
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            color: white;
            border: none;
            font-size: 28px;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            z-index: 999;
            transition: transform 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .advisor-fab:active {
            transform: scale(0.95);
        }

        .advisor-panel {
            max-width: 600px;
            width: 90%;
            max-height: 85vh;
            display: flex;
            flex-direction: column;
        }

        .advisor-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-bottom: 12px;
            border-bottom: 2px solid #e2e8f0;
            flex-shrink: 0;
        }

        .advisor-header h3 {
            margin: 0;
            color: #2d3748;
            font-size: 18px;
        }

        .quick-prompts {
            padding: 12px;
            background: #fef3c7;
            border-radius: 8px;
            border: 1px solid #fbbf24;
            flex-shrink: 0;
            margin-top: 12px;
        }

        .quick-prompt-btn {
            padding: 8px 12px;
            background: white;
            border: 1px solid #cbd5e1;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 12px;
            font-weight: 500;
            color: #1e293b;
        }

        .quick-prompt-btn:hover {
            background: #f1f5f9;
            border-color: #94a3b8;
        }

        .quick-prompt-btn:active {
            transform: scale(0.98);
            background: #012169;
            color: white;
        }

        .conversation-history {
            flex: 1;
            overflow-y: auto;
            padding: 12px;
            background: #f8fafc;
            border-radius: 8px;
            min-height: 150px;
            max-height: none;
            margin: 12px 0;
        }

        .advisor-message {
            padding: 10px 12px;
            margin-bottom: 10px;
            border-radius: 8px;
            max-width: 85%;
            font-size: 13px;
            line-height: 1.5;
        }

        .advisor-message.user {
            background: #012169;
            color: white;
            margin-left: auto;
        }

        .advisor-message.assistant {
            background: white;
            color: #1e293b;
            border: 1px solid #e2e8f0;
        }

        .advisor-input-area {
            display: flex;
            gap: 8px;
            flex-shrink: 0;
        }

        .advisor-input-area input {
            flex: 1;
            padding: 10px;
            border: 2px solid #cbd5e1;
            border-radius: 6px;
            font-size: 14px;
            font-family: inherit;
        }

        .typing-indicator {
            display: flex;
            gap: 4px;
            padding: 4px;
        }

        .typing-indicator span {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #64748b;
            animation: typing 1.4s infinite;
        }

        .typing-indicator span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing-indicator span:nth-child(3) {
            animation-delay: 0.4s;
        }

        @keyframes typing {
            0%, 60%, 100% {
                transform: translateY(0);
                opacity: 0.5;
            }
            30% {
                transform: translateY(-4px);
                opacity: 1;
            }
        }

        /* Economic Events System Styling */
        .event-modal {
            max-width: 600px;
            width: 90%;
        }

        .event-result-modal {
            max-width: 500px;
            width: 90%;
        }

        .event-title {
            font-size: 22px;
            margin: 0 0 16px 0;
            color: #1f2937;
            text-align: center;
        }

        .event-description {
            font-size: 14px;
            line-height: 1.6;
            margin-bottom: 20px;
            padding: 16px;
            background: #f8fafc;
            border-radius: 8px;
            border-left: 4px solid #012169;
        }

        .event-choices {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-bottom: 20px;
        }

        .event-choice-btn {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px;
            background: white;
            border: 2px solid #e2e8f0;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            text-align: left;
            pointer-events: auto; /* Ensure button is clickable */
            user-select: none; /* Prevent text selection on click */
        }

        .event-choice-btn:hover {
            border-color: #012169;
            background: #f8fafc;
            transform: translateX(4px);
            box-shadow: 0 4px 12px rgba(1, 33, 105, 0.15);
        }

        .event-choice-btn:active {
            transform: translateX(2px);
            background: #012169;
            color: white;
        }

        .event-choice-btn:active .choice-text {
            color: white;
        }

        .event-choice-btn:active .choice-framing {
            color: #e5e7eb;
        }

        .event-choice-btn:active .choice-cost {
            background: rgba(255, 255, 255, 0.2);
            color: white;
        }

        .choice-main {
            flex: 1;
            min-width: 0;
            pointer-events: none; /* Let clicks pass through to button */
        }

        .choice-text {
            font-size: 15px;
            font-weight: 600;
            color: #1f2937;
            margin-bottom: 4px;
            pointer-events: none; /* Let clicks pass through to button */
        }

        .choice-framing {
            font-size: 12px;
            color: #64748b;
            font-style: italic;
            pointer-events: none; /* Let clicks pass through to button */
        }

        .choice-cost {
            font-size: 12px;
            font-weight: 600;
            color: #012169;
            background: #e0e7ff;
            padding: 6px 12px;
            border-radius: 6px;
            white-space: nowrap;
            margin-left: 12px;
            pointer-events: none; /* Let clicks pass through to button */
        }

        .event-lesson {
            padding: 16px;
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            border-left: 4px solid #f59e0b;
            border-radius: 8px;
            font-size: 13px;
            line-height: 1.6;
        }

        .event-lesson strong {
            color: #92400e;
            font-size: 14px;
        }

        .event-lesson em {
            color: #b45309;
            font-weight: 600;
        }

        .event-result-content {
            font-size: 14px;
            line-height: 1.6;
        }

        /* Mobile Responsive */
        @media (max-width: 600px) {
            /* Header Compact - Stack vertically on mobile to prevent overlap */
            .header-compact {
                grid-template-columns: 1fr;
                gap: 6px;
            }

            .title-welcome-group {
                order: 1;
            }

            .title-row {
                flex-wrap: wrap;
                gap: 4px;
            }

            .title {
                font-size: 14px;
            }

            .welcome-text {
                font-size: 8px;
                line-height: 1.2;
                margin-top: 2px;
            }

            .header-buttons {
                order: 2;
                justify-content: flex-start;
            }

            /* Lower Panel - Compact on mobile */
            .lower-panel {
                padding: 6px;
            }


            /* Recommended Actions - More compact */
            .recommended-actions-panel {
                padding: 4px 6px;
                margin-bottom: 4px;
            }

            .recommended-header {
                margin-bottom: 4px;
            }

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

            .recommended-title {
                font-size: 10px;
            }

            .recommended-list {
                display: flex;
                overflow-x: auto;
                gap: 4px;
                padding-bottom: 2px;
            }

            .recommended-action {
                min-height: 38px;
                min-width: 140px;
                flex-shrink: 0;
                padding: 6px 8px;
            }

            .recommended-action-name {
                font-size: 12px;
            }

            .recommended-action-preview {
                font-size: 8px;
            }

            /* Primary Stats - Stack vertically on mobile */
            .primary-stats {
                grid-template-columns: 1fr;
                gap: 6px;
            }

            .primary-stat {
                padding: 8px 12px;
            }

            .primary-stat-value {
                font-size: 16px;
            }

            /* Advanced Stats Accordion - Increase height to show all content */
            .accordion-content.expanded {
                max-height: 400px;
            }

            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 3px;
            }

            .stat-box {
                padding: 3px 5px;
            }

            .stat-label {
                font-size: 7px;
            }

            /* MMT Metrics compact */
            .mmt-metrics-section {
                margin-top: 8px;
                padding-top: 8px;
            }

            .mmt-section-header {
                font-size: 9px;
                margin-bottom: 4px;
            }

            .sectoral-balances {
                padding: 4px;
            }

            .sectoral-title {
                font-size: 8px;
                margin-bottom: 4px;
            }

            .sectoral-value {
                font-size: 9px;
            }

            .mmt-score-display {
                padding: 4px 8px;
            }

            .mmt-score-label {
                font-size: 9px;
            }

            .mmt-score-value {
                font-size: 12px;
            }

            .two-column-layout {
                grid-template-columns: 1fr;
            }

            .chat-panel {
                max-width: 100%;
                height: 80vh;
            }

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

            .actions-list {
                grid-template-columns: 1fr;
            }

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

            /* Capacity and Policy Indicators - Side by side on mobile */
            .capacity-indicators-wrapper {
                display: grid;
                grid-template-columns: 1fr 85px;
                gap: 4px;
                margin-bottom: 4px;
            }

            .capacity-section {
                padding: 4px 6px;
                border-radius: 4px;
            }

            .capacity-section h3 {
                display: none; /* Hide header on mobile to save space */
            }

            .capacity-bars {
                gap: 2px;
            }

            .capacity-item {
                gap: 4px;
            }

            .capacity-label {
                font-size: 8px;
                min-width: 38px;
            }

            .capacity-bar {
                height: 12px;
            }

            .capacity-fill {
                font-size: 8px;
            }

            .policy-indicators {
                padding: 3px;
                gap: 2px;
                flex-direction: column;
                border-radius: 4px;
            }

            .indicator-btn {
                font-size: 7px;
                padding: 2px 3px;
                line-height: 1.1;
                text-align: center;
            }

            /* Location Buttons - Vertical column on left side */
            .location-buttons {
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                gap: 3px;
            }

            .location-btn {
                font-size: 18px;
                padding: 4px;
                min-height: 36px;
                min-width: 36px;
            }

            .location-btn-text {
                font-size: 7px;
                margin-top: 1px;
            }

            /* Content Area Wrapper - Side by side on mobile */
            .content-area-wrapper {
                grid-template-columns: 80px 1fr;
                gap: 4px;
            }

            .content-area {
                max-height: 30vh;
                padding: 6px;
            }

            .location-title {
                font-size: 12px;
                margin-bottom: 6px;
            }

            /* Action Cards - Compact but touchable */
            .action-card {
                min-height: 44px;
                padding: 8px 10px;
            }

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

            .action-name {
                font-size: 12px;
            }

            .action-desc {
                font-size: 10px;
            }

            .advisor-panel {
                width: 95%;
                max-height: 90vh;
            }

            .conversation-history {
                max-height: 250px;
            }

            .event-modal, .event-result-modal {
                width: 95%;
                max-height: 90vh;
            }

            .event-choice-btn {
                flex-direction: column;
                align-items: flex-start;
                min-height: 52px;
                padding: 14px;
            }

            .choice-cost {
                margin-left: 0;
                margin-top: 8px;
            }

            /* Advisor FAB - Larger for mobile */
            .advisor-fab {
                width: 56px;
                height: 56px;
                font-size: 24px;
                bottom: 16px;
                right: 16px;
            }

            /* Next Button and Actions Badge - Larger touch targets */
            .action-controls {
                gap: 8px;
            }

            .actions-badge {
                min-height: 48px;
                font-size: 14px;
            }

            .next-button {
                min-height: 48px;
                font-size: 14px;
            }

            /* Hide action preview tooltips on mobile (use tap instead) */
            .action-preview-tooltip {
                display: none;
            }
        }

        /* Tablet breakpoint */
        @media (min-width: 601px) and (max-width: 900px) {
            .primary-stats {
                grid-template-columns: repeat(3, 1fr);
            }

            .stats-grid {
                grid-template-columns: repeat(3, 1fr);
            }

            .location-btn {
                min-height: 44px;
                min-width: 44px;
            }

            .action-card {
                min-height: 48px;
            }
        }

        /* ============================================
           MMT INSIGHT MODAL
           ============================================ */
        .mmt-insight-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1100;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
            padding: 16px;
        }

        .mmt-insight-modal.active {
            opacity: 1;
            visibility: visible;
        }

        .mmt-insight-content {
            background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
            border-radius: 16px;
            padding: 24px;
            max-width: 400px;
            width: 100%;
            color: white;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
            animation: insightSlideIn 0.4s ease;
        }

        @keyframes insightSlideIn {
            from {
                transform: translateY(-20px) scale(0.95);
                opacity: 0;
            }
            to {
                transform: translateY(0) scale(1);
                opacity: 1;
            }
        }

        .mmt-insight-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 16px;
        }

        .mmt-insight-icon {
            font-size: 32px;
            animation: pulse-glow 2s infinite;
        }

        @keyframes pulse-glow {
            0%, 100% { filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6)); }
            50% { filter: drop-shadow(0 0 16px rgba(251, 191, 36, 0.9)); }
        }

        .mmt-insight-title {
            font-size: 20px;
            font-weight: 700;
            margin: 0;
            color: #fbbf24;
        }

        .mmt-insight-message {
            font-size: 14px;
            line-height: 1.6;
            margin-bottom: 16px;
            opacity: 0.95;
        }

        .mmt-insight-badge {
            background: rgba(251, 191, 36, 0.2);
            border: 1px solid rgba(251, 191, 36, 0.5);
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 16px;
            text-align: center;
        }

        .badge-earned {
            color: #fbbf24;
            font-weight: 600;
            font-size: 14px;
        }

        .mmt-insight-close {
            width: 100%;
            padding: 12px 24px;
            background: #fbbf24;
            color: #1e3a8a;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .mmt-insight-close:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
        }

        .mmt-insight-close:active {
            transform: scale(0.98);
        }

        /* ============================================
           MMT METRICS SECTION IN ADVANCED STATS
           ============================================ */
        .mmt-metrics-section {
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px solid #e2e8f0;
        }

        .mmt-section-header {
            font-size: 11px;
            font-weight: 600;
            color: #1e3a8a;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 8px;
        }

        .mmt-stats-grid {
            margin-bottom: 8px;
        }

        .mmt-value {
            color: #1e3a8a !important;
        }

        .mmt-deficit-box {
            border-left: 3px solid #3b82f6;
        }

        .mmt-issued-box {
            border-left: 3px solid #10b981;
        }

        .mmt-deleted-box {
            border-left: 3px solid #ef4444;
        }

        .deficit-positive {
            color: #10b981 !important;
        }

        .deficit-negative {
            color: #ef4444 !important;
        }

        /* Sectoral Balances Display */
        .sectoral-balances {
            background: #f8fafc;
            border-radius: 6px;
            padding: 8px;
            margin-bottom: 8px;
        }

        .sectoral-title {
            font-size: 10px;
            color: #64748b;
            margin-bottom: 6px;
            text-align: center;
        }

        .sectoral-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 4px;
        }

        .sectoral-item {
            text-align: center;
            padding: 4px;
            border-radius: 4px;
            background: white;
        }

        .sectoral-label {
            font-size: 9px;
            color: #64748b;
            display: block;
            margin-bottom: 2px;
        }

        .sectoral-value {
            font-size: 11px;
            font-weight: 600;
        }

        .sectoral-value.surplus {
            color: #10b981;
        }

        .sectoral-value.deficit {
            color: #ef4444;
        }

        .gov-sector {
            border-bottom: 2px solid #3b82f6;
        }

        .pvt-sector {
            border-bottom: 2px solid #10b981;
        }

        .ext-sector {
            border-bottom: 2px solid #8b5cf6;
        }

        /* MMT Score Display */
        .mmt-score-display {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
            border-radius: 6px;
            padding: 8px 12px;
            color: white;
        }

        .mmt-score-label {
            font-size: 11px;
            opacity: 0.9;
        }

        .mmt-score-value {
            font-size: 16px;
            font-weight: 700;
            color: #fbbf24;
        }

        .mmt-badges {
            display: flex;
            gap: 2px;
        }

        .badge-icon {
            font-size: 14px;
            cursor: help;
            transition: transform 0.2s;
        }

        .badge-icon:hover {
            transform: scale(1.2);
        }

        /* ============================================
           QUICK PROMPT BUTTONS ENHANCEMENT
           ============================================ */
        .quick-prompts {
            margin-bottom: 12px;
        }

        .quick-prompt-btn {
            padding: 6px 10px;
            font-size: 11px;
            background: #f1f5f9;
            border: 1px solid #e2e8f0;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s;
            color: #475569;
        }

        .quick-prompt-btn:hover {
            background: #e2e8f0;
            border-color: #cbd5e1;
            color: #1e293b;
        }

        .quick-prompt-btn:active {
            background: #cbd5e1;
            transform: scale(0.98);
        }

        /* Mobile adjustments for MMT elements */
        @media (max-width: 600px) {
            .mmt-insight-content {
                padding: 20px;
            }

            .mmt-insight-title {
                font-size: 18px;
            }

            .mmt-insight-message {
                font-size: 13px;
            }

            .sectoral-grid {
                gap: 2px;
            }

            .sectoral-label {
                font-size: 8px;
            }

            .sectoral-value {
                font-size: 10px;
            }

            .mmt-score-display {
                padding: 6px 10px;
            }

            .mmt-score-value {
                font-size: 14px;
            }
        }

        /* ============================================
           v7.0 - GAMEPLAY DRAMA ENHANCEMENTS
           ============================================ */

        /* Difficulty Badge */
        .difficulty-badge {
            background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
            color: white;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-left: 8px;
        }

        .difficulty-badge.easy {
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
        }

        .difficulty-badge.hard {
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        }

        /* Header Buttons */
        .header-buttons {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .header-button {
            padding: 8px 16px;
            border: none;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .new-game-btn {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            color: white;
        }

        .new-game-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
        }

        .achievements-btn {
            background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
            color: white;
        }

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

        /* Chain Event Badge */
        .chain-event-badge {
            display: inline-block;
            background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
            color: white;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            animation: chainPulse 1s ease infinite;
            margin-right: 8px;
        }

        @keyframes chainPulse {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.8; transform: scale(1.05); }
        }

        /* Game Setup Modal */
        .game-setup-modal {
            max-width: 500px;
            max-height: 80vh;
            overflow-y: auto;
        }

        .game-setup-modal h2 {
            margin: 0 0 20px 0;
            text-align: center;
            color: #1e293b;
        }

        .setup-section {
            margin-bottom: 24px;
        }

        .setup-section h3 {
            margin: 0 0 12px 0;
            font-size: 14px;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .difficulty-options,
        .mode-options {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .setup-option {
            padding: 12px 16px;
            background: #f8fafc;
            border: 2px solid #e2e8f0;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .setup-option:hover {
            background: #f1f5f9;
            border-color: #cbd5e1;
        }

        .setup-option.selected {
            background: #eff6ff;
            border-color: #3b82f6;
        }

        .option-name {
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 4px;
        }

        .option-desc {
            font-size: 12px;
            color: #64748b;
        }

        .setup-actions {
            display: flex;
            justify-content: flex-end;
            gap: 12px;
            margin-top: 20px;
            padding-top: 16px;
            border-top: 1px solid #e2e8f0;
        }

        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-primary {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            color: white;
        }

        .btn-primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
        }

        .btn-secondary {
            background: #f1f5f9;
            color: #64748b;
            border: 1px solid #e2e8f0;
        }

        .btn-secondary:hover {
            background: #e2e8f0;
        }

        /* Achievement Notification */
        .achievement-notification {
            position: fixed;
            top: 20px;
            right: 20px;
            background: linear-gradient(135deg, #1e3a8a 0%, #7c3aed 100%);
            color: white;
            padding: 16px 20px;
            border-radius: 12px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
            z-index: 10000;
            transform: translateX(120%);
            transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            max-width: 320px;
        }

        .achievement-notification.active {
            transform: translateX(0);
        }

        .achievement-content {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .achievement-notification .achievement-icon {
            font-size: 32px;
            animation: achieveBounce 0.6s ease;
        }

        @keyframes achieveBounce {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.2); }
        }

        .achievement-info {
            flex: 1;
        }

        .achievement-title {
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            opacity: 0.8;
            margin-bottom: 4px;
        }

        .achievement-notification .achievement-name {
            font-size: 16px;
            font-weight: 700;
            margin-bottom: 4px;
        }

        .achievement-notification .achievement-desc {
            font-size: 12px;
            opacity: 0.9;
            margin-bottom: 4px;
        }

        .achievement-notification .achievement-points {
            font-size: 14px;
            font-weight: 600;
            color: #fbbf24;
        }

        /* Achievements Modal */
        .achievements-modal {
            max-width: 600px;
            max-height: 80vh;
        }

        .achievements-modal .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 12px;
            border-bottom: 1px solid #e2e8f0;
        }

        .achievements-modal h2 {
            margin: 0;
            color: #1e293b;
        }

        .modal-close {
            width: 32px;
            height: 32px;
            border: none;
            background: #f1f5f9;
            border-radius: 6px;
            font-size: 18px;
            cursor: pointer;
            transition: all 0.2s;
            color: #64748b;
        }

        .modal-close:hover {
            background: #e2e8f0;
            color: #1e293b;
        }

        .achievements-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            max-height: 60vh;
            overflow-y: auto;
            padding-right: 8px;
        }

        .achievement-card {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            transition: all 0.2s;
        }

        .achievement-card.unlocked {
            background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
            border-color: #86efac;
        }

        .achievement-card.locked {
            opacity: 0.6;
        }

        .achievement-card-icon {
            font-size: 28px;
            width: 40px;
            text-align: center;
        }

        .achievement-card.locked .achievement-card-icon {
            filter: grayscale(1);
        }

        .achievement-card-info {
            flex: 1;
        }

        .achievement-card-name {
            font-size: 13px;
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 2px;
        }

        .achievement-card-desc {
            font-size: 11px;
            color: #64748b;
            margin-bottom: 4px;
        }

        .achievement-card-points {
            font-size: 11px;
            font-weight: 600;
            color: #8b5cf6;
        }

        /* Mobile adjustments for v7.0 features */
        @media (max-width: 600px) {
            .header-buttons {
                flex-wrap: wrap;
                gap: 4px;
            }

            .header-button {
                padding: 6px 10px;
                font-size: 11px;
            }

            .difficulty-badge {
                font-size: 9px;
                padding: 3px 8px;
            }

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

            .game-setup-modal {
                max-width: 95vw;
            }

            .achievement-notification {
                right: 10px;
                left: 10px;
                max-width: none;
            }
        }