* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

.auth-box,
.page-box {
  width: 100%;
  max-width: 420px;
  margin: 50px auto;
  padding: 20px;
}

input,
textarea,
button {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 14px;
  margin-top: 10px;
  font-size: 16px;
}

button {
  background: #16c784;
  color: #000;
  font-weight: bold;
  cursor: pointer;
}

.feed-spinner-wrap {
  width: 100%;
  height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.feed-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: feedSpin .8s linear infinite;
}

@keyframes feedSpin {
  to {
    transform: rotate(360deg);
  }
}

#feedList {
  width: 100%;
  height: calc(100vh - 70px);
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  background: #000;
}

.video-card {
  width: 100%;
  height: calc(100vh - 70px);
  position: relative;
  background: #000;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
}

.video-card video,
.video-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: #000;
}

.video-card video {
  z-index: 2;
}

.video-thumb {
  z-index: 5;
  opacity: 1;
  transition: opacity .18s ease, visibility .18s ease;
  pointer-events: none;
  visibility: visible;
}

.video-thumb.hide-thumb {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.video-info {
  position: absolute;
  left: 15px;
  right: 95px;
  bottom: 145px;
  z-index: 10;
  text-shadow: 0 2px 8px rgba(0,0,0,.8);
}

.video-info p {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.35;
}

.video-actions {
  position: absolute;
  right: 14px;
  bottom: 145px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.action-btn {
  width: 52px;
  height: 52px;
  padding: 0;
  margin: 0;
  background: rgba(0,0,0,.25);
  border-radius: 50%;
  color: #fff;
  font-size: 28px;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn.liked,
.like-btn.liked {
  color: #ff2d55;
  background: rgba(255,255,255,.12);
}

.video-actions span {
  font-size: 12px;
  font-weight: bold;
  text-shadow: 0 2px 6px #000;
  margin-bottom: 10px;
}

.video-progress-wrap {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 105px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 30;
}

.video-progress-wrap span {
  font-size: 12px;
  min-width: 35px;
  text-shadow: 0 1px 4px #000;
}

.video-progress {
  flex: 1;
  padding: 0;
  margin: 0;
  height: 4px;
  cursor: pointer;
}

.tap-hint,
.center-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 25;
}

.tap-hint {
  background: rgba(0,0,0,.55);
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: bold;
  opacity: 0;
  transition: opacity .25s;
}

.center-play {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  opacity: 0;
  transition: opacity .2s ease;
}

.comment-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: flex-end;
}

.comment-box {
  width: 100%;
  height: 60vh;
  background: #111;
  border-radius: 18px 18px 0 0;
  display: flex;
  flex-direction: column;
}

.comment-head {
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comment-close {
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
}

.reply-bar {
  padding: 10px 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #aaa;
  font-size: 13px;
}

.reply-cancel {
  width: auto;
  padding: 0;
  margin: 0;
  background: transparent;
  color: #16c784;
  font-size: 13px;
}

.comment-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 14px;
}

.comment-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.comment-item p {
  margin-top: 4px;
  font-size: 14px;
}

.comment-reply {
  margin-left: 18px;
  padding-left: 10px;
  border-left: 2px solid rgba(255,255,255,.12);
}

.reply-btn {
  width: auto;
  padding: 0;
  margin-top: 6px;
  background: transparent;
  color: #aaa;
  font-size: 13px;
  font-weight: bold;
}

.delete-comment-btn {
  width: auto;
  padding: 0;
  margin-top: 6px;
  margin-left: 12px;
  background: transparent;
  color: #ff4d4d;
  font-size: 13px;
  font-weight: bold;
}

.comment-empty {
  padding: 20px;
  text-align: center;
  color: #aaa;
}

.comment-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.comment-input {
  flex: 1;
  margin: 0;
  background: #222;
  color: #fff;
}

.comment-send {
  width: 80px;
  margin: 0;
}

nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  display: flex;
  background: rgba(0,0,0,.05);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-top: none;
  z-index: 999;
}

nav a {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  text-shadow: 0 2px 6px rgba(0,0,0,.9);
}

::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.video-actions .action-btn {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  background: rgba(0,0,0,.25) !important;
  color: #fff !important;
  font-size: 28px !important;
  line-height: 1 !important;
}

.video-actions .like-btn.liked {
  color: #ff2d55 !important;
  background: rgba(255,255,255,.12) !important;
}