:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #121626;
  --bg-surface: rgba(255,255,255,0.03);
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --bg-glass: rgba(255,255,255,0.02);
  --accent: #00aaff;
  --accent-glow: rgba(0,170,255,0.15);
  --accent-subtle: rgba(0,170,255,0.3);
  --text-primary: #ffffff;
  --text-secondary: rgba(255,255,255,0.6);
  --text-muted: rgba(255,255,255,0.3);
  --border-subtle: rgba(255,255,255,0.06);
  --border-focus: rgba(255,255,255,0.12);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-hover: 0 12px 48px rgba(0,0,0,0.5);
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --sidebar-width: 64px;
  --header-height: 52px;
  --ease-out: cubic-bezier(0.16,1,0.3,1);
  --ease-spring: cubic-bezier(0.34,1.56,0.64,1);
  --ease-smooth: cubic-bezier(0.4,0,0.2,1);
  font-family: 'SF Pro Display', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: var(--bg-primary);
  color: var(--text-primary);
  user-select: none; -webkit-user-select: none;
}
#app { width: 100%; height: 100%; position: relative; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

/* BOOT SCREEN - PS5 style */
.boot-screen {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: #000;
  transition: opacity .6s ease, visibility .6s ease;
}
.boot-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-complete .boot-screen { display: none; }

.boot-logo { width: 72px; height: 72px; margin-bottom: 32px; animation: bootPulse 2s ease-in-out infinite; }
.boot-logo img, .boot-logo svg { width: 100%; height: 100%; filter: brightness(0) invert(1); }
.boot-title {
  font-size: 1.4rem; font-weight: 300; letter-spacing: 8px;
  color: #fff; text-transform: uppercase; opacity: 0;
  animation: fadeInUp .6s ease .2s forwards;
}
.boot-tagline {
  font-size: .7rem; color: rgba(255,255,255,.3); letter-spacing: 4px;
  opacity: 0; animation: fadeInUp .6s ease .4s forwards;
}
.boot-loader { margin-top: 48px; width: 200px; height: 2px; background: rgba(255,255,255,.06); border-radius: 1px; overflow: hidden; }
.boot-loader-bar { height: 100%; width: 0%; background: #fff; border-radius: 1px; transition: width .3s ease; }
.boot-status { margin-top: 12px; font-size: .6rem; color: rgba(255,255,255,.3); letter-spacing: 2px; opacity: 0; animation: fadeIn .4s ease .6s forwards; }

/* AUTH SCREENS */
.auth-screen {
  position: fixed; inset: 0; z-index: 9000;
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.92);
}
.auth-screen.active { display: flex; }
.auth-panel {
  width: 400px; padding: 48px 40px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-xl);
  text-align: center;
}
.auth-panel h2 { font-size: 1.3rem; font-weight: 600; margin-bottom: 4px; }
.auth-panel .subtitle { font-size: .8rem; color: var(--text-secondary); margin-bottom: 28px; }

.form-group { margin-bottom: 18px; text-align: left; }
.form-group label { display: block; margin-bottom: 6px; font-size: .7rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }
.form-group input {
  width: 100%; padding: 10px 14px;
  background: rgba(0,0,0,.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary); font-size: .9rem;
  outline: none; transition: border-color .2s ease;
}
.form-group input:focus { border-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border: none; border-radius: var(--radius-md);
  font-size: .85rem; font-weight: 600; cursor: pointer;
  transition: transform .15s ease, background .2s ease;
  font-family: inherit;
}
.btn:active { transform: scale(.97); }
.btn-primary { width: 100%; background: #fff; color: #000; }
.btn-primary:hover { background: rgba(255,255,255,.85); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-subtle); }
.btn-ghost:hover { border-color: rgba(255,255,255,.2); color: var(--text-primary); }
.btn-ghost.active { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 6px 14px; font-size: .75rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; display: flex; align-items: center; justify-content: center; }

