*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* ----- NProgress (loading bar) ----- */
#nprogress { pointer-events: none; }
#nprogress .bar {
  background: #0d6b2e;
  position: fixed;
  z-index: 1031;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
}
#nprogress .peg {
  display: block;
  position: absolute;
  right: 0;
  width: 100px;
  height: 100%;
  box-shadow: 0 0 10px #0d6b2e, 0 0 5px #0d6b2e;
  opacity: 1;
  transform: rotate(3deg) translate(0, -4px);
}

body {
  background-color: #0c0c0f;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.025) 1px, transparent 1.5px),
    radial-gradient(ellipse 900px 700px at 8% 5%, rgba(15, 100, 50, 0.40) 0%, transparent 55%),
    radial-gradient(ellipse 800px 600px at 92% 95%, rgba(74, 222, 128, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 700px 500px at 95% 10%, rgba(15, 80, 40, 0.20) 0%, transparent 60%);
  background-size: 28px 28px, auto, auto, auto;
  background-repeat: repeat, no-repeat, no-repeat, no-repeat;
  background-attachment: fixed;
  color: #efeff1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  top: -10%;
  right: -8%;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 222, 128, .18) 0%, transparent 65%);
  filter: blur(60px);
  pointer-events: none;
  z-index: -1;
  animation: blob-1 22s ease-in-out infinite alternate;
}
body::after {
  content: "";
  position: fixed;
  bottom: -15%;
  left: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22, 163, 74, .22) 0%, transparent 65%);
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
  animation: blob-2 28s ease-in-out infinite alternate;
}
@keyframes blob-1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-60px, 80px) scale(1.2); }
}
@keyframes blob-2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, -60px) scale(1.15); }
}

/* ----- Header ----- */
header {
  padding: 28px 28px 18px;
  border-bottom: 1px solid #2a2a2d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: rgba(14, 14, 16, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
h1 {
  margin: 0;
  font-family: "Archivo", -apple-system, sans-serif;
  font-style: italic;
  font-weight: 900;
  font-size: 32px;
  letter-spacing: .3px;
  line-height: 1;
}
h1 a { text-decoration: none; color: inherit; display: inline-block; }
h1 a:hover { opacity: .85; }
h1 .kafi, h1 .roleplay { color: #ffffff; }

.meta {
  font-size: 13px;
  color: #adadb8;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.meta b { color: #efeff1; font-weight: 600; }
.pill {
  background: #1f1f23;
  border: 1px solid #2a2a2d;
  padding: 4px 10px;
  border-radius: 999px;
}

/* ----- Header right (live badge + apply button) ----- */
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ----- CANLI badge ----- */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #eb0400;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .8px;
  padding: 6px 13px 6px 11px;
  border-radius: 999px;
  user-select: none;
  animation: live-glow 1.8s ease-in-out infinite;
}
.live-badge b {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}
.live-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  animation: live-pulse 1.4s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%     { opacity: .35; transform: scale(.7); }
}
@keyframes live-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(235, 4, 0, .55); }
  50%     { box-shadow: 0 0 0 9px rgba(235, 4, 0, 0); }
}

