/* MODEL Y PERF — koyu motorsporları teması */
:root {
  --bg: #0a0a0e;
  --bg2: #101016;
  --card: #131318;
  --line: #22222c;
  --txt: #ececf1;
  --dim: #9a9aa6;
  --mut: #5c5c6a;
  --acid: #c8ff1f;
  --acid-dim: rgba(200, 255, 31, .12);
  --red: #ff3d57;
  --font-d: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-b: "Barlow", system-ui, sans-serif;
  --font-m: "Courier New", ui-monospace, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font-b);
  line-height: 1.5;
  overflow-x: hidden;
}
img, video, canvas { max-width: 100%; display: block; }
a { color: var(--acid); text-decoration: none; }
h1, h2, h3 { font-family: var(--font-d); text-transform: uppercase; letter-spacing: .02em; }
section { padding: 72px 24px; max-width: 1080px; margin: 0 auto; }
.section-head {
  display: flex; align-items: baseline; gap: 16px; margin-bottom: 32px;
}
.section-head h2 { font-size: 2.2rem; font-weight: 800; }
.section-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.section-head .idx { font-family: var(--font-m); color: var(--acid); font-size: .9rem; }

/* dil düğmeleri */
.lang-switch { display: inline-flex; gap: 2px; margin-left: auto; }
.lang-btn {
  background: none; border: 1px solid var(--line); color: var(--dim);
  font-family: var(--font-m); font-size: .72rem; padding: 3px 9px; cursor: pointer;
}
.lang-btn.active { color: var(--acid); border-color: var(--acid); }

/* nav */
#topnav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 24px;
  background: rgba(10, 10, 14, .86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--font-d); font-weight: 800; font-size: 1.25rem; letter-spacing: .04em; color: var(--txt); }
.brand em { font-style: normal; color: var(--acid); }
#nav { display: flex; gap: 4px; margin-left: 16px; }
#nav a {
  color: var(--dim); font-family: var(--font-d); text-transform: uppercase;
  font-size: .95rem; letter-spacing: .06em; padding: 6px 12px; border-radius: 3px;
}
#nav a:hover { color: var(--acid); background: var(--acid-dim); }
#burger { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--txt); font-size: 1.1rem; padding: 4px 12px; cursor: pointer; }

/* hero */
.hero {
  min-height: 82vh;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
  padding: 100px 24px 64px;
  max-width: 1080px; margin: 0 auto;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    repeating-linear-gradient(115deg, transparent 0 46px, rgba(200,255,31,.028) 46px 47px),
    radial-gradient(700px 340px at 82% 18%, rgba(200,255,31,.09), transparent 70%);
}
.hero-tag {
  font-family: var(--font-m); color: var(--acid); font-size: .8rem;
  letter-spacing: .28em; text-transform: uppercase; margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(3.4rem, 11vw, 7.5rem);
  font-weight: 800; line-height: .92; text-transform: uppercase;
}
.hero h1 .stroke {
  color: transparent;
  -webkit-text-stroke: 2px var(--txt);
}
.hero-sub {
  margin-top: 22px; max-width: 560px; color: var(--dim); font-size: 1.05rem;
}
.hero-lap {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 30px; padding: 12px 22px;
  border: 1px solid var(--acid);
  font-family: var(--font-m); font-size: 1.3rem; color: var(--acid);
  background: var(--acid-dim);
}
.hero-lap small { color: var(--dim); font-size: .7rem; letter-spacing: .2em; }
.hero-cta { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 26px;
  font-family: var(--font-d); text-transform: uppercase; letter-spacing: .08em; font-size: 1rem;
  border: 1px solid var(--acid); cursor: pointer; transition: .15s;
}
.btn.solid { background: var(--acid); color: #0a0a0e; font-weight: 700; }
.btn.solid:hover { box-shadow: 0 0 24px rgba(200,255,31,.45); }
.btn.ghost { color: var(--acid); background: transparent; }
.btn.ghost:hover { background: var(--acid-dim); }

/* ticker */
.ticker {
  border-block: 1px solid var(--line);
  background: var(--bg2);
  overflow: hidden; white-space: nowrap;
}
.ticker-inner {
  display: inline-block; padding: 10px 0;
  animation: tick 28s linear infinite;
  font-family: var(--font-m); font-size: .78rem; letter-spacing: .18em;
  color: var(--dim); text-transform: uppercase;
}
.ticker-inner b { color: var(--acid); font-weight: 700; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* araç specs */
#spec-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
}
.spec {
  border: 1px solid var(--line); padding: 18px 16px; background: var(--card);
}
.spec .k { display: block; font-family: var(--font-m); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--mut); margin-bottom: 6px; }
.spec .v { font-family: var(--font-d); font-size: 1.35rem; font-weight: 700; text-transform: uppercase; }
#mod-list { margin-top: 22px; list-style: none; }
#mod-list li { padding: 8px 0 8px 20px; color: var(--dim); border-bottom: 1px dashed var(--line); position: relative; }
#mod-list li::before { content: "▸"; position: absolute; left: 0; color: var(--acid); }