.auth-links { margin-top: 20px; font-size: .8rem; color: var(--text-secondary); }
.auth-links a { color: var(--text-secondary); cursor: pointer; text-decoration: none; }
.auth-links a:hover { color: #fff; }

.profile-grid { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; margin: 28px 0; }
.profile-card {
  width: 120px; padding: 20px 12px;
  background: rgba(255,255,255,.03); border: 2px solid transparent;
  border-radius: var(--radius-lg); text-align: center; cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}
.profile-card:hover, .profile-card.selected { border-color: var(--accent); transform: translateY(-3px); }
.profile-avatar {
  width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 700; color: #fff;
}
.profile-card .name { font-weight: 600; font-size: .9rem; }
.profile-card .role { font-size: .7rem; color: var(--text-muted); margin-top: 2px; }

/* MAIN SHELL - PS5 layout */
#main-shell { display: none; width: 100%; height: 100%; position: relative; }
#main-shell.active { display: flex; }

.bg-layer { position: fixed; inset: 0; z-index: 0; background: var(--bg-primary); }
.bg-layer::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,14,26,.5) 0%, rgba(10,14,26,.95) 100%); }
.bg-animated { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-orb { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .15; animation: floatOrb 15s ease-in-out infinite; }
.bg-orb:nth-child(1) { width: 500px; height: 500px; background: rgba(0,170,255,.12); top: -200px; left: -100px; }
.bg-orb:nth-child(2) { width: 400px; height: 400px; background: rgba(0,100,200,.1); bottom: -150px; right: -80px; animation-delay: -5s; }
.bg-orb:nth-child(3) { width: 300px; height: 300px; background: rgba(0,60,120,.08); top: 30%; left: 50%; animation-delay: -10s; }

/* SIDEBAR - thin, minimal */
.sidebar {
  position: relative; z-index: 10;
  width: var(--sidebar-width); height: 100%;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(20px);
  display: flex; flex-direction: column;
  align-items: center; padding: 8px 0;
}
.sidebar-logo { width: 32px; height: 32px; margin-bottom: 16px; cursor: pointer; opacity: .7; transition: opacity .2s; }
.sidebar-logo:hover { opacity: 1; }
.sidebar-logo img, .sidebar-logo svg { width: 100%; height: 100%; filter: brightness(0) invert(1); }
.nav-items { flex: 1; display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 0 4px; }
.nav-item {
  width: 100%; height: 48px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; border: none; background: transparent;
  color: var(--text-muted); cursor: pointer;
  border-radius: var(--radius-sm); transition: all .15s ease;
  font-family: inherit; font-size: .5rem; text-transform: uppercase; letter-spacing: .5px;
}
.nav-item .nav-icon { font-size: 1.2rem; line-height: 1; }
.nav-item:hover { color: var(--text-secondary); background: rgba(255,255,255,.04); }
.nav-item.active { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 2px; height: 20px; background: #fff; border-radius: 0 2px 2px 0;
}
.sidebar-footer { padding: 4px; width: 100%; }
.sidebar-footer .nav-item { height: 40px; }

/* MAIN AREA */
.main-area { flex: 1; display: flex; flex-direction: column; position: relative; z-index: 5; overflow: hidden; }

/* TOP BAR - PS5 minimal */
.top-bar {
  height: var(--header-height); display: flex; align-items: center;
  padding: 0 24px; gap: 12px;
  flex-shrink: 0;
}
.top-bar h1 { font-size: .85rem; font-weight: 300; letter-spacing: 1px; color: var(--text-secondary); text-transform: uppercase; white-space: nowrap; }
.top-bar-spacer { flex: 1; min-width: 8px; }
.search-box {
  display: flex; align-items: center; gap: 6px; padding: 5px 12px; width: 200px;
  background: rgba(255,255,255,.04); border: 1px solid transparent;
  border-radius: 20px; transition: all .2s ease;
}
.search-box:focus-within { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.06); }
.search-box input { flex: 1; background: none; border: none; color: #fff; font-size: .75rem; outline: none; }
.search-box input::placeholder { color: var(--text-muted); }
.top-icons { display: flex; gap: 4px; align-items: center; }
.icon-btn {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  border-radius: 50%; color: var(--text-muted); cursor: pointer;
  font-size: .9rem; transition: all .15s ease; position: relative;
}
.icon-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.icon-btn:active { transform: scale(.92); }
.icon-btn .badge { position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; background: #fff; border-radius: 50%; }
.storage-indicator { display: none; }
.user-pill { display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 2px 8px 2px 2px; border-radius: 20px; transition: background .15s; }
.user-pill:hover { background: rgba(255,255,255,.04); }
.user-pill-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; color: #fff; }
.user-pill-name { font-size: .75rem; font-weight: 500; }

/* PAGE CONTENT - PS5 scroll sections */
.page-content { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0; scroll-behavior: smooth; }
.page { display: none; }
.page.active { display: block; animation: fadeIn .3s ease; }

/* PS5 HERO BANNER */
.hero-banner { position: relative; padding: 48px 40px 40px; margin-bottom: 8px; overflow: hidden; }
.hero-banner-bg { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,170,255,.08), rgba(0,80,200,.04)); }
.hero-banner-content { position: relative; z-index: 1; }
.hero-banner .tag { display: inline-block; font-size: .6rem; letter-spacing: 2px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; }
.hero-banner h2 { font-size: 2rem; font-weight: 300; letter-spacing: -1px; }
.hero-banner p { color: var(--text-secondary); font-size: .85rem; margin-top: 4px; }

