 @import url('https://fonts.googleapis.com/css2?family=Roboto+Slab&display=swap');
 /* ... CSS ... */
 * { box-sizing: border-box; }
 body {
 background: #121417; color: #e0e0e0; font-family: 'Roboto Slab', "微软雅黑", sans-serif;
 display: flex; flex-direction: column; align-items: center;
 padding: 25px 15px 40px 268px; min-height: 100vh;
 scroll-behavior: smooth; overflow-x: hidden;
 }
 body.app-empty {
 padding-left: 15px; justify-content: center;
 }
 body.app-empty .quick-nav,
 body.app-empty .header-controls,
 body.app-empty .builder-only,
 body.app-empty #apiViewerContainer,
 body.app-empty #videoInspector,
 body.app-empty #imageInspector {
 display: none !important;
 }
 body.app-empty.app-status-visible .quick-nav {
 display: flex !important;
 }
 body.app-empty.app-status-visible .quick-nav > button {
 display: none;
 }
 body.app-empty .main-container {
 max-width: 720px; min-height: calc(100vh - 80px);
 display: flex; flex-direction: column; justify-content: center;
 }
 body.app-empty .header-container {
 justify-content: center; margin-bottom: 24px;
 }
 body.app-empty h1 {
 text-align: center; font-size: 2.15rem;
 }
 body.app-empty .app-search-controls {
 max-width: 720px; margin: 0 auto 12px;
 padding: 14px; background: #1e2433;
 border: 1px solid #2e3a59; border-radius: 12px;
 box-shadow: 0 12px 34px rgba(0,0,0,0.35);
 }
 body.app-empty #appId {
 height: 42px; font-size: 15px;
 }
 body.app-empty #fetchBtn {
 height: 42px; padding: 10px 24px; margin-left: 8px !important;
 }
 body.app-empty #updateBtn,
 body.app-empty #saveBtn,
 body.app-empty #goToStoreBtn {
 display: none;
 }
 .main-container, #imageInspector, #videoInspector, #apiViewerContainer {
 width: 100%; max-width: 1200px;
 }
 .header-container {
 display: flex; align-items: center; gap: 15px; margin-bottom: 20px; width: 100%; max-width: 1200px;
 }
 h1 {
 margin: 0; font-weight: 700; font-size: 2.4rem; letter-spacing: 2px;
 color: #60a5fa; text-shadow: 0 0 10px #60a5faaa;
 }
 .header-controls {
    margin-left: auto; display: flex; align-items: center; gap: 10px;
 }
 .controls {
 display: flex; gap: 12px; margin-bottom: 15px;
 width: 100%; max-width: 820px; flex-wrap: wrap; align-items: center;
 }
 input, button, select, textarea {
 border-radius: 8px; border: none; font-size: 14px;
 outline: none; transition: all 0.25s ease; font-weight: 500;
 }
 input[type="text"], input[type="number"], select, textarea {
 background: #23262a; color: #ddd; padding: 8px 12px;
 box-shadow: inset 0 0 6px #0008;
 }
 input[type="text"]:focus, input[type="number"]:focus, select:focus, textarea:focus {
 background: #2b2e34; box-shadow: inset 0 0 8px #60a5faaa; color: #eef3ff;
 }
 #appId {
 height: 36px; line-height: 20px; flex: 1 1 auto; min-width: 0;
 }
 button {
 background: #3b82f6; color: white; cursor: pointer; padding: 10px 22px;
 font-weight: 700; box-shadow: 0 4px 15px #3b82f6bb; flex: none;
 display: inline-flex; align-items: center; justify-content: center;
 gap: 6px; line-height: 1.2; text-align: center;
 }
 button:disabled { background: #606c8f; cursor: not-allowed; box-shadow: none; }
 button:hover:not(:disabled) { background: #2563eb; box-shadow: 0 6px 20px #2563ebcc; }
 #customText {
 resize: vertical; min-height: 60px; max-height: 120px;
 padding: 8px 12px; line-height: 20px; flex: 1 1 auto; min-width: 0;
 }
 input[type="color"] {
 min-width: 48px; height: 36px; padding: 2px; cursor: pointer; flex: none;
 border-radius: 8px; border: 2px solid transparent; transition: border-color 0.2s ease;
 background: #23262a;
 }
 input[type="color"]:focus { border-color: #60a5fa; }
 input[type="number"] { width: 80px; height: 36px; text-align: center; flex: none; }
 select { width: 150px; cursor: pointer; height: 36px; flex: none; }
 #canvas-container {
 background: #171c29; width: 100%; max-width: 1200px; height: 278px;
 position: relative; overflow: visible; box-shadow: 0 0 25px #2563eb44 inset;
 border-radius: 12px; cursor: grab; margin: 0 auto;
 }
 canvas { display: block; user-select: none; border-radius: 12px; }
 .slider-container, .main-container .controls {
 margin-left: auto; margin-right: auto;
 }
 .slider-container {
 margin-top: 15px; width: 100%; max-width: 600px; display: flex;
 align-items: center; gap: 15px; color: #bbb;
 }
 input[type="range"] {
 flex: 1; -webkit-appearance: none; height: 6px; border-radius: 6px;
 background: #4b6cb7; cursor: pointer; transition: background-color 0.2s ease;
 }
 input[type="range"]:hover { background: #3b82f6; }
 input[type="range"]::-webkit-slider-thumb {
 -webkit-appearance: none; width: 16px; height: 16px; background: #60a5fa;
 border-radius: 50%; cursor: pointer; box-shadow: 0 0 8px #60a5faaa;
 transition: background-color 0.2s ease;
 }
 input[type="range"]:active::-webkit-slider-thumb { background: #2563eb; box-shadow: 0 0 12px #2563ebcc; }
 #scalePercent, #overlayPercent { min-width: 45px; font-weight: 600; color: #60a5fa; }
 .status-box { margin-top: 18px; min-height: 1.5em; text-align: center; font-weight: 700; width: 100%; max-width: 820px; }
 #error { color: #ef4444; }
 #loading { color: #60a5fa; }
 .app-history {
 width: 100%; display: flex; flex-direction: column; gap: 6px;
 }
 .history-panel {
    border-top: 1px solid rgba(71, 85, 105, 0.7);
    margin-top: 4px; padding-top: 8px;
 }
 .history-panel.hidden {
    display: none;
 }
 .history-title {
    color: #94a3b8; font-size: 13px; font-weight: 700;
    text-align: center; margin-bottom: 6px;
 }
 .history-empty {
    color: #64748b; font-size: 12px; line-height: 1.35; text-align: center;
    padding: 8px 4px;
 }
 .history-row {
    display: grid; grid-template-columns: minmax(0, 1fr) 34px 30px; gap: 5px;
    align-items: stretch;
 }
 .history-chip {
    background: #23262a; color: #cbd5e1; border: 1px solid #334155;
    border-radius: 8px; padding: 7px 9px; font-size: 12px; box-shadow: none;
    width: 100%; justify-content: flex-start; text-align: left;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
 }
 .history-chip:hover:not(:disabled) { background: #334155; box-shadow: none; }
 .history-delete-btn {
    min-width: 30px; height: 30px; padding: 0; border-radius: 8px;
    background: #2a2025; color: #fca5a5; border: 1px solid #7f1d1d;
    box-shadow: none; font-size: 16px; line-height: 1; justify-content: center;
 }
 .history-delete-btn:hover:not(:disabled) {
    background: #7f1d1d; color: #fff; box-shadow: none;
 }
 .history-detail-btn {
    min-width: 34px; height: 30px; padding: 0; border-radius: 8px;
    background: #172033; color: #93c5fd; border: 1px solid #334155;
    box-shadow: none; font-size: 12px; justify-content: center;
 }
 .history-detail-btn:hover:not(:disabled) {
    background: #1d4ed8; color: #fff; box-shadow: none;
 }
 .history-clear-btn {
    width: 100%; min-height: 34px; margin-top: 8px; padding: 7px 9px;
    border-radius: 8px; background: #3b1d1d; color: #fecaca;
    border: 1px solid #7f1d1d; box-shadow: none; font-size: 12px;
 }
 .history-clear-btn:hover:not(:disabled) {
    background: #7f1d1d; color: #fff; box-shadow: none;
 }
 .cache-detail-panel {
    margin-top: 8px; padding: 9px; border-radius: 8px;
    background: rgba(15,23,42,0.58); border: 1px solid #334155;
    color: #cbd5e1; font-size: 12px; line-height: 1.45;
 }
 .cache-detail-panel.hidden { display: none; }
 .cache-detail-title { color: #7dd3fc; font-weight: 700; margin-bottom: 6px; }
 .cache-detail-grid { display: grid; gap: 4px; }
 .cache-detail-grid div { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 6px; }
 .cache-detail-grid span:first-child { color: #94a3b8; }
 .cache-detail-grid span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 .game-preview {
 width: 100%; max-width: 980px; margin: 22px auto 24px;
 background: #1e2433; border: 1px solid #2e3a59; border-radius: 12px;
 overflow: hidden; box-shadow: 0 10px 28px rgba(0,0,0,0.32);
 }
 .game-preview-inner {
 display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 0;
 }
 .game-preview img {
 width: 100%; height: 100%; min-height: 180px; object-fit: cover;
 background: #111827;
 }
 .game-preview-body {
 padding: 16px 18px; display: flex; flex-direction: column; gap: 10px;
 }
 .game-preview-title {
 margin: 0; color: #f8fafc; font-size: 24px; line-height: 1.25;
 }
 .game-preview-meta {
 display: flex; gap: 8px; flex-wrap: wrap; color: #aeb9c7; font-size: 13px;
 }
 .game-preview-meta span {
 background: rgba(15,23,42,0.55); border: 1px solid #334155;
 border-radius: 6px; padding: 4px 7px;
 }
 .game-preview-facts {
 display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
 gap: 8px;
 }
 .game-preview-fact {
 min-width: 0; background: rgba(15,23,42,0.48); border: 1px solid #334155;
 border-radius: 8px; padding: 7px 8px;
 }
 .game-preview-fact-label {
 display: block; color: #94a3b8; font-size: 12px; line-height: 1.2;
 margin-bottom: 3px;
 }
 .game-preview-fact-value {
 display: block; color: #e5eefc; font-size: 13px; line-height: 1.35;
 overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
 }
 .game-preview-actions {
 display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
 }
 .preview-price-note {
 color: #93c5fd; font-size: 13px; line-height: 1.35;
 }
 .game-preview-desc {
 color: #cbd5e1; line-height: 1.55; margin: 0;
 display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
 overflow: hidden;
 }
 .game-preview-tags { display: flex; gap: 6px; flex-wrap: wrap; }
 .preview-link {
 align-self: flex-start; background: #3b82f6; color: #fff;
 padding: 7px 12px; border-radius: 7px; text-decoration: none; font-weight: 700;
 }
 .side-panel {
 position: fixed; top: 20px; width: 420px; z-index: 1000;
 padding: 20px 25px; background: #1e2433ee; backdrop-filter: blur(8px);
 border-radius: 14px; font-size: 14px; line-height: 1.7; border: 1px solid #2e3a59;
 box-shadow: 0 8px 30px rgba(0,0,0,0.4); max-height: calc(100vh - 40px);
 overflow-y: auto; transition: opacity 0.3s ease, transform 0.3s ease;
 }
 #tutorial, #tagsViewer { right: 20px; }
 #eventsViewer { left: 20px; }

 .side-panel.hidden {
    opacity: 0;
    pointer-events: none;
 }
 #tutorial.hidden, #tagsViewer.hidden { transform: translateX(105%); }
 #eventsViewer.hidden { transform: translateX(-105%); }

 .panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
 .panel-header h2 { margin: 0; color: #60a5fa; font-weight: 700; text-shadow: 0 0 10px #60a5faaa; font-size: 20px; }
 #tutorial h3 { margin: 20px 0 10px; color: #82b9ff; font-weight: 700; border-bottom: 1px solid #2e3a59; padding-bottom: 5px;}
 #tutorial ul { list-style-type: disc; padding-left: 20px; color: #ccc; margin: 0; }
 #tutorial ul li { margin-bottom: 10px; }
 #tutorial p { margin: 10px 0; }
 #tutorial code, #tutorial kbd { background: #121417; padding: 2px 5px; border-radius: 4px; font-family: monospace; color: #ffb86c; border: 1px solid #444; }
 .toggle-panel-btn {
 background: none; border: 1px solid #4b6cb7; color: #bbb;
 padding: 4px 10px; font-size: 12px; cursor: pointer; box-shadow: none;
 }
 .header-btn {
 font-size: 14px; min-height: 38px; padding: 8px 11px; background: #23262a;
 border: 1px solid #2e3a59; box-shadow: none; cursor: pointer;
 }
 .top-tools {
    position: fixed; top: 16px; left: 16px; z-index: 1001;
    width: 236px; padding: 10px; background: rgba(18, 24, 34, 0.94);
    border: 1px solid #334155; border-radius: 12px;
    box-shadow: 0 12px 34px rgba(0,0,0,0.42);
 }
 .top-tools-row {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px;
 }
 .top-tools .header-btn {
    width: 100%; justify-content: center; box-shadow: none;
    white-space: nowrap;
 }
 .top-tools .history-panel {
    position: absolute; top: 0; left: calc(100% + 12px);
    width: 340px; margin-top: 0; padding: 12px;
    background: rgba(18, 24, 34, 0.98);
    border: 1px solid #334155; border-radius: 12px;
    box-shadow: 0 16px 42px rgba(0,0,0,0.46);
    max-height: calc(100vh - 32px); overflow-y: auto;
 }
 .quick-nav {
    position: fixed; left: 16px; top: 146px; z-index: 900;
    width: 236px; padding: 14px; background: rgba(18, 24, 34, 0.94);
    border: 1px solid #334155; border-radius: 12px;
    box-shadow: 0 12px 34px rgba(0,0,0,0.42);
    display: flex; flex-direction: column; gap: 6px;
    max-height: calc(100vh - 104px); overflow-y: auto;
 }
 .quick-nav-title {
    color: #7dd3fc; font-size: 14px; font-weight: 700;
    text-align: center; padding: 4px 0 9px;
    border-bottom: 1px solid rgba(71, 85, 105, 0.7);
    margin-bottom: 2px;
 }
 .quick-nav > button {
    width: 100%; min-height: 42px; padding: 9px 12px 9px 24px;
    font-size: 14px; line-height: 1.2; background: transparent;
    color: #cbd5e1; border: 1px solid transparent; box-shadow: none;
    border-radius: 8px; position: relative; justify-content: flex-start;
    text-align: left;
 }
 .quick-nav > button::before {
    content: ""; position: absolute; left: 7px; top: 50%;
    width: 4px; height: 20px; transform: translateY(-50%);
    border-radius: 3px; background: transparent;
 }
 .quick-nav > button:hover:not(:disabled), .quick-nav > button.active {
    background: #1f2a3a; border-color: #3b82f6;
    color: #fff; box-shadow: inset 0 0 0 1px rgba(96,165,250,0.15);
 }
 .quick-nav > button:hover:not(:disabled)::before, .quick-nav > button.active::before {
    background: #60a5fa;
 }
 .fetch-status-panel {
    border-top: 1px solid rgba(71, 85, 105, 0.7);
    margin-top: 4px; padding-top: 7px;
    display: flex; flex-direction: column; gap: 5px;
 }
 .fetch-status-title {
    color: #94a3b8; font-size: 13px; font-weight: 700;
    text-align: center; margin-bottom: 1px;
 }
 .fetch-status-item {
    display: flex; align-items: center; gap: 5px;
    font-size: 13px; line-height: 1.25; color: #cbd5e1;
    padding: 7px 9px; border-radius: 8px; background: rgba(15,23,42,0.42);
 }
 .fetch-status-item::before {
    content: ""; width: 9px; height: 9px; border-radius: 50%; flex: none;
    background: #64748b;
 }
 .fetch-status-item.ok::before { background: #22c55e; }
 .fetch-status-item.warn::before { background: #f59e0b; }
 .fetch-status-item.fail::before { background: #ef4444; }
 .fetch-status-item.pending::before { background: #60a5fa; }
 .fetch-status-item .status-label {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
 }
 .health-panel {
    border-top: 1px solid rgba(71, 85, 105, 0.7);
    margin-top: 4px; padding-top: 8px;
    display: flex; flex-direction: column; gap: 5px;
 }
 .health-title {
    color: #94a3b8; font-size: 13px; font-weight: 700;
    text-align: center; margin-bottom: 1px;
 }
 .health-row {
    display: grid; grid-template-columns: 76px minmax(0, 1fr);
    gap: 6px; align-items: center;
    padding: 7px 8px; border-radius: 8px;
    background: rgba(15,23,42,0.42); border: 1px solid transparent;
    font-size: 12px; line-height: 1.25;
 }
 .health-row.ok { border-color: rgba(34,197,94,0.35); }
 .health-row.warn { border-color: rgba(245,158,11,0.35); }
 .health-row.fail { border-color: rgba(239,68,68,0.35); }
 .health-row.pending { border-color: rgba(96,165,250,0.35); }
 .health-name { color: #e2e8f0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 .health-detail { color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 #tagsListContainer {
    columns: 2;
    column-gap: 20px;
    padding: 10px 0;
 }
 .tag-item {
    font-size: 13px; color: #ccc; margin-bottom: 8px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
 }
 .tag-item .tag-id {
    font-weight: 700; color: #82b9ff; margin-right: 8px;
    display: inline-block; width: 50px; text-align: right;
 }
 #events-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
 #events-table th, #events-table td {
    padding: 8px 10px; text-align: left; border-bottom: 1px solid #2e3a59;
 }
 #events-table th { font-weight: bold; color: #aeb9c7; }
 #events-table td:first-child { color: #e0e0e0; }
 #events-table td:last-child { color: #9aa4b2; font-size: 13px; }
 .event-row.active {
    background-color: rgba(34, 197, 94, 0.2);
    border-left: 3px solid #22c55e;
 }
 .event-row.active td:first-child {
    font-weight: bold;
    color: #a3e635;
 }

 #imageInspector, #videoInspector {
 text-align: left; margin-top: 36px; padding: 20px 25px; background: #1e2433;
 border-radius: 14px; font-size: 15px; line-height: 1.7;
 box-shadow: 0 0 20px #1e2433; border: 1px solid #2e3a59;
 }
 #videoInspector {
    width: 100%; max-width: 980px;
 }
 #imageInspector h3, #videoInspector h3 { margin: 0 0 15px; color: #60a5fa; font-weight: 700; text-shadow: 0 0 10px #60a5faaa; }
 .inspector-controls { display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; }
 .group-mode-btn.active { background: #1d4ed8; }
 #urlsBox { width: 100%; min-height: 120px; resize: vertical; margin-bottom: 15px; }
 .url-actions-container { margin-top: 25px; }
 .category { margin-bottom: 20px; padding: 15px; border-radius: 12px; background: rgba(0,0,0,0.2); border: 1px solid #2e3a59; }
 .category-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
 .category-header h4 { margin: 0; font-size: 16px; font-weight: bold; color: #fff; background: #60a5fa; display: inline-block; padding: 4px 10px; border-radius: 6px; }
 .toggle-btn { font-size: 12px; padding: 4px 10px; background: transparent; border: 1px solid #4b6cb7; color: #bbb; box-shadow: none; }
 .card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
 .card { background: #23262a; padding: 8px; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); display: flex; flex-direction: column; gap: 8px; align-items: center; transition: all 0.2s ease; border: 2px solid transparent; }
 .card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(96,165,250,0.3); }
 .card.highlight-schinese {
 border-color: #60a5fa; box-shadow: 0 0 15px rgba(96, 165, 250, 0.6);
 }
 .thumb {
 width: 100%; height: 120px; object-fit: contain; border-radius: 8px;
 background: #121214; cursor: pointer;
 }
 .card .meta { width: 100%; font-size: 13px; color: #9aa4b2; text-align: center; }
 .card .actions { display: flex; gap: 8px; width: 100%; flex-wrap: wrap; justify-content: center; }
 .card .actions button { font-size: 12px; padding: 6px 10px; background: #4b6cb7; box-shadow: none; }
 .card .actions button:hover:not(:disabled) { background: #3b82f6; }
 .video-format-row {
    display: flex; gap: 6px; flex-wrap: wrap; justify-content: center;
    width: 100%; padding-top: 2px;
 }
 .video-format-row .format-label {
    width: 100%; color: #aeb9c7; font-size: 12px; text-align: center;
 }
 .video-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px;
 }
 .video-card {
    background: #23262a; border: 1px solid #334155; border-radius: 10px;
    overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,0.28);
 }
 .video-thumb-wrap {
    position: relative; background: #111827; aspect-ratio: 16 / 9;
 }
 .video-thumb {
    width: 100%; height: 100%; display: block; object-fit: cover;
 }
 .video-hd-badge {
    position: absolute; left: 10px; bottom: 10px;
    background: rgba(15, 23, 42, 0.86); color: #bfdbfe;
    border: 1px solid rgba(96,165,250,0.7); border-radius: 6px;
    padding: 3px 8px; font-size: 12px; font-weight: 700;
 }
 .video-card-body {
    padding: 12px; display: flex; flex-direction: column; gap: 10px;
 }
 .video-title {
    margin: 0; color: #f8fafc; font-size: 15px; line-height: 1.35;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
 }
 .video-primary-actions, .video-source-actions {
    display: flex; gap: 8px; flex-wrap: wrap;
 }
 .video-primary-actions button, .video-source-actions button {
    font-size: 12px; padding: 6px 10px; box-shadow: none;
 }
 .video-primary-actions button { background: #4b6cb7; }
 .video-source-list {
    display: flex; flex-direction: column; gap: 7px;
 }
 .video-source-row {
    display: grid; grid-template-columns: 142px minmax(0, 1fr) auto;
    align-items: center; gap: 8px; padding: 7px 8px;
    background: rgba(15,23,42,0.55); border: 1px solid #334155;
    border-radius: 8px;
 }
 .video-source-type { color: #e2e8f0; font-weight: 700; font-size: 12px; }
 .video-source-quality {
    color: #93c5fd; font-size: 12px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
 }
 .video-source-actions button { background: #334155; }
 .video-source-actions button:hover:not(:disabled) { background: #475569; box-shadow: none; }
 
 /* --- NEW UI STYLES FOR API VIEWER --- */
 #apiViewerContainer {
    margin-top: 36px; background: #1e2433; border-radius: 14px;
    border: 1px solid #2e3a59; box-shadow: 0 0 20px #1e2433;
    padding: 0; overflow: hidden;
 }
 #apiViewerContainer h3 {
    margin: 0; font-weight: 700; color: #60a5fa;
    padding: 15px 25px; background-color: #2a3141;
    border-bottom: 1px solid #2e3a59;
    text-shadow: 0 0 10px #60a5faaa;
 }
 .api-export-controls {
    padding: 12px 20px; margin: 0; border-bottom: 1px solid #2e3a59;
    background: rgba(15,23,42,0.32);
 }
 #api-table {
    width: 100%; border-collapse: collapse; font-size: 14px;
 }
 #api-table tr:nth-child(even):not(.api-section-header) td { background-color: rgba(0,0,0,0.15); }
 #api-table tr:hover:not(.api-section-header) td { background-color: rgba(96,165,250,0.1); }
 #api-table td {
    padding: 12px 15px; vertical-align: middle;
    border-bottom: 1px solid #2e3a59;
 }
 #api-table tr:last-child td { border-bottom: none; }
 #api-table td:nth-child(1) {
    font-weight: 700; color: #aeb9c7; width: 250px;
    text-align: right; word-break: break-word;
 }
 #api-table td:nth-child(2) { color: #e0e0e0; word-break: break-word; }
 #api-table td:nth-child(2) :is(ul, ol) { padding-left: 20px; margin: 0; }
 #api-table td:nth-child(2) img { max-width: 100%; border-radius: 6px; }
 .api-game-title { font-size: 20px; font-weight: bold; color: #ccc; margin: 5px 0 0 0; }
 .api-game-title-zh { font-size: 28px; font-weight: bold; color: #60a5fa; text-shadow: 0 0 10px #60a5faaa; margin: 0; }
 #api-table .api-section-header td {
    font-size: 16px; font-weight: bold; color: #e0e0e0;
    background-color: #3a4255; text-align: left;
    padding: 10px 15px !important;
    border-top: 1px solid #4a5568;
    border-bottom: 1px solid #4a5568;
 }
 #api-table .api-title-header td {
    border: none; padding: 20px 15px !important; text-align: left;
 }
 #api-table a { color: #60a5fa; text-decoration: none; }
 #api-table a:hover { text-decoration: underline; }
 #api-table code { background: #121417; padding: 2px 5px; border-radius: 4px; font-family: monospace; }
 .api-tag {
    display: inline-block; background-color: #3b5a94; color: #e0e0e0;
    padding: 3px 8px; border-radius: 4px; font-size: 13px;
    margin: 2px; text-decoration: none; border: 1px solid #4b6cb7;
 }
 .api-tag:hover { background-color: #4b6cb7; }
 .api-link-list { display: flex; flex-direction: column; gap: 6px; }
 .api-link-list a { display: inline-block; }
 .review-table { width: 100%; border: 1px solid #2e3a59; border-radius: 6px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
 .review-table th, .review-table td { text-align: left; padding: 7px 9px; border-bottom: 1px solid #2e3a59; }
 .review-table tr:last-child td { border-bottom: none; }
 .review-table th { color: #aeb9c7; background: #23262a; }
 .review-rate-good { color: #86efac; font-weight: 700; }
 .review-rate-mid { color: #fde68a; font-weight: 700; }
 .review-rate-low { color: #fca5a5; font-weight: 700; }
 .price-table { width: 100%; border: 1px solid #2e3a59; border-radius: 6px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
 .price-table th, .price-table td { text-align: left; padding: 7px 9px; border-bottom: 1px solid #2e3a59; }
 .price-table tr:last-child td { border-bottom: none; }
 .price-table th { color: #aeb9c7; background: #23262a; }
 .price-current { color: #e5eefc; font-weight: 700; }
 .price-discount { color: #a1e196; font-weight: 700; }
 .price-muted { color: #94a3b8; }
 .language-table { width: 100%; margin-top: 5px; border: 1px solid #2e3a59; border-radius: 6px; border-collapse: separate; border-spacing: 0; }
 .language-table th, .language-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #2e3a59; }
 .language-table tr:last-child td { border-bottom: none; }
 .language-table th { color: #aeb9c7; background: #23262a; }
 .language-table .support-cell { text-align: center; }
 .check-mark { color: #4ade80; font-weight: bold; }
 .platform-icon { display: inline-block; vertical-align: middle; margin: 0 4px; }
 .settings-grid {
    display: grid; grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px; align-items: center;
 }
 .settings-grid label { color: #aeb9c7; font-weight: 700; }
 .settings-grid select {
    width: 100%; height: 38px; border-radius: 8px;
    border: 1px solid #334155; background: #111827; color: #e5eefc;
    padding: 0 10px;
 }
 .settings-actions {
    display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px;
 }
 /* --- END NEW UI STYLES --- */

 #cropModal {
     position: fixed; top: 0; left: 0; width: 100%; height: 100%;
     background: rgba(0, 0, 0, 0.8); z-index: 2000;
     display: none; align-items: center; justify-content: center;
     backdrop-filter: blur(5px);
 }
 #cropContainer {
     background: #1e2433; padding: 20px; border-radius: 14px;
     max-width: 90vw; max-height: 90vh; display: flex; flex-direction: column;
     box-shadow: 0 8px 30px rgba(0,0,0,0.4); border: 1px solid #2e3a59;
 }
 #cropImageContainer { max-width: 80vw; max-height: 70vh; }
 #cropImage { display: block; max-width: 100%; max-height: 100%; }
 .crop-controls { margin-top: 15px; text-align: center; display: flex; flex-direction: column; gap: 10px; justify-content: center;}
 .crop-controls .row { display: flex; gap: 10px; justify-content: center; align-items: center; }
 .crop-controls .row button, .crop-controls button { font-size: 12px; padding: 6px 12px;}
 .crop-controls input[type="number"] { width: 70px; height: 30px; }

 @media (max-width: 900px) {
    body { padding-left: 15px; padding-bottom: 92px; }
    body.app-empty { padding-bottom: 40px; }
    .quick-nav {
        left: 10px; right: 10px; top: auto; bottom: 10px; width: auto;
        flex-direction: row; overflow-x: auto; border-radius: 10px;
    }
    .quick-nav-title { display: none; }
    .quick-nav > button { min-width: 64px; }
    .quick-nav > button::before { display: none; }
    .fetch-status-panel, .history-panel { display: none; }
    .video-source-row { grid-template-columns: 1fr; }
    .game-preview-inner { grid-template-columns: 1fr; }
    .game-preview img { min-height: 170px; }
 }
