/* Kod Başlangıcı: PcKafa Ekran Testi - Ortak Stil */

:root {
  --bg: #0d1117;
  --surface: #151b23;
  --surface-2: #1c2530;
  --border: #2a3542;
  --text: #e6edf3;
  --text-dim: #8b98a5;
  --accent: #c17a4f;
  --accent-blue: #5b9bd5;
  --accent-blue-dim: #3d6a94;
  --danger: #d5695b;
  --ok: #5bb587;
  --radius: 10px;
  --header-h: 64px;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #edeff2;
  --border: #dde1e6;
  --text: #1a2028;
  --text-dim: #5c6570;
  --accent: #b8683a;
  --accent-blue: #3d74ad;
  --accent-blue-dim: #2c5a87;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  scroll-behavior: smooth;
}

body { min-height: 100dvh; }

img, svg, video, canvas { max-width: 100%; display: block; }

a { color: var(--accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
p { line-height: 1.6; color: var(--text-dim); }

:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.back-to-site {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.back-to-site:hover { border-color: var(--accent-blue); text-decoration: none; color: var(--accent-blue); }
.back-to-site svg { width: 14px; height: 14px; flex-shrink: 0; }

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Menü */
.nav-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 38px; height: 38px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle svg { width: 18px; height: 18px; }

.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 38px; height: 38px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: inline-flex; }

.test-menu {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
  z-index: 99;
}
.test-menu.open { max-height: 520px; overflow-y: auto; }
.test-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2px;
  padding: 12px clamp(16px, 4vw, 32px) 20px;
  max-width: 1180px;
  margin: 0 auto;
}
.test-menu-grid a {
  color: var(--text);
  font-size: .88rem;
  padding: 10px 12px;
  border-radius: 8px;
}
.test-menu-grid a:hover { background: var(--surface-2); text-decoration: none; color: var(--accent-blue); }
.test-menu-grid a.current { color: var(--accent); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding: 28px clamp(16px, 4vw, 32px) 40px;
}
.site-footer .inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: .85rem;
  color: var(--text-dim);
}

/* ---------- Genel bileşenler ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: .85rem;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.btn:hover { border-color: var(--accent-blue); text-decoration: none; }
.btn-primary { background: var(--accent-blue); border-color: var(--accent-blue); color: #08121c; font-weight: 600; }
.btn-primary:hover { background: var(--accent-blue-dim); border-color: var(--accent-blue-dim); color: #fff; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.breadcrumb {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-dim);
  margin-bottom: 18px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent-blue); }
.breadcrumb .sep { opacity: .5; }
.breadcrumb .current { color: var(--text); }

/* ---------- Hub: mini monitor kartları ---------- */

.hero {
  padding: 56px 0 32px;
  text-align: center;
}
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
.hero p { max-width: 560px; margin: 0 auto; }

.test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  padding: 20px 0 60px;
}

.mini-monitor {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--text);
  transition: border-color .15s ease, transform .15s ease;
}
.mini-monitor:hover { border-color: var(--accent-blue); text-decoration: none; transform: translateY(-2px); }

.mini-screen {
  aspect-ratio: 16/10;
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #000;
  position: relative;
  overflow: hidden;
}

.mini-monitor h3 { font-size: 1rem; margin: 0; }
.mini-monitor .desc { font-size: .82rem; color: var(--text-dim); line-height: 1.45; }
.mini-monitor .tag { font-family: var(--font-mono); font-size: .7rem; color: var(--accent); }

/* mini animasyonlar */
.mini-screen.dead-pixel span {
  position: absolute; inset: 0;
  animation: cyclecolors 4s steps(6) infinite;
}
@keyframes cyclecolors {
  0% { background:#ff2d2d; } 16.6% { background:#2dff5a; } 33.3% { background:#2d6bff; }
  50% { background:#fff; } 66.6% { background:#000; } 83.3% { background:#ffe62d; } 100% { background:#ff2d2d; }
}
.mini-screen.color-test { background: linear-gradient(90deg,#ff2d2d,#ffe62d,#2dff5a,#2dd4ff,#2d6bff,#c22dff); }
.mini-screen.contrast-test { background: linear-gradient(90deg,#000,#0a0a0a,#141414,#1e1e1e,#282828); }
.mini-screen.bleeding-test { background: #000; }
.mini-screen.sharpness-test {
  background-image: repeating-linear-gradient(90deg,#fff 0 2px,#000 2px 4px);
}
.mini-screen.uniformity-test { background: #4a4a4a; }
.mini-screen.flicker-test {
  background: #fff;
  animation: flicker 1.1s infinite;
}
@keyframes flicker { 50% { opacity: .35; } }

.mini-screen.response-test { background:#111; }
.mini-screen.response-test i {
  position: absolute; top: 50%; left: -30px; width: 24px; height: 24px;
  background: var(--accent-blue); border-radius: 4px; transform: translateY(-50%);
  animation: slidebox 1.8s linear infinite;
}
@keyframes slidebox { from { left: -30px; } to { left: 100%; } }

/* ---------- Test sayfaları: kontrol paneli ---------- */

.test-layout {
  padding: 32px 0 20px;
}
.test-intro { max-width: 680px; }
.test-intro h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }

.control-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 22px 0;
  padding: 16px;
}

.control-panel label {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.swatch-row { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch-row button {
  width: 34px; height: 34px;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
}
.swatch-row button:hover { border-color: var(--accent-blue); }

.stage-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
  width: 100%;
  position: relative;
}

.stage-wrap.stage-fullscreen-hint::after {
  content: "Tam ekran için tıklayın ya da 'F' tuşuna basın";
  position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: .72rem;
  color: rgba(255,255,255,.55);
  pointer-events: none;
}

#stage {
  width: 100%; height: 100%;
  display: block;
  position: relative;
  cursor: pointer;
}

body.fs-active #stage-wrap-fixed {
  position: fixed; inset: 0; z-index: 1000; border-radius: 0; aspect-ratio: auto;
}
body.fs-active .site-header,
body.fs-active .site-footer,
body.fs-active .fs-hide { display: none !important; }

.exit-fs-hint {
  position: fixed; top: 16px; right: 16px; z-index: 1001;
  font-family: var(--font-mono); font-size: .72rem;
  color: rgba(255,255,255,.6);
  background: rgba(0,0,0,.4);
  padding: 6px 10px; border-radius: 6px;
  display: none;
}
body.fs-active .exit-fs-hint { display: block; }

.info-section { padding: 20px 0 60px; }
.info-section h2 { font-size: 1.25rem; margin-top: 40px; }

.faq { border-top: 1px solid var(--border); margin-top: 16px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  cursor: pointer; padding: 16px 4px;
  font-family: var(--font-display); font-weight: 600;
  color: var(--text);
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; float: right; color: var(--accent-blue); }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 4px 16px; margin: 0; }

.related-tests {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.related-tests a {
  display: block;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  color: var(--text);
  font-size: .88rem;
}
.related-tests a:hover { border-color: var(--accent-blue); text-decoration: none; color: var(--accent-blue); }

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .brand span.full { display: none; }
  .control-panel { flex-direction: column; align-items: stretch; }
  .control-panel label { justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Kod Bitişi */