/* PS5 SECTION HEADERS */
.section-header { padding: 20px 40px 12px; display: flex; align-items: center; justify-content: space-between; }
.section-header h3 { font-size: 1.1rem; font-weight: 500; letter-spacing: .5px; }
.section-header .section-link { font-size: .75rem; color: var(--text-muted); cursor: pointer; transition: color .15s; }
.section-header .section-link:hover { color: #fff; }

/* PS5 HORIZONTAL ROWS */
.horz-scroll { display: flex; gap: 12px; padding: 0 40px 24px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.horz-scroll::-webkit-scrollbar { height: 0; }

/* PS5 CARDS */
.card-ps5 {
  flex-shrink: 0; width: 200px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  scroll-snap-align: start;
  border: 1px solid var(--border-subtle);
}
.card-ps5:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); background: var(--bg-card-hover); }
.card-ps5:active { transform: translateY(-2px) scale(.98); }
.card-ps5 .card-art { width: 100%; height: 120px; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; background: rgba(255,255,255,.02); }
.card-ps5 .card-info { padding: 12px 14px; }
.card-ps5 .card-title { font-size: .85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-ps5 .card-sub { font-size: .7rem; color: var(--text-muted); margin-top: 2px; }
.card-ps5 .card-rating { font-size: .65rem; color: var(--text-muted); }
.card-ps5 .installed-badge { position: absolute; top: 8px; right: 8px; font-size: .65rem; color: var(--accent); background: rgba(0,170,255,.15); padding: 2px 8px; border-radius: 10px; }

/* GRID FALLBACK */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; padding: 0 40px 24px; }
.card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); overflow: hidden; cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.1); box-shadow: var(--shadow-hover); }
.card:active { transform: translateY(-2px) scale(.98); }

/* WIDGETS - PS5 stats */
.widget-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 0 40px 16px; }
.widget {
  background: rgba(255,255,255,.02); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 16px; text-align: center;
}
.widget .widget-value { font-size: 1.5rem; font-weight: 200; color: #fff; }
.widget .widget-label { font-size: .65rem; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }
.widget.compact { padding: 12px; }
.widget.compact .widget-value { font-size: 1.2rem; }

/* QUICK LAUNCH */
.quick-launch { display: flex; gap: 8px; padding: 0 40px 20px; }
.quick-item {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.02); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 8px 14px; cursor: pointer;
  transition: background .15s;
}
.quick-item:hover { background: var(--bg-card-hover); }
.quick-icon { font-size: 1rem; }
.quick-label { font-size: .75rem; }

