:root {
  --bg: #0a0d14;
  --text: #f7f7f8;
  --muted: rgba(247, 247, 248, 0.75);
  --chip: rgba(14, 20, 32, 0.7);
  --accent: #ffd45a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: radial-gradient(circle at 20% 10%, #1a2437 0%, var(--bg) 60%);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
  height: 100%;
  overscroll-behavior: none;
}

#app {
  height: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.feed {
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.initial-loader {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-content: center;
  gap: 12px;
  background: radial-gradient(circle at 20% 10%, #1a2437 0%, var(--bg) 60%);
}

.loader-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

.loader-text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.top-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  z-index: 40;
  background: linear-gradient(90deg, #f0c85e 0%, #ffe8a3 50%, #f0c85e 100%);
  background-size: 200% 100%;
  animation: progress-shift 1.1s linear infinite;
}

.slide {
  position: relative;
  height: 100vh;
  min-height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  height: 100svh;
  min-height: 100svh;
  scroll-snap-align: start;
  overflow: hidden;
  background: #000;
}

.slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.72) 7%, rgba(0, 0, 0, 0.18) 55%, rgba(0, 0, 0, 0.08) 100%);
}

.info {
  position: absolute;
  left: 16px;
  right: 88px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 2;
}

.desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}

.actions {
  position: absolute;
  right: 12px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
}

.action-btn {
  width: 58px;
  border: none;
  border-radius: 999px;
  padding: 8px 0;
  background: var(--chip);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.action-btn .icon {
  font-size: 16px;
}

.discord-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.discord-icon svg {
  width: 100%;
  height: 100%;
}

.action-btn .count {
  font-size: 11px;
  color: var(--muted);
}

.action-btn.like {
  outline: 1px solid rgba(255, 212, 90, 0.35);
}

.skeleton {
  background: linear-gradient(100deg, #10151f 0%, #202a3f 50%, #10151f 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  padding: 16px;
}

.hidden {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 20;
  background: rgba(8, 10, 16, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text);
  padding: 8px 12px;
}

body.desktop-compat #app {
  max-width: 430px;
  height: calc(100vh - 32px);
  margin: 16px auto;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

body.desktop-compat .feed {
  scrollbar-width: none;
}

body.desktop-compat .feed::-webkit-scrollbar {
  display: none;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes progress-shift {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}
