        @import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&display=swap');

        :root {
            --bg-darker: #080a10;
            --bg-dark: #0f121d;
            --bg-card: rgba(20, 26, 45, 0.75);
            --border-glow: rgba(0, 240, 255, 0.25);
            --border-color: rgba(255, 255, 255, 0.08);
            
            --color-cyan: #00f0ff;
            --color-pink: #ff0055;
            --color-green: #00ff66;
            --color-yellow: #ffb800;
            --color-purple: #8f00ff;
            --color-grey: #64748b;
            --color-text: #e2e8f0;
            
            --glow-cyan: 0 0 15px rgba(0, 240, 255, 0.4);
            --glow-pink: 0 0 15px rgba(255, 0, 85, 0.4);
            --glow-green: 0 0 15px rgba(0, 255, 102, 0.4);
            --glow-yellow: 0 0 15px rgba(255, 184, 0, 0.4);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Outfit', sans-serif;
            user-select: none;
            -webkit-user-drag: none;
        }

        body {
            background-color: var(--bg-darker);
            color: var(--color-text);
            overflow: hidden;
            height: 100vh;
            width: 100vw;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .background-grid {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: 
                radial-gradient(circle at 20% 30%, rgba(143, 0, 255, 0.05) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(0, 240, 255, 0.05) 0%, transparent 40%),
                linear-gradient(rgba(255, 255, 255, 0.005) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255, 255, 255, 0.005) 1px, transparent 1px);
            background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
            z-index: -2;
        }

        .glass-panel {
            background: var(--bg-card);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--border-color);
            border-radius: 16px;
            box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        }

        .glass-panel:hover {
            border-color: rgba(255, 255, 255, 0.15);
        }

        .app-container {
            display: flex;
            width: 95vw;
            max-width: 1400px;
            height: 85vh;
            gap: 24px;
            z-index: 1;
        }

        .game-area {
            flex: 1.6;
            display: flex;
            flex-direction: column;
            position: relative;
            border: 1px solid var(--border-glow);
            box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
            border-radius: 20px;
            overflow: hidden;
        }

        canvas {
            width: 100%;
            height: 100%;
            background: #090a12;
            display: block;
        }

        .sidebar {
            flex: 0.9;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .tabs-nav {
            display: flex;
            gap: 8px;
            padding: 16px 16px 8px 16px;
            border-bottom: 1px solid var(--border-color);
        }

        .tab-btn {
            flex: 1;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border-color);
            color: var(--color-grey);
            padding: 10px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.9rem;
            transition: all 0.2s ease;
            text-align: center;
        }

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

        .tab-btn.active {
            color: var(--bg-darker);
            background: var(--color-cyan);
            border-color: var(--color-cyan);
            box-shadow: var(--glow-cyan);
            font-weight: 700;
        }

        .tab-content {
            flex: 1;
            display: none;
            flex-direction: column;
            padding: 16px;
            overflow-y: auto;
        }

        .tab-content.active {
            display: flex;
        }

        .canvas-overlay-hud {
            position: absolute;
            top: 16px;
            left: 16px;
            right: 16px;
            display: flex;
            justify-content: space-between;
            pointer-events: none;
            z-index: 5;
        }

        .hud-panel {
            pointer-events: auto;
            padding: 12px 18px;
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .hud-stat {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .hud-label {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            color: var(--color-grey);
            font-weight: 700;
        }

        .hud-value {
            font-size: 1.2rem;
            font-weight: 800;
            color: #fff;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .stat-bar-container {
            width: 150px;
            height: 10px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .stat-bar {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            width: 100%;
            transition: width 0.15s cubic-bezier(0.1, 0.8, 0.2, 1);
            z-index: 2;
        }

        .stat-bar-bg {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            width: 100%;
            transition: width 0.8s cubic-bezier(0.1, 0.8, 0.2, 1);
            z-index: 1;
        }

        .stat-bar.health {
            background: linear-gradient(90deg, #ff0055, #ff5500);
            box-shadow: 0 0 8px rgba(255, 0, 85, 0.5);
        }

        .stat-bar-bg.health-bg {
            background: rgba(255, 0, 85, 0.35);
        }

        .stat-bar.shield {
            background: linear-gradient(90deg, #00d2ff, #007aff);
            box-shadow: 0 0 8px rgba(0, 210, 255, 0.5);
        }

        .stat-bar-bg.shield-bg {
            background: rgba(0, 210, 255, 0.35);
        }

        .weapon-hotbar {
            position: absolute;
            bottom: 16px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 10px;
            background: rgba(10, 15, 28, 0.7);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--border-color);
            padding: 8px 12px;
            border-radius: 16px;
            z-index: 5;
            box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
            transition: all 0.3s ease;
        }

        .hotbar-slot {
            width: 48px;
            height: 48px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
        }

        .hotbar-slot:hover {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }

        .hotbar-slot.active {
            background: rgba(0, 240, 255, 0.12);
            border-color: var(--color-cyan);
            box-shadow: var(--glow-cyan);
        }

        .hotbar-slot.locked {
            opacity: 0.35;
            cursor: not-allowed;
            background: rgba(0, 0, 0, 0.4);
        }

        .hotbar-icon {
            font-size: 1.5rem;
        }

        .hotbar-key {
            position: absolute;
            top: 2px;
            left: 4px;
            font-size: 0.6rem;
            font-weight: 800;
            color: var(--color-grey);
            font-family: monospace;
        }

        .hotbar-slot.active .hotbar-key {
            color: var(--color-cyan);
        }

        .hotbar-cooldown-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            background: rgba(0, 0, 0, 0.65);
            z-index: 3;
            border-radius: 0 0 9px 9px;
            pointer-events: none;
        }

        .hotbar-cooldown-text {
            position: absolute;
            z-index: 4;
            font-size: 1.1rem;
            font-weight: 800;
            color: var(--color-pink);
            text-shadow: 0 0 8px rgba(255, 0, 85, 0.8);
            pointer-events: none;
        }

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

        .inventory-slot {
            aspect-ratio: 1;
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
            transition: all 0.25s ease;
            cursor: default;
        }

        .inventory-slot.has-item {
            background: rgba(255, 255, 255, 0.05);
            border-color: rgba(255, 255, 255, 0.2);
            cursor: pointer;
        }

        .inventory-slot.has-item:hover {
            transform: translateY(-2px);
            border-color: var(--color-cyan);
            box-shadow: var(--glow-cyan);
        }

        .inventory-slot .item-icon {
            font-size: 1.8rem;
            margin-bottom: 4px;
        }

        .inventory-slot .item-count {
            position: absolute;
            bottom: 6px;
            right: 8px;
            font-size: 0.68rem;
            font-weight: 800;
            background: rgba(0, 0, 0, 0.6);
            padding: 1px 5px;
            border-radius: 20px;
            color: #fff;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .inventory-slot .item-name {
            font-size: 0.65rem;
            color: var(--color-grey);
            text-align: center;
            max-width: 90%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .recipe-list, .shop-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .card-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 14px;
            transition: all 0.25s ease;
        }

        .card-item:hover {
            background: rgba(255, 255, 255, 0.04);
            border-color: rgba(255, 255, 255, 0.15);
        }

        .item-details {
            display: flex;
            gap: 14px;
            align-items: center;
        }

        .item-icon-square {
            width: 44px;
            height: 44px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
        }

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

        .item-title {
            font-weight: 700;
            font-size: 0.95rem;
        }

        .item-desc {
            font-size: 0.75rem;
            color: var(--color-grey);
        }

        .cost-tags {
            display: flex;
            gap: 6px;
            margin-top: 4px;
        }

        .cost-tag {
            font-size: 0.65rem;
            background: rgba(0, 0, 0, 0.3);
            border: 1px solid var(--border-color);
            padding: 2px 6px;
            border-radius: 4px;
            color: var(--color-text);
        }

        .cost-tag.missing {
            color: var(--color-pink);
            border-color: rgba(255, 0, 85, 0.3);
            background: rgba(255, 0, 85, 0.05);
        }

        .cost-tag.available {
            color: var(--color-green);
            border-color: rgba(0, 255, 102, 0.3);
            background: rgba(0, 255, 102, 0.05);
        }

        .action-btn {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border-color);
            color: var(--color-text);
            padding: 8px 14px;
            border-radius: 8px;
            font-weight: 700;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .action-btn:hover:not(:disabled) {
            background: var(--color-cyan);
            color: var(--bg-darker);
            border-color: var(--color-cyan);
            box-shadow: var(--glow-cyan);
        }

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

        .action-btn.btn-sell {
            border-color: rgba(255, 184, 0, 0.3);
        }

        .action-btn.btn-sell:hover:not(:disabled) {
            background: var(--color-yellow);
            border-color: var(--color-yellow);
            color: var(--bg-darker);
            box-shadow: var(--glow-yellow);
        }

        .objective-panel {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .level-banner {
            background: linear-gradient(135deg, rgba(0, 240, 255, 0.1) 0%, rgba(143, 0, 255, 0.1) 100%);
            border: 1px solid rgba(0, 240, 255, 0.2);
            border-radius: 12px;
            padding: 16px;
        }

        .level-num {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 2px;
            color: var(--color-cyan);
            font-weight: 800;
            margin-bottom: 4px;
        }

        .level-name {
            font-size: 1.2rem;
            font-weight: 800;
        }

        .level-objective-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .obj-item {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.85rem;
        }

        .obj-checkbox {
            width: 18px;
            height: 18px;
            border-radius: 4px;
            border: 2px solid var(--color-grey);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
            font-weight: 900;
            transition: all 0.2s ease;
        }

        .obj-item.completed {
            color: var(--color-grey);
            text-decoration: line-through;
        }

        .obj-item.completed .obj-checkbox {
            border-color: var(--color-green);
            background: var(--color-green);
            color: var(--bg-darker);
        }

        .game-menu-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(8, 10, 16, 0.85);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 10;
            gap: 20px;
        }

        .menu-title {
            font-size: 4rem;
            font-weight: 800;
            letter-spacing: -2px;
            text-transform: uppercase;
            background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-purple) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.2));
        }

        .menu-subtitle {
            font-size: 1rem;
            color: var(--color-grey);
            letter-spacing: 2px;
            text-transform: uppercase;
            margin-top: -12px;
            margin-bottom: 20px;
        }

        .menu-buttons {
            display: flex;
            flex-direction: column;
            gap: 12px;
            width: 280px;
        }

        .menu-btn {
            width: 100%;
            padding: 14px;
            border-radius: 12px;
            font-size: 1rem;
            font-weight: 700;
            cursor: pointer;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border-color);
            color: var(--color-text);
            transition: all 0.25s ease;
            text-align: center;
        }

        .menu-btn:hover {
            transform: translateY(-2px);
            background: var(--color-cyan);
            border-color: var(--color-cyan);
            color: var(--bg-darker);
            box-shadow: var(--glow-cyan);
        }

        .instructions-card {
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid var(--border-color);
            padding: 16px;
            border-radius: 12px;
            width: 320px;
            font-size: 0.8rem;
            color: var(--color-grey);
            line-height: 1.5;
        }

        .instructions-card h4 {
            color: var(--color-text);
            margin-bottom: 8px;
            text-align: center;
            font-size: 0.9rem;
        }

        .instructions-grid {
            display: grid;
            grid-template-columns: auto 1fr;
            gap: 6px 12px;
        }

        .key-tag {
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.15);
            padding: 1px 6px;
            border-radius: 4px;
            font-family: monospace;
            font-weight: bold;
            color: #fff;
            text-align: center;
        }

        .system-controls {
            position: absolute;
            bottom: 16px;
            left: 16px;
            display: flex;
            gap: 10px;
            z-index: 35;
        }

        .icon-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            color: var(--color-text);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 1.1rem;
            transition: all 0.2s ease;
            backdrop-filter: blur(10px);
        }

        .icon-btn:hover {
            border-color: var(--color-cyan);
            box-shadow: var(--glow-cyan);
            transform: scale(1.05);
        }

        .icon-btn.is-active {
            border-color: var(--color-cyan);
            color: var(--color-cyan);
            box-shadow: var(--glow-cyan);
        }

        .pause-overlay {
            position: absolute;
            inset: 0;
            z-index: 25;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 6px;
            background: rgba(4, 7, 16, 0.66);
            backdrop-filter: blur(4px);
        }

        .pause-title {
            color: var(--color-cyan);
            font-size: 2.6rem;
            font-weight: 800;
            text-transform: uppercase;
            text-shadow: var(--glow-cyan);
        }

        .pause-subtitle {
            color: var(--color-text);
            font-size: 0.95rem;
        }

        .level-up-overlay {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.8);
            background: rgba(13, 15, 23, 0.95);
            border: 2px solid var(--color-cyan);
            box-shadow: var(--glow-cyan);
            border-radius: 20px;
            padding: 30px;
            text-align: center;
            z-index: 8;
            pointer-events: none;
            opacity: 0;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        .level-up-overlay.show {
            pointer-events: auto;
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }

        .level-up-title {
            font-size: 2.2rem;
            font-weight: 800;
            color: var(--color-green);
            margin-bottom: 6px;
            text-transform: uppercase;
        }

        .level-up-subtitle {
            font-size: 1rem;
            color: var(--color-text);
            margin-bottom: 20px;
        }

        .betrayal-dialogue {
            position: absolute;
            left: 24px;
            right: 24px;
            bottom: 88px;
            z-index: 30;
            padding: 16px 18px;
            border: 1px solid rgba(0, 210, 255, 0.45);
            border-radius: 8px;
            background: rgba(3, 12, 30, 0.92);
            box-shadow: 0 0 30px rgba(0, 210, 255, 0.18);
            backdrop-filter: blur(10px);
        }

        .betrayal-speaker {
            margin-bottom: 8px;
            color: #00d2ff;
            font-size: 0.8rem;
            font-weight: 800;
            letter-spacing: 1px;
            text-transform: uppercase;
        }

        .betrayal-text {
            color: #ffffff;
            font-size: 0.95rem;
            line-height: 1.45;
            white-space: pre-line;
        }

        .betrayal-skip {
            margin-top: 10px;
            color: var(--color-grey);
            font-size: 0.75rem;
            font-weight: 800;
            text-transform: uppercase;
        }

        [data-tooltip] {
            position: relative;
        }

        [data-tooltip]::after {
            content: attr(data-tooltip);
            position: absolute;
            bottom: 125%;
            left: 50%;
            transform: translateX(-50%) scale(0.9);
            background: #090a12;
            border: 1px solid var(--border-color);
            padding: 6px 10px;
            border-radius: 6px;
            font-size: 0.7rem;
            white-space: nowrap;
            opacity: 0;
            pointer-events: none;
            transition: all 0.2s ease;
            z-index: 100;
            box-shadow: 0 4px 12px rgba(0,0,0,0.5);
        }

        [data-tooltip]:hover::after {
            opacity: 1;
            transform: translateX(-50%) scale(1);
        }

        .footer-info {
            position: absolute;
            bottom: 15px;
            font-size: 0.75rem;
            color: var(--color-grey);
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .tab-content::-webkit-scrollbar {
            width: 6px;
        }

        .tab-content::-webkit-scrollbar-track {
            background: transparent;
        }

        .tab-content::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.08);
            border-radius: 4px;
        }

        .tab-content::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.15);
        }

        /* Victory Sandbox Banner Styles */
        .victory-sandbox-banner {
            position: absolute;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            width: 85%;
            max-width: 650px;
            background: rgba(10, 20, 15, 0.85);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 2px solid #10b981;
            border-radius: 20px;
            padding: 16px 24px;
            text-align: center;
            box-shadow: 0 0 30px rgba(16, 185, 129, 0.45), inset 0 0 15px rgba(16, 185, 129, 0.2);
            z-index: 1000;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            animation: slideDownBanner 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        }

        @keyframes slideDownBanner {
            from {
                transform: translate(-50%, -100px);
                opacity: 0;
            }
            to {
                transform: translate(-50%, 0);
                opacity: 1;
            }
        }

        .sandbox-banner-title {
            color: #10b981;
            margin: 0;
            font-size: 1.8rem;
            font-family: 'Outfit', sans-serif;
            font-weight: 800;
            letter-spacing: 2px;
            text-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
        }

        .sandbox-banner-desc {
            color: #e2e8f0;
            margin: 0;
            font-size: 0.95rem;
            line-height: 1.4;
            max-width: 500px;
        }

        .sandbox-reset-btn {
            margin-top: 4px;
            background: linear-gradient(135deg, #10b981, #059669) !important;
            border: none !important;
            color: #ffffff !important;
            font-weight: 800 !important;
            letter-spacing: 1px;
            padding: 8px 20px !important;
            border-radius: 8px !important;
            font-size: 0.85rem !important;
            box-shadow: 0 0 12px rgba(16, 185, 129, 0.4) !important;
            transition: all 0.2s ease !important;
            cursor: pointer;
        }

        .sandbox-reset-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 0 20px rgba(16, 185, 129, 0.7) !important;
        }

        /* Glowing key slot in inventory */
        .glowing-slot {
            position: relative;
            border: 2px dashed #f59e0b !important;
            background: rgba(245, 158, 11, 0.08) !important;
            animation: pulseGlow 1.8s infinite alternate ease-in-out;
            box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
        }

        @keyframes pulseGlow {
            0% {
                border-color: rgba(245, 158, 11, 0.5);
                box-shadow: 0 0 4px rgba(245, 158, 11, 0.1);
            }
            100% {
                border-color: rgba(245, 158, 11, 1.0);
                box-shadow: 0 0 16px rgba(245, 158, 11, 0.5);
                background: rgba(245, 158, 11, 0.16) !important;
            }
        }

        @media (max-width: 900px) {
            body {
                width: 100%;
                height: auto;
                min-height: 100vh;
                padding: 12px 0 32px;
                overflow-x: hidden;
                overflow-y: auto;
                justify-content: flex-start;
            }

            .background-grid {
                position: fixed;
            }

            .app-container {
                width: calc(100vw - 24px);
                height: auto;
                min-height: 0;
                flex-direction: column;
                gap: 12px;
            }

            .game-area {
                flex: none;
                width: 100%;
                height: min(72vh, 680px);
                min-height: 520px;
            }

            .sidebar {
                flex: none;
                width: 100%;
                height: 560px;
                min-height: 480px;
            }

            .canvas-overlay-hud {
                top: 10px;
                left: 10px;
                right: 10px;
                gap: 6px;
            }

            .hud-panel {
                min-width: 0;
                padding: 8px 10px;
                gap: 8px;
            }

            .stat-bar-container {
                width: 100px;
            }

            .hud-value {
                font-size: 1rem;
            }

            .tabs-nav {
                gap: 6px;
                padding: 10px 10px 8px;
            }

            .tab-btn {
                min-width: 0;
                padding: 9px 5px;
                font-size: 0.78rem;
            }

            .footer-info {
                position: static;
                margin-top: 16px;
                text-align: center;
            }
        }

        @media (max-width: 560px) {
            .game-area {
                height: 68vh;
                min-height: 460px;
            }

            .canvas-overlay-hud {
                align-items: flex-start;
            }

            .hud-panel {
                padding: 7px 8px;
                gap: 5px;
            }

            .hud-label {
                font-size: 0.58rem;
                letter-spacing: 0.8px;
            }

            .stat-bar-container {
                width: 72px;
                height: 8px;
            }

            .hud-value {
                font-size: 0.85rem;
                gap: 3px;
            }

            .instructions-card {
                width: calc(100vw - 64px);
                max-width: 320px;
            }

            .system-controls {
                bottom: 10px;
                left: 10px;
                gap: 6px;
            }

            .icon-btn {
                width: 36px;
                height: 36px;
            }
        }