/* SETTINGS PANELS */
.settings-panel {
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.settings-panel h3 { font-size: 1rem; font-weight: 500; margin-bottom: 16px; }
.setting-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.03);
}
.setting-row:last-child { border-bottom: none; }
.setting-label { font-size: .8rem; }
.setting-desc { font-size: .7rem; color: var(--text-muted); margin-top: 2px; }
.setting-value { font-size: .8rem; color: var(--text-secondary); }

/* TOGGLE SWITCH */
.toggle-switch {
  width: 36px; height: 20px; background: rgba(255,255,255,.1); border-radius: 10px;
  cursor: pointer; position: relative; transition: background .2s; flex-shrink: 0;
}
.toggle-switch.on { background: var(--accent); }
.toggle-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; background: #fff; border-radius: 50%;
  transition: transform .2s ease;
}
.toggle-switch.on::after { transform: translateX(16px); }

/* NOTIF PANEL */
.notif-panel {
  position: fixed; top: 0; right: -360px; width: 360px; height: 100%;
  z-index: 100; background: rgba(10,14,26,.95); backdrop-filter: blur(24px);
  border-left: 1px solid var(--border-subtle);
  padding: 24px; overflow-y: auto;
  transition: right .3s ease;
}
.notif-panel.open { right: 0; }

/* FPS */
.fps-monitor { position: fixed; bottom: 8px; left: 8px; z-index: 9999; font-size: .6rem; color: rgba(255,255,255,.2); background: rgba(0,0,0,.3); padding: 2px 6px; border-radius: 4px; pointer-events: none; }

/* TOAST */
.toast-container { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 10px 20px; background: rgba(0,0,0,.85); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.06); border-radius: 12px; font-size: .8rem; color: #fff; animation: toastIn .25s ease, toastOut .2s ease 2.5s forwards; pointer-events: auto; }

/* OVERLAY */
.runtime-overlay { position: fixed; inset: 0; z-index: 500; display: none; flex-direction: column; background: #000; }
.runtime-overlay.active { display: flex; }
.runtime-bar { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: rgba(0,0,0,.8); border-bottom: 1px solid rgba(255,255,255,.06); flex-shrink: 0; }
.runtime-bar .btn { color: #fff; }
#runtime-title { flex: 1; font-size: .8rem; text-align: center; color: var(--text-secondary); }
#runtime-frame { flex: 1; border: none; }

/* SETUP */
#setup-screen { z-index: 9500; }
.setup-card { max-width: 520px; margin: 0 auto; padding: 32px; background: rgba(255,255,255,.02); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); }
.setup-card h2 { font-size: 1.3rem; font-weight: 500; margin-bottom: 4px; }
.setup-card p { color: var(--text-secondary); font-size: .85rem; margin-bottom: 20px; }
.setup-edition-card { padding: 16px; background: rgba(255,255,255,.02); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); cursor: pointer; transition: all .2s; }
.setup-edition-card:hover, .setup-edition-card.selected { border-color: var(--accent); background: rgba(0,170,255,.04); }