/* seanslar */
.session {
  border: 1px solid var(--line); background: var(--card);
  margin-bottom: 28px; padding: 24px;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}
.session.latest { border-color: var(--acid); box-shadow: 0 0 32px rgba(200,255,31,.08); }
.sess-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.sess-head h3 { font-size: 1.6rem; }
.sess-head .num { color: var(--acid); font-family: var(--font-m); font-size: 1rem; margin-right: 8px; }
.sess-head time { font-family: var(--font-m); color: var(--dim); font-size: .85rem; }
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  border: 1px solid var(--line); background: var(--bg2);
}
.stat-grid .cell { padding: 12px 14px; border-right: 1px solid var(--line); }
.stat-grid .cell:last-child { border-right: 0; }
.cell .lbl { display: block; font-family: var(--font-m); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); }
.cell .val { font-family: var(--font-m); font-size: 1.05rem; color: var(--txt); font-weight: 700; }
.notes { margin-top: 14px; color: var(--dim); font-size: .95rem; }
.tele-block { margin-top: 18px; border: 1px solid var(--line); padding: 14px; background: var(--bg2); }
.tele-block canvas { width: 100%; }
.tele-cap { margin-top: 8px; font-family: var(--font-m); font-size: .68rem; color: var(--mut); letter-spacing: .1em; }
.strip { display: flex; gap: 10px; margin-top: 16px; overflow-x: auto; }
.strip img { height: 120px; width: auto; border: 1px solid var(--line); transition: .15s; }
.strip img:hover { border-color: var(--acid); }
.session video { margin-top: 16px; border: 1px solid var(--line); }
.video-embed { margin-top: 16px; aspect-ratio: 16/9; }
.video-embed iframe { width: 100%; height: 100%; border: 0; }

/* videolar */
#videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.video-card { border: 1px solid var(--line); background: var(--card); padding: 12px; }
.video-card iframe { width: 100%; aspect-ratio: 16/9; border: 0; }
.video-card p { margin-top: 10px; color: var(--dim); font-size: .9rem; }
.vid-link { display: block; padding: 18px; font-family: var(--font-m); word-break: break-all; }

/* galeri */
#gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px;
}
#gallery figure { position: relative; border: 1px solid var(--line); background: var(--card); overflow: hidden; }
#gallery img, #gallery video { width: 100%; height: 220px; object-fit: cover; transition: transform .3s; }
#gallery figure:hover img { transform: scale(1.04); }
#gallery figcaption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 8px 12px; font-family: var(--font-m); font-size: .72rem;
  background: linear-gradient(transparent, rgba(0,0,0,.85)); color: var(--txt);
}

/* hakkında */
#about p { max-width: 640px; color: var(--dim); }
#about-links { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.soc {
  font-family: var(--font-d); text-transform: uppercase; letter-spacing: .1em;
  border: 1px solid var(--line); padding: 8px 18px; color: var(--txt); font-size: .9rem;
}
.soc:hover { border-color: var(--acid); color: var(--acid); }
.sep { color: var(--mut); }

/* footer */
footer {
  border-top: 1px solid var(--line);
  padding: 28px 24px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-family: var(--font-m); font-size: .72rem; color: var(--mut);
}

