:root {
  --accent: #d63031;
  --accent-rgb: 255, 77, 166;
  --bg: #080708;
  --panel: rgba(20, 18, 21, .88);
  --panel-solid: #151216;
  --panel-2: #201b21;
  --text: #f6f2f5;
  --muted: #9f949e;
  --line: rgba(255,255,255,.09);
  --shadow: 0 24px 80px rgba(0,0,0,.42);
  color-scheme: dark;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 16px;
}

:root[data-mode="light"] {
  --bg: #f7f4f5;
  --panel: rgba(255, 255, 255, .9);
  --panel-solid: #fff;
  --panel-2: #f1eaed;
  --text: #211c20;
  --muted: #786d75;
  --line: rgba(65,35,52,.12);
  --shadow: 0 24px 80px rgba(74,48,64,.14);
  color-scheme: light;
}

:root[data-size="small"] { font-size: 14px; }
:root[data-size="large"] { font-size: 18px; }
* { box-sizing: border-box; }
html, body, #root { width: 100%; height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); overflow: hidden; }
button, input, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.ambient { position: fixed; inset: 0; pointer-events: none; overflow: hidden; background: radial-gradient(circle at 50% 100%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 45%); }
.ambient i { position: absolute; width: 40vw; height: 40vw; border-radius: 50%; filter: blur(90px); opacity: .13; background: var(--accent); animation: drift 15s ease-in-out infinite alternate; }
.ambient i:nth-child(1) { left: -12vw; top: -18vw; }
.ambient i:nth-child(2) { right: -15vw; top: 18vh; animation-delay: -5s; }
.ambient i:nth-child(3) { left: 35vw; bottom: -30vw; animation-delay: -10s; }
@keyframes drift { to { transform: translate3d(8vw, 6vh, 0) scale(1.15); } }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; }

.app-shell { position: relative; display: grid; grid-template-columns: 76px 1fr; grid-template-rows: 64px 1fr; height: 100%; }
.sidebar { grid-row: 1 / 3; display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 12px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--panel-solid) 72%, transparent); backdrop-filter: blur(22px); z-index: 3; }
.side-button { width: 56px; height: 52px; border: 0; border-radius: 14px; display: grid; place-content: center; gap: 2px; background: transparent; color: var(--muted); cursor: pointer; transition: .2s ease; }
.side-button .icon { font-size: 20px; }
.side-button span:last-child { font-size: 10px; font-weight: 600; }
.side-button:hover, .side-button.active { color: var(--text); background: color-mix(in srgb, var(--accent) 17%, transparent); }
.side-button.active { box-shadow: inset 3px 0 var(--accent); }

.topbar { grid-column: 2; display: flex; align-items: center; gap: 8px; padding: 8px 14px; z-index: 5; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--panel-solid) 78%, transparent); backdrop-filter: blur(24px); }
.logo-button, .round-button, .top-link { border: 0; background: transparent; cursor: pointer; }
.logo-button { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; }
.logo-button img { width: 33px; height: 33px; }
.logo-button:hover, .round-button:hover, .top-link:hover, .top-link.active { background: var(--panel-2); }
.round-button, .top-link { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--muted); }
.round-button .icon, .top-link .icon { font-size: 19px; }
.address-wrap { flex: 1; max-width: 700px; height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 10px; margin-left: 4px; border: 1px solid var(--line); border-radius: 13px; background: color-mix(in srgb, var(--panel-2) 74%, transparent); }
.address-wrap input { min-width: 80px; flex: 1; border: 0; outline: 0; color: var(--muted); background: transparent; font-family: "JetBrains Mono", monospace; font-size: 12px; }
.address-wrap kbd { color: var(--muted); font: 10px "JetBrains Mono", monospace; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; }
.address-icon { color: var(--accent); }
.top-links { display: flex; gap: 3px; margin-left: auto; }

.stage { grid-column: 2; min-width: 0; min-height: 0; overflow: auto; }
.stage:fullscreen { background: var(--bg); }
.page { min-height: 100%; padding: 36px clamp(24px, 5vw, 76px) 60px; }
.home-page { display: flex; flex-direction: column; align-items: center; justify-content: center; padding-bottom: 90px; }
.brand-lockup { display: grid; justify-items: center; }
.brand-lockup img { width: 74px; filter: drop-shadow(0 12px 30px color-mix(in srgb, var(--accent) 35%, transparent)); }
.brand-lockup h1 { margin: 10px 0 0; font-size: clamp(45px, 7vw, 82px); line-height: .95; letter-spacing: -.065em; }
.brand-lockup h1 span { color: var(--accent); }
.brand-lockup p { margin: 12px 0 30px; color: var(--muted); font: 12px "JetBrains Mono", monospace; letter-spacing: .14em; }
.hero-search { width: min(720px, 88vw); height: 62px; display: flex; align-items: center; gap: 12px; padding: 0 18px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); border-radius: 20px; background: var(--panel); box-shadow: var(--shadow); }
.hero-search .icon { color: var(--accent); font-size: 28px; }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 17px; }
.hero-search span:last-child { color: var(--muted); font-size: 11px; }
.quick-grid { width: min(720px, 88vw); display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 22px; }
.quick-card { display: grid; justify-items: center; gap: 9px; border: 0; padding: 0; background: transparent; cursor: pointer; }
.quick-card .quick-icon { width: 56px; height: 56px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); box-shadow: 0 10px 30px rgba(0,0,0,.16); font-size: 24px; transition: transform .18s ease, border-color .18s ease; }
.quick-card:hover .quick-icon { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.quick-card img { max-width: 33px; max-height: 33px; object-fit: contain; }
.quick-card b { color: var(--muted); font-size: 12px; font-weight: 500; }
.quick-card.red .quick-icon { color: #ff4b56; }.quick-card.violet .quick-icon { color: #a77bff; }.quick-card.lime .quick-icon { color: #7ee45e; }
.clean-note { margin-top: 28px; color: var(--muted); font: 10px "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .14em; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-heading h1, .library-panel h1 { margin: 0; font-size: clamp(34px, 5vw, 56px); letter-spacing: -.04em; }
.page-heading p, .library-panel p { margin: 5px 0 0; color: var(--muted); }
.catalog-search { width: min(340px, 45vw); height: 44px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 0 13px; background: var(--panel); }
.catalog-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chips button, .segmented button, .action-row button, .file-button { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; background: var(--panel); color: var(--muted); cursor: pointer; }
.chips button.active, .segmented button.active { color: #fff; background: var(--accent); border-color: transparent; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 18px; }
.game-card { position: relative; min-width: 0; }
.game-open { width: 100%; display: grid; gap: 9px; padding: 0; text-align: left; border: 0; background: transparent; cursor: pointer; }
.cover { position: relative; aspect-ratio: 1 / .82; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 22%, var(--panel-2)), var(--panel-solid)); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.cover em { font-style: normal; font-size: 42px; font-weight: 800; color: color-mix(in srgb, var(--accent) 70%, white); opacity: .5; }
.game-open:hover .cover img { transform: scale(1.055); }
.game-open strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.favorite { position: absolute; z-index: 2; top: 8px; right: 8px; width: 31px; height: 31px; border: 0; border-radius: 10px; background: rgba(8,7,8,.72); color: white; cursor: pointer; }
.favorite.on { color: var(--accent); }
.catalog-limit { text-align: center; color: var(--muted); margin: 30px 0; }
.empty-state, .empty-mini { display: grid; justify-items: center; gap: 6px; padding: 70px 20px; color: var(--muted); }

.center-page { display: grid; place-items: center; }
.feature-card { width: min(560px, 92vw); padding: 48px; text-align: center; border: 1px solid var(--line); border-radius: 28px; background: var(--panel); box-shadow: var(--shadow); }
.feature-card h1 { margin: 8px 0; font-size: 48px; letter-spacing: -.04em; }
.feature-card p { color: var(--muted); line-height: 1.7; }
.feature-icon { width: 72px; height: 72px; display: inline-grid; place-items: center; border-radius: 22px; color: white; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 48%, #6655ff)); font-size: 35px; }
.eyebrow { margin: 16px 0 0 !important; color: var(--accent) !important; font: 10px "JetBrains Mono", monospace; letter-spacing: .16em; }
.primary { border: 0; border-radius: 12px; padding: 11px 18px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }
.primary.wide { width: 100%; }

.split-page { padding: 0; display: grid; grid-template-columns: 260px 1fr; min-height: 100%; }
.library-panel { padding: 36px 22px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--panel-solid) 60%, transparent); }
.library-item { width: 100%; display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 11px; border: 0; border-radius: 12px; background: transparent; text-align: left; cursor: pointer; }
.library-item.active, .library-item:hover { background: var(--panel-2); }
.library-item span { display: grid; }.library-item small { color: var(--muted); }
.content-panel { min-width: 0; padding: 44px; }
.music-hero { display: flex; gap: 24px; align-items: center; min-height: 220px; padding: 32px; border: 1px solid var(--line); border-radius: 25px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 26%, var(--panel)), var(--panel)); }
.music-hero > span { width: 110px; height: 110px; display: grid; place-items: center; border-radius: 25px; background: var(--accent); font-size: 50px; }
.music-hero h2 { margin: 7px 0; font-size: 38px; }.music-hero p { color: var(--muted); }
.track-list { margin-top: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.track-list div { display: grid; grid-template-columns: 35px 1fr; }.track-list small { grid-column: 2; color: var(--muted); }
.player { position: fixed; left: 98px; right: 22px; bottom: 18px; height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel-solid); box-shadow: var(--shadow); }
.player button { border: 0; background: transparent; cursor: pointer; }.player .play { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: white; }
.player-line { flex: 1; height: 3px; border-radius: 3px; background: var(--line); }.player-line i { display: block; width: 0; height: 100%; background: var(--accent); }

.ai-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ai-empty h2 { margin: 18px 0 4px; font-size: 36px; }.ai-empty > p { max-width: 640px; color: var(--muted); line-height: 1.7; }
.composer { width: min(760px, 100%); min-height: 58px; display: flex; align-items: flex-end; gap: 10px; margin-top: 24px; padding: 8px 8px 8px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.composer textarea { flex: 1; min-height: 38px; max-height: 120px; resize: vertical; border: 0; outline: 0; padding: 8px 0; background: transparent; color: var(--text); }
.composer button { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--accent); color: white; cursor: pointer; }
.chat-panel { display: grid; grid-template-rows: auto 1fr auto; height: calc(100vh - 64px); padding: 0; }
.chat-panel > header { display: flex; justify-content: space-between; align-items: center; padding: 20px 28px; border-bottom: 1px solid var(--line); }.chat-panel h2, .chat-panel p { margin: 0; }.chat-panel header p { color: var(--muted); font-size: 12px; }
.privacy-pill { padding: 5px 10px; border-radius: 999px; color: #7be39a; background: rgba(72,190,104,.12); font-size: 11px; }
.messages { overflow: auto; padding: 25px 28px; }.messages article { display: flex; gap: 12px; margin-bottom: 22px; }.messages .avatar { flex: 0 0 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--accent); color: white; font-weight: 800; }.messages time { margin-left: 8px; color: var(--muted); font-size: 10px; }.messages p { margin-top: 4px; }.compact .messages article { margin-bottom: 10px; }.compact .messages .avatar { flex-basis: 30px; height: 30px; border-radius: 9px; }
.chat-panel .composer { width: auto; margin: 16px 28px 24px; }

.shop-banner { display: flex; align-items: center; gap: 20px; padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 22%, var(--panel)), var(--panel)); }.shop-banner > span { font-size: 52px; color: var(--accent); }.shop-banner h2, .shop-banner p { margin: 3px 0; }.shop-banner p:last-child { color: var(--muted); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-top: 22px; }.shop-grid article { padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }.shop-grid i { display: block; height: 120px; border-radius: 14px; background: radial-gradient(circle at 35% 30%, white, var(--item) 10%, color-mix(in srgb, var(--item) 25%, var(--panel-solid)) 55%); }.shop-grid h3 { margin-bottom: 4px; }.shop-grid p { color: var(--muted); }.shop-grid button { width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); cursor: pointer; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }.setting-card { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }.setting-card h2 { margin: 0 0 18px; }.setting-card > label:not(.color-label) { display: block; margin: 18px 0 8px; color: var(--muted); font-size: 12px; }.segmented { display: flex; gap: 7px; flex-wrap: wrap; }.segmented button { flex: 1; min-width: 80px; border-radius: 10px; }.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 20px; }.setting-row div { display: grid; }.setting-row small, .setting-help { color: var(--muted); }.toggle { flex: 0 0 45px; height: 25px; padding: 3px; border: 0; border-radius: 999px; background: var(--panel-2); cursor: pointer; }.toggle i { display: block; width: 19px; height: 19px; border-radius: 50%; background: white; transition: transform .18s; }.toggle.on { background: var(--accent); }.toggle.on i { transform: translateX(20px); }.swatches { display: flex; gap: 10px; flex-wrap: wrap; }.swatches button { width: 31px; height: 31px; border: 2px solid transparent; border-radius: 50%; background: var(--swatch); cursor: pointer; }.swatches button.active { outline: 2px solid var(--text); outline-offset: 3px; }.color-label { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; }.color-label input { width: 44px; height: 32px; padding: 0; border: 0; background: transparent; }.action-row { display: flex; gap: 8px; flex-wrap: wrap; }.action-row button, .file-button { border-radius: 10px; }.file-button input { display: none; }.clean-card ul { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.9; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 26px; transform: translate(-50%, 20px); padding: 10px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-solid); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .2s; }.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 940px) {
  .top-links { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .app-shell { grid-template-columns: 1fr; grid-template-rows: 58px 1fr 65px; }
  .topbar { grid-column: 1; grid-row: 1; padding: 6px 9px; }.logo-button { width: 40px; height: 40px; }.add-tab, .topbar > .round-button:nth-of-type(3), .topbar > .round-button:last-child, .address-wrap kbd { display: none; }
  .sidebar { position: static; grid-column: 1; grid-row: 3; flex-direction: row; justify-content: space-between; gap: 0; padding: 6px; border: 0; border-top: 1px solid var(--line); overflow-x: auto; }.side-button { flex: 0 0 44px; height: 50px; }.side-button span:last-child { display: none; }
  .stage { grid-column: 1; grid-row: 2; }.page { padding: 24px 18px 40px; }.quick-grid { width: 96%; grid-template-columns: repeat(3, 1fr); }.hero-search { width: 96%; }
  .page-heading { align-items: stretch; flex-direction: column; }.catalog-search { width: 100%; }.game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .split-page { grid-template-columns: 1fr; }.library-panel { display: none; }.content-panel { padding: 24px 18px; }.chat-panel { height: calc(100vh - 123px); }.player { left: 12px; right: 12px; bottom: 76px; }.music-hero { align-items: flex-start; flex-direction: column; }.music-hero > span { width: 74px; height: 74px; }
}