/* QR MODAL */
.qr-modal-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; }
.qr-modal { background: #fff; border-radius: var(--radius-xl); padding: 32px; text-align: center; max-width: 320px; width: 90%; color: #000; }
.qr-modal h3 { font-size: 1rem; font-weight: 600; margin-bottom: 16px; }
.qr-modal canvas { margin: 0 auto 16px; display: block; }
.qr-modal .qr-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* BROWSER PAGE */
.browser-toolbar { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: rgba(0,0,0,.2); border-bottom: 1px solid var(--border-subtle); flex-shrink: 0; }
.browser-nav-btns { display: flex; gap: 4px; }
.browser-nav-btn { width: 28px; height: 28px; border: none; background: transparent; color: var(--text-secondary); cursor: pointer; border-radius: var(--radius-sm); font-size: .8rem; display: flex; align-items: center; justify-content: center; }
.browser-nav-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.browser-nav-btn:disabled { opacity: .3; cursor: default; }
.browser-url-bar { flex: 1; display: flex; gap: 4px; }
.browser-url-bar input { flex: 1; padding: 4px 10px; background: rgba(0,0,0,.3); border: 1px solid var(--border-subtle); border-radius: 20px; color: #fff; font-size: .78rem; outline: none; }
.browser-url-bar input:focus { border-color: rgba(255,255,255,.1); }
.browser-go-btn { padding: 4px 14px; background: var(--accent); color: #fff; border: none; border-radius: 20px; font-size: .75rem; cursor: pointer; }
.browser-actions { display: flex; gap: 4px; }
.browser-action-btn { width: 28px; height: 28px; border: none; background: transparent; color: var(--text-muted); cursor: pointer; border-radius: 50%; font-size: .85rem; display: flex; align-items: center; justify-content: center; }
.browser-action-btn:hover { background: rgba(255,255,255,.05); color: #fff; }
.browser-content { flex: 1; position: relative; }
.browser-welcome { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.browser-welcome-icon { font-size: 3rem; margin-bottom: 16px; }
.browser-welcome h2 { font-size: 1.2rem; font-weight: 400; margin-bottom: 8px; }
.browser-welcome p { font-size: .8rem; color: var(--text-muted); }
.browser-speed-dials { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; justify-content: center; }
.browser-dial { width: 80px; padding: 12px 8px; background: rgba(255,255,255,.03); border-radius: var(--radius-md); text-align: center; cursor: pointer; transition: background .15s; }
.browser-dial:hover { background: rgba(255,255,255,.06); }
.browser-dial-icon { font-size: 1.5rem; margin-bottom: 4px; }
.browser-dial-title { font-size: .65rem; color: var(--text-secondary); }
.browser-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: none; display: none; }
.browser-frame.show { display: block; }
.browser-panel { position: absolute; inset: 0; background: rgba(10,14,26,.95); z-index: 10; display: none; flex-direction: column; }
.browser-panel.open { display: flex; }
.browser-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); }
.browser-panel-title { font-size: .85rem; }
.browser-panel-close { background: none; border: none; color: var(--text-muted); font-size: 1rem; cursor: pointer; }
.browser-panel-content { flex: 1; overflow-y: auto; padding: 8px; }
.browser-panel-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-sm); cursor: pointer; }
.browser-panel-item:hover { background: rgba(255,255,255,.03); }
.browser-panel-icon { font-size: 1rem; }
.browser-panel-info { flex: 1; }
.browser-panel-name { font-size: .78rem; }
.browser-panel-url { font-size: .65rem; color: var(--text-muted); }
.browser-panel-time { font-size: .6rem; color: var(--text-muted); }
.browser-status { padding: 2px 12px; font-size: .65rem; color: var(--text-muted); background: rgba(0,0,0,.2); border-top: 1px solid var(--border-subtle); }

/* STORE */
.store-featured { display: grid; grid-template-columns: 1fr 240px; gap: 12px; padding: 24px 40px; }
.store-featured-main { padding: 32px; background: linear-gradient(135deg, rgba(0,170,255,.06), rgba(0,80,200,.03)); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); cursor: pointer; transition: background .2s; }
.store-featured-main:hover { background: linear-gradient(135deg, rgba(0,170,255,.09), rgba(0,80,200,.05)); }
.store-featured-side { display: flex; flex-direction: column; gap: 8px; }
.mini-feature { flex: 1; padding: 16px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); cursor: pointer; transition: background .15s; display: flex; flex-direction: column; justify-content: center; }
.mini-feature:hover { background: var(--bg-card-hover); }
.mini-feature h4 { font-size: .85rem; font-weight: 500; }
.category-pills { display: flex; gap: 6px; padding: 0 40px 16px; flex-wrap: wrap; }
.category-pill { padding: 6px 14px; border-radius: 20px; font-size: .72rem; background: rgba(255,255,255,.03); border: 1px solid var(--border-subtle); cursor: pointer; transition: all .15s; color: var(--text-secondary); }
.category-pill:hover { border-color: rgba(255,255,255,.15); color: #fff; }
.category-pill.active { background: #fff; color: #000; border-color: #fff; }

/* FILES */
.files-breadcrumb { display: flex; align-items: center; gap: 4px; padding: 8px 40px; font-size: .78rem; color: var(--text-secondary); }
.files-breadcrumb span { cursor: pointer; }
.files-breadcrumb span:hover { color: #fff; }
.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; padding: 0 40px 24px; }
.file-item { padding: 12px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); text-align: center; cursor: pointer; transition: all .15s; }
.file-item:hover { background: var(--bg-card-hover); }
.file-item.selected { border-color: var(--accent); background: rgba(0,170,255,.05); }
.file-icon { font-size: 1.5rem; margin-bottom: 4px; }
.file-name { font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: .6rem; color: var(--text-muted); }

/* DOWNLOAD PROGRESS */
#install-progress { padding: 0 40px 16px; }
.download-progress { height: 3px; background: rgba(255,255,255,.06); border-radius: 2px; overflow: hidden; }
.download-progress-bar { height: 100%; background: #fff; border-radius: 2px; transition: width .3s ease; }

/* SETTINGS GRID */
.settings-grid { display: grid; grid-template-columns: 200px 1fr; gap: 0; height: 100%; }
.settings-nav { padding: 16px; border-right: 1px solid var(--border-subtle); }
.settings-nav-item { padding: 8px 12px; border-radius: var(--radius-sm); font-size: .8rem; cursor: pointer; color: var(--text-secondary); margin-bottom: 2px; transition: all .15s; }
.settings-nav-item:hover { color: #fff; background: rgba(255,255,255,.03); }
.settings-nav-item.active { color: #fff; background: rgba(255,255,255,.06); }
.settings-content { padding: 24px; overflow-y: auto; }

/* DOWNLOADS PAGE */
.download-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); margin-bottom: 8px; }
.download-item .dl-icon { font-size: 1.3rem; }
.download-item .dl-info { flex: 1; }
.download-item .dl-title { font-size: .85rem; }
.download-item .dl-status { font-size: .7rem; color: var(--text-muted); }

/* FRIENDS */
.friends-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; padding: 0 40px 24px; }
.friend-card { padding: 20px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); text-align: center; cursor: pointer; transition: all .15s; }
.friend-card:hover { background: var(--bg-card-hover); }
.friend-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 600; margin: 0 auto 8px; color: #fff; }
.friend-name { font-size: .85rem; font-weight: 500; }
.friend-status { font-size: .65rem; color: var(--text-muted); margin-top: 2px; }

/* MODAL OVERLAY */
.modal-overlay { position: fixed; inset: 0; z-index: 8000; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; }
.modal-overlay .auth-panel { position: relative; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; }
.modal-close:hover { color: #fff; }

/* QR BUTTON ON CARDS */
.card-qr-btn { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.5); border: none; color: #fff; cursor: pointer; font-size: .75rem; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; }
.card:hover .card-qr-btn { opacity: 1; }

/* SETTINGS TABS */
.settings-tabs { display: flex; gap: 4px; padding: 0 40px 16px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 20px; }
.settings-tab { padding: 8px 16px; font-size: .78rem; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; transition: all .15s; }
.settings-tab:hover { color: #fff; }
.settings-tab.active { color: #fff; border-bottom-color: #fff; }

/* MEDIA PAGE */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; padding: 0 40px 24px; }
.media-item { padding: 16px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); text-align: center; cursor: pointer; transition: all .15s; }
.media-item:hover { background: var(--bg-card-hover); }
.media-icon { font-size: 2rem; margin-bottom: 8px; }
.media-name { font-size: .78rem; }

/* BOOT SKIP */
.boot-skip {
  position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%);
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.4); padding: 8px 24px; border-radius: 20px;
  font-size: 0.75rem; font-family: inherit; cursor: pointer;
  transition: all 0.2s; z-index: 10001; letter-spacing: 1px;
}
.boot-skip:hover { background: rgba(255,255,255,0.12); color: #fff; }
.boot-screen.hidden .boot-skip { display: none; }

/* RESPONSIVE — fit any screen */
@media (max-width: 900px) {
  :root { --sidebar-width: 48px; --header-height: 44px; }
  .auth-panel { width: 90%; max-width: 400px; padding: 32px 24px; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav { display: flex; gap: 4px; overflow-x: auto; padding: 8px 16px; }
  .settings-nav-item { white-space: nowrap; font-size: 0.7rem; padding: 6px 12px; }
  .settings-panel { padding: 16px; }
  .settings-nav { border-right: none; border-bottom: 1px solid var(--border-subtle); }
  .page { padding: 0 16px; }
  .top-bar { padding: 0 12px; }
  .top-bar .search-box { display: none; }
  .top-icons .icon-btn { width: 32px; height: 32px; font-size: 0.85rem; }
  .user-pill { padding: 2px 8px; }
  .user-pill-name { display: none; }
  .widget-grid { grid-template-columns: 1fr 1fr; }
  .store-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .profile-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .settings-section h3 { font-size: 0.9rem; }
  .storage-dashboard { flex-direction: column; }
  .storage-dashboard-label { font-size: 0.7rem; }
  .guide-panel { width: 90% !important; max-width: 400px; }
  .shortcut-group { font-size: 0.75rem; }
  .shortcut-row kbd { font-size: 0.65rem; padding: 2px 6px; }
  .fs-hero { padding: 24px 16px; }
  .fs-hero-text h2 { font-size: 1.3rem; }
  .fs-section { padding: 8px 16px 16px; }
  .fs-header { padding: 10px 16px; }
  .fs-card { width: 140px; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); padding: 0 16px 16px; }
}

@media (max-width: 600px) {
  :root { --sidebar-width: 0px; --header-height: 40px; }
  .sidebar { display: none; }
  .top-bar .search-box { display: none; }
  .auth-panel { width: 95%; padding: 24px 16px; }
  .widget-grid { grid-template-columns: 1fr; }
  .store-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
  .guide-panel { width: 95% !important; }
  .settings-tabs { padding: 0 16px 12px; gap: 2px; }
  .settings-tab { font-size: 0.7rem; padding: 6px 10px; }
  .boot-title { font-size: 1rem; letter-spacing: 4px; }
  .boot-logo { width: 48px; height: 48px; }
  .boot-loader { width: 160px; }
  .boot-skip { bottom: 24px; font-size: 0.65rem; padding: 6px 16px; }
  .notif-panel { width: 100% !important; }
  .fs-hero-text h2 { font-size: 1.1rem; }
  .fs-card { width: 120px; }
  .fs-footer { flex-direction: column; gap: 4px; align-items: center; font-size: 0.6rem; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 6px; }
  .page-content { margin-left: 0; }
}

@media (min-width: 1400px) {
  :root { --sidebar-width: 72px; }
  .auth-panel { width: 480px; padding: 56px 48px; }
  .widget-grid { grid-template-columns: repeat(4, 1fr); }
  .store-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .page { padding: 0 48px; }
  .fs-card { width: 220px; }
  .fs-hero { padding: 64px 48px 40px; }
}

@media (min-width: 1900px) {
  :root { --sidebar-width: 80px; --header-height: 56px; }
  html { font-size: 18px; }
  .page { padding: 0 64px; }
  .auth-panel { width: 520px; }
  .widget-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ANIMATIONS */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bootPulse { 0%,100% { opacity: .7; } 50% { opacity: 1; } }
@keyframes floatOrb { 0%,100% { transform: translate(0,0); } 25% { transform: translate(30px,-30px); } 50% { transform: translate(-20px,20px); } 75% { transform: translate(20px,30px); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px) scale(.95); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