/* ----- BAŞVUR button ----- */
.btn-apply {
  display: inline-block;
  background: linear-gradient(135deg, #ff7a00 0%, #ff5b00 100%);
  color: #fff;
  text-decoration: none;
  font-family: "Archivo", -apple-system, sans-serif;
  font-style: italic;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .8px;
  padding: 9px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 4px 14px rgba(255, 91, 0, .25);
  transition: box-shadow .2s ease, filter .2s ease, transform .2s ease;
  cursor: pointer;
  user-select: none;
}
.btn-apply:hover {
  filter: brightness(1.12);
  box-shadow: 0 6px 22px rgba(255, 91, 0, .55), 0 0 0 3px rgba(255, 122, 0, .18);
  transform: scale(1.03);
}
.btn-apply:active {
  transform: scale(.98);
  filter: brightness(.95);
}

/* ----- Main / grid ----- */
main {
  padding: 28px;
  max-width: 1400px;
  margin: 0 auto;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}

/* ----- Card ----- */
.card {
  background: #18181b;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s ease;
  border: 1px solid #26262a;
  display: flex;
  flex-direction: column;
  position: relative;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 50%),
    rgba(110, 231, 142, .28),
    rgba(45, 180, 100, .12) 22%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
  z-index: 2;
  border-radius: inherit;
}
.card:hover::before { opacity: 1; }
.card:hover { border-color: #3a3a40; }
.thumb { position: relative; aspect-ratio: 16/9; background: #000; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #18181b, #2a2a2d);
  color: #444; font-size: 36px;
}
.live {
  position: absolute; top: 8px; left: 8px;
  background: #eb0400; color: white;
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 4px;
  letter-spacing: .5px;
}
.platform-badge {
  position: absolute; top: 8px; right: 8px;
  font-size: 10px; font-weight: 800;
  padding: 3px 8px; border-radius: 4px;
  letter-spacing: .8px;
  user-select: none;
}
.platform-badge.kick   { background: #53fc18; color: #000; }
.platform-badge.twitch { background: #9146ff; color: #fff; }
.viewers {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(0, 0, 0, .78); color: white;
  font-size: 12px; font-weight: 600;
  padding: 3px 8px; border-radius: 4px;
  display: flex; align-items: center; gap: 5px;
}
.viewers::before { content: ""; width: 7px; height: 7px; background: #eb0400; border-radius: 50%; }
.duration {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0, 0, 0, .78); color: #ccc;
  font-size: 11px; padding: 3px 8px; border-radius: 4px;
}
.body { padding: 12px 14px 14px; }
.title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.channel { font-size: 13px; color: #adadb8; }

/* ----- States ----- */
.empty {
  padding: 100px 20px 80px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: #adadb8;
}
.empty-icon {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 222, 128, .18) 0%, rgba(15, 80, 40, .08) 50%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 6px;
}
.empty-icon::before,
.empty-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(74, 222, 128, .30);
  animation: empty-ring 2.6s ease-out infinite;
}
.empty-icon::after { animation-delay: 1.3s; }
.empty-emoji {
  font-size: 56px;
  display: inline-block;
  animation: empty-bounce 2.6s ease-in-out infinite;
  filter: drop-shadow(0 4px 16px rgba(74, 222, 128, .35));
}
@keyframes empty-ring {
  0%   { transform: scale(.85); opacity: .85; }
  100% { transform: scale(1.7); opacity: 0; }
}
@keyframes empty-bounce {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%     { transform: translateY(-8px) rotate(-4deg); }
}
.empty h2 {
  color: #efeff1;
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.2px;
}
.empty p {
  color: #8a8a92;
  margin: 0;
  max-width: 420px;
  line-height: 1.6;
  font-size: 14px;
}
.error {
  background: #311; color: #fbb;
  padding: 12px 16px; border-radius: 8px;
  margin-bottom: 16px; font-size: 14px;
  border: 1px solid #532;
}
.setup {
  background: #1a1f2e; color: #cde;
  padding: 18px 22px; border-radius: 10px;
  border: 1px solid #2a3548; line-height: 1.5;
}
.setup code {
  background: #0c1018; padding: 1px 6px; border-radius: 4px;
  font-size: 13px; color: #fff;
}

.grid.refreshing { opacity: .55; transition: opacity .2s; }

/* ----- Offline channels (geçmiş yayıncılar) ----- */
.offline-section {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid #2a2a2d;
}
.offline-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.offline-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #efeff1;
}
.offline-count {
  font-size: 13px;
  color: #adadb8;
}
.offline-count b {
  color: #efeff1;
  font-weight: 700;
}
.offline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.ofc {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(24, 24, 27, .55);
  border: 1px solid #26262a;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background .15s ease, border-color .15s ease;
  filter: grayscale(.35);
  opacity: .82;
}
.ofc:hover {
  background: rgba(24, 24, 27, .85);
  border-color: #3a3a40;
  filter: none;
  opacity: 1;
}
.ofc-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #1f1f23;
}
.ofc-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #adadb8;
  font-size: 16px;
  background: linear-gradient(135deg, #0d6b2e, #16a34a);
  color: #fff;
}
.ofc-body {
  flex: 1;
  min-width: 0;
}
.ofc-name {
  font-size: 13px;
  font-weight: 600;
  color: #efeff1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ofc-name .badge {
  flex-shrink: 0;
  font-size: 9px;
  padding: 1px 5px;
}
.ofc-meta {
  font-size: 11px;
  color: #8a8a92;
  margin-top: 2px;
}
