:root {
  --bg: #000000;
  --accent: #d4ff00;
  --love: #ff2d55;
  --save: #ffc107;
  --text: #ffffff;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #000;
  color: #fff;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.kd-shell {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  background: #060608;
}

.kd-stage {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 100dvh;
  background: #000;
  overflow: hidden;
}

.kd-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 12px 14px 8px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
}

.kd-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.kd-brand {
  font-family: 'Dela Gothic One', system-ui, sans-serif;
  font-size: 1.1rem;
  letter-spacing: -0.025em;
  color: #fff;
  text-decoration: none;
  text-shadow: 2px 2px 0 #000;
}

.kd-accent { color: var(--accent); }

.kd-icon-btn {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.kd-filter-tabs {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.kd-filter-tabs::-webkit-scrollbar { display: none; }

.kd-filter-tab {
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 6px 2px;
  min-height: 40px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease;
}

.kd-filter-tab.active {
  color: #fff;
  font-weight: 800;
  border-bottom-color: var(--accent);
}

.kd-feed {
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.kd-feed::-webkit-scrollbar { display: none; }

.kd-slide {
  position: relative;
  width: 100%;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #000;
  overflow: hidden;
}

.kd-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kd-scrim-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
}

.kd-info {
  position: absolute;
  left: 16px;
  right: 80px;
  bottom: 24px;
  z-index: 10;
}

.kd-username { font-weight: 800; font-size: 0.95rem; margin: 0 0 6px; }
.kd-caption { font-size: 0.88rem; line-height: 1.4; margin: 0; color: rgba(255,255,255,0.92); }

.kd-actions {
  position: absolute;
  right: 10px;
  bottom: 24px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.kd-action-btn {
  min-width: 48px;
  min-height: 48px;
  background: none;
  border: 0;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.kd-action-count { font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kd-action-btn.liked { color: var(--love); }
.kd-action-btn.saved { color: var(--save); }

.kd-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 15;
}
.kd-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
}

.kd-pause-indicator {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 12;
}

.kd-splash {
  position: absolute;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  transition: opacity 260ms ease;
}
.kd-splash.hidden { opacity: 0; pointer-events: none; }
.kd-splash-logo { font-size: 2rem; animation: kd-pulse 1.2s ease-in-out infinite; }
@keyframes kd-pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

.kd-toast {
  position: absolute;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 24, 0.94);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  z-index: 60;
  transition: opacity 200ms ease;
}
.kd-toast.show { opacity: 1; }

.kd-sheet-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
}
.kd-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.kd-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 65%;
  background: #121216;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  display: flex;
  flex-direction: column;
  padding: 8px 16px 16px;
}
.kd-sheet-handle { display: flex; justify-content: center; padding: 4px 0 8px; }
.kd-sheet-handle span { width: 40px; height: 5px; border-radius: 999px; background: rgba(255,255,255,0.28); }
.kd-sheet-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.kd-sheet-title { font-family: 'Dela Gothic One', sans-serif; font-size: 1rem; margin: 0; }
.kd-close-btn { min-width: 44px; min-height: 44px; background: none; border: 0; color: #fff; font-size: 1.1rem; cursor: pointer; }
.kd-comments-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.kd-comment-row { display: flex; gap: 10px; align-items: flex-start; }
.kd-avatar { width: 34px; height: 34px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.75rem; flex-shrink: 0; }
.kd-comments-form { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.1); }
.kd-comments-form input { flex: 1; background: #1e1e24; border: 1px solid rgba(255,255,255,0.14); color: #fff; padding: 10px 14px; border-radius: 12px; font-size: 0.875rem; }
.kd-send-btn { background: var(--accent); color: #000; border: 0; border-radius: 12px; padding: 0 18px; font-weight: 800; min-height: 44px; cursor: pointer; }

.kd-swipe-guide {
  position: absolute;
  inset: 0;
  z-index: 28;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
.kd-swipe-guide[hidden] { display: none; }
.kd-guide-card { max-width: 280px; display: flex; flex-direction: column; align-items: center; }
.kd-guide-stage { position: relative; width: 128px; height: 176px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 8px 0; margin-bottom: 18px; }
.kd-guide-track { position: absolute; top: 32px; bottom: 32px; left: 50%; width: 3px; transform: translateX(-50%); border-radius: 999px; background: linear-gradient(to bottom, rgba(212,255,0,0.8), rgba(255,255,255,0.3), rgba(212,255,0,0.8)); }
.kd-guide-arrow { position: relative; z-index: 1; color: var(--accent); font-size: 1.2rem; font-weight: 800; }
.kd-guide-hand { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 2; animation: kd-cf-swipe 2.2s ease-in-out infinite; }
.kd-guide-ripple { position: absolute; top: 52px; left: 49px; width: 26px; height: 26px; border-radius: 999px; border: 2px solid var(--accent); animation: kd-cf-ripple 2.2s ease-in-out infinite; }
.kd-guide-title { font-family: 'Dela Gothic One', sans-serif; font-size: 1.2rem; margin: 0; }
.kd-guide-desc { font-size: 0.875rem; line-height: 1.5; color: rgba(255,255,255,0.9); margin: 8px 0 0; }
.kd-guide-tip { font-size: 0.75rem; color: rgba(255,255,255,0.65); margin: 8px 0 0; }
.kd-guide-btn { margin-top: 22px; min-height: 44px; padding: 0 28px; border-radius: 12px; border: 0; background: var(--accent); color: #000; font-weight: 800; font-size: 0.875rem; cursor: pointer; }

@keyframes kd-cf-swipe {
  0%, 100% { transform: translateY(24px) scale(0.96); }
  50% { transform: translateY(-28px) scale(1); }
}
@keyframes kd-cf-ripple {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 0.9; transform: scale(1.25); }
}

.kd-sponsor-slide {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 20px;
  background: #08080c;
}
.kd-sponsor-card {
  width: 100%;
  background: #121218;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.kd-sponsor-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.kd-sponsor-badge {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent);
}
.kd-sponsor-hint {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
}
.kd-sponsor-native-box {
  min-height: 180px;
  border-radius: 16px;
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.kd-sponsor-title {
  font-family: 'Dela Gothic One', sans-serif;
  font-size: 1.05rem;
  margin: 0;
  color: #fff;
}
.kd-sponsor-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border-radius: 16px;
  background: var(--accent);
  color: #000;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
}
.kd-comments-ad-slot {
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 14px;
  background: #18181f;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.kd-comments-ad-slot[hidden] { display: none; }

