:root {
  --bg: #f5f5f7;
  --text: #1f1f1f;
  --muted: #777;
  --accent: #4f46e5;
  --box: #e5e7eb;
}

/* Temalar */
.theme-light {
  --bg: #f5f5f7;
  --text: #1f1f1f;
  --muted: #777;
  --accent: #4f46e5;
  --box: #e5e7eb;
}
.theme-dark {
  --bg: #121212;
  --text: #f2f2f2;
  --muted: #a0a0a0;
  --accent: #10b981;
  --box: #1f2937;
}
.theme-orange {
  --bg: #fff7ed;
  --text: #2a2a2a;
  --muted: #7a6a5c;
  --accent: #f97316;
  --box: #fde68a;
}
.theme-depressive {
  --bg: #0f172a;
  --text: #d1d5db;
  --muted: #94a3b8;
  --accent: #64748b;
  --box: #111827;
}
.theme-happy {
  --bg: #ecfeff;
  --text: #0f766e;
  --muted: #22c55e;
  --accent: #06b6d4;
  --box: #cffafe;
}
.theme-bipolar {
  --bg: #111827;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --accent: #a855f7;
  --box: #1f2937;
}

.theme-britney {
  --bg: #fff1f7;
  --text: #5b21b6;
  --muted: #f472b6;
  --accent: #ec4899;
  --box: #fde2e8;
}

html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* Arka plan animasyonları */
@keyframes bg-pan {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body.theme-happy {
  background: linear-gradient(120deg, #ecfeff, #e0f2fe, #d1fae5, #fde68a);
  background-size: 400% 400%;
  animation: bg-pan 20s ease infinite;
}
body.theme-depressive {
  background: linear-gradient(120deg, #0b1020, #0f172a, #111827, #0b1020);
  background-size: 400% 400%;
  animation: bg-pan 30s ease infinite;
}
body.theme-bipolar {
  background: linear-gradient(130deg, #0f172a, #f5f5f7, #1f2937, #fef3c7);
  background-size: 500% 500%;
  animation: bg-pan 12s ease-in-out infinite;
}
body.theme-britney {
  background: linear-gradient(135deg, #fff1f7, #fde2e8, #fae8ff, #fff7ed);
  background-size: 400% 400%;
  animation: bg-pan 22s ease infinite;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.topbar .left, .topbar .right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.track-stack { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

.track-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--box);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 220px;
  max-width: 520px;
  flex: 1;
  min-width: 0;
  justify-content: flex-start;
}

.tiny-btn {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}
.tiny-btn svg { width: 16px; height: 16px; }
.track-pill .note { color: var(--accent); font-weight: 600; }
#trackName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn, .theme-btn {
  background: var(--box);
  color: var(--text);
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
}
.theme-btn { width: 80px; }
.btn:hover, .theme-btn:hover { filter: brightness(0.95); }

.theme-select span { color: var(--muted); margin-right: 8px; }
.theme-select select {
  background: var(--box);
  color: var(--text);
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.icon-btn:hover { filter: brightness(1.05); }
.icon-btn svg { width: 18px; height: 18px; }



.center-area {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  content-visibility: auto;
  contain-intrinsic-size: 300px;
}

.avatar {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
}

.role-line {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.4px;
}
.role-line .prefix { color: var(--muted); margin-right: 8px; }
.role { border-bottom: 1px dotted var(--muted); padding-bottom: 4px; }

.fade-out { opacity: 0; transition: opacity .35s ease; }
.fade-in { opacity: 1; transition: opacity .35s ease; }
/* Görsel geçişleri için daha yumuşak sınıflar */
.fade-img-out { opacity: 0; transition: opacity 1s ease-in-out; }
.fade-img-in { opacity: 1; transition: opacity 1s ease-in-out; }

.carousel-area { padding: 16px 24px; max-width: 1100px; margin: 0 auto; }
.countdown { text-align: center; color: var(--muted); font-size: 14px; margin-top: 8px; }
.carousel {
  position: relative;
  height: 360px;
  border-radius: 12px;
  background: var(--box);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  content-visibility: auto;
  contain-intrinsic-size: 360px;
}
.carousel img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 1s ease-in-out, filter .3s ease;
  will-change: opacity;
}
.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: white;
  cursor: pointer;
}
.nav.left { left: 12px; }
.nav.right { right: 12px; }

.inputs { display: none; }
.uploader input { display: none; }

/* Roller büyük harf */
.role { text-transform: uppercase; }
.role-line .prefix { text-transform: uppercase; }

.theme-depressive .carousel img,
.theme-depressive .avatar {
  filter: grayscale(65%) saturate(0.55) contrast(0.9);
}

@media (max-width: 768px) {
  .topbar { padding: 12px 16px; }
  .theme-btn { width: auto; padding: 8px 12px; }
  .track-pill { max-width: none; }
}

@media (max-width: 640px) {
  .topbar { flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 8px; }
  .topbar .left, .topbar .right { width: auto; }
  .track-stack { width: auto; }
  .track-pill { display: inline-flex; flex: 0; width: fit-content; max-width: 100%; padding: 8px 10px; }
  .icon-btn { width: 32px; height: 32px; }
  .theme-select { flex: 0 0 auto; }
  .theme-select select { width: 120px; font-size: 12px; padding: 4px 6px; }
  .center-area { padding: 0 12px; }
  .avatar { width: 160px; height: 160px; }
  .role-line { font-size: 16px; }
  .carousel-area { padding: 8px 12px; max-width: 100%; }
  .carousel { height: 260px; }
  .nav { width: 32px; height: 32px; }
}

@media (max-width: 420px) {
  .avatar { width: 120px; height: 120px; }
  .role-line { font-size: 15px; }
  .track-pill .note { display: none; }
  .icon-btn { width: 28px; height: 28px; }
  .nav { width: 28px; height: 28px; }
  .carousel { height: 220px; }
}
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal.hidden { display: none; }
.modal-content { background: var(--bg); color: var(--text); padding: 20px 24px; border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.35); min-width: 280px; text-align: center; }
.modal-content p { margin: 0 0 12px; font-weight: 600; }
