/* ============================================================
   Genesi OS — Caelestia desktop preview
   Left bar + wallpaper + edge overlays (dashboard, dock, OSD,
   notifications) + draggable app windows.
   ============================================================ */

:root {
  --bar-w: 54px;
  --frame-thin: 8px;
  --frame-radius: 14px;
  --frame-color: #0d0d12;
  --frame-color-secondary: #1c1c27;

  --accent: #e8a0bf;          /* Caelestia pink */
  --icon: #9aa0b0;
  --icon-hover: #eef0f6;
  --text-dim: #6b7080;

  --c-green: #34d9a0;
  --c-blue: #7aa2f7;
  --c-fox: #ff9e64;
  --c-teal: #2ac3de;

  --panel: rgba(18, 16, 22, 0.82);
  --panel-brd: rgba(255,255,255,0.08);

  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  color: var(--icon);
  height: 100vh; width: 100vw;
  overflow: hidden;
  background: #05070c;
}

/* ---- Wallpaper ---- */
.wallpaper { position: fixed; inset: 0; z-index: 0; background: #0b1220; overflow: hidden; }
.wallpaper-video,
.wallpaper-image {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.wallpaper-scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(130% 100% at 20% 10%, rgba(0,0,0,0.02), rgba(0,0,0,0.28) 95%),
    linear-gradient(90deg, rgba(0,0,0,0.28), rgba(0,0,0,0) 18%);
}

/* icon glyphs (user-provided svgs) */
.ai-monitor { background-image: url('/desktop-preview/public/logo.svg'); width: 20px; height: 20px; background-size: cover; background-repeat: no-repeat; background-position: center; }
.genesi-container { background-image: url('/desktop-preview/public/genesi-containers.svg'); width: 20px; height: 20px; background-size: cover; background-repeat: no-repeat; background-position: center; }
.genesi-studio { background-image: url('/desktop-preview/public/genesi-studio.svg'); width: 20px; height: 20px; background-size: cover; background-repeat: no-repeat; background-position: center; }
.genesi-update { background-image: url('/desktop-preview/public/GenesiOSLogoNoBg.png'); width: 24px; height: 24px; background-size: cover; background-repeat: no-repeat; background-position: center; }
.genesi-ports { background-image: url('/desktop-preview/public/genesi-ports.svg'); width: 20px; height: 20px; background-size: cover; background-repeat: no-repeat; background-position: center; }

/* ---- Rounded screen frame (box-shadow trick) ---- */
.screen-frame { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.screen-frame::after {
  content: '';
  position: absolute;
  top: var(--frame-thin);
  left: var(--bar-w);
  right: var(--frame-thin);
  bottom: var(--frame-thin);
  border-radius: var(--frame-radius);
  box-shadow: 0 0 0 100vmax var(--frame-color);
  z-index: 2;
}

/* ---- Left bar ---- */
.bar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--bar-w);
  z-index: 60;
  background: rgba(13, 13, 18, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  padding: 1px 0;
}
.bar-group { display: flex; flex-direction: column; align-items: center; gap: 0px; }
.bar-group.mid { flex: 1; justify-content: center; }

.bar-logo, .bar-icon {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 11px; cursor: pointer;
  color: var(--icon); font-size: 0.92rem;
  background: transparent; border: none;
  transition: background 0.18s, color 0.18s, transform 0.18s;
  position: relative;
}
.bar-icon:hover { background: rgba(255,255,255,0.08); color: var(--icon-hover); }
.bar-logo { color: var(--accent); }
.bar-icon.accent { color: var(--accent); }
.bar-icon.accent.on { background: var(--accent); color: #1a1420; box-shadow: 0 0 18px rgba(232,160,191,0.5); }
.bar-icon.power:hover { background: rgba(247,118,142,0.16); color: #f7768e; }

.bar-utils { background-color: var(--frame-color-secondary); padding: 4px; border-radius: 24px; }

/* app shortcut colors */
.app.c-green { color: var(--c-green); }
.app.c-blue { color: var(--c-blue); }
.app.c-fox { color: var(--c-fox); }
.app.c-teal { color: var(--c-teal); }
.app.c-mono { color: var(--icon); }
.app:active { transform: scale(0.88); }

/* running-app indicator dot on the bar */
.bar-icon.running::before {
  content: ''; position: absolute; left: 2px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 12px; border-radius: 3px; background: var(--accent);
}

/* workspaces */
.group-ws { background-color: var(--frame-color-secondary); padding: 18px 8px; border-radius: 24px; margin-top: 24px; }
.ws { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.ws-dot { width: 8px; height: 8px; border-radius: 50%; background: #3a3f4d; cursor: pointer; transition: all 0.25s; }
.ws-dot:hover { background: #5b6172; }
.ws-dot.active { background: var(--accent); box-shadow: 0 0 8px rgba(232,160,191,0.6); width: 18px; height: 18px; }

/* vertical brand */
.bar-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-dim); }
.bar-brand i { font-size: 0.85rem; color: var(--c-green); opacity: 0.9; }
.brand-text { writing-mode: vertical-rl; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; color: var(--text-dim); }

/* clock */
.bar-clock { display: flex; flex-direction: column; align-items: center; gap: 1px; margin: 6px 0; color: var(--icon); }
.bar-clock i { font-size: 0.72rem; margin-bottom: 3px; color: var(--text-dim); }
.bar-clock span { font-family: var(--mono); font-size: 0.74rem; font-weight: 700; line-height: 1.05; }

/* ============================================================
   Edge hot-zones + peek handles (reveal the overlays on hover)
   ============================================================ */
.edge-hot { position: fixed; z-index: 44; }
.edge-top    { top: 0; left: var(--bar-w); right: 0; height: 12px; }
.edge-bottom { bottom: 0; left: var(--bar-w); right: 0; height: 12px; }
.edge-right  { right: 0; top: 22%; height: 56%; width: 12px; }
.edge-br     { right: 0; bottom: 0; width: 260px; height: 90px; }

.edge-handle {
  position: fixed; z-index: 43; display: grid; place-items: center;
  color: var(--icon); background: var(--panel); backdrop-filter: blur(14px);
  border: 1px solid var(--panel-brd); font-size: 0.62rem;
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.edge-handle-top    { top: 0; left: calc(50% + var(--bar-w) / 2); transform: translateX(-50%); width: 54px; height: 15px; border-top: none; border-radius: 0 0 10px 10px; }
.edge-handle-bottom { bottom: 0; left: calc(50% + var(--bar-w) / 2); transform: translateX(-50%); width: 54px; height: 15px; border-bottom: none; border-radius: 10px 10px 0 0; }
.edge-handle-right  { right: 0; top: 50%; transform: translateY(-50%); width: 15px; height: 54px; border-right: none; border-radius: 10px 0 0 10px; }
.edge-handle-br     { right: 14px; bottom: 12px; width: 30px; height: 30px; border-radius: 10px; }
.edge-handle-br .dot { position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* handles fade out while their panel is open */
.edge-top:hover    ~ .edge-handle-top,
.edge-bottom:hover ~ .edge-handle-bottom,
.edge-right:hover  ~ .edge-handle-right,
.edge-br:hover     ~ .edge-handle-br { opacity: 0; }

/* ============================================================
   Top dashboard
   ============================================================ */
.dash {
  position: fixed; top: 12px; left: calc(50% + var(--bar-w) / 2);
  transform: translate(-50%, calc(-100% - 24px));
  z-index: 45; display: flex; gap: 12px;
  background: var(--panel); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--panel-brd); border-radius: 20px; padding: 14px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.55);
  transition: transform 0.42s var(--ease), opacity 0.3s;
  opacity: 0;
}
.edge-top:hover ~ .dash, .dash:hover { transform: translate(-50%, 0); opacity: 1; }

.dash-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.05); border-radius: 14px; padding: 12px; }
.dash-card-title { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-dim); font-weight: 700; margin-bottom: 10px; }

/* now playing */
.np { display: flex; gap: 12px; width: 250px; }
.np-art { width: 74px; height: 74px; border-radius: 12px; display: grid; place-items: center; font-size: 1.6rem; color: #fff;
  background: linear-gradient(135deg, #e8a0bf, #7aa2f7); animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.np-art.paused { animation-play-state: paused; }
.np-meta { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.np-title { font-size: 0.85rem; font-weight: 700; color: #eef0f6; }
.np-artist { font-size: 0.72rem; color: var(--text-dim); }
.np-bar { height: 4px; border-radius: 3px; background: rgba(255,255,255,0.1); margin: 6px 0 2px; overflow: hidden; }
.np-fill { height: 100%; width: 42%; background: var(--accent); border-radius: 3px; }
.np-ctrls { display: flex; gap: 12px; align-items: center; color: var(--icon); }
.np-ctrls button { background: none; border: none; color: inherit; cursor: pointer; font-size: 0.78rem; }
.np-ctrls .np-play { color: #eef0f6; font-size: 0.9rem; }
.np-ctrls button:hover { color: var(--accent); }

/* resources */
.res { width: 190px; display: flex; flex-direction: column; }
.res-row { display: grid; grid-template-columns: 34px 1fr 40px; align-items: center; gap: 8px; margin-bottom: 9px; }
.res-row:last-child { margin-bottom: 0; }
.res-lbl { font-size: 0.6rem; font-weight: 700; color: var(--text-dim); }
.res-track { height: 6px; border-radius: 4px; background: rgba(255,255,255,0.08); overflow: hidden; }
.res-fill { height: 100%; border-radius: 4px; transition: width 0.6s var(--ease); }
.res-fill.cpu { background: var(--accent); } .res-fill.ram { background: var(--c-green); }
.res-fill.gpu { background: var(--c-blue); } .res-fill.tmp { background: var(--c-fox); }
.res-val { font-family: var(--mono); font-size: 0.66rem; color: #eef0f6; text-align: right; }

/* calendar / weather */
.cal { width: 150px; display: flex; flex-direction: column; justify-content: space-between; }
.cal-weather { display: flex; align-items: center; gap: 8px; color: #eef0f6; }
.cal-weather i { font-size: 1.5rem; color: var(--c-fox); }
.cal-temp { font-size: 1.15rem; font-weight: 700; }
.cal-city { font-size: 0.62rem; color: var(--text-dim); }
.cal-date { font-size: 0.74rem; color: var(--text-dim); line-height: 1.5; }
.cal-date b { color: #eef0f6; font-size: 0.92rem; }
.cal-dots { display: flex; gap: 6px; }
.cal-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.cal-dots span.on { background: var(--accent); }

/* ============================================================
   Right OSD (volume / brightness)
   ============================================================ */
.osd {
  position: fixed; right: 12px; top: 50%; transform: translate(calc(100% + 24px), -50%);
  z-index: 45; display: flex; gap: 12px;
  background: var(--panel); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--panel-brd); border-radius: 20px; padding: 16px 14px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.55);
  transition: transform 0.42s var(--ease), opacity 0.3s; opacity: 0;
}
.edge-right:hover ~ .osd, .osd:hover, .osd.show { transform: translate(0, -50%); opacity: 1; }
.osd-item { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.osd-track { width: 8px; height: 130px; border-radius: 6px; background: rgba(255,255,255,0.1); position: relative; overflow: hidden; }
.osd-fill { position: absolute; bottom: 0; left: 0; width: 100%; background: var(--accent); border-radius: 6px; transition: height 0.3s var(--ease); }
.osd-fill.amber { background: var(--c-fox); }
.osd-item i { color: var(--icon); font-size: 0.85rem; }

/* ============================================================
   Notifications (bottom-right)
   ============================================================ */
.notifs {
  position: fixed; right: 14px; bottom: 14px; z-index: 46;
  display: flex; flex-direction: column; gap: 10px; width: 268px;
  transform: translateX(calc(100% + 30px)); opacity: 0;
  transition: transform 0.42s var(--ease), opacity 0.3s;
}
.edge-br:hover ~ .notifs, .notifs:hover, .notifs.show { transform: translateX(0); opacity: 1; }
.notif {
  background: var(--panel); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--panel-brd); border-radius: 14px; padding: 11px 12px;
  display: flex; gap: 10px; box-shadow: 0 16px 44px rgba(0,0,0,0.5);
  animation: notif-in 0.4s var(--ease) both;
}
@keyframes notif-in { from { opacity: 0; transform: translateY(8px); } }
.notif-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex-shrink: 0; font-size: 0.82rem; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 0.76rem; font-weight: 700; color: #eef0f6; }
.notif-text { font-size: 0.7rem; color: var(--text-dim); line-height: 1.35; margin-top: 1px; }
.notif-x { color: var(--text-dim); cursor: pointer; font-size: 0.7rem; align-self: flex-start; }
.notif-x:hover { color: #eef0f6; }

/* ============================================================
   Bottom dock / quick access
   ============================================================ */
.dock {
  position: fixed; bottom: 14px; left: calc(50% + var(--bar-w) / 2);
  transform: translate(-50%, calc(100% + 28px)); z-index: 45;
  display: flex; flex-direction: column; gap: 3px; width: 272px;
  background: var(--panel); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--panel-brd); border-radius: 20px; padding: 10px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.55);
  transition: transform 0.42s var(--ease), opacity 0.3s; opacity: 0;
}
.edge-bottom:hover ~ .dock, .dock:hover { transform: translate(-50%, 0); opacity: 1; }
.dock-head { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-dim); font-weight: 700; padding: 4px 8px 8px; display: flex; align-items: center; gap: 7px; }
.dock-head i { color: var(--accent); }
.dock-app {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: none; cursor: pointer; background: transparent; border-radius: 13px; padding: 8px 10px;
  transition: background 0.18s;
}
.dock-app:hover { background: rgba(255,255,255,0.07); }
.dock-app:active { transform: scale(0.985); }
.dock-ico {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0;
  font-size: 1.05rem; color: var(--g, #fff); background: color-mix(in srgb, var(--g) 18%, transparent);
}
.dock-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dock-name { font-size: 0.8rem; font-weight: 700; color: #eef0f6; }
.dock-desc { font-size: 0.66rem; color: var(--text-dim); }

/* ============================================================
   Genesi control center
   ============================================================ */
.cc {
  position: fixed; left: calc(var(--bar-w) + 14px); bottom: 12px; width: 258px; z-index: 55;
  background: var(--panel); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--panel-brd); border-radius: 18px; padding: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55); transition: opacity 0.2s, transform 0.2s;
}
.cc.hidden { opacity: 0; transform: translateY(8px) scale(0.98); pointer-events: none; }
.cc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cc-title { font-weight: 700; font-size: 0.9rem; color: #eef0f6; }
.cc-switch { position: relative; width: 38px; height: 20px; }
.cc-switch input { opacity: 0; width: 0; height: 0; }
.cc-slider { position: absolute; inset: 0; cursor: pointer; background: #3a3f4d; border-radius: 20px; transition: 0.3s; }
.cc-slider::before { content: ''; position: absolute; width: 14px; height: 14px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.3s; }
.cc-switch input:checked + .cc-slider { background: var(--accent); }
.cc-switch input:checked + .cc-slider::before { transform: translateX(18px); }
.cc-gauges { display: flex; justify-content: space-around; margin-bottom: 14px; }
.cc-gauge { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cc-ring { width: 50px; height: 50px; }
.cc-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cc-ring .bg { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 3; }
.cc-ring .fill { fill: none; stroke-width: 3; stroke-linecap: round; transition: stroke-dasharray 0.6s ease; }
.cc-ring .cpu { stroke: var(--accent); } .cc-ring .ram { stroke: var(--c-green); } .cc-ring .gpu { stroke: var(--c-blue); }
.cc-lbl { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); font-weight: 600; }
.cc-val { font-family: var(--mono); font-size: 0.72rem; color: #eef0f6; font-weight: 600; }
.cc-note { font-size: 0.72rem; color: var(--text-dim); text-align: center; line-height: 1.4; }
.cc-note.on { color: var(--c-green); }

/* ============================================================
   App windows
   ============================================================ */
.windows { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.win {
  position: absolute; left: var(--wx); top: var(--wy); width: var(--ww); height: var(--wh);
  max-width: calc(100vw - var(--bar-w) - 24px); max-height: calc(100vh - 24px);
  background: #16161e; border: 1px solid rgba(255,255,255,0.09); border-radius: 14px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.6); overflow: hidden; pointer-events: auto;
  display: flex; flex-direction: column;
  animation: win-in 0.34s var(--ease) both;
}
.win.hidden { display: none; }
@keyframes win-in { from { opacity: 0; transform: scale(0.96) translateY(10px); } }
.win-bar { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: #1c1c27; cursor: grab; user-select: none; flex-shrink: 0; }
.win-bar:active { cursor: grabbing; }
.win-dots { display: flex; gap: 7px; }
.win-dots span { width: 12px; height: 12px; border-radius: 50%; }
.d-close { background: #f7768e; cursor: pointer; } .d-min { background: #e0af68; } .d-max { background: #9ece6a; }
.win-title { font-size: 0.76rem; color: #c0caf5; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.win-title i { color: var(--text-dim); }
.win-spacer { flex: 1; }

/* --- Genesi Code --- */
.code-body { flex: 1; display: grid; grid-template-columns: 44px 160px 1fr 220px; min-height: 0; font-size: 0.72rem; }
.code-rail { background: #16161e; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 14px 0; color: var(--text-dim); }
.code-rail i { cursor: pointer; } .code-rail i.on { color: var(--accent); } .code-rail i:hover { color: #c0caf5; }
.code-tree { background: #1a1b26; padding: 10px 8px; overflow: auto; color: #a9b1d6; }
.tree-h { font-size: 0.58rem; letter-spacing: 0.8px; color: var(--text-dim); margin-bottom: 8px; }
.tree-row { display: flex; align-items: center; gap: 6px; padding: 3px 4px; border-radius: 5px; white-space: nowrap; }
.tree-row i { width: 12px; font-size: 0.66rem; color: var(--text-dim); }
.tree-row.indent { padding-left: 16px; } .tree-row.active { background: rgba(122,162,247,0.18); color: #fff; }
.code-edit { background: #1a1b26; display: flex; flex-direction: column; min-width: 0; }
.code-tabs { display: flex; background: #16161e; }
.code-tabs .tab { padding: 7px 14px; font-size: 0.68rem; color: var(--text-dim); border-right: 1px solid #16161e; }
.code-tabs .tab.active { background: #1a1b26; color: #c0caf5; border-top: 2px solid var(--accent); }
.code-pre { flex: 1; margin: 0; padding: 10px 12px; font-family: var(--mono); font-size: 0.7rem; line-height: 1.7; color: #a9b1d6; overflow: auto; white-space: pre; }
.code-pre .ln { display: inline-block; width: 22px; color: #3b4261; user-select: none; }
.code-pre .c-tag { color: #7aa2f7; } .code-pre .c-attr { color: #bb9af7; } .code-pre .c-str { color: #9ece6a; }
.code-ai { background: #16161e; border-left: 1px solid #1c1c27; display: flex; flex-direction: column; padding: 10px; gap: 8px; min-width: 0; }
.ai-h { font-size: 0.72rem; font-weight: 700; color: #c0caf5; display: flex; gap: 7px; align-items: center; }
.ai-h i { color: var(--accent); }
.ai-msg { font-size: 0.7rem; line-height: 1.4; padding: 8px 10px; border-radius: 10px; }
.ai-msg.user { background: rgba(122,162,247,0.15); color: #c0caf5; align-self: flex-end; max-width: 85%; }
.ai-msg.bot { background: rgba(255,255,255,0.05); color: #a9b1d6; }
.ai-msg code { font-family: var(--mono); background: rgba(0,0,0,0.4); padding: 1px 4px; border-radius: 4px; color: var(--c-green); }
.ai-input { margin-top: auto; }
.ai-input input { width: 100%; background: #1a1b26; border: 1px solid #2a2b3d; border-radius: 9px; padding: 8px 10px; color: #c0caf5; font-size: 0.7rem; }
.ai-model { font-size: 0.6rem; color: var(--text-dim); margin-top: 6px; display: flex; gap: 6px; align-items: center; }

/* --- Genesi Store --- */
.store-body { flex: 1; background: #0c1512; display: flex; flex-direction: column; min-height: 0; }
.store-top { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.store-logo { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.5px; color: var(--c-green); display: flex; gap: 7px; align-items: center; white-space: nowrap; }
.store-search { flex: 1; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.05); border: 1px solid rgba(52,217,160,0.2); border-radius: 20px; padding: 7px 14px; color: var(--text-dim); }
.store-search input { flex: 1; background: none; border: none; color: #d7f5ea; font-size: 0.72rem; }
.store-lib { font-size: 0.7rem; color: #d7f5ea; background: rgba(255,255,255,0.06); border-radius: 16px; padding: 6px 14px; white-space: nowrap; }
.store-grid { flex: 1; overflow: auto; padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-content: start; }
.wp-card { border-radius: 12px; overflow: hidden; background: #10201a; border: 1px solid rgba(255,255,255,0.05); }
.wp-thumb { height: 88px; position: relative; }
.wp-time { position: absolute; top: 8px; left: 8px; font-family: var(--mono); font-weight: 700; font-size: 0.9rem; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,0.6); }
.wp-tag { position: absolute; bottom: 8px; left: 8px; font-size: 0.5rem; letter-spacing: 0.5px; background: rgba(0,0,0,0.55); color: #d7f5ea; padding: 2px 6px; border-radius: 5px; }
.wp-info { padding: 8px 10px; }
.wp-name { font-size: 0.72rem; font-weight: 700; color: #eafff7; }
.wp-by { font-size: 0.58rem; color: var(--text-dim); margin-bottom: 8px; }
.wp-btns { display: flex; gap: 6px; }
.wp-btns button { flex: 1; font-size: 0.6rem; font-weight: 700; border: none; border-radius: 7px; padding: 5px; cursor: pointer; }
.wp-apply { background: var(--c-green); color: #04140e; } .wp-get { background: rgba(255,255,255,0.08); color: #d7f5ea; }

/* --- Forum --- */
.forum-body { flex: 1; display: grid; grid-template-columns: 150px 1fr; background: #0e1420; min-height: 0; }
.forum-side { background: #0b101a; padding: 12px 8px; display: flex; flex-direction: column; gap: 3px; }
.fs-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; font-size: 0.72rem; color: #7d8bb0; cursor: pointer; }
.fs-item i { width: 14px; } .fs-item:hover { background: rgba(255,255,255,0.04); color: #c0caf5; }
.fs-item.active { background: rgba(232,160,191,0.14); color: var(--accent); }
.forum-main { overflow: auto; }
.fp-cover { height: 96px; background: linear-gradient(120deg, #1b2440, #3a2b46 60%, #143631); }
.fp-head { display: flex; gap: 16px; padding: 0 20px; margin-top: -34px; }
.fp-ring { width: 78px; height: 78px; border-radius: 50%; padding: 3px; background: conic-gradient(var(--accent), var(--c-blue), var(--c-green), var(--accent)); flex-shrink: 0; }
.fp-avatar { width: 100%; height: 100%; border-radius: 50%; background: #1b2440; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 1.3rem; border: 3px solid #0e1420; }
.fp-id { padding-top: 40px; }
.fp-name { font-size: 1rem; font-weight: 800; color: #eef2ff; display: flex; align-items: center; gap: 10px; }
.fp-badge { font-size: 0.6rem; background: var(--accent); color: #1a1420; padding: 2px 8px; border-radius: 20px; font-weight: 800; }
.fp-sub { font-size: 0.68rem; color: #7d8bb0; margin: 3px 0 8px; }
.fp-xp { height: 7px; width: 260px; max-width: 100%; border-radius: 5px; background: rgba(255,255,255,0.08); overflow: hidden; }
.fp-xp-fill { height: 100%; width: 84%; background: linear-gradient(90deg, var(--accent), var(--c-blue)); border-radius: 5px; }
.fp-xp-lbl { font-size: 0.58rem; color: var(--text-dim); margin-top: 4px; font-family: var(--mono); }
.fp-stats { display: flex; gap: 12px; padding: 18px 20px; }
.fp-stat { flex: 1; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; padding: 12px; text-align: center; }
.fp-stat b { display: block; font-size: 1.2rem; color: #eef2ff; } .fp-stat span { font-size: 0.62rem; color: var(--text-dim); }

/* --- Terminal --- */
.term-body { flex: 1; background: rgba(13,13,18,0.92); padding: 12px 14px; font-family: var(--mono); font-size: 0.72rem; line-height: 1.7; color: #c0caf5; overflow: auto; }
.term-body p { margin: 0; } .t-user { color: var(--c-green); font-weight: 700; } .t-path { color: var(--c-blue); } .t-dim { color: #7d8bb0; }
.t-cursor { color: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---- toast ---- */
.toast {
  position: fixed; bottom: 80px; left: calc(50% + var(--bar-w) / 2); transform: translateX(-50%) translateY(12px);
  z-index: 70; background: var(--panel); backdrop-filter: blur(20px); border: 1px solid var(--panel-brd);
  color: #eef0f6; font-size: 0.74rem; padding: 9px 16px; border-radius: 12px; opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- responsive ---- */
@media (max-width: 720px) {
  :root { --bar-w: 48px; }
  .cc { width: calc(100vw - var(--bar-w) - 28px); }
  .dash { flex-wrap: wrap; max-width: calc(100vw - var(--bar-w) - 28px); }
  .dash .cal { display: none; }
  .win { left: 8px !important; top: 8px !important; width: calc(100vw - var(--bar-w) - 16px) !important; height: calc(100vh - 16px) !important; }
  .code-body { grid-template-columns: 40px 1fr; }
  .code-tree, .code-ai { display: none; }
  .forum-body { grid-template-columns: 1fr; } .forum-side { display: none; }
}
