*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } /* Focus ring for controller/keyboard navigation */ :focus-visible { outline: 2px solid var(--accent) !important; outline-offset: 2px !important; } /* Game cards need special treatment since they use div click handlers */ .game-card:focus-visible { outline: 2px solid var(--accent) !important; outline-offset: 2px !important; border-color: var(--accent); } :root { --bg-primary: #0f0f1a; --bg-secondary: #1a1a2e; --bg-tertiary: #16213e; --bg-card: #1e1e36; --bg-hover: #252542; --text-primary: #e0e0f0; --text-secondary: #8888aa; --text-muted: #555577; --accent: #6c63ff; --accent-hover: #7b73ff; --accent-dim: rgba(108, 99, 255, 0.15); --success: #4ade80; --warning: #fbbf24; --error: #f87171; --border: #2a2a44; --radius: 8px; --radius-sm: 4px; --shadow: 0 2px 8px rgba(0, 0, 0, 0.3); --transition: 150ms ease; } [data-theme="light"] { --bg-primary: #f5f5f8; --bg-secondary: #ffffff; --bg-tertiary: #eef0f5; --bg-card: #ffffff; --bg-hover: #e8e8f0; --text-primary: #1a1a2e; --text-secondary: #555577; --text-muted: #9999bb; --accent: #6c63ff; --accent-hover: #5b52ee; --accent-dim: rgba(108, 99, 255, 0.1); --success: #22c55e; --warning: #d97706; --error: #dc2626; --border: #d4d4e0; --shadow: 0 2px 8px rgba(0, 0, 0, 0.08); } html, body, #root { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: var(--bg-primary); color: var(--text-primary); overflow: hidden; } /* Layout */ .app-layout { display: flex; height: 100vh; } .sidebar { width: 240px; background: var(--bg-secondary); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; } .sidebar-header { padding: 20px 16px; border-bottom: 1px solid var(--border); } .sidebar-header h1 { font-size: 20px; font-weight: 700; background: linear-gradient(135deg, var(--accent), #a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .sidebar-header p { font-size: 12px; color: var(--text-muted); margin-top: 2px; } .sidebar-nav { flex: 1; padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; } .nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius); border: none; background: transparent; color: var(--text-secondary); font-size: 14px; cursor: pointer; transition: all var(--transition); width: 100%; text-align: left; } .nav-item:hover { background: var(--bg-hover); color: var(--text-primary); } .nav-item.active { background: var(--accent-dim); color: var(--accent-hover); font-weight: 600; } .nav-icon { font-size: 18px; width: 24px; text-align: center; } .sidebar-footer { padding: 12px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-muted); } /* Main content */ .main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; } .topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--border); background: var(--bg-secondary); } .topbar h2 { font-size: 18px; font-weight: 600; } .page-content { flex: 1; padding: 24px; overflow-y: auto; } /* Cards */ .card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; } .card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: all var(--transition); } .card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); } .card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; } .card h3 { font-size: 16px; font-weight: 600; } .card p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; } /* Badge */ .badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; } .badge-installed { background: rgba(74, 222, 128, 0.15); color: var(--success); } .badge-missing { background: rgba(248, 113, 113, 0.15); color: var(--error); } .badge-unsupported { background: rgba(251, 191, 36, 0.15); color: var(--warning); } /* Buttons */ .btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius); border: none; font-size: 13px; font-weight: 500; cursor: pointer; transition: all var(--transition); } .btn-primary { background: var(--accent); color: white; } .btn-primary:hover { background: var(--accent-hover); } .btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border); } .btn-secondary:hover { background: var(--bg-hover); border-color: var(--accent); } .btn-sm { padding: 4px 10px; font-size: 12px; } .btn-icon { width: 32px; height: 32px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); border: 1px solid var(--border); background: transparent; color: var(--text-secondary); cursor: pointer; transition: all var(--transition); } .btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); } .btn-danger { background: color-mix(in srgb, var(--error) 20%, transparent); border: 1px solid var(--error); color: var(--error); } .btn-danger:hover { background: var(--error); color: #fff; } /* Game library */ .library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; } .game-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: all var(--transition); } .game-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); } .game-card-cover { width: 100%; aspect-ratio: 1; background: var(--bg-tertiary); display: flex; align-items: center; justify-content: center; font-size: 40px; color: var(--text-muted); } .game-card-info { padding: 12px; } .game-card-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .game-card-platform { font-size: 11px; color: var(--text-muted); margin-top: 2px; } /* Scan area */ .scan-area { border: 2px dashed var(--border); border-radius: var(--radius); padding: 48px; text-align: center; cursor: pointer; transition: all var(--transition); } .scan-area:hover { border-color: var(--accent); background: var(--accent-dim); } .scan-area p { color: var(--text-secondary); margin-top: 8px; } /* Settings */ .settings-section { margin-bottom: 32px; } .settings-section h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); } .setting-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; } .setting-label { font-size: 14px; } .setting-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; } /* Select / Input */ select, input[type="text"] { background: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; outline: none; transition: border var(--transition); } select:focus, input[type="text"]:focus { border-color: var(--accent); } /* Toggle */ .toggle { position: relative; width: 44px; height: 24px; cursor: pointer; } .toggle input { opacity: 0; width: 0; height: 0; } .toggle-slider { position: absolute; inset: 0; background: var(--bg-tertiary); border-radius: 24px; transition: all var(--transition); } .toggle-slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: var(--text-muted); border-radius: 50%; transition: all var(--transition); } .toggle input:checked + .toggle-slider { background: var(--accent); } .toggle input:checked + .toggle-slider::before { transform: translateX(20px); background: white; } /* Info bar */ .info-bar { display: flex; align-items: center; gap: 16px; padding: 12px 0; font-size: 13px; color: var(--text-secondary); } .info-item { display: flex; align-items: center; gap: 6px; } /* Progress bar */ .progress-bar { width: 100%; height: 6px; background: var(--bg-tertiary); border-radius: 3px; overflow: hidden; } .progress-fill { height: 100%; border-radius: 3px; transition: width 300ms ease, background 300ms ease; } /* Utility */ .mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-2 { gap: 8px; } .gap-4 { gap: 16px; } .text-sm { font-size: 13px; } .text-muted { color: var(--text-muted); } .text-center { text-align: center; } /* Scrollbar */ ::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: var(--text-muted); } /* Platform tags */ .platform-tag { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 600; text-transform: uppercase; background: var(--bg-tertiary); color: var(--text-muted); margin-right: 4px; margin-top: 4px; } /* Loading */ .loading { display: flex; align-items: center; justify-content: center; height: 200px; color: var(--text-muted); font-size: 14px; } /* Empty state */ .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 300px; color: var(--text-muted); text-align: center; } .empty-state-icon { font-size: 48px; margin-bottom: 16px; } .empty-state p { font-size: 14px; margin-top: 8px; } /* Controller */ .controller-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .controller-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--bg-tertiary); border: 1px solid var(--border); min-width: 56px; transition: all var(--transition); } .controller-btn.pressed { background: var(--accent-dim); border-color: var(--accent); box-shadow: 0 0 12px rgba(108, 99, 255, 0.4); } .controller-btn-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); } .controller-btn-value { font-size: 10px; color: var(--text-muted); } .controller-btn.pressed .controller-btn-value { color: var(--accent); } .controller-axes { display: flex; flex-direction: column; gap: 6px; } .axis-bar { display: flex; align-items: center; gap: 8px; } .axis-label { font-size: 11px; color: var(--text-muted); min-width: 44px; } .axis-track { flex: 1; height: 6px; background: var(--bg-tertiary); border-radius: 3px; position: relative; overflow: visible; } .axis-fill { position: absolute; top: -2px; width: 10px; height: 10px; background: var(--accent); border-radius: 50%; transform: translateX(-50%); transition: left 50ms linear; } .axis-value { font-size: 10px; color: var(--text-muted); min-width: 32px; text-align: right; } /* BIOS */ .bios-grid { display: flex; flex-direction: column; gap: 6px; } .bios-entry { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; } .bios-entry-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } .bios-indicator { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; } .bios-indicator.present { background: rgba(74, 222, 128, 0.2); color: var(--success); } .bios-indicator.missing { background: rgba(248, 113, 113, 0.2); color: var(--error); } .bios-entry-name { font-size: 13px; font-weight: 600; } .bios-entry-files { display: flex; flex-wrap: wrap; gap: 4px; } .bios-file { font-size: 10px; font-family: monospace; padding: 2px 6px; border-radius: 3px; background: var(--bg-tertiary); color: var(--text-muted); } .bios-file.found { background: rgba(74, 222, 128, 0.15); color: var(--success); } /* Full-page modal */ .modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; backdrop-filter: blur(4px); } .modal-full { background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-lg); width: min(800px, 90vw); height: min(600px, 80vh); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4); } .modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; } .modal-header h2 { font-size: 16px; font-weight: 600; margin: 0; } .modal-body { flex: 1; overflow-y: auto; padding: 20px; font-size: 14px; line-height: 1.6; } /* Markdown rendered content */ .markdown h1 { font-size: 22px; margin: 0 0 12px; font-weight: 700; } .markdown h2 { font-size: 18px; margin: 20px 0 10px; font-weight: 600; border-bottom: 1px solid var(--border); padding-bottom: 6px; } .markdown h3 { font-size: 15px; margin: 16px 0 8px; font-weight: 600; } .markdown p { margin: 0 0 10px; } .markdown ul { margin: 0 0 10px; padding-left: 24px; } .markdown li { margin-bottom: 4px; } .markdown strong { font-weight: 700; color: var(--text-primary); } .markdown em { font-style: italic; } .markdown a { color: var(--accent); text-decoration: underline; } .markdown a:hover { color: var(--accent-hover); } .markdown code { background: var(--bg-tertiary); padding: 2px 6px; border-radius: 3px; font-size: 13px; font-family: 'SF Mono', 'Fira Code', monospace; } .markdown pre { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; overflow-x: auto; margin: 0 0 12px; } .markdown pre code { background: none; padding: 0; font-size: 13px; line-height: 1.5; } .markdown hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; } .markdown table { width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: 13px; } .markdown td, .markdown th { border: 1px solid var(--border); padding: 6px 10px; text-align: left; } .markdown th { background: var(--bg-tertiary); font-weight: 600; } .markdown tr:nth-child(even) { background: var(--bg-tertiary); } /* Game detail modal */ .game-detail-modal { background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-lg); width: min(960px, 92vw); height: min(680px, 85vh); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4); } .game-detail-body { display: flex; flex: 1; overflow: hidden; } .game-detail-left { width: 380px; flex-shrink: 0; display: flex; flex-direction: column; border-right: 1px solid var(--border); } .game-detail-cover { flex: 1; display: flex; align-items: center; justify-content: center; background: var(--bg-tertiary); padding: 16px; min-height: 0; } .game-detail-cover img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius); } .game-detail-cover-placeholder { font-size: 48px; color: var(--text-muted); opacity: 0.4; } .game-detail-thumbnails { display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto; border-top: 1px solid var(--border); flex-shrink: 0; } .game-detail-thumb { width: 64px; height: 48px; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; border: 2px solid transparent; flex-shrink: 0; transition: border-color var(--transition); } .game-detail-thumb.active { border-color: var(--accent); } .game-detail-thumb img { width: 100%; height: 100%; object-fit: cover; } .game-detail-right { flex: 1; display: flex; flex-direction: column; min-width: 0; } .game-detail-right-scroll { flex: 1; overflow-y: auto; padding: 20px 20px 0; display: flex; flex-direction: column; gap: 16px; } .game-detail-launch { margin: 12px 20px 20px; flex-shrink: 0; } .game-detail-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 13px; } .meta-row { display: contents; } .meta-label { color: var(--text-muted); font-weight: 500; } .game-detail-description h4, .game-detail-achievements h4 { font-size: 14px; font-weight: 600; margin: 0 0 6px; } .game-detail-description p { font-size: 13px; line-height: 1.6; color: var(--text-secondary); margin: 0; } .game-detail-achievements { margin: 0; } .achievement-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; } .achievement-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); background: var(--bg-secondary); transition: background var(--transition); } .achievement-row.locked { opacity: 0.55; } .achievement-badge { width: 36px; height: 36px; border-radius: 4px; flex-shrink: 0; object-fit: cover; } .achievement-info { flex: 1; min-width: 0; } .achievement-title { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .achievement-desc { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .achievement-points { font-size: 13px; font-weight: 700; color: var(--accent); flex-shrink: 0; min-width: 24px; text-align: right; } .achievement-row.earned .achievement-points { color: var(--success, #4ade80); } .platform-tag { display: inline-block; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-sm); white-space: nowrap; flex-shrink: 0; } /* Controller legend overlay */ .controller-legend { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 8px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); font-size: 12px; color: var(--text-secondary); z-index: 999; box-shadow: var(--shadow); backdrop-filter: blur(8px); cursor: pointer; user-select: none; animation: legendFadeIn 0.2s ease; } .controller-legend .sep { color: var(--border); font-size: 10px; } @keyframes legendFadeIn { from { opacity: 0; transform: translateX(-50%) translateY(8px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }