/* ==========================================================================
   kaanOS — stiller
   ========================================================================== */
:root {
  --accent: #3584e4;
  --accent-soft: color-mix(in srgb, var(--accent) 20%, transparent);
  --accent-text: color-mix(in srgb, var(--accent) 70%, white);
  --topbar-h: 32px;
  --dock-h: 78px;
  --font: 'Ubuntu', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --r: 12px;
  --glass: rgba(18, 19, 24, .62);
  --glass-border: rgba(255, 255, 255, .09);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme="dark"] {
  --bg-win: #1f2026; --bg-surface: #25262d; --bg-elev: #2e2f37; --bg-hover: rgba(255,255,255,.07);
  --bg-active: rgba(255,255,255,.11); --border: rgba(255,255,255,.08); --text: #ebebf0; --text-dim: #a4a5b0;
  --text-faint: #6d6e79; --titlebar: #2a2b32; --titlebar-inactive: #232429; --shadow: 0 22px 60px rgba(0,0,0,.5);
  --input: #18191e; color-scheme: dark;
}
:root[data-theme="light"] {
  --bg-win: #fbfbfc; --bg-surface: #f0f0f3; --bg-elev: #ffffff; --bg-hover: rgba(0,0,0,.05);
  --bg-active: rgba(0,0,0,.09); --border: rgba(0,0,0,.1); --text: #1d1e23; --text-dim: #5d5e68;
  --text-faint: #9596a0; --titlebar: #ebebef; --titlebar-inactive: #f3f3f6; --shadow: 0 22px 60px rgba(0,0,0,.28);
  --input: #ffffff; --accent-text: color-mix(in srgb, var(--accent) 80%, black); color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; }
body {
  font: 14px/1.45 var(--font); color: var(--text);
  user-select: none; -webkit-user-select: none; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
input, textarea, .md, .term-out, .ab-bio { user-select: text; -webkit-user-select: text; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }
a { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.no-anim *, .no-anim *::before, .no-anim *::after { transition: none !important; animation: none !important; }
.muted { color: var(--text-dim); }
.ui-ico { flex: none; display: block; }
.ico { display: block; width: 100%; height: 100%; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(128,128,128,.35); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Ortak kontroller ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 9px;
  background: var(--bg-elev); border: 1px solid var(--border); font-weight: 500; white-space: nowrap;
  transition: background .12s, border-color .12s; text-decoration: none; color: var(--text);
}
.btn:hover:not(:disabled) { background: var(--bg-active); }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 85%, white); }
.btn.danger { color: #ff6b6b; }
.btn.primary.danger { background: #e0364a; color: #fff; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn.xs { height: 24px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--text-dim);
  transition: background .12s, color .12s; flex: none;
}
.icon-btn:hover:not(:disabled) { background: var(--bg-hover); color: var(--text); }
.icon-btn.sm { width: 26px; height: 26px; }
.icon-btn.round { border-radius: 50%; width: 38px; height: 38px; background: rgba(255,255,255,.08); color: #fff; }
.icon-btn.round:hover { background: rgba(255,255,255,.16); color: #fff; }
.input, .search-box {
  height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--input); color: var(--text);
  padding: 0 10px; font: inherit; outline: none;
}
.input:focus, .search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-box { display: flex; align-items: center; gap: 6px; color: var(--text-faint); width: 180px; flex: none; }
.search-box input { border: 0; background: none; outline: none; color: var(--text); font: inherit; width: 100%; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-text); font-weight: 500; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: #2ec27e26; color: #3ddc97; font-weight: 500; }
.link-btn { color: var(--accent-text); font-size: 12px; }
.link-btn:hover { text-decoration: underline; }
.empty-note { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px 10px; color: var(--text-faint); grid-column: 1 / -1; text-align: center; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; overflow: hidden;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #ff4f8b)); color: #fff; font-weight: 700;
  box-shadow: 0 0 0 3px rgba(255,255,255,.12);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 38px; height: 38px; font-size: 14px; }
.avatar.lg { width: 92px; height: 92px; font-size: 34px; }
.avatar.xl { width: 128px; height: 128px; font-size: 46px; box-shadow: 0 0 0 5px rgba(255,255,255,.15), 0 20px 50px rgba(0,0,0,.4); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.switch { width: 44px; height: 24px; border-radius: 99px; background: var(--bg-active); position: relative; transition: background .15s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .18s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(20px); }
input[type=range] { accent-color: var(--accent); width: 100%; }
.seg { display: inline-flex; background: var(--bg-hover); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 7px; font-size: 13px; color: var(--text-dim); }
.seg button.on { background: var(--bg-elev); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.15); }

/* ---------- Duvar kağıdı ve masaüstü ---------- */
#desktop-root { position: fixed; inset: 0; overflow: hidden; transition: opacity .45s, filter .45s; }
#desktop-root.powering-off { opacity: 0; filter: brightness(2) blur(4px); }
.wallpaper { position: absolute; inset: 0; background: #0b1026; transition: background .5s; }
#dimmer { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 200; transition: opacity .2s; }

#desktop { position: absolute; inset: var(--topbar-h) 0 0 0; z-index: 5; }
.dicon {
  position: absolute; width: 88px; padding: 6px 4px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; gap: 5px;
  cursor: default; transition: background .1s, left .15s var(--ease), top .15s var(--ease); touch-action: none;
}
.dicon.dragging { transition: none; opacity: .85; z-index: 3; }
.dicon:hover { background: rgba(255,255,255,.08); }
.dicon.selected { background: color-mix(in srgb, var(--accent) 38%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 70%, transparent); }
.dicon-img { width: 50px; height: 50px; filter: drop-shadow(0 3px 6px rgba(0,0,0,.35)); pointer-events: none; }
.dicon-label {
  color: #fff; font-size: 12.5px; text-align: center; line-height: 1.25; text-shadow: 0 1px 3px rgba(0,0,0,.85), 0 0 8px rgba(0,0,0,.4);
  word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; pointer-events: none;
}
.dicon.selected .dicon-label { -webkit-line-clamp: unset; }
.rubber { position: absolute; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); border-radius: 3px; pointer-events: none; }

/* ---------- Üst bar ---------- */
#topbar {
  position: absolute; top: 0; left: 0; right: 0; height: var(--topbar-h); z-index: 50;
  display: flex; align-items: center; justify-content: space-between; padding: 0 6px;
  background: rgba(0,0,0,.55); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  color: #f2f2f5; font-size: 13.5px; font-weight: 500;
}
.tb-sec { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.tb-sec.right { justify-content: flex-end; }
.top-btn { display: inline-flex; align-items: center; gap: 8px; height: 24px; padding: 0 11px; border-radius: 99px; transition: background .12s; white-space: nowrap; }
.top-btn:hover, .top-btn.open { background: rgba(255,255,255,.14); }
#clock { flex: none; }
.top-label { opacity: .75; padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray-icons { display: inline-flex; align-items: center; gap: 9px; }
.bat-pct { font-size: 12.5px; margin-left: -4px; }

/* ---------- Açılır paneller ---------- */
.popover {
  position: fixed; z-index: 70; background: rgba(30,31,38,.92); color: #eee; border: 1px solid var(--glass-border);
  border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.5); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  animation: pop .16s var(--ease); max-width: calc(100vw - 12px);
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.cal-pop { display: flex; gap: 0; width: 620px; max-width: 100%; }
.cal-notifs { flex: 1; padding: 16px; border-right: 1px solid var(--glass-border); min-width: 0; display: flex; flex-direction: column; }
.cal-sub { display: flex; justify-content: space-between; align-items: center; font-weight: 500; margin-bottom: 10px; color: #bbb; font-size: 13px; }
.notif-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow: auto; flex: 1; }
.notif-list .empty-note { color: #777; flex: 1; }
.notif-item { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: start; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.06); }
.notif-ico { width: 30px; height: 30px; }
.notif-t { font-weight: 500; font-size: 13px; }
.notif-b { font-size: 12.5px; color: #aaa; }
.notif-item small { color: #888; font-size: 11px; }
.cal-side { width: 280px; padding: 16px; flex: none; }
.cal-today small { display: block; color: #aaa; font-size: 12px; }
.cal-today b { font-size: 18px; font-weight: 500; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 6px; font-weight: 500; }
.cal-head .icon-btn { color: #bbb; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 13px; }
.cal-dow { font-size: 11px; color: #888; padding: 4px 0; }
.cal-day { padding: 6px 0; border-radius: 99px; }
.cal-day:hover { background: rgba(255,255,255,.08); }
.cal-day.today { background: var(--accent); color: #fff; font-weight: 700; }

.qs { width: 360px; max-width: 100%; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.qs-sliders { display: flex; flex-direction: column; gap: 8px; }
.qs-slider { display: flex; align-items: center; gap: 12px; padding: 0 4px; }
.qs-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qs-toggle { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 99px; background: rgba(255,255,255,.08); text-align: left; transition: background .15s; }
.qs-toggle:hover { background: rgba(255,255,255,.13); }
.qs-toggle.on { background: var(--accent); color: #fff; }
.qs-toggle b { display: block; font-size: 13px; font-weight: 500; }
.qs-toggle small { display: block; font-size: 11.5px; opacity: .75; }
.qs-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--glass-border); padding-top: 14px; gap: 10px; flex-wrap: wrap; }
.qs-user { display: flex; align-items: center; gap: 10px; }
.qs-user small { display: block; color: #aaa; font-size: 12px; }
.qs-actions { display: flex; gap: 6px; }

/* ---------- Dock ---------- */
#dock {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); z-index: 40;
  display: flex; align-items: center; gap: 4px; padding: 6px 8px; height: calc(var(--dock-h) - 14px); max-width: calc(100vw - 16px);
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: 20px;
  backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
}
.dock-item { position: relative; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; transition: background .15s; flex: none; }
.dock-item:hover { background: rgba(255,255,255,.1); }
.dock-item.active { background: rgba(255,255,255,.13); }
.dock-icon { width: 44px; height: 44px; transition: transform .2s var(--ease); }
.dock-item:hover .dock-icon { transform: translateY(-3px) scale(1.06); }
.dock-item:active .dock-icon { transform: scale(.94); }
.launcher-ico { display: grid; place-items: center; color: #eee; }
.dock-dots { position: absolute; bottom: 1px; display: flex; gap: 3px; }
.dock-dots i { width: 5px; height: 5px; border-radius: 50%; background: #ddd; }
.dock-item.active .dock-dots i { background: var(--accent); width: 12px; border-radius: 3px; }
.dock-sep { width: 1px; height: 36px; background: rgba(255,255,255,.14); margin: 0 4px; flex: none; }
.tip {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(4px); white-space: nowrap;
  background: rgba(20,20,25,.92); color: #fff; font-size: 12.5px; padding: 5px 10px; border-radius: 8px; pointer-events: none;
  opacity: 0; transition: opacity .12s, transform .12s; border: 1px solid var(--glass-border);
}
.dock-item:hover .tip { opacity: 1; transform: translateX(-50%); }

/* ---------- Başlatıcı ---------- */
#launcher {
  position: absolute; inset: var(--topbar-h) 0 0 0; z-index: 60; display: flex; justify-content: center;
  background: rgba(8,9,14,.55); backdrop-filter: blur(28px) saturate(1.3); -webkit-backdrop-filter: blur(28px) saturate(1.3);
  opacity: 0; visibility: hidden; transition: opacity .18s, visibility 0s .18s; color: #fff;
}
#launcher.show { opacity: 1; visibility: visible; transition: opacity .18s; }
.launcher-inner { width: min(860px, 100%); padding: 40px 24px 110px; overflow: auto; transform: scale(.97); transition: transform .22s var(--ease); }
#launcher.show .launcher-inner { transform: none; }
.launcher-search {
  display: flex; align-items: center; gap: 10px; max-width: 460px; margin: 0 auto 30px; height: 44px; padding: 0 16px;
  border-radius: 99px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); color: #bbb;
}
.launcher-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.launcher-search input { flex: 1; border: 0; outline: 0; background: none; color: #fff; font: inherit; font-size: 15px; }
.launcher-results section { margin-bottom: 26px; }
.launcher-results h4 { margin: 0 0 12px 8px; font-size: 13px; font-weight: 500; color: #aaa; letter-spacing: .02em; }
.l-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px; }
.l-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: 16px; transition: background .12s; min-width: 0; }
.l-item:hover, .l-item:focus-visible { background: rgba(255,255,255,.1); }
.l-ico { width: 60px; height: 60px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
.l-name { font-size: 13px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.l-item small { font-size: 11px; color: #999; margin-top: -6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#launcher .empty-note { color: #999; }

/* ---------- Bildirimler ---------- */
#notifications { position: absolute; top: calc(var(--topbar-h) + 10px); right: 10px; z-index: 75; display: flex; flex-direction: column; gap: 8px; width: 360px; max-width: calc(100vw - 20px); pointer-events: none; }
.toast {
  pointer-events: auto; display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: start; padding: 12px 12px 12px 14px;
  background: rgba(30,31,38,.92); color: #eee; border: 1px solid var(--glass-border); border-radius: 16px; cursor: pointer;
  box-shadow: 0 12px 34px rgba(0,0,0,.4); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  animation: toastIn .3s var(--ease);
}
.toast.out { animation: toastOut .22s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }
.toast-icon { width: 40px; height: 40px; }
.toast-title { font-weight: 500; }
.toast-body { font-size: 13px; color: #aaa; margin-top: 2px; }
.toast-body:empty { display: none; }
.toast-close { color: #999; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; }
.toast-close:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ---------- Sağ tık menüsü ---------- */
.ctx-menu {
  position: fixed; z-index: 1000; min-width: 220px; padding: 5px; border-radius: 12px;
  background: color-mix(in srgb, var(--bg-elev) 94%, transparent); border: 1px solid var(--border); color: var(--text);
  box-shadow: 0 14px 40px rgba(0,0,0,.35); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  animation: pop .12s var(--ease);
}
.ctx-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 7px; text-align: left; font-size: 13.5px; }
.ctx-item:hover:not(:disabled) { background: var(--accent); color: #fff; }
.ctx-item.danger { color: #ff6b6b; }
.ctx-item.danger:hover:not(:disabled) { background: #e0364a; color: #fff; }
.ctx-ico { width: 16px; display: grid; place-items: center; opacity: .85; }
.ctx-label { flex: 1; }
.ctx-hint { font-size: 12px; opacity: .5; }
.ctx-sep { height: 1px; background: var(--border); margin: 4px 6px; }

/* ---------- Diyaloglar ---------- */
.dialog-overlay { position: absolute; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(0,0,0,.35); animation: fade .15s; padding: 16px; }
.dialog-overlay.out { animation: fade .15s reverse forwards; }
@keyframes fade { from { opacity: 0; } }
.dialog {
  width: 400px; max-width: 100%; background: var(--bg-win); color: var(--text); border-radius: 16px; padding: 22px;
  box-shadow: var(--shadow), 0 0 0 1px var(--border); animation: pop .18s var(--ease);
}
.dialog-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.dialog-body { color: var(--text-dim); margin-bottom: 16px; }
.dialog-input { width: 100%; margin-bottom: 18px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.props { display: flex; gap: 16px; align-items: flex-start; color: var(--text); }
.props-icon { width: 56px; height: 56px; flex: none; }
.props dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 13px; min-width: 0; }
.props dt { color: var(--text-dim); }
.props dd { margin: 0; word-break: break-all; }

/* ---------- Pencereler ---------- */
#windows { position: absolute; inset: var(--topbar-h) 0 0 0; z-index: 10; pointer-events: none; }
.window {
  position: absolute; pointer-events: auto; border-radius: var(--r); box-shadow: var(--shadow), 0 0 0 1px rgba(0,0,0,.35);
  transition: opacity .18s, transform .2s var(--ease), box-shadow .2s;
}
.window:not(.active) { box-shadow: 0 10px 30px rgba(0,0,0,.28), 0 0 0 1px rgba(0,0,0,.3); }
.window.opening { opacity: 0; transform: scale(.94) translateY(8px); }
.window.closing { opacity: 0; transform: scale(.94); pointer-events: none; }
.window.minimized { opacity: 0; transform: scale(.08); pointer-events: none; visibility: hidden; transition: opacity .25s, transform .3s var(--ease), visibility 0s .3s; }
.window.animating { transition: left .22s var(--ease), top .22s var(--ease), width .22s var(--ease), height .22s var(--ease), opacity .18s, transform .2s; }
.window.maximized { border-radius: 0; }
.window.maximized .frame { border-radius: 0; }
.window.maximized .rh { display: none; }
.frame { position: absolute; inset: 0; display: flex; flex-direction: column; border-radius: inherit; overflow: hidden; background: var(--bg-win); border: 1px solid var(--border); }
.titlebar {
  height: 42px; flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 8px 0 12px;
  background: var(--titlebar); border-bottom: 1px solid var(--border); touch-action: none; cursor: default;
}
.window:not(.active) .titlebar { background: var(--titlebar-inactive); }
.window:not(.active) .tb-title, .window:not(.active) .tb-icon { opacity: .55; }
.tb-icon { width: 20px; height: 20px; }
.tb-title { font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; max-width: 60vw; }
.tb-actions { display: flex; gap: 8px; justify-self: end; }
.tb-btn { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-hover); color: var(--text-dim); transition: background .12s, color .12s; }
.tb-btn:hover { background: var(--bg-active); color: var(--text); }
.tb-btn.close:hover { background: #e0364a; color: #fff; }
.window-body { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.window-body > * { flex: 1; min-height: 0; }
.rh { position: absolute; z-index: 2; }
.rh.n { top: -4px; left: 10px; right: 10px; height: 8px; cursor: ns-resize; }
.rh.s { bottom: -4px; left: 10px; right: 10px; height: 8px; cursor: ns-resize; }
.rh.e { right: -4px; top: 10px; bottom: 10px; width: 8px; cursor: ew-resize; }
.rh.w { left: -4px; top: 10px; bottom: 10px; width: 8px; cursor: ew-resize; }
.rh.ne { top: -5px; right: -5px; width: 16px; height: 16px; cursor: nesw-resize; }
.rh.nw { top: -5px; left: -5px; width: 16px; height: 16px; cursor: nwse-resize; }
.rh.se { bottom: -5px; right: -5px; width: 16px; height: 16px; cursor: nwse-resize; }
.rh.sw { bottom: -5px; left: -5px; width: 16px; height: 16px; cursor: nesw-resize; }
body.wm-busy iframe { pointer-events: none; }
body.wm-busy { cursor: default; }
#snap-preview {
  position: absolute; border-radius: 14px; background: color-mix(in srgb, var(--accent) 22%, transparent);
  border: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); opacity: 0; transform: scale(.96); transition: all .18s var(--ease); pointer-events: none; z-index: 1;
}
#snap-preview.show { opacity: 1; transform: none; }

/* Uygulama iskeleti */
.toolbar { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--border); background: var(--bg-surface); flex: none; min-width: 0; }
.statusbar { display: flex; justify-content: space-between; gap: 10px; padding: 4px 12px; font-size: 12px; color: var(--text-dim); border-top: 1px solid var(--border); background: var(--bg-surface); flex: none; }
.sidebar { width: 190px; flex: none; padding: 8px; overflow: auto; background: var(--bg-surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 1px; }
.side-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--text-dim); text-align: left; font-size: 13.5px; }
.side-item:hover { background: var(--bg-hover); color: var(--text); }
.side-item.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 500; }
.side-sep { height: 1px; background: var(--border); margin: 6px 4px; }

/* ---------- Dosyalar ---------- */
.app-files { display: flex; flex-direction: column; }
.crumbs { flex: 1; display: flex; align-items: center; gap: 2px; min-width: 0; overflow-x: auto; margin: 0 6px; height: 32px; padding: 0 4px; background: var(--bg-hover); border-radius: 8px; scrollbar-width: none; }
.crumbs::-webkit-scrollbar { display: none; }
.crumb { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; white-space: nowrap; color: var(--text-dim); font-size: 13px; }
.crumb:hover { background: var(--bg-active); color: var(--text); }
.crumb.cur { color: var(--text); font-weight: 500; }
.crumb-sep { color: var(--text-faint); display: grid; }
.files-body { flex: 1; display: flex; min-height: 0; }
.files-pane { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.files-view { flex: 1; overflow: auto; outline: none; padding: 12px; align-content: start; }
.files-view.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 4px; }
.fitem { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border-radius: 10px; cursor: default; min-width: 0; }
.fitem:hover { background: var(--bg-hover); }
.fitem.selected { background: var(--accent-soft); }
.fi-ico { width: 54px; height: 54px; pointer-events: none; }
.fi-name { font-size: 13px; text-align: center; word-break: break-word; line-height: 1.25; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fitem.selected .fi-name { color: var(--accent-text); }
.files-view.list { padding: 0 0 8px; }
.fl-head, .fitem.row { display: grid; grid-template-columns: minmax(160px, 2.2fr) 90px 130px 150px; gap: 10px; align-items: center; padding: 5px 14px; }
.fl-head { position: sticky; top: 0; z-index: 1; font-size: 12px; color: var(--text-dim); background: var(--bg-win); border-bottom: 1px solid var(--border); padding: 7px 14px; }
.fitem.row { flex-direction: row; border-radius: 0; font-size: 13px; color: var(--text-dim); }
.fitem.row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fi-main { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.fitem.row .fi-ico { width: 24px; height: 24px; flex: none; }
.fitem.row .fi-name { text-align: left; -webkit-line-clamp: 1; font-size: 13px; }
.files-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.files-banner.trash { background: color-mix(in srgb, #e0364a 10%, transparent); }
.files-banner.trash span { display: flex; align-items: center; gap: 8px; }
.files-banner.project { background: linear-gradient(90deg, color-mix(in srgb, #9141ac 18%, transparent), transparent); padding: 14px 16px; align-items: center; flex-wrap: wrap; }
.pb-ico { width: 52px; height: 52px; flex: none; }
.pb-text { flex: 1; min-width: 200px; }
.pb-text h3 { margin: 0 0 2px; font-size: 16px; }
.pb-text p { margin: 0 0 8px; color: var(--text-dim); }
.pb-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Terminal ---------- */
.app-term {
  background: #14151b; color: #d8dae3; font: 13.5px/1.55 var(--mono); padding: 10px 14px 14px; overflow-y: auto; cursor: text;
  --t-accent: color-mix(in srgb, var(--accent) 65%, white);
}
.t-row { white-space: pre-wrap; word-break: break-word; min-height: 1.55em; }
.term-line { display: flex; align-items: baseline; }
.term-prompt { white-space: pre; flex: none; }
.term-input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: inherit; font: inherit; padding: 0; caret-color: var(--t-accent); }
.t-user { color: #5fd38d; font-weight: 600; }
.t-path { color: #6aa9ff; font-weight: 600; }
.t-err { color: #ff7a85; }
.t-dim { color: #7c7f8e; }
.t-b { font-weight: 600; }
.t-accent { color: var(--t-accent); }
.t-dir { color: #6aa9ff; font-weight: 600; cursor: pointer; }
.t-link { color: #5ce1e6; cursor: pointer; }
.t-exec { color: #5fd38d; font-weight: 600; }
.t-cmd { color: #f5c26b; cursor: pointer; text-decoration: underline dotted rgba(245,194,107,.5); text-underline-offset: 3px; }
.t-cmd:hover { color: #ffd88f; }
.t-tag { color: #c3a6ff; }
.t-ls { display: flex; flex-wrap: wrap; column-gap: 2.5ch; }
.t-neo { white-space: pre; overflow-x: auto; }
.app-term a { color: #6aa9ff; }
.app-term ::selection { background: color-mix(in srgb, var(--accent) 50%, transparent); }

/* ---------- Metin düzenleyici ---------- */
.app-editor { display: flex; flex-direction: column; }
.app-editor .toolbar { gap: 8px; }
.ed-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; padding-left: 4px; }
.ed-name b { font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-name small { color: var(--text-faint); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-body { flex: 1; min-height: 0; position: relative; display: flex; }
.ed-text { flex: 1; resize: none; border: 0; outline: 0; padding: 16px 20px; background: var(--bg-win); color: var(--text); font: 14px/1.65 var(--mono); tab-size: 2; }
.ed-preview { display: none; flex: 1; overflow: auto; padding: 24px 32px 40px; }
.app-editor.previewing .ed-text { display: none; }
.app-editor.previewing .ed-preview { display: block; }
.md { line-height: 1.65; max-width: 760px; }
.md h1 { font-size: 26px; margin: 0 0 14px; }
.md h2 { font-size: 19px; margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.md h3 { font-size: 16px; margin: 20px 0 8px; }
.md p { margin: 0 0 12px; }
.md ul, .md ol { padding-left: 22px; margin: 0 0 12px; }
.md li { margin: 3px 0; }
.md code { font-family: var(--mono); font-size: .88em; background: var(--bg-hover); padding: 2px 6px; border-radius: 5px; }
.md pre { background: #14151b; color: #d8dae3; padding: 14px 16px; border-radius: 10px; overflow: auto; margin: 0 0 14px; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: 0 0 12px; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; color: var(--text-dim); }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
.md img { max-width: 100%; border-radius: 8px; }

/* ---------- Tarayıcı ---------- */
.app-browser { display: flex; flex-direction: column; }
.urlbar { flex: 1; display: flex; align-items: center; gap: 8px; height: 32px; margin: 0 6px; padding: 0 12px; border-radius: 99px; background: var(--bg-hover); border: 1px solid transparent; min-width: 0; }
.urlbar:focus-within { border-color: var(--accent); background: var(--input); }
.urlbar input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 13.5px; }
.url-ico { color: var(--text-faint); display: grid; }
.br-view, .app-webapp { flex: 1; position: relative; background: #fff; min-height: 0; }
.br-view iframe, .app-webapp iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.app-webapp { background: #0f1015; }
.app-webapp iframe { background: #0f1015; }
.br-loading { position: absolute; inset: 0; display: grid; place-items: center; background: var(--bg-win); }
.br-home, .br-blocked { position: absolute; inset: 0; overflow: auto; background: var(--bg-win); color: var(--text); }
.br-home { padding: 40px min(60px, 6%); }
.brh-hero { text-align: center; margin-bottom: 30px; }
.brh-logo { width: 64px; height: 64px; margin: 0 auto 8px; }
.brh-hero h2 { margin: 0 0 16px; font-weight: 500; }
.brh-search { display: flex; align-items: center; gap: 10px; max-width: 480px; margin: 0 auto; height: 44px; padding: 0 16px; border-radius: 99px; background: var(--bg-surface); border: 1px solid var(--border); color: var(--text-faint); }
.brh-search:focus-within { border-color: var(--accent); }
.brh-search input { flex: 1; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 15px; }
.br-home h4 { font-size: 13px; color: var(--text-dim); font-weight: 500; margin: 20px 0 10px; }
.brh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.brh-card { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; padding: 12px; border-radius: 12px; background: var(--bg-surface); border: 1px solid var(--border); transition: transform .15s, border-color .15s; }
.brh-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.brh-ico { grid-row: span 2; width: 40px; height: 40px; }
.brh-card small { color: var(--text-dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-blocked { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 30px; color: var(--text-dim); }
.br-blocked h3 { color: var(--text); margin: 6px 0 0; }
.br-blocked p { max-width: 420px; margin: 0 0 8px; }
.br-blocked small { color: var(--text-faint); word-break: break-all; }

/* ---------- Hakkımda ---------- */
.app-about { overflow: auto; padding: 30px 32px; }
.ab-hero { display: flex; align-items: center; gap: 22px; margin-bottom: 18px; }
.ab-hero h1 { margin: 0; font-size: 28px; }
.ab-role { color: var(--accent-text); font-weight: 500; font-size: 16px; }
.ab-loc { display: flex; align-items: center; gap: 5px; color: var(--text-dim); font-size: 13px; margin-top: 4px; }
.ab-bio { color: var(--text-dim); font-size: 15px; line-height: 1.65; margin: 0 0 16px; }
.ab-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.app-about h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin: 26px 0 12px; font-weight: 500; }
.ab-skills { display: flex; flex-direction: column; gap: 12px; }
.ab-skill-group small { display: block; color: var(--text-dim); margin-bottom: 6px; font-size: 12.5px; }
.ab-projects { display: flex; flex-direction: column; gap: 8px; }
.ab-proj { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; background: var(--bg-surface); border: 1px solid var(--border); text-align: left; transition: border-color .15s, transform .15s; }
.ab-proj:hover { border-color: var(--accent); transform: translateX(3px); }
.ab-proj-ico { width: 42px; height: 42px; flex: none; }
.ab-proj-text { flex: 1; min-width: 0; }
.ab-proj-text b { display: block; font-weight: 500; }
.ab-proj-text small { color: var(--text-dim); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }

/* ---------- Ayarlar ---------- */
.app-settings { display: flex; }
.app-settings .sidebar { width: 200px; }
.set-main { flex: 1; overflow: auto; padding: 24px 28px 36px; min-width: 0; }
.set-main h2 { margin: 0 0 16px; font-size: 20px; }
.set-main h3 { margin: 24px 0 10px; font-size: 14px; font-weight: 500; color: var(--text-dim); }
.set-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px 16px; margin-bottom: 12px; }
.set-card:has(.theme-pick), .set-card:has(.accents) { padding: 16px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: 0; }
.set-row b { font-weight: 500; display: block; }
.set-row small { color: var(--text-dim); font-size: 12.5px; }
.set-ctl { flex: none; width: auto; display: flex; }
.set-ctl input[type=range] { width: 180px; }
.theme-pick { display: flex; gap: 14px; }
.theme-opt { display: flex; flex-direction: column; gap: 8px; align-items: center; font-size: 13px; }
.theme-prev { width: 130px; height: 80px; border-radius: 10px; border: 2px solid var(--border); position: relative; overflow: hidden; transition: border-color .15s; }
.theme-opt.dark .theme-prev { background: #1f2026; }
.theme-opt.light .theme-prev { background: #f0f0f3; }
.theme-prev i { position: absolute; left: 12px; right: 12px; height: 10px; border-radius: 4px; }
.theme-opt.dark .theme-prev i { background: #3a3b44; }
.theme-opt.light .theme-prev i { background: #d8d8de; }
.theme-prev i:first-child { top: 14px; background: var(--accent) !important; width: 50%; }
.theme-prev i:last-child { top: 34px; }
.theme-opt.on .theme-prev { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.accents { display: flex; flex-wrap: wrap; gap: 12px; }
.accent { width: 34px; height: 34px; border-radius: 50%; background: var(--c); display: grid; place-items: center; color: transparent; transition: transform .12s; }
.accent:hover { transform: scale(1.1); }
.accent.on { color: #fff; box-shadow: 0 0 0 3px var(--bg-win), 0 0 0 5px var(--c); }
.wallpapers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.wp { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-dim); }
.wp-img { aspect-ratio: 16/10; border-radius: 10px; border: 2px solid transparent; transition: border-color .15s, transform .15s; }
.wp:hover .wp-img { transform: translateY(-2px); }
.wp.on .wp-img { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.wp.on small { color: var(--text); }
.sys-logo { display: flex; align-items: center; gap: 16px; margin: 6px 0 18px; }
.sys-logo > svg { width: 64px; height: 64px; }
.sys-logo b { font-size: 22px; display: block; }
.sys-logo small { color: var(--text-dim); }

/* ---------- Hesap makinesi ---------- */
.app-calc { display: flex; flex-direction: column; padding: 12px; gap: 10px; outline: none; background: var(--bg-win); }
.calc-disp { text-align: right; padding: 12px 8px; min-height: 96px; display: flex; flex-direction: column; justify-content: flex-end; }
.calc-disp small { color: var(--text-dim); height: 20px; font-size: 14px; }
.calc-cur { font-size: 42px; font-weight: 300; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calc-keys { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ck { border-radius: 12px; background: var(--bg-elev); border: 1px solid var(--border); font-size: 20px; transition: background .1s, transform .08s; }
.ck:hover { background: var(--bg-active); }
.ck:active { transform: scale(.95); }
.ck.fn { background: var(--bg-hover); color: var(--text-dim); }
.ck.op { background: var(--accent-soft); color: var(--accent-text); font-size: 22px; }
.ck.op.on { background: var(--accent); color: #fff; }
.ck.eq { background: var(--accent); color: #fff; border-color: transparent; }
.ck.wide { grid-column: span 2; }

/* ---------- Sistem izleyici ---------- */
.app-sysmon { overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.sm-cards { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.sm-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; min-width: 0; }
.sm-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sm-val { margin-left: auto; font-family: var(--mono); font-size: 12.5px; color: var(--accent-text); }
.sm-card canvas { width: 100%; height: 90px; display: block; }
.sm-bar { height: 10px; border-radius: 99px; background: var(--bg-active); overflow: hidden; margin-bottom: 6px; }
.sm-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.sm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sm-table th { text-align: left; font-weight: 500; color: var(--text-dim); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.sm-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.sm-table td:last-child { text-align: right; }
.sm-proc { display: flex; align-items: center; gap: 8px; }
.sm-ico { width: 20px; height: 20px; flex: none; }
.sm-ico.sys { display: grid; place-items: center; border-radius: 5px; background: var(--bg-active); color: var(--text-dim); }

/* ---------- Yılan ---------- */
.app-snake { display: flex; flex-direction: column; background: #0d0e12; color: #eee; outline: none; }
.sn-bar { display: flex; justify-content: space-between; padding: 10px 16px; font-size: 13px; color: #aaa; }
.sn-bar b { color: #fff; }
.sn-stage { flex: 1; position: relative; display: grid; place-items: center; padding: 0 12px 12px; min-height: 0; }
.sn-stage canvas { max-width: 100%; max-height: 100%; aspect-ratio: 1; border-radius: 10px; }
.sn-msg { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 26px; border-radius: 14px; background: rgba(0,0,0,.7); backdrop-filter: blur(6px); text-align: center; }
.sn-msg b { font-size: 20px; }
.sn-msg small { color: #999; }

/* ---------- Açılış / giriş / kapanış ---------- */
#boot, #shutdown { position: fixed; inset: 0; z-index: 500; background: #000; color: #c8c8c8; font: 14px/1.5 var(--mono); overflow: hidden; }
.grub { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding-top: 12vh; color: #ccc; }
.grub-title { margin-bottom: 16px; }
.grub-box { border: 1px solid #aaa; width: min(640px, 92vw); min-height: 220px; padding: 4px 0; }
.grub-item { padding: 0 8px; }
.grub-item.on { background: #ccc; color: #000; }
.grub-hint { margin-top: 16px; width: min(640px, 92vw); font-size: 13px; color: #999; }
.bootlog { padding: 14px 18px; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.bootlog .k { color: #9a9a9a; }
.ok { color: #4ee06f; font-weight: 600; }
.boot-skip { position: absolute; bottom: 14px; right: 18px; font-size: 12px; color: #555; }

#login { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; overflow: hidden; transition: opacity .45s, transform .45s var(--ease); animation: fade .5s; }
#login.out { opacity: 0; transform: scale(1.04); pointer-events: none; }
#login .wallpaper { filter: blur(24px) brightness(.7); transform: scale(1.1); }
.login-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,.05), rgba(0,0,0,.45)); }
.login-clock { position: absolute; top: 9vh; text-align: center; }
.lc-time { font-size: clamp(64px, 11vw, 110px); font-weight: 300; letter-spacing: -.02em; line-height: 1; }
.lc-date { font-size: 18px; opacity: .85; margin-top: 8px; }
.login-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 16vh; }
.login-name { font-size: 24px; font-weight: 500; margin-top: 14px; }
.login-sub { opacity: .75; margin-bottom: 14px; }
.login-btn { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 26px; border-radius: 99px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(10px); font-weight: 500; font-size: 15px; transition: background .15s, transform .15s; }
.login-btn:hover { background: var(--accent); border-color: transparent; transform: translateY(-1px); }
.login-hint { opacity: .55; margin-top: 10px; font-size: 12.5px; }
.login-foot { position: absolute; bottom: 20px; font-size: 12px; opacity: .5; }

#shutdown { display: grid; place-items: center; }
.sd-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.sd-log { font-size: 13px; color: #888; }
.power-btn { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; color: #888; border: 2px solid #333; transition: color .2s, border-color .2s, box-shadow .2s; }
.power-btn:hover { color: #4ee06f; border-color: #4ee06f; box-shadow: 0 0 30px #4ee06f55; }
#shutdown small { color: #555; font-family: var(--font); }

/* ==========================================================================
   Sürpriz özellikler
   ========================================================================== */

/* Canlı duvar kağıdı, gece ışığı, sürükle-bırak */
.live-wall { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#nightlight { position: absolute; inset: 0; z-index: 199; pointer-events: none; background: #ff9a3c; mix-blend-mode: multiply; opacity: 0; transition: opacity .8s; }
#nightlight.on { opacity: .22; }
.drop-hint { position: absolute; inset: 40px 16px 90px; z-index: 65; border: 3px dashed var(--accent); border-radius: 22px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: #fff; font-size: 18px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .15s; backdrop-filter: blur(2px); }
#desktop-root.dropping .drop-hint { opacity: 1; }
.thumb { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; box-shadow: 0 0 0 1px rgba(255,255,255,.25), 0 3px 8px rgba(0,0,0,.3); background: #fff; display: block; }
.fitem.row .thumb { border-radius: 3px; }

/* Üst bar ekleri */
.ws-dots { display: inline-flex; gap: 4px; align-items: center; }
.ws-dots i { width: 6px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.35); transition: width .25s var(--ease), background .2s; }
.ws-dots i.used { background: rgba(255,255,255,.6); }
.ws-dots i.on { width: 18px; background: #fff; }
#now-playing { max-width: 190px; }
#now-playing span { overflow: hidden; text-overflow: ellipsis; }
#now-playing.playing .ui-ico { animation: bob .8s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-2px) rotate(-8deg); } }

/* Çalışma alanları ve Etkinlikler görünümü */
.window.ws-hidden { opacity: 0; transform: translateX(calc(var(--ws-dir, 1) * -60px)); pointer-events: none; visibility: hidden; transition: opacity .2s, transform .25s var(--ease), visibility 0s .25s; }
.window.on-top .titlebar::after { content: '📌'; position: absolute; left: 38px; font-size: 11px; }
.titlebar { position: relative; }
#overview { position: absolute; inset: calc(-1 * var(--topbar-h)) 0 0 0; z-index: 1; pointer-events: auto; background: rgba(4,5,10,.55); backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2); opacity: 0; transition: opacity .22s; }
#overview.show { opacity: 1; }
.ov-ws { position: absolute; top: calc(var(--topbar-h) + 16px); left: 0; right: 0; display: flex; justify-content: center; gap: 14px; }
.ov-ws-tile { width: 150px; height: 92px; border-radius: 12px; position: relative; overflow: hidden; border: 2px solid rgba(255,255,255,.15); transition: transform .15s, border-color .15s; }
.ov-ws-tile:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.4); }
.ov-ws-tile.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ov-ws-wall { position: absolute; inset: 0; }
.ov-ws-label { position: absolute; left: 8px; bottom: 6px; color: #fff; font-size: 12px; font-weight: 500; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.ov-empty { position: absolute; top: 50%; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.6); font-size: 15px; }
body.overview .window { transition: transform .3s var(--ease), opacity .2s, box-shadow .2s; }
body.overview .window .frame { pointer-events: none; }
body.overview .window .rh { display: none; }
body.overview .window:hover { box-shadow: 0 0 0 4px var(--accent), 0 20px 50px rgba(0,0,0,.5); cursor: pointer; }
body.overview #dock, body.overview #widgets { opacity: .25; pointer-events: none; transition: opacity .2s; }
.ov-caption { position: absolute; z-index: 200000; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 10px; border-radius: 99px; background: rgba(20,20,26,.85); color: #fff; font-size: 12.5px; max-width: 280px; pointer-events: auto; cursor: pointer; animation: fade .25s; }
.ov-caption > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-cap-ico { width: 18px; height: 18px; flex: none; }
.ov-close { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); flex: none; }
.ov-close:hover { background: #e0364a; }

/* Bileşenler */
#widgets { position: absolute; inset: var(--topbar-h) 0 0 0; z-index: 6; pointer-events: none; }
#widgets > * { pointer-events: auto; }
.widget { position: absolute; width: 180px; padding: 14px; border-radius: 20px; background: rgba(15,16,22,.45); border: 1px solid rgba(255,255,255,.1); color: #fff; backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 10px 30px rgba(0,0,0,.25); cursor: grab; touch-action: none; transition: transform .15s; }
.widget.dragging { cursor: grabbing; transform: scale(1.03); }
.w-clock svg { width: 120px; height: 120px; display: block; margin: 0 auto 8px; }
.w-clock .face { fill: rgba(255,255,255,.08); stroke: rgba(255,255,255,.2); }
.w-clock .ticks line { stroke: rgba(255,255,255,.7); stroke-width: 2; stroke-linecap: round; }
.w-clock .h { stroke: #fff; stroke-width: 4; stroke-linecap: round; }
.w-clock .m { stroke: #fff; stroke-width: 2.6; stroke-linecap: round; }
.w-clock .s { stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; }
.w-clock .pin { fill: var(--accent); }
.w-date { text-align: center; }
.w-date b { display: block; font-weight: 500; }
.w-date small { opacity: .7; }
.ww-main { display: flex; align-items: center; gap: 10px; }
.ww-emoji { font-size: 38px; line-height: 1; }
.ww-temp { font-size: 36px; font-weight: 300; }
.ww-desc { margin-top: 4px; font-weight: 500; }
.ww-city { opacity: .7; font-size: 12px; }
.sticky { position: absolute; width: 210px; min-height: 170px; display: flex; flex-direction: column; background: var(--c); color: #3b3526; border-radius: 4px 4px 16px 4px; box-shadow: 0 12px 28px rgba(0,0,0,.3); transform: rotate(-1.2deg); animation: pop .25s var(--ease); }
.sticky.dragging { transform: rotate(1deg) scale(1.03); box-shadow: 0 20px 40px rgba(0,0,0,.35); }
.sticky.out { opacity: 0; transform: scale(.8); transition: all .2s; }
.sticky-head { height: 26px; display: flex; align-items: center; justify-content: space-between; padding: 0 6px; background: rgba(0,0,0,.06); cursor: grab; touch-action: none; }
.sticky-colors { display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.sticky:hover .sticky-colors { opacity: 1; }
.sticky-colors button { width: 12px; height: 12px; border-radius: 50%; background: var(--c); border: 1px solid rgba(0,0,0,.2); }
.sticky-x { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 5px; color: #3b3526; opacity: .5; }
.sticky-x:hover { opacity: 1; background: rgba(0,0,0,.08); }
.sticky textarea { flex: 1; resize: none; border: 0; outline: 0; background: none; padding: 10px 12px 14px; font: 15px/1.45 'Ubuntu', sans-serif; color: inherit; min-height: 140px; }

/* Başarım bildirimi */
.ach-toast { position: fixed; z-index: 900; left: 50%; top: 48px; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 12px 22px 12px 14px; border-radius: 99px; background: linear-gradient(135deg, #1f1a08, #3a2c05); color: #fff; border: 1px solid #f5c24266; box-shadow: 0 0 0 4px #f5c24222, 0 18px 40px rgba(0,0,0,.45); cursor: pointer; animation: achIn .6s var(--ease); }
.ach-toast.out { animation: achOut .45s forwards; }
@keyframes achIn { from { opacity: 0; transform: translate(-50%, -30px) scale(.8); } }
@keyframes achOut { to { opacity: 0; transform: translate(-50%, -30px) scale(.9); } }
.ach-toast .ach-emoji { font-size: 30px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, #fde68a55, transparent 70%); animation: spinY 1s ease-out; }
@keyframes spinY { from { transform: rotateY(720deg) scale(.4); } }
.ach-toast small { display: block; color: #f5c242; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.ach-toast b { display: block; font-size: 15px; }
.ach-toast .ach-desc { font-size: 12.5px; opacity: .75; }
.app-ach { overflow: auto; padding: 22px; }
.ach-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.ach-trophy { width: 64px; height: 64px; flex: none; }
.ach-head h2 { margin: 0 0 6px; }
.ach-bar { height: 8px; border-radius: 99px; background: var(--bg-active); overflow: hidden; margin-bottom: 6px; }
.ach-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #fde047); transition: width .5s var(--ease); }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.ach-card { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--bg-surface); border: 1px solid var(--border); opacity: .55; }
.ach-card.on { opacity: 1; border-color: #f5c24255; background: linear-gradient(135deg, color-mix(in srgb, #f5c242 10%, var(--bg-surface)), var(--bg-surface)); }
.ach-card .ach-emoji { font-size: 24px; width: 38px; text-align: center; flex: none; }
.ach-card b { display: block; font-weight: 500; }
.ach-card small { color: var(--text-dim); font-size: 12px; }

/* Ekran koruyucu, çekirdek paniği, BIOS, Konami */
#screensaver { position: fixed; inset: 0; z-index: 800; background: #000; cursor: none; animation: fade 1s; }
#screensaver.out { opacity: 0; transition: opacity .4s; }
#screensaver canvas { display: block; width: 100%; height: 100%; }
.ss-hint { position: absolute; bottom: 24px; width: 100%; text-align: center; color: rgba(255,255,255,.35); font: 12px var(--mono); animation: fade 3s; }
#panic { position: fixed; inset: 0; z-index: 950; background: #000; color: #e5e5e5; font: 13px/1.6 var(--mono); padding: 20px; overflow: hidden; cursor: default; }
#panic pre { margin: 0; white-space: pre-wrap; word-break: break-all; }
.panic-foot { position: absolute; bottom: 20px; left: 20px; color: #777; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.bios { padding: 22px 26px; color: #c8c8c8; font-size: 14px; line-height: 1.7; }
.bios-logo { font: 700 30px var(--font); color: #fff; margin-bottom: 14px; letter-spacing: -.02em; }
.bios-logo b { color: #4ee06f; }
.bios-hint { color: #777; }
#desktop-root.barrel-roll { animation: barrel 1.4s var(--ease); }
@keyframes barrel { to { transform: rotate(360deg); } }
.confetti { position: fixed; top: -12px; z-index: 990; width: 9px; height: 14px; border-radius: 2px; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { top: 105vh; transform: rotate(900deg) translateX(60px); } }

/* Çizim */
.app-paint { display: flex; flex-direction: column; outline: none; }
.pt-bar { flex-wrap: wrap; gap: 6px; }
.pt-tools { display: flex; gap: 2px; }
.pt-tools .icon-btn.on { background: var(--accent-soft); color: var(--accent-text); }
.pt-sep { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }
.pt-colors { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.pt-swatch { width: 20px; height: 20px; border-radius: 50%; background: var(--c); border: 1px solid rgba(128,128,128,.4); transition: transform .1s; }
.pt-swatch:hover { transform: scale(1.15); }
.pt-swatch.on { box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px var(--accent); }
.pt-custom { width: 22px; height: 22px; border-radius: 50%; overflow: hidden; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); position: relative; cursor: pointer; }
.pt-custom input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.pt-size { display: flex; align-items: center; gap: 8px; }
.pt-size input { width: 90px; }
.pt-dot { border-radius: 50%; display: inline-block; border: 1px solid rgba(128,128,128,.4); }
.pt-fill { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-dim); }
.spacer { flex: 1; }
.pt-stage { flex: 1; min-height: 0; display: grid; place-items: center; background: repeating-conic-gradient(var(--bg-surface) 0 25%, var(--bg-win) 0 50%) 0 0/20px 20px; overflow: hidden; }
.pt-canvas-wrap { position: relative; box-shadow: 0 8px 30px rgba(0,0,0,.3); touch-action: none; }
.pt-canvas-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pt-over { pointer-events: none; }

/* Görüntüleyici */
.app-viewer { display: flex; flex-direction: column; background: #111216; color: #eee; outline: none; }
.vw-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; display: grid; place-items: center; }
.vw-stage img { max-width: none; transform-origin: center; transition: transform .12s; user-select: none; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.vw-stage.pannable { cursor: grab; }
.vw-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; opacity: 0; transition: opacity .15s; }
.vw-stage:hover .vw-nav { opacity: 1; }
.vw-nav.prev { left: 12px; } .vw-nav.next { right: 12px; }
.vw-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; background: #1b1c22; flex-wrap: wrap; }
.vw-name { font-size: 13px; color: #aaa; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vw-tools { display: flex; align-items: center; gap: 2px; }
.vw-tools .icon-btn { color: #bbb; }
.vw-tools .icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.vw-zoom { font: 12px var(--mono); width: 48px; text-align: center; color: #aaa; }
.app-viewer .empty-note { color: #777; }

/* Kamera */
.app-camera { display: flex; flex-direction: column; background: #0c0d10; color: #eee; outline: none; }
.cam-stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; overflow: hidden; }
.cam-stage canvas { max-width: 100%; max-height: 100%; display: block; }
.cam-msg { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 20px; color: #aaa; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam-flash.go { animation: flash .5s ease-out; }
@keyframes flash { from { opacity: .95; } }
.cam-count { position: absolute; font-size: 120px; font-weight: 700; color: #fff; text-shadow: 0 4px 30px rgba(0,0,0,.6); pointer-events: none; }
.cam-count.pop { animation: pop .9s ease-out; }
.cam-filters { display: flex; gap: 6px; padding: 10px; overflow-x: auto; justify-content: center; flex-wrap: wrap; }
.cam-filter { padding: 5px 12px; border-radius: 99px; background: rgba(255,255,255,.08); font-size: 12.5px; }
.cam-filter.on { background: var(--accent); color: #fff; }
.cam-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 8px 14px 14px; gap: 10px; }
.cam-gallery { display: flex; gap: 6px; overflow-x: auto; min-width: 0; }
.cam-thumb { width: 48px; height: 36px; border-radius: 6px; overflow: hidden; flex: none; border: 1px solid rgba(255,255,255,.2); animation: pop .3s; }
.cam-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cam-shutter { width: 62px; height: 62px; border-radius: 50%; border: 4px solid #fff; display: grid; place-items: center; }
.cam-shutter i { width: 48px; height: 48px; border-radius: 50%; background: #fff; transition: transform .1s, background .1s; }
.cam-shutter:hover i { background: #ff4d5e; }
.cam-shutter:active i { transform: scale(.85); }
.cam-timer { justify-self: end; font-size: 13px; color: #aaa; display: flex; gap: 6px; align-items: center; }

/* Müzik */
.app-music { overflow: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--mu, #888) 22%, var(--bg-win)), var(--bg-win) 55%); transition: background .6s; }
.mu-now { display: flex; align-items: center; gap: 18px; }
.mu-disc { width: 108px; height: 108px; border-radius: 50%; flex: none; background: repeating-radial-gradient(circle, #111 0 2px, #1c1c1c 2px 4px); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.mu-disc.spin { animation: spin 3s linear infinite; }
.mu-label { width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle, #111 0 3px, var(--mu) 4px); }
.mu-info small { font-size: 11px; letter-spacing: .08em; color: var(--text-dim); }
.mu-info h2 { margin: 2px 0; font-size: 22px; }
.mu-viz { width: 100%; height: 90px; display: block; }
.mu-progress { display: flex; align-items: center; gap: 10px; font: 12px var(--mono); color: var(--text-dim); }
.mu-track { flex: 1; height: 6px; border-radius: 99px; background: var(--bg-active); cursor: pointer; overflow: hidden; }
.mu-track i { display: block; height: 100%; background: var(--mu); border-radius: 99px; }
.mu-controls { display: flex; justify-content: center; align-items: center; gap: 18px; }
.mu-play { width: 58px; height: 58px; border-radius: 50%; background: var(--mu); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px color-mix(in srgb, var(--mu) 50%, transparent); transition: transform .1s; }
.mu-play:active { transform: scale(.93); }
.mu-list { display: flex; flex-direction: column; gap: 2px; }
.mu-item { display: grid; grid-template-columns: 10px 1fr auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; padding: 8px 12px; border-radius: 10px; }
.mu-item:hover { background: var(--bg-hover); }
.mu-item.on { background: var(--bg-active); }
.mu-dot { width: 10px; height: 10px; border-radius: 50%; grid-row: span 2; }
.mu-item b { font-weight: 500; }
.mu-item small { color: var(--text-dim); font-size: 12px; }
.mu-item small:last-child { grid-row: 1 / span 2; grid-column: 3; font-family: var(--mono); }
.mu-note { text-align: center; font-size: 12px; }

/* Hava durumu */
.app-weather { position: relative; overflow: hidden; color: #fff; background: linear-gradient(180deg, #3b82f6, #1e3a8a); display: flex; flex-direction: column; }
.app-weather[data-day="0"] { background: linear-gradient(180deg, #0f172a, #312e81); }
.app-weather[data-kind="rain"], .app-weather[data-kind="storm"] { background: linear-gradient(180deg, #475569, #1e293b); }
.app-weather[data-kind="cloud"][data-day="1"] { background: linear-gradient(180deg, #64748b, #334155); }
.app-weather[data-kind="snow"] { background: linear-gradient(180deg, #94a3b8, #475569); }
.app-weather[data-kind="clear"][data-day="1"] { background: linear-gradient(180deg, #38bdf8, #2563eb); }
.wx-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.wx-fx .drop { position: absolute; top: -20px; width: 1.5px; height: 18px; background: linear-gradient(transparent, rgba(255,255,255,.6)); animation: rain linear infinite; }
.wx-fx .flake { position: absolute; top: -10px; width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.85); animation: snow linear infinite; }
@keyframes rain { to { transform: translateY(110vh) translateX(-30px); } }
@keyframes snow { to { transform: translateY(110vh) translateX(40px); } }
.wx-top { position: relative; display: flex; gap: 4px; padding: 10px; }
.wx-top .icon-btn { color: rgba(255,255,255,.8); }
.wx-top .icon-btn:hover { background: rgba(255,255,255,.15); color: #fff; }
.wx-search { flex: 1; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 99px; background: rgba(255,255,255,.15); color: rgba(255,255,255,.7); }
.wx-search input { flex: 1; border: 0; outline: 0; background: none; color: #fff; font: inherit; min-width: 0; }
.wx-search input::placeholder { color: rgba(255,255,255,.6); }
.wx-content { position: relative; flex: 1; overflow: auto; padding: 0 16px 16px; }
.wx-loading { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; font-size: 14px; }
.wx-loading > span { font-size: 40px; }
.wx-now { text-align: center; padding: 8px 0 18px; }
.wx-city { font-size: 20px; font-weight: 500; }
.wx-emoji { font-size: 64px; line-height: 1.2; filter: drop-shadow(0 6px 16px rgba(0,0,0,.25)); }
.wx-temp { font-size: 72px; font-weight: 300; line-height: 1; }
.wx-desc { font-size: 17px; margin-top: 4px; }
.wx-meta { display: flex; justify-content: center; gap: 14px; margin-top: 8px; font-size: 13px; opacity: .85; flex-wrap: wrap; }
.wx-card { background: rgba(255,255,255,.12); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; backdrop-filter: blur(10px); }
.wx-card > small { display: block; font-size: 11px; letter-spacing: .08em; opacity: .7; margin-bottom: 8px; }
.wx-hours { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 4px; }
.wx-hours > div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; flex: none; }
.wx-hours b { font-size: 22px; font-weight: 400; }
.wx-day { display: grid; grid-template-columns: 90px 30px 36px 1fr 36px; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; }
.wx-day .muted { color: rgba(255,255,255,.6); text-align: right; }
.wx-range { height: 5px; border-radius: 99px; background: rgba(255,255,255,.15); position: relative; }
.wx-range i { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, #7dd3fc, #fcd34d, #fb923c); }
.wx-credit { font-size: 11px; opacity: .6; text-align: center; margin-top: 4px; }

/* Mayın tarlası */
.app-mines { display: flex; flex-direction: column; background: var(--bg-surface); }
.mn-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; flex-wrap: wrap; }
.mn-lcd { font: 700 22px var(--mono); color: #ff3b3b; background: #120606; padding: 2px 8px; border-radius: 6px; letter-spacing: .08em; text-shadow: 0 0 8px #ff3b3b88; }
.mn-face { font-size: 26px; width: 42px; height: 42px; border-radius: 10px; background: var(--bg-elev); border: 1px solid var(--border); }
.mn-face:active { transform: scale(.94); }
.mn-wrap { flex: 1; min-height: 0; container-type: size; display: grid; place-items: center; padding: 0 12px 12px; }
.mn-board { display: grid; gap: 2px; width: min(100cqw, 100cqh); aspect-ratio: 1; }
.mn-cell { aspect-ratio: 1; border-radius: 4px; background: var(--bg-active); font-weight: 700; font-size: min(18px, calc(100cqh / var(--cols) * .55)); display: grid; place-items: center; transition: background .08s; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); line-height: 1; padding: 0; }
.mn-cell:hover:not(.open) { background: color-mix(in srgb, var(--accent) 30%, var(--bg-active)); }
.mn-cell.open { background: var(--bg-win); box-shadow: none; }
.mn-cell.boom { background: #e0364a; }
.mn-cell[data-n="1"] { color: #3b82f6; } .mn-cell[data-n="2"] { color: #22c55e; } .mn-cell[data-n="3"] { color: #ef4444; } .mn-cell[data-n="4"] { color: #8b5cf6; }
.mn-cell[data-n="5"] { color: #f97316; } .mn-cell[data-n="6"] { color: #06b6d4; } .mn-cell[data-n="7"] { color: #ec4899; } .mn-cell[data-n="8"] { color: #9ca3af; }

/* Ayarlar ekleri */
.wp-img { position: relative; overflow: hidden; }
.wp-live { position: absolute; top: 6px; left: 6px; font-size: 10px; font-weight: 700; color: #fff; background: #e0364a; padding: 1px 6px; border-radius: 99px; letter-spacing: .04em; }
.wp-upload { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--bg-surface) !important; border: 2px dashed var(--border) !important; color: var(--text-dim); font-size: 12px; }
select.input { padding-right: 28px; }

/* KOOM */
.app-fps { position: relative; background: #000; display: grid; place-items: center; outline: none; overflow: hidden; }
.app-fps canvas { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; image-rendering: crisp-edges; cursor: crosshair; touch-action: none; }
.fps-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at center, rgba(60,0,0,.55), rgba(0,0,0,.88)); color: #f5e6c8; font-family: var(--mono); padding: 16px; }
.fps-box { text-align: center; max-width: 440px; }
.fps-box h1 { font: 900 clamp(34px, 8vw, 64px)/1 var(--font); letter-spacing: .08em; margin: 0 0 12px; color: #ffb000; text-shadow: 0 0 0 #000, 3px 3px 0 #8a1c00, 0 0 30px rgba(255,90,0,.5); }
.fps-box p { color: #d8c7a6; margin: 0 0 16px; font-size: 13px; }
.fps-red { color: #ff3b3b; }
.fps-keys { display: grid; grid-template-columns: repeat(2, auto); gap: 4px 18px; justify-content: center; font-size: 12px; margin-bottom: 18px; color: #bba98a; }
.fps-keys b { color: #ffda6b; font-weight: 600; }
.fps-btn { padding: 10px 26px; border-radius: 4px; background: #b3261e; color: #fff; font: 700 14px var(--mono); letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 4px 0 #5c0f0b; transition: transform .08s; }
.fps-btn:hover { background: #d33a2f; }
.fps-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #5c0f0b; }

/* Ortak oyun mesajı */
.game-msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 26px; border-radius: 14px; background: rgba(0,0,0,.75); color: #eee; text-align: center; backdrop-filter: blur(6px); pointer-events: none; min-width: 200px; }
.game-msg b { font-size: 20px; }
.game-msg small { color: #999; }

/* Blok Düşür */
.app-tetris { position: relative; display: flex; gap: 14px; padding: 14px; background: #07080c; color: #eee; outline: none; justify-content: center; overflow: hidden; }
.tt-board { width: auto; height: auto; max-height: 100%; max-width: calc(100% - 134px); align-self: center; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255,255,255,.08); min-height: 0; }
.tt-side { display: flex; flex-direction: column; gap: 8px; width: 120px; flex: none; }
.tt-card { background: rgba(255,255,255,.06); border-radius: 10px; padding: 8px 10px; }
.tt-card small { display: block; font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: .05em; }
.tt-card b { font: 700 20px var(--mono); }
.tt-next { display: block; margin: 4px auto 0; }
.tt-help { font-size: 11.5px; color: #888; line-height: 1.7; margin-top: auto; }

/* 2048 */
.app-2048 { display: flex; flex-direction: column; gap: 12px; padding: 18px; background: #faf8ef; color: #776e65; outline: none; overflow: auto; }
:root[data-theme="dark"] .app-2048 { background: #1c1a17; color: #d6cfc4; }
.g2-head { display: flex; justify-content: space-between; align-items: center; }
.g2-title { font: 800 46px var(--font); color: #776e65; }
:root[data-theme="dark"] .g2-title { color: #eee4da; }
.g2-scores { display: flex; gap: 6px; }
.g2-scores div { background: #bbada0; color: #fff; border-radius: 6px; padding: 4px 14px; text-align: center; min-width: 64px; }
.g2-scores small { display: block; font-size: 10px; text-transform: uppercase; color: #eee4da; }
.g2-scores b { font-size: 18px; }
.g2-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.g2-board { position: relative; background: #bbada0; border-radius: 10px; padding: 10px; aspect-ratio: 1; width: 100%; max-width: 440px; margin: 0 auto; --gap: 10px; }
.g2-grid, .g2-tiles { position: absolute; inset: 10px; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); gap: var(--gap); }
.g2-grid i { background: rgba(238,228,218,.35); border-radius: 6px; }
.g2-tiles { display: block; }
.g2-tile { position: absolute; width: calc((100% - 3 * var(--gap)) / 4); height: calc((100% - 3 * var(--gap)) / 4); left: calc(var(--x) * (100% + var(--gap)) / 4); top: calc(var(--y) * (100% + var(--gap)) / 4); display: grid; place-items: center; border-radius: 6px; font: 800 clamp(18px, 6vw, 34px) var(--font); background: #eee4da; color: #776e65; transition: left .1s, top .1s; }
.g2-tile.new { animation: g2new .2s; }
.g2-tile.merged { animation: g2pop .2s; }
@keyframes g2new { from { transform: scale(0); } }
@keyframes g2pop { 50% { transform: scale(1.15); } }
.g2-tile.v4 { background: #ede0c8; } .g2-tile.v8 { background: #f2b179; color: #f9f6f2; } .g2-tile.v16 { background: #f59563; color: #f9f6f2; }
.g2-tile.v32 { background: #f67c5f; color: #f9f6f2; } .g2-tile.v64 { background: #f65e3b; color: #f9f6f2; } .g2-tile.v128 { background: #edcf72; color: #f9f6f2; font-size: clamp(16px, 5vw, 28px); }
.g2-tile.v256 { background: #edcc61; color: #f9f6f2; font-size: clamp(16px, 5vw, 28px); } .g2-tile.v512 { background: #edc850; color: #f9f6f2; font-size: clamp(16px, 5vw, 28px); }
.g2-tile.v1024 { background: #edc53f; color: #f9f6f2; font-size: clamp(14px, 4vw, 22px); } .g2-tile.v2048, .g2-tile.v4096 { background: #edc22e; color: #f9f6f2; font-size: clamp(14px, 4vw, 22px); box-shadow: 0 0 24px #edc22e; }
.g2-msg { position: absolute; inset: 0; border-radius: 10px; background: rgba(238,228,218,.8); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #776e65; font-size: 26px; z-index: 2; animation: fade .3s; }
.g2-msg div { display: flex; gap: 8px; }

/* Tuğla Kırıcı */
.app-breakout { display: flex; flex-direction: column; background: #0b0d12; color: #eee; outline: none; }
.bo-bar { display: flex; justify-content: space-around; padding: 8px; font-size: 13px; color: #aaa; }
.bo-bar b { color: #fff; }
.bo-stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; padding: 0 10px 10px; }
.bo-stage canvas { max-width: 100%; max-height: 100%; aspect-ratio: 4 / 3; border-radius: 8px; cursor: none; touch-action: none; }

/* Satranç */
.app-chess { display: flex; flex-direction: column; background: var(--bg-win); }
.ch-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); background: var(--bg-surface); }
.ch-status { flex: 1; font-weight: 500; font-size: 13.5px; }
.ch-level { width: auto; height: 30px; }
.ch-wrap { flex: 1; min-height: 0; container-type: size; display: grid; place-items: center; padding: 12px; }
.ch-board { display: grid; grid-template-columns: repeat(8, 1fr); width: min(100cqw, 100cqh); aspect-ratio: 1; border-radius: 6px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.ch-sq { position: relative; display: grid; place-items: center; aspect-ratio: 1; padding: 0; font-size: min(7cqw, 7cqh); line-height: 1; }
.ch-sq.light { background: #eeeed2; } .ch-sq.dark { background: #769656; }
.ch-sq.last.light { background: #f6f669; } .ch-sq.last.dark { background: #baca2b; }
.ch-sq.sel { box-shadow: inset 0 0 0 4px rgba(255,255,255,.7); }
.ch-sq.check { background: radial-gradient(circle, #ff3b3b 0, #e11 40%, transparent 75%), #769656 !important; }
.ch-sq.dot::after { content: ''; width: 28%; height: 28%; border-radius: 50%; background: rgba(0,0,0,.2); }
.ch-sq.cap::after { content: ''; position: absolute; inset: 4%; border-radius: 50%; border: 5px solid rgba(0,0,0,.22); }
.ch-sq[data-rank]::before { content: attr(data-rank); position: absolute; top: 2px; left: 3px; font: 600 10px var(--font); color: rgba(0,0,0,.45); }
.ch-sq[data-file]::before { content: attr(data-file); position: absolute; bottom: 1px; right: 3px; font: 600 10px var(--font); color: rgba(0,0,0,.45); }
.ch-sq[data-rank][data-file]::before { content: attr(data-rank); }
.ch-pc { user-select: none; }
.ch-pc.w { color: #fff; text-shadow: 0 0 1px #000, 0 0 1px #000, 0 1px 2px rgba(0,0,0,.6); }
.ch-pc.b { color: #1a1a1a; text-shadow: 0 1px 1px rgba(255,255,255,.25); }
.ch-captured { display: flex; justify-content: space-between; padding: 0 14px 10px; font-size: 18px; min-height: 30px; letter-spacing: -2px; }
.ch-captured .ch-pc.w { color: #ddd; }
.ch-captured .ch-pc.b { color: var(--text-dim); text-shadow: none; }

/* Dil seçimi */
.set-note { margin: -6px 0 16px; font-size: 13px; }
.lang-list { display: flex; flex-direction: column; gap: 8px; max-width: 460px; }
.lang-opt { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px; background: var(--bg-surface); border: 1px solid var(--border); text-align: left; transition: border-color .15s; }
.lang-opt:hover { border-color: var(--accent); }
.lang-opt.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.lang-opt > span:nth-child(2) { flex: 1; }
.lang-opt b { display: block; font-weight: 500; color: var(--text); }
.lang-opt small { color: var(--text-dim); }
.lang-flag { font-size: 26px; }
.login-langs { display: flex; gap: 4px; margin-top: 18px; padding: 4px; border-radius: 99px; background: rgba(0,0,0,.25); }
.login-langs button { padding: 5px 12px; border-radius: 99px; font-size: 12.5px; color: rgba(255,255,255,.75); }
.login-langs button:hover { color: #fff; }
.login-langs button.on { background: rgba(255,255,255,.2); color: #fff; }
:root:lang(zh-CN) { --font: 'Ubuntu', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif; }

/* ---------- Mobil ---------- */
@media (max-width: 700px) {
  :root { --dock-h: 72px; }
  #btn-activities span, .top-label, .bat-pct { display: none; }
  #dock { gap: 2px; padding: 5px 6px; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .dock-item { width: 48px; height: 48px; }
  .dock-icon { width: 40px; height: 40px; }
  .tip { display: none; }
  .window, .window .frame { border-radius: 0 !important; }
  .rh { display: none; }
  .tb-actions [data-act="max"] { display: none; }
  .sidebar { display: none; }
  .app-settings { flex-direction: column; }
  .app-settings .sidebar { display: flex; flex-direction: row; width: auto; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .app-settings .side-item { white-space: nowrap; }
  .search-box { width: 110px; }
  .cal-pop { flex-direction: column-reverse; width: 330px; }
  .cal-notifs { border-right: 0; border-top: 1px solid var(--glass-border); }
  .cal-side { width: auto; }
  .fl-head, .fitem.row { grid-template-columns: 1fr 80px; }
  .fl-head span:nth-child(n+3), .fitem.row > span:nth-child(n+3) { display: none; }
  .sm-cards { grid-template-columns: 1fr; }
  #widgets .widget { display: none; }
  .sticky { width: 170px; }
  #now-playing span { display: none; }
  .ov-ws-tile { width: 70px; height: 50px; }
  .app-tetris { gap: 8px; padding: 8px; }
  .tt-side { width: 92px; }
  .tt-board { max-width: calc(100% - 100px); }
  .tt-help { display: none; }
  .tt-card b { font-size: 16px; }
  .app-about { padding: 22px 18px; }
  .ab-hero { gap: 14px; }
  .avatar.lg { width: 72px; height: 72px; font-size: 26px; }
  .set-main { padding: 18px 16px; }
  .set-ctl input[type=range] { width: 120px; }
}
