/* =========================================================
   Bio Sitesi - Genel Stil
   Tipografi: Space Grotesk (baslik) / Inter (govde) / Space Mono (handle, sayilar)
   ========================================================= */

:root {
  --accent: #8b5cf6;
  --accent-2: #ec4899;
  --bg-color: #0a0a0f;
  --card-bg: rgba(18, 18, 26, .58);
  --card-border: rgba(255, 255, 255, .08);
  --text-primary: #f4f4f7;
  --text-muted: #9ca0ad;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

html[data-theme="light"] {
  --bg-color: #f3f1ee;
  --card-bg: rgba(255, 255, 255, .72);
  --card-border: rgba(10, 10, 15, .08);
  --text-primary: #16161c;
  --text-muted: #5c5f6b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 48px 16px calc(48px + env(safe-area-inset-bottom, 0px));
  padding-top: calc(48px + env(safe-area-inset-top, 0px));
  overflow-x: hidden;
  transition: background-color .4s ease;
}

body.bg-type-gradient {
  background: linear-gradient(145deg, var(--accent) 0%, var(--bg-color) 45%, var(--accent-2) 100%);
}

.bg-video, .bg-image {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.bg-image { background-size: cover; background-position: center; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 10, .35);
  z-index: -1;
  pointer-events: none;
}
html[data-theme="light"] body::before { background: rgba(255, 255, 255, .25); }

#particle-canvas, #cursor-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
#cursor-canvas { z-index: 5; }

/* ---------- Kart ---------- */
.bio-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 32px 26px 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  animation: card-in .6s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.avatar-wrap { margin-bottom: 14px; }
.avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(139, 92, 246, .15);
}
.avatar-placeholder {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 36px; font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.display-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin: 4px 0 2px;
  letter-spacing: -.01em;
}
.handle {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 14px;
  margin: 0 0 10px;
}

.typewriter {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  min-height: 18px;
  margin: 0 0 8px;
}
.typewriter::after {
  content: "";
  display: inline-block;
  width: 2px; height: 13px;
  background: var(--accent);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}
@keyframes blink { 50% { opacity: 0; } }

.bio-text {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-primary);
  margin: 0 0 16px;
}

.mood-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 14px;
  color: var(--text-muted);
}

.pill-btn, .pill-btn-small {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, .05);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
  margin: 0 0 12px;
}
.pill-btn-small { padding: 8px 14px; font-size: 13px; text-decoration: none; }
.pill-btn:hover, .pill-btn-small:hover { background: rgba(255, 255, 255, .1); transform: translateY(-1px); }
.pill-btn:active, .pill-btn-small:active { transform: translateY(0); }

/* ---------- Geri sayim ---------- */
.countdown-box { margin-bottom: 16px; }
.countdown-label { font-size: 12.5px; color: var(--text-muted); margin: 0 0 8px; }
.countdown-digits {
  display: flex; justify-content: center; gap: 10px;
}
.countdown-digits > div {
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  min-width: 52px;
}
.countdown-digits span {
  display: block; font-family: var(--font-mono); font-size: 19px; font-weight: 700;
}
.countdown-digits small { font-size: 10px; color: var(--text-muted); text-transform: lowercase; }

