:root {
            --bg-color: #0f172a;
            --glass-bg: rgba(30, 41, 59, 0.7);
            --glass-border: rgba(255, 255, 255, 0.1);
            --accent: #3b82f6;
            --accent-hover: #2563eb;
            --text-main: #f8fafc;
            --text-dim: #94a3b8;
        }

        *,
        *::before,
        *::after {
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            margin: 0;
            padding: 0;
            background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
            color: var(--text-main);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            overflow-x: hidden;
        }

        .container {
            width: 90%;
            max-width: 900px;
            margin: 40px auto;
            background: var(--glass-bg);
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--glass-border);
        }

        h1 {
            text-align: center;
            font-size: 2.5rem;
            margin-bottom: 20px;
            background: linear-gradient(to right, #60a5fa, #a78bfa);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        
        .description {
            text-align: center;
            color: var(--text-dim);
            margin-bottom: 30px;
            font-size: 1.1rem;
        }

        /* Tabs */
        .tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            border-bottom: 1px solid var(--glass-border);
            padding-bottom: 10px;
            flex-wrap: wrap;
        }

        .tab-btn {
            background: transparent;
            border: none;
            color: var(--text-dim);
            font-size: 1.1rem;
            padding: 10px 20px;
            cursor: pointer;
            border-radius: 8px;
            transition: 0.3s ease;
            font-weight: 600;
        }

        .tab-btn:hover {
            color: var(--text-main);
            background: rgba(255, 255, 255, 0.05);
        }

        .tab-btn.active {
            color: #fff;
            background: var(--accent);
            box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
        }

        .tab-content {
            display: none;
            animation: fadeIn 0.3s ease;
        }

        .tab-content.active {
            display: block;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Upload Grids */
        .upload-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 20px;
            margin-bottom: 20px;
        }

        .upload-zone {
            background: rgba(15, 23, 42, 0.6);
            border: 2px dashed #475569;
            border-radius: 12px;
            padding: 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            min-height: 120px;
            justify-content: center;
        }

        .upload-zone:hover, .upload-zone.dragover {
            border-color: var(--accent);
            background: rgba(59, 130, 246, 0.1);
        }

        .upload-zone input[type="file"] {
            display: none;
        }

        .status-text {
            color: var(--text-dim);
            font-size: 0.9rem;
            word-break: break-all;
        }

        .clear-zone-btn {
            display: none;
            position: absolute;
            top: -8px;
            right: -8px;
            background: #ef4444;
            color: white;
            border: none;
            border-radius: 50%;
            width: 24px;
            height: 24px;
            font-size: 14px;
            font-weight: bold;
            cursor: pointer;
            z-index: 10;
            box-shadow: 0 2px 4px rgba(0,0,0,0.5);
            transition: 0.2s;
            align-items: center;
            justify-content: center;
            line-height: 1;
        }

        .clear-zone-btn:hover {
            background: #dc2626;
            transform: scale(1.1);
        }

        .preview-img {
            max-width: 64px;
            max-height: 64px;
            image-rendering: pixelated;
            display: none;
            border-radius: 4px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.3);
        }

        /* Dynamic Rows (Items & Blocks) */
        .dynamic-row {
            display: flex;
            gap: 15px;
            align-items: center;
            background: rgba(15, 23, 42, 0.4);
            padding: 15px;
            border-radius: 10px;
            margin-bottom: 15px;
            border: 1px solid var(--glass-border);
            flex-wrap: wrap;
        }

        .dynamic-input {
            flex: 2;
            min-width: 200px;
            background: rgba(15, 23, 42, 0.8);
            border: 1px solid #475569;
            color: white;
            padding: 12px 15px;
            border-radius: 8px;
            font-size: 1rem;
            outline: none;
            transition: border-color 0.2s;
        }
        
        .dynamic-input:focus {
            border-color: var(--accent);
        }

        .dynamic-upload {
            flex: 1;
            min-height: 60px;
            min-width: 150px;
            padding: 10px;
            flex-direction: row;
            justify-content: space-evenly;
            margin: 0;
        }

        .btn-remove {
            background: #ef4444;
            color: white;
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 1.2rem;
            transition: 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .btn-remove:hover {
            background: #dc2626;
        }

        .row-toolbar {
            display: flex;
            gap: 15px;
            width: 100%;
            align-items: center;
            flex-wrap: wrap;
            min-width: 0;
        }

        .row-toolbar > * {
            min-width: 0;
        }

        .row-toolbar-label {
            font-size: 0.9rem;
            color: var(--text-dim);
        }

        .row-toolbar-field {
            flex: 1 1 220px;
            min-width: 0;
        }

        .row-toolbar-field--wide {
            flex: 2 1 260px;
        }

        .row-toolbar-btn {
            flex: 0 1 auto;
        }

        .command-preview {
            background: rgba(0, 0, 0, 0.4);
            padding: 5px 10px;
            border-radius: 4px;
            font-family: monospace;
            color: #cbd5e1;
            font-size: 0.85rem;
            margin-top: 5px;
            overflow-x: auto;
            white-space: nowrap;
            display: none;
            width: 100%;
        }

        .block-sides {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 15px;
            min-width: 0;
        }

        .block-side-cell {
            position: relative;
            flex: 1 1 110px;
            min-width: 100px;
        }

        .btn-add {
            background: rgba(255,255,255,0.05);
            border: 1px dashed #475569;
            color: var(--text-dim);
            width: 100%;
            padding: 15px;
            border-radius: 10px;
            cursor: pointer;
            font-size: 1rem;
            transition: 0.2s;
            margin-bottom: 20px;
        }

        .btn-add:hover {
            background: rgba(255,255,255,0.1);
            border-color: var(--text-dim);
            color: white;
        }

        /* Main Button */
        .generate-btn {
            background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
            color: white;
            border: none;
            padding: 18px 40px;
            font-size: 1.2rem;
            font-weight: bold;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
            width: 100%;
            margin-top: 20px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .generate-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 15px 25px rgba(59, 130, 246, 0.4);
        }

        .generate-btn:active {
            transform: translateY(1px);
        }
        
        /* Modal Slicer */
        .modal-overlay {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(5px);
            z-index: 1000;
            display: none;
            justify-content: center;
            align-items: center;
        }

        .modal-content {
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: 12px;
            padding: 25px;
            width: 90%;
            max-width: 800px;
            max-height: 90%;
            overflow-y: auto;
            position: relative;
        }

        .modal-close {
            position: absolute;
            top: 15px; right: 15px;
            background: none; border: none;
            color: #fff; font-size: 24px; cursor: pointer;
        }

        .slicer-canvas-container {
            position: relative;
            margin: 20px auto;
            display: inline-block;
            border: 2px solid var(--accent);
            background: #000;
        }

        #slicerCanvas {
            image-rendering: pixelated;
            cursor: crosshair;
        }

        .slicer-controls {
            display: flex;
            gap: 10px;
            margin-top: 15px;
            justify-content: center;
            flex-wrap: wrap;
            align-items: center;
        }

        .slicer-btn {
            background: rgba(255, 255, 255, 0.1);
            color: white;
            border: 1px solid #475569;
            padding: 8px 15px;
            border-radius: 6px;
            cursor: pointer;
            transition: 0.2s;
            font-size: 0.9rem;
        }

        .slicer-btn:hover { background: rgba(255, 255, 255, 0.2); }
        
        .slicer-btn.top { border-bottom-color: #ef4444; border-bottom-width: 3px; }
        .slicer-btn.bottom { border-bottom-color: #3b82f6; border-bottom-width: 3px;  }
        .slicer-btn.front { border-bottom-color: #10b981; border-bottom-width: 3px;  }
        .slicer-btn.back { border-bottom-color: #6366f1; border-bottom-width: 3px;  }
        .slicer-btn.left { border-bottom-color: #ec4899; border-bottom-width: 3px;  }
        .slicer-btn.right { border-bottom-color: #14b8a6; border-bottom-width: 3px;  }
        .slicer-btn.side { border-bottom-color: #f59e0b; border-bottom-width: 3px;  }
        .slicer-btn.main { border-bottom-color: #a855f7; border-bottom-width: 3px;  }

        .btn-slice {
            background: var(--accent);
            color: white; border: none;
            padding: 12px 15px; border-radius: 8px;
            cursor: pointer; font-weight: bold;
            display: flex; align-items: center; gap: 5px;
        }
        .btn-slice:hover { background: var(--accent-hover); }

        @media (max-width: 600px) {
            .container { width: 95%; padding: 15px; margin: 20px auto; }
            h1 { font-size: 1.8rem; }
            .tab-btn { font-size: 0.9rem; padding: 8px 12px; }
            .modal-content { padding: 15px; width: 95%; max-height: 95vh; }
            #previewContainer { height: 300px !important; }
            .btn-slice { font-size: 0.8rem; padding: 8px; }
            .slicer-btn { font-size: 0.8rem; padding: 6px 10px; }
            .upload-grid { grid-template-columns: 1fr 1fr; }
        }

        /* Gallery Styles (Minecraft Inventory) */
        .gallery {
            margin-top: 50px;
            background: #c6c6c6; 
            border: 2px solid;
            border-color: #ffffff #555555 #555555 #ffffff; /* Classic MC border */
            padding: 15px;
            color: #333;
        }

        .gallery-header { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
        .gallery-header h3 { color: #333; text-shadow: none; font-size: 1.2rem; margin: 0; }
        
        .gallery-search {
            flex: 1;
            min-width: 200px;
            background: #ffffff;
            border: 2px solid;
            border-color: #555555 #ffffff #ffffff #555555; /* Inset */
            color: #333;
            padding: 6px 10px;
            font-size: 1rem;
            outline: none;
            font-family: inherit;
        }

        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
            gap: 2px; /* Very tight */
            max-height: 400px;
            overflow-y: auto;
            padding: 5px;
            background: #8b8b8b; /* Slot background container color */
            border: 2px solid;
            border-color: #555555 #ffffff #ffffff #555555; /* Inset */
        }

        .gallery-grid::-webkit-scrollbar { width: 12px; }
        .gallery-grid::-webkit-scrollbar-track { background: #c6c6c6; border-left: 2px solid #555555; }
        .gallery-grid::-webkit-scrollbar-thumb { background: #c6c6c6; border: 2px solid; border-color: #ffffff #555555 #555555 #ffffff; }

        .gallery-item {
            width: 36px;
            height: 36px;
            background: #8b8b8b;
            border: 2px solid;
            border-color: #373737 #ffffff #ffffff #373737; /* MC Slot inset */
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
            position: relative;
        }

        .gallery-item:hover {
            background: #c6c6c6;
        }
        
        .gallery-item span {
            display: none; /* Hide text as requested */
        }

        .gallery-item img {
            width: 32px;
            height: 32px;
            image-rendering: pixelated;
            object-fit: contain;
        }

        /* Tooltip */
        .mc-tooltip {
            position: fixed;
            background: #100010;
            border: 2px solid #2a005c;
            border-radius: 3px;
            padding: 4px 6px;
            color: #ffffff;
            pointer-events: none;
            z-index: 9999;
            display: none;
            flex-direction: column;
            line-height: 1.2;
        }
        .mc-tooltip .tt-title { color: #fdfdfd; font-family: sans-serif; font-size: 1rem; margin-bottom: 3px;}
        .mc-tooltip .tt-id { color: #aaaaaa; font-family: monospace; font-size: 0.8rem; }
        
        /* Glass Navbar */
        .steam-navbar {
            width: 100%;
            background: rgba(15, 23, 42, 0.6);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border-bottom: 1px solid var(--glass-border);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 20px;
            box-sizing: border-box;
            height: 60px;
            font-size: 15px;
            position: sticky;
            top: 0;
            z-index: 1000;
            box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
        }
        .steam-navbar-inner {
            display: flex;
            align-items: center;
            max-width: 960px;
            width: 100%;
            gap: 16px;
        }
        .site-icon-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 30px;
            height: 30px;
            flex: 0 0 30px;
            border-radius: 6px;
            text-decoration: none;
            transition: opacity 0.2s ease, transform 0.2s ease;
        }
        .site-icon-link:hover,
        .site-icon-link:focus {
            outline: none;
            opacity: 0.86;
            transform: translateY(-1px);
        }
        .site-icon-link img {
            width: 30px;
            height: 30px;
            border-radius: 4px;
            object-fit: cover;
        }
        .steam-nav-menu {
            position: relative;
            display: flex;
            align-items: center;
        }
        .steam-nav-dropdown {
            position: relative;
            cursor: pointer;
            color: var(--text-dim);
            text-decoration: none;
            padding: 10px 10px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: 0.3s ease;
            border-radius: 8px;
        }
        .steam-nav-dropdown:hover {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.05);
        }
        .steam-nav-dropdown.is-active {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.08);
        }
        .steam-nav-dropdown::after {
            content: "▼";
            font-size: 10px;
            opacity: 0.5;
        }
        .steam-dropdown-panel {
            position: absolute;
            left: 0;
            top: calc(100% + 8px);
            min-width: 260px;
            padding: 8px;
            display: flex;
            flex-direction: column;
            gap: 3px;
            background: rgba(15, 23, 42, 0.94);
            border: 1px solid var(--glass-border);
            border-radius: 8px;
            box-shadow: 0 22px 50px -24px rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            opacity: 0;
            visibility: hidden;
            transform: translateY(-6px);
            transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
            z-index: 1100;
        }
        .steam-dropdown-panel--small {
            min-width: 190px;
        }
        .steam-mega-panel {
            width: 260px;
            max-width: calc(100vw - 32px);
            display: grid;
            grid-template-columns: 220px 360px;
            gap: 10px;
            align-items: stretch;
            overflow: hidden;
            transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease, width 0.24s ease;
        }
        .steam-dropdown-panel a {
            color: var(--text-dim);
            text-decoration: none;
            padding: 9px 10px;
            border-radius: 7px;
            font-weight: 650;
            line-height: 1.2;
            transition: color 0.2s ease, background 0.2s ease;
        }
        .steam-dropdown-panel a:hover,
        .steam-dropdown-panel a:focus {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.08);
            outline: none;
        }
        .steam-nav-menu:hover .steam-dropdown-panel,
        .steam-nav-menu:focus-within .steam-dropdown-panel {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }
        .steam-nav-menu.is-open .steam-dropdown-panel {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }
        .steam-nav-menu:hover .steam-mega-panel,
        .steam-nav-menu:focus-within .steam-mega-panel {
            width: min(640px, calc(100vw - 32px));
        }
        .steam-nav-menu.is-open .steam-mega-panel {
            width: min(640px, calc(100vw - 32px));
        }
        .mega-list {
            display: flex;
            flex-direction: column;
            gap: 3px;
            min-width: 220px;
            padding-right: 10px;
            border-right: 1px solid var(--glass-border);
        }
        .mega-list-tree {
            gap: 10px;
        }
        .mega-group {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .steam-dropdown-panel .mega-group-title {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.055);
        }
        .mega-sublist {
            display: flex;
            flex-direction: column;
            gap: 2px;
            padding-left: 12px;
            border-left: 1px solid rgba(148, 163, 184, 0.22);
        }
        .steam-dropdown-panel .mega-sublist a {
            padding: 7px 9px;
            font-size: 0.9rem;
            font-weight: 600;
        }
        .mega-feature {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
            min-width: 360px;
            opacity: 0;
            transform: translateX(-10px);
            transition: opacity 0.18s ease 0.08s, transform 0.18s ease 0.08s;
        }
        .steam-nav-menu:hover .mega-feature,
        .steam-nav-menu:focus-within .mega-feature {
            opacity: 1;
            transform: translateX(0);
        }
        .steam-nav-menu.is-open .mega-feature {
            opacity: 1;
            transform: translateX(0);
        }
        .steam-dropdown-panel .mega-card {
            min-height: 88px;
            padding: 12px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 6px;
            border: 1px solid rgba(148, 163, 184, 0.18);
            background: rgba(255, 255, 255, 0.045);
        }
        .steam-dropdown-panel .mega-card strong {
            color: #ffffff;
            font-size: 0.96rem;
        }
        .steam-dropdown-panel .mega-card span {
            color: var(--text-dim);
            font-size: 0.88rem;
            line-height: 1.35;
        }
        .steam-dropdown-panel .mega-card:hover,
        .steam-dropdown-panel .mega-card:focus {
            border-color: rgba(96, 165, 250, 0.42);
            background: rgba(59, 130, 246, 0.16);
        }
        .steam-search {
            margin-left: auto;
            display: flex;
            align-items: center;
            background: rgba(15, 23, 42, 0.8);
            border: 1px solid var(--glass-border);
            border-radius: 20px;
            overflow: hidden;
            transition: 0.3s ease;
        }
        .steam-search:focus-within {
            border-color: var(--accent);
            box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
        }
        .steam-search input {
            background: transparent;
            border: none;
            padding: 8px 15px;
            color: white;
            outline: none;
            width: 220px;
            font-size: 14px;
        }
        .steam-search input::placeholder {
            color: #64748b;
        }
        .steam-search button {
            background: transparent;
            border: none;
            padding: 0 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: var(--text-dim);
            transition: 0.3s;
        }
        .steam-search button:hover {
            color: var(--accent);
        }

        .language-switch {
            display: inline-flex;
            align-items: center;
            gap: 2px;
            padding: 3px;
            border: 1px solid var(--glass-border);
            border-radius: 999px;
            background: rgba(15, 23, 42, 0.72);
        }

        .language-switch a {
            color: var(--text-dim);
            text-decoration: none;
            font-weight: 800;
            font-size: 0.78rem;
            line-height: 1;
            padding: 7px 8px;
            border-radius: 999px;
        }

        .language-switch a:hover,
        .language-switch a.is-active {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.1);
        }

        .steam-nav-dropdown::after {
            content: "\25BE";
        }

        .language-switch {
            position: relative;
            justify-content: center;
            gap: 4px;
            min-width: 58px;
            overflow: hidden;
            max-width: 58px;
            transition:
                max-width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.22s ease,
                background 0.22s ease,
                box-shadow 0.22s ease,
                transform 0.22s ease;
        }

        .language-switch a {
            align-items: center;
            justify-content: center;
            white-space: nowrap;
            display: inline-flex;
            overflow: hidden;
            max-width: 0;
            opacity: 0;
            transform: translateX(-6px) scale(0.96);
            padding-left: 0;
            padding-right: 0;
            pointer-events: none;
            transition:
                max-width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.18s ease,
                transform 0.22s ease,
                padding 0.22s ease,
                background 0.18s ease,
                color 0.18s ease;
        }

        .language-switch a.is-active {
            order: -1;
            max-width: 52px;
            opacity: 1;
            transform: translateX(0) scale(1);
            padding-left: 8px;
            padding-right: 8px;
            pointer-events: auto;
        }

        .language-switch a.is-active::after {
            content: "\25BE";
            margin-left: 6px;
            font-size: 0.62rem;
            opacity: 0.72;
            transition: transform 0.2s ease;
        }

        .language-switch:hover,
        .language-switch:focus-within,
        .language-switch.is-open {
            background: rgba(15, 23, 42, 0.88);
            border-color: rgba(96, 165, 250, 0.3);
            box-shadow: 0 10px 24px -18px rgba(59, 130, 246, 0.68);
            max-width: 220px;
        }

        .language-switch:hover a,
        .language-switch:focus-within a,
        .language-switch.is-open a {
            max-width: 52px;
            opacity: 1;
            transform: translateX(0) scale(1);
            padding-left: 8px;
            padding-right: 8px;
            pointer-events: auto;
        }

        .language-switch:hover a:hover,
        .language-switch:hover a:focus,
        .language-switch:focus-within a:hover,
        .language-switch:focus-within a:focus,
        .language-switch.is-open a:hover,
        .language-switch.is-open a:focus {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.1);
            outline: none;
        }

        .language-switch:hover a.is-active::after,
        .language-switch:focus-within a.is-active::after,
        .language-switch.is-open a.is-active::after {
            transform: rotate(180deg);
        }

        .search-results-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;
            margin-bottom: 14px;
        }

        .search-results-summary {
            color: var(--text-dim);
            line-height: 1.6;
        }

        .search-results-clear {
            color: #bfdbfe;
            font-weight: 700;
            text-decoration: none;
        }

        .search-results-clear:hover,
        .search-results-clear:focus {
            color: #ffffff;
            text-decoration: underline;
            outline: none;
        }

        .search-empty {
            padding: 18px;
            border: 1px dashed rgba(148, 163, 184, 0.28);
            border-radius: 8px;
            background: rgba(15, 23, 42, 0.42);
            color: var(--text-dim);
        }

        .cookie-banner {
            position: fixed;
            left: 16px;
            right: 16px;
            bottom: 16px;
            z-index: 2100;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 16px 18px;
            border: 1px solid rgba(148, 163, 184, 0.22);
            border-radius: 12px;
            background: rgba(15, 23, 42, 0.94);
            box-shadow: 0 22px 50px -24px rgba(0, 0, 0, 0.88);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
        }

        .cookie-banner-copy {
            min-width: 0;
        }

        .cookie-banner-copy strong {
            display: block;
            margin-bottom: 6px;
            color: #ffffff;
            font-size: 0.98rem;
        }

        .cookie-banner-copy p {
            margin: 0;
            color: var(--text-dim);
            line-height: 1.55;
        }

        .cookie-banner-link {
            display: inline-block;
            margin-top: 8px;
            color: #bfdbfe;
            font-weight: 700;
            text-decoration: none;
        }

        .cookie-banner-link:hover,
        .cookie-banner-link:focus {
            color: #ffffff;
            text-decoration: underline;
            outline: none;
        }

        .cookie-banner-actions {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            flex: 0 0 auto;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .cookie-banner-button {
            border: 0;
            border-radius: 999px;
            background: var(--accent);
            color: #ffffff;
            padding: 10px 16px;
            font: inherit;
            font-weight: 800;
            cursor: pointer;
            transition: background 0.2s ease, transform 0.2s ease;
        }

        .cookie-banner-button:hover,
        .cookie-banner-button:focus {
            background: var(--accent-hover);
            transform: translateY(-1px);
            outline: none;
        }

        .cookie-banner-button-secondary {
            background: rgba(148, 163, 184, 0.16);
            color: #dbeafe;
            border: 1px solid rgba(148, 163, 184, 0.24);
        }

        .cookie-banner-button-secondary:hover,
        .cookie-banner-button-secondary:focus {
            background: rgba(59, 130, 246, 0.22);
        }

        .page-shell {
            width: 90%;
            max-width: 980px;
            margin: 56px auto;
        }

        .page-hero {
            margin-bottom: 28px;
        }

        .page-hero h1 {
            text-align: left;
            margin-bottom: 12px;
        }

        .page-lead {
            max-width: 720px;
            color: var(--text-dim);
            font-size: 1.08rem;
            line-height: 1.7;
        }

        .page-section {
            margin-top: 34px;
        }

        .section-title {
            margin: 0 0 16px;
            font-size: 1.35rem;
            color: var(--text-main);
        }

        .resource-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 16px;
        }

        .resource-card {
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: 8px;
            padding: 18px;
            box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
        }

        .resource-card h2,
        .resource-card h3 {
            margin: 0 0 10px;
            font-size: 1.05rem;
            color: var(--text-main);
        }

        .resource-card p,
        .resource-card li {
            color: var(--text-dim);
            line-height: 1.6;
        }

        .resource-card p {
            margin: 0;
        }

        .resource-card ul {
            margin: 0;
            padding-left: 18px;
        }

        .server-slideshow {
            position: relative;
            overflow: hidden;
            border-radius: 8px;
            border: 1px solid var(--glass-border);
            background: rgba(2, 6, 23, 0.55);
            box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.85);
        }

        .server-slides {
            position: relative;
            aspect-ratio: 16 / 9;
            background: #020617;
        }

        .server-slides img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.28s ease, visibility 0.28s ease;
        }

        .server-slides img.is-active {
            opacity: 1;
            visibility: visible;
        }

        .slideshow-btn {
            position: absolute;
            top: 50%;
            z-index: 2;
            width: 42px;
            height: 42px;
            border: 1px solid rgba(255, 255, 255, 0.22);
            border-radius: 999px;
            background: rgba(2, 6, 23, 0.64);
            color: #ffffff;
            font-size: 2rem;
            line-height: 1;
            cursor: pointer;
            transform: translateY(-50%);
            transition: background 0.2s ease, transform 0.2s ease;
        }

        .slideshow-btn:hover,
        .slideshow-btn:focus {
            background: rgba(59, 130, 246, 0.72);
            outline: none;
            transform: translateY(-50%) scale(1.04);
        }

        .slideshow-btn-prev {
            left: 14px;
        }

        .slideshow-btn-next {
            right: 14px;
        }

        .slideshow-dots {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 12px;
            z-index: 2;
            display: flex;
            justify-content: center;
            gap: 8px;
            pointer-events: none;
        }

        .slideshow-dots button {
            width: 9px;
            height: 9px;
            padding: 0;
            border: 0;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.42);
            cursor: pointer;
            pointer-events: auto;
        }

        .slideshow-dots button.is-active {
            background: #ffffff;
            box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.26);
        }

        .wiki-article {
            max-width: 860px;
        }

        .wiki-article h2 {
            margin: 34px 0 12px;
            color: var(--text-main);
            font-size: 1.45rem;
        }

        .wiki-article h3 {
            margin: 24px 0 10px;
            color: var(--text-main);
            font-size: 1.12rem;
        }

        .wiki-article p,
        .wiki-article li {
            color: var(--text-dim);
            line-height: 1.75;
            font-size: 1rem;
        }

        .wiki-article ul {
            padding-left: 22px;
        }

        .wiki-article pre {
            margin: 16px 0;
            padding: 16px;
            overflow-x: auto;
            border-radius: 8px;
            border: 1px solid var(--glass-border);
            background: rgba(2, 6, 23, 0.72);
            color: #dbeafe;
            line-height: 1.55;
        }

        .wiki-article code {
            font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
        }

        .wiki-article :not(pre) > code {
            padding: 2px 5px;
            border-radius: 5px;
            background: rgba(15, 23, 42, 0.8);
            color: #bfdbfe;
        }

        .article-back {
            display: inline-flex;
            margin-bottom: 18px;
            color: #bfdbfe;
            text-decoration: none;
            font-weight: 700;
        }

        .article-back:hover {
            color: #ffffff;
        }

        .site-footer {
            width: 90%;
            max-width: 980px;
            margin: 24px auto 36px;
            padding-top: 18px;
            border-top: 1px solid var(--glass-border);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;
            color: var(--text-dim);
            font-size: 0.92rem;
        }

        .site-footer a {
            color: #bfdbfe;
            text-decoration: none;
            font-weight: 700;
        }

        .site-footer a:hover {
            color: #ffffff;
        }

        .resource-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-top: 14px;
            padding: 10px 14px;
            border-radius: 8px;
            background: var(--accent);
            color: #ffffff;
            text-decoration: none;
            font-weight: 700;
            transition: background 0.2s ease, transform 0.2s ease;
        }

        .resource-link:hover {
            background: var(--accent-hover);
            transform: translateY(-1px);
        }

        .resource-link-secondary {
            background: rgba(148, 163, 184, 0.16);
            color: #dbeafe;
            border: 1px solid rgba(148, 163, 184, 0.24);
        }

        .resource-link-secondary:hover {
            background: rgba(59, 130, 246, 0.22);
        }

        .soon-kicker {
            margin: 0 0 10px;
            color: #93c5fd;
            font-size: 0.9rem;
            font-weight: 800;
            text-transform: uppercase;
        }

        .soon-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 18px;
        }

        .compact-table {
            width: 100%;
            border-collapse: collapse;
            overflow: hidden;
            border-radius: 8px;
            background: rgba(15, 23, 42, 0.45);
            border: 1px solid var(--glass-border);
        }

        .compact-table th,
        .compact-table td {
            padding: 12px 14px;
            border-bottom: 1px solid var(--glass-border);
            text-align: left;
            color: var(--text-dim);
            vertical-align: top;
        }

        .compact-table th {
            color: var(--text-main);
            background: rgba(255, 255, 255, 0.04);
        }

        .compact-table tr:last-child th,
        .compact-table tr:last-child td {
            border-bottom: 0;
        }

        .copy-example {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            min-width: 0;
        }

        .copy-example code {
            min-width: 0;
        }

        .copy-button {
            flex: 0 0 auto;
            border: 1px solid rgba(148, 163, 184, 0.24);
            border-radius: 999px;
            background: rgba(59, 130, 246, 0.16);
            color: #dbeafe;
            padding: 6px 10px;
            font: inherit;
            font-size: 0.8rem;
            font-weight: 800;
            line-height: 1;
            cursor: pointer;
            transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
        }

        .copy-button:hover,
        .copy-button:focus {
            background: rgba(59, 130, 246, 0.28);
            border-color: rgba(96, 165, 250, 0.45);
            color: #ffffff;
            outline: none;
        }

        .copy-button.is-copied {
            background: rgba(16, 185, 129, 0.22);
            border-color: rgba(52, 211, 153, 0.4);
            color: #d1fae5;
        }

        .status-pill {
            display: inline-flex;
            align-items: center;
            padding: 4px 8px;
            border-radius: 999px;
            background: rgba(59, 130, 246, 0.18);
            color: #bfdbfe;
            font-size: 0.82rem;
            font-weight: 700;
        }

        .tool-layout {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 18px;
        }

        .tool-panel {
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: 8px;
            padding: 18px;
            box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.72);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
        }

        .tool-panel h2,
        .tool-panel h3 {
            margin: 0 0 14px;
            color: var(--text-main);
        }

        .tool-form-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
            gap: 14px;
        }

        .tool-field {
            display: flex;
            flex-direction: column;
            gap: 7px;
        }

        .tool-field label,
        .tool-check label {
            color: var(--text-dim);
            font-size: 0.92rem;
            font-weight: 700;
        }

        .tool-field input,
        .tool-field select,
        .tool-field textarea {
            width: 100%;
            box-sizing: border-box;
            border: 1px solid rgba(148, 163, 184, 0.28);
            border-radius: 8px;
            background: rgba(2, 6, 23, 0.58);
            color: var(--text-main);
            padding: 11px 12px;
            font: inherit;
            outline: none;
        }

        .tool-field input:focus,
        .tool-field select:focus,
        .tool-field textarea:focus {
            border-color: rgba(96, 165, 250, 0.72);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
        }

        .tool-check-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 10px;
            margin-top: 16px;
        }

        .tool-check {
            display: flex;
            align-items: center;
            gap: 9px;
            padding: 10px 12px;
            border: 1px solid rgba(148, 163, 184, 0.2);
            border-radius: 8px;
            background: rgba(15, 23, 42, 0.42);
        }

        .tool-check input {
            width: 16px;
            height: 16px;
            accent-color: var(--accent);
        }

        .trade-list {
            display: grid;
            gap: 14px;
        }

        .trade-card {
            border: 1px solid rgba(148, 163, 184, 0.22);
            border-radius: 8px;
            background: rgba(15, 23, 42, 0.52);
            padding: 14px;
        }

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

        .trade-card-header h3 {
            margin: 0;
            font-size: 1rem;
        }

        .tool-button-row {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 14px;
        }

        .tool-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            border: 0;
            border-radius: 8px;
            background: var(--accent);
            color: #ffffff;
            padding: 10px 14px;
            font: inherit;
            font-weight: 800;
            cursor: pointer;
            transition: background 0.2s ease, transform 0.2s ease;
        }

        .tool-button:hover,
        .tool-button:focus {
            background: var(--accent-hover);
            transform: translateY(-1px);
            outline: none;
        }

        .tool-button-secondary {
            background: rgba(148, 163, 184, 0.16);
            color: #dbeafe;
            border: 1px solid rgba(148, 163, 184, 0.24);
        }

        .tool-button-secondary:hover,
        .tool-button-secondary:focus {
            background: rgba(59, 130, 246, 0.22);
        }

        .tool-button-danger {
            background: rgba(239, 68, 68, 0.18);
            color: #fecaca;
            border: 1px solid rgba(248, 113, 113, 0.35);
        }

        .tool-button-danger:hover,
        .tool-button-danger:focus {
            background: rgba(239, 68, 68, 0.3);
        }

        .command-output {
            min-height: 180px;
            resize: vertical;
            font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
            line-height: 1.55;
        }

        .tool-summary {
            margin-top: 10px;
            color: var(--text-dim);
            font-size: 0.92rem;
            line-height: 1.55;
        }

        @media (max-width: 700px) {
            .container,
            .page-shell,
            .site-footer,
            .gallery,
            .dynamic-row,
            .resource-card,
            .tool-panel {
                min-width: 0;
            }

            .steam-navbar {
                height: auto;
                padding: 10px 14px;
            }

            .steam-navbar-inner {
                flex-wrap: wrap;
                gap: 8px;
                align-items: flex-start;
            }

            .steam-navbar-inner > * {
                min-width: 0;
            }

            .steam-nav-menu {
                position: static;
                flex: 0 1 auto;
            }

            .steam-nav-menu.is-open .steam-nav-dropdown {
                color: #ffffff;
                background: rgba(255, 255, 255, 0.08);
            }

            .steam-dropdown-panel {
                left: 14px;
                right: 14px;
                top: auto;
                min-width: 0;
                width: auto;
            }

            .steam-mega-panel,
            .steam-nav-menu:hover .steam-mega-panel,
            .steam-nav-menu:focus-within .steam-mega-panel {
                width: auto;
                max-width: none;
                grid-template-columns: 1fr;
            }

            .mega-list {
                min-width: 0;
                padding-right: 0;
                padding-bottom: 8px;
                border-right: 0;
                border-bottom: 1px solid var(--glass-border);
            }

            .mega-sublist {
                padding-left: 10px;
            }

            .mega-feature {
                min-width: 0;
                grid-template-columns: 1fr;
                opacity: 1;
                transform: none;
            }

            .steam-search {
                width: 100%;
                margin-left: 0;
                min-width: 0;
            }

            .steam-search input {
                width: 100%;
            }

            .language-switch {
                margin-left: auto;
                flex: 0 0 auto;
                min-width: 56px;
            }

            .cookie-banner {
                left: 12px;
                right: 12px;
                bottom: 12px;
                flex-direction: column;
                align-items: stretch;
                padding: 14px;
            }

            .cookie-banner-actions {
                width: 100%;
                justify-content: stretch;
            }

            .cookie-banner-button {
                flex: 1 1 100%;
                width: 100%;
            }

            .page-shell {
                margin: 36px auto;
            }

            .gallery-search,
            #packNameInput,
            #gameVersionSelect {
                width: 100% !important;
                max-width: 100% !important;
                min-width: 0;
            }

            #gameVersionSelect {
                display: block;
                margin: 10px auto 0;
            }

            .tool-form-grid,
            .tool-check-grid,
            .upload-grid {
                grid-template-columns: 1fr;
            }

            .compact-table {
                display: block;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            .compact-table th,
            .compact-table td {
                white-space: nowrap;
            }

            .copy-example {
                gap: 8px;
            }

            .copy-button {
                padding: 6px 9px;
                font-size: 0.76rem;
            }

            .row-toolbar {
                gap: 10px;
            }

            .row-toolbar-label,
            .row-toolbar-field,
            .row-toolbar-field--wide {
                flex: 1 1 100%;
                width: 100%;
            }

            .row-toolbar .btn-slice,
            .row-toolbar .btn-remove {
                flex: 1 1 calc(50% - 5px);
                width: auto;
                min-width: 0;
                justify-content: center;
            }

            .block-side-cell {
                flex: 1 1 calc(50% - 5px);
                min-width: calc(50% - 5px);
            }

            .site-footer {
                align-items: flex-start;
                flex-direction: column;
            }

            .slideshow-btn {
                width: 34px;
                height: 34px;
                font-size: 1.6rem;
            }

            .slideshow-btn-prev {
                left: 8px;
            }

            .slideshow-btn-next {
                right: 8px;
            }
        }