.empty { color: var(--mut); font-family: var(--font-m); padding: 20px 0; }

/* ---------- mobil ---------- */
@media (max-width: 760px) {
  #nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--bg2); border-bottom: 1px solid var(--line); padding: 10px; }
  body.nav-open #nav { display: flex; }
  #burger { display: block; }
  .hero h1 { font-size: clamp(2.8rem, 13vw, 4.6rem); }
}

/* ---------- admin panel ortak ---------- */
.admin-wrap { max-width: 900px; margin: 0 auto; padding: 28px 20px 90px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-head h1 { font-size: 1.6rem; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.tab {
  background: var(--card); border: 1px solid var(--line); color: var(--dim);
  font-family: var(--font-d); text-transform: uppercase; letter-spacing: .06em;
  padding: 8px 18px; cursor: pointer; font-size: .95rem;
}
.tab.active { color: var(--acid); border-color: var(--acid); background: var(--acid-dim); }
.panel h3 { margin-bottom: 16px; }
.panel h4 { margin: 20px 0 10px; color: var(--acid); font-family: var(--font-d); text-transform: uppercase; letter-spacing: .08em; }
.row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border: 1px solid var(--line); padding: 12px 14px; margin-bottom: 8px; background: var(--card); flex-wrap: wrap;
}
.row-title { font-family: var(--font-m); font-size: .85rem; }
.row-title b { color: var(--acid); }
button {
  background: var(--card); border: 1px solid var(--line); color: var(--txt);
  font-family: var(--font-d); text-transform: uppercase; letter-spacing: .05em;
  padding: 7px 16px; cursor: pointer; font-size: .85rem;
}
button:hover { border-color: var(--acid); }
button.primary { background: var(--acid); color: #0a0a0e; border-color: var(--acid); font-weight: 700; }
button.secondary { color: var(--acid); border-color: var(--acid); background: transparent; }
button.danger { color: var(--red); border-color: transparent; }
button.danger:hover { border-color: var(--red); }
button:disabled { opacity: .3; cursor: default; }
input, select, textarea {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--txt);
  padding: 9px 12px; font-family: var(--font-m); font-size: .85rem; margin-top: 4px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--acid); }
label { display: block; margin-bottom: 12px; font-size: .8rem; color: var(--dim); font-family: var(--font-m); text-transform: uppercase; letter-spacing: .08em; }
label.wide { grid-column: 1 / -1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
#editor { border: 1px solid var(--acid); padding: 22px; margin-top: 20px; background: var(--card); }
.editor-actions { margin-top: 22px; display: flex; gap: 10px; }
.media-item {
  display: flex; align-items: center; gap: 10px;
  border: 1px dashed var(--line); padding: 8px 10px; margin-bottom: 6px;
  font-family: var(--font-m); font-size: .78rem;
}
.media-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
}
.login-card {
  border: 1px solid var(--acid); padding: 40px; width: min(380px, 90vw);
  background: var(--card); box-shadow: 0 0 40px rgba(200,255,31,.1);
  text-align: center;
}
.login-card h1 { font-size: 1.8rem; margin-bottom: 6px; }
.login-card p { color: var(--dim); font-size: .85rem; margin-bottom: 20px; font-family: var(--font-m); }
.login-card input { text-align: center; font-size: 1.3rem; letter-spacing: .4em; }
.login-card button { margin-top: 14px; width: 100%; padding: 11px; }
#pin-error { color: var(--red); font-size: .8rem; margin-top: 10px; font-family: var(--font-m); }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--acid); color: #0a0a0e; font-family: var(--font-d); font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; padding: 10px 24px; z-index: 99;
}
.toast.err { background: var(--red); color: #fff; }
#json-area { height: 420px; font-size: .75rem; }
.json-actions { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.hint { font-family: var(--font-m); font-size: .75rem; color: var(--mut); margin-top: 8px; }

/* dil: sadece ilgili dilde göster */
[data-lang-tr], [data-lang-en] { display: none; }
html[lang="tr"] [data-lang-tr] { display: inline; }
html[lang="en"] [data-lang-en] { display: inline; }