/* ---------- Now playing ---------- */
.now-playing {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 16px;
  text-align: left;
}
.np-cover { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.np-info { flex: 1; min-width: 0; }
.np-title { margin: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { margin: 0 0 4px; font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-bar { height: 3px; background: rgba(255, 255, 255, .12); border-radius: 2px; overflow: hidden; }
.np-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.np-time { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 9.5px; color: var(--text-muted); margin-top: 3px; }
.np-eq { display: flex; align-items: flex-end; gap: 2px; height: 20px; flex-shrink: 0; }
.np-eq span { width: 3px; background: var(--accent); border-radius: 2px; height: 30%; animation: eq 1s ease-in-out infinite; animation-play-state: paused; }
.np-eq span:nth-child(2) { animation-delay: .15s; }
.np-eq span:nth-child(3) { animation-delay: .3s; }
.np-eq span:nth-child(4) { animation-delay: .45s; }
.now-playing.playing .np-eq span { animation-play-state: running; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

#visualizer-canvas {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 90px;
  z-index: 1;
  pointer-events: none;
  opacity: .55;
}

/* ---------- Sosyal linkler ---------- */
.social-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background .2s ease, transform .15s ease, border-color .2s ease;
}
.social-link:hover { background: rgba(255, 255, 255, .1); border-color: var(--accent); transform: translateY(-1px); }
.social-link i { width: 20px; text-align: center; color: var(--accent); }

/* ---------- Gizli bolum ---------- */
.secret-box { margin-bottom: 8px; }
.secret-panel { margin-top: 8px; text-align: left; }
.secret-panel form { display: flex; gap: 8px; }
.secret-panel input[type="password"] {
  flex: 1;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, .05);
  color: var(--text-primary);
}
.error-text { color: #f87171; font-size: 12.5px; margin: 8px 0 0; }
.secret-content {
  margin-top: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, .05);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.5;
}

/* ---------- Misafir defteri ---------- */
.guestbook-box { text-align: left; margin-top: 10px; }
.guestbook-box h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.guestbook-box form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.guestbook-box input, .guestbook-box textarea {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, .05);
  color: var(--text-primary);
  font-family: inherit;
  resize: vertical;
}
.guestbook-list { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.guestbook-entry {
  background: rgba(255, 255, 255, .04);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 13px;
}
.guestbook-entry strong { font-size: 12.5px; }
.guestbook-entry p { margin: 4px 0 0; }

/* ---------- Govdeler ---------- */
.site-footer { margin-top: 18px; }
.muted { color: var(--text-muted); }
.small { font-size: 11.5px; }

/* ---------- Yuzen rozetler ---------- */
.floating-badge {
  position: fixed;
  z-index: 10;
  font-size: 12px;
  background: rgba(18, 18, 26, .65);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  padding: 7px 12px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 5px;
}
#online-badge { top: calc(14px + env(safe-area-inset-top, 0px)); left: 14px; }
.floating-btn { cursor: pointer; border: 1px solid var(--card-border); }
#lang-toggle { top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; }
#sound-toggle { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); right: 14px; font-size: 16px; padding: 10px 13px; }

/* ---------- Giris kapisi ("girmek icin dokun") ---------- */
.gate-locked .bio-card,
.gate-locked #particle-canvas,
.gate-locked #cursor-canvas,
.gate-locked .bg-video,
.gate-locked .bg-image,
.gate-locked .floating-badge {
  filter: blur(22px) saturate(1.15);
  transition: filter .5s ease;
}
.gate-locked .floating-badge { pointer-events: none; }
.gate-locked { overflow: hidden; height: 100vh; }

.entry-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 10, .45);
  cursor: pointer;
  opacity: 1;
  transition: opacity .5s ease;
}
html[data-theme="light"] .entry-gate { background: rgba(255, 255, 255, .35); }
.entry-gate--closing { opacity: 0; pointer-events: none; }

.entry-gate-inner {
  text-align: center;
  color: #fff;
  padding: 20px;
}
.entry-gate-pulse {
  width: 76px; height: 76px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 0 rgba(139, 92, 246, .55);
  animation: gate-pulse 1.8s ease-out infinite;
}
@keyframes gate-pulse {
  0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, .55); }
  70% { box-shadow: 0 0 0 26px rgba(139, 92, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}
.entry-gate-text {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 6px;
}
.entry-gate-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, .75);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 0;
}

/* ---------- Dil gorunurlugu ---------- */
html[data-lang="tr"] .lang-en { display: none; }
html[data-lang="en"] .lang-tr { display: none; }

/* ---------- Erisilebilirlik ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Mobil ---------- */
@media (max-width: 480px) {
  .bio-card { padding: 26px 18px 20px; border-radius: 18px; }
  .display-name { font-size: 22px; }
}
