/* scienceWiki — kabuk: preloader, launchpad, palet, laboratuvar penceresi */
body { min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3, .brand-title { font-family: var(--display); }

/* ---------- Preloader (GPU parçacık dönüşümü + parıltı efektleri) ---------- */
#swPreloader {
  position: fixed; inset: 0; z-index: 9999; background: #06080d; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 7vh;
  transition: opacity 0.75s ease, visibility 0.75s ease, transform 0.75s ease;
}
#swPreloader.preloader-hide { opacity: 0; visibility: hidden; pointer-events: none; transform: scale(1.04); }
#plCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#swPreloader::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 38%, transparent 45%, rgba(3, 4, 8, 0.75) 100%);
}
.pl-overlay { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; padding: 0 16px; }
.pl-brand { display: flex; align-items: center; gap: 12px; }
.pl-mark {
  position: relative; overflow: hidden; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  font-weight: 900; color: #fff; font-size: 18px;
  background: conic-gradient(from 200deg, #10b981, #00f2fe, #a855f7, #f59e0b, #f97316, #10b981);
  box-shadow: 0 0 32px rgba(0, 242, 254, 0.5), 0 0 64px rgba(168, 85, 247, 0.25);
  animation: plMarkSpin 6s linear infinite;
}
.pl-mark::after {
  content: ''; position: absolute; top: -60%; left: -120%; width: 60%; height: 220%; transform: rotate(25deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  animation: plSweep 2.4s ease-in-out infinite;
}
.pl-title { font-family: var(--display); font-size: clamp(30px, 4vw, 40px); font-weight: 700; letter-spacing: -0.01em; color: #fff; }
.pl-shine {
  background: linear-gradient(105deg, #ffffff 30%, #7dd3fc 42%, #ffffff 50%, #f0abfc 58%, #ffffff 70%);
  background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: plTextShine 2.8s linear infinite; filter: drop-shadow(0 0 14px rgba(125, 211, 252, 0.35));
}
.pl-sub { color: #cbd5e1; font-size: 13.5px; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9); }
.pl-progress-shell { position: relative; width: min(460px, 86vw); height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: 4px; box-shadow: 0 0 18px rgba(0, 242, 254, 0.15); }
.pl-progress-bar { position: relative; height: 100%; width: 0%; border-radius: 99px; background: linear-gradient(90deg, #10b981, #00f2fe, #a855f7, #f59e0b, #f97316); box-shadow: 0 0 16px rgba(0, 242, 254, 0.7); transition: width 0.12s linear; overflow: hidden; }
.pl-progress-bar::after { content: ''; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent); animation: plBarSheen 1.3s linear infinite; }
.pl-status-row { width: min(460px, 86vw); display: flex; justify-content: space-between; gap: 10px; font-family: var(--mono); font-size: 11.5px; color: #7dd3fc; }
.pl-stage-label {
  position: absolute; z-index: 2; top: 6vh; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; pointer-events: none;
}
.pl-stage-label span { font-family: var(--display); font-size: clamp(18px, 2.2vw, 26px); font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: #e0f2fe; text-shadow: 0 0 18px rgba(125, 211, 252, 0.7); }
.pl-stage-label small { font-family: var(--mono); font-size: 12px; color: #94a3b8; letter-spacing: 0.08em; }
.pl-stage-label.pop span { animation: plPop 0.9s cubic-bezier(.2, .8, .2, 1); }
.pl-stage-label.pop small { animation: plFadeUp 0.9s ease; }
.pl-skip {
  position: absolute; z-index: 3; top: 18px; right: 18px; padding: 7px 13px; border-radius: 99px; cursor: pointer;
  font: 600 12px var(--font); color: #e2e8f0; background: rgba(15, 20, 32, 0.6); border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px); transition: background 0.2s ease, border-color 0.2s ease;
}
.pl-skip:hover { background: rgba(56, 189, 248, 0.2); border-color: rgba(125, 211, 252, 0.6); }
@keyframes plTextShine { from { background-position: 130% 0; } to { background-position: -130% 0; } }
@keyframes plSweep { 0% { left: -120%; } 55%, 100% { left: 160%; } }
@keyframes plBarSheen { from { transform: translateX(-120%); } to { transform: translateX(320%); } }
@keyframes plMarkSpin { to { filter: hue-rotate(360deg); } }
@keyframes plPop { 0% { opacity: 0; letter-spacing: 0.6em; filter: blur(8px); } 60% { opacity: 1; } 100% { letter-spacing: 0.22em; filter: blur(0); } }
@keyframes plFadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pl-shine, .pl-mark, .pl-mark::after, .pl-progress-bar::after { animation: none; } }

/* ---------- Görünümler ---------- */
/* İçerik uzadıkça bölüm de uzar (flex: 1 0 auto) — alt bilgi hiçbir zaman içeriğin üstüne binmez. */
.sw-view { display: flex; flex-direction: column; gap: 14px; padding: 14px 18px 8px; flex: 1 0 auto; min-height: auto; }
.sw-view[hidden] { display: none !important; }
.sw-view-root { display: flex; flex-direction: column; gap: 12px; flex: 1 0 auto; min-height: auto; }
.sw-search-btn kbd, .palette-head kbd {
  font-family: var(--mono); font-size: 10px; padding: 2px 6px; border-radius: 5px; margin-left: 6px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.06); color: var(--muted);
}

/* ---------- Launchpad (demo portalı) ---------- */
.launchpad { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.lp-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, transparent), rgba(15, 20, 32, 0.78) 55%);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); backdrop-filter: blur(16px);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.lp-card:hover { transform: translateY(-3px); box-shadow: 0 12px 36px -14px var(--c); }
.lp-top { display: flex; align-items: center; gap: 10px; }
.lp-icon { font-size: 26px; filter: drop-shadow(0 0 10px var(--c)); }
.lp-top h3 { font-size: 16px; color: var(--c); line-height: 1.1; }
.lp-top small { font-size: 11px; color: var(--muted); }
.lp-badge { margin-left: auto; font-family: var(--mono); font-size: 9.5px; padding: 2px 6px; border-radius: 99px; border: 1px solid var(--c); color: var(--c); }
.lp-card p { font-size: 11.8px; line-height: 1.5; color: var(--muted); flex: 1; }
.lp-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.lp-btn {
  padding: 6px 10px; border-radius: 8px; font-size: 11.5px; font-weight: 700; cursor: pointer; text-decoration: none;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.05); color: var(--text); white-space: nowrap;
}
.lp-btn:hover { border-color: var(--c, var(--cyan)); }
.lp-btn.primary { background: var(--c, var(--cyan)); color: #04111a; border-color: transparent; }

/* ---------- Footer ---------- */
.sw-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 18px 14px; font-size: 11.5px; color: var(--muted); }
.sw-footer a { color: var(--cyan); text-decoration: none; }

/* ---------- Laboratuvar önizleme penceresi ---------- */
.lab-modal-bg { position: fixed; inset: 0; z-index: 950; background: rgba(2, 4, 8, 0.72); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 18px; }
.lab-modal-win { width: min(1500px, 100%); height: min(920px, 100%); display: flex; flex-direction: column; border-radius: 16px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--lab-color, #38bdf8) 55%, transparent); background: #06080d; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); }
.lab-modal-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: rgba(15, 20, 32, 0.9); flex-wrap: wrap; }
.lab-modal-head b { font-family: var(--display); color: var(--lab-color, var(--cyan)); }
.lab-modal-head .bio-select { width: auto; min-width: 220px; margin-left: auto; }
.lab-modal-head .lp-btn.primary { --c: var(--lab-color); }
.lab-modal-icon { font-size: 22px; }
#labModalFrame { flex: 1; width: 100%; border: 0; background: #000; }
.lab-modal-foot { padding: 5px 12px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); border-top: 1px solid var(--border); }

/* ---------- Komut paleti ---------- */
.palette-bg { position: fixed; inset: 0; z-index: 960; background: rgba(2, 4, 8, 0.6); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.palette-win { width: min(720px, 100%); max-height: 72vh; display: flex; flex-direction: column; border-radius: 16px; overflow: hidden;
  background: rgba(15, 20, 32, 0.96); border: 1px solid var(--border-hi); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.palette-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 16px; }
.palette-head input { flex: 1; background: transparent; border: 0; outline: none; color: var(--text); font-size: 15px; font-family: var(--font); }
.palette-list { overflow-y: auto; padding: 6px; }
.pal-item { display: flex; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--text); cursor: pointer; align-items: flex-start; }
.pal-item.sel, .pal-item:hover { background: rgba(56, 189, 248, 0.1); border-color: rgba(56, 189, 248, 0.35); }
.pal-type { flex: 0 0 92px; font-family: var(--mono); font-size: 10px; color: var(--cyan); padding-top: 3px; text-transform: uppercase; letter-spacing: 0.04em; }
.pal-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pal-main b { font-size: 13.5px; }
.pal-main small { font-size: 11.5px; color: var(--muted); }
.pal-tex { font-size: 12px; color: var(--text); }
.pal-empty { padding: 20px; text-align: center; color: var(--muted); font-size: 13px; }
.palette-foot { display: flex; gap: 14px; padding: 7px 14px; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 10.5px; color: var(--muted); }

/* ---------- Ortak alan rozetleri ---------- */
.dom-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); }

@media (max-width: 1250px) { .launchpad { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .launchpad { grid-template-columns: 1fr 1fr; }
  .sw-view { padding: 10px; }
  .lab-modal-bg { padding: 0; }
  .lab-modal-win { border-radius: 0; height: 100%; }
}
@media (max-width: 480px) { .launchpad { grid-template-columns: 1fr; } }
