:root {
  --accent: #ff3b6f;
  --cta: #24a1de;
  --blur: 25px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: #000;
  color: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

.swipe-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.video-track {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  will-change: transform;
}

.video-item {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
}

.video-element {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  transition: filter 0.4s ease;
}

.video-item.locked .video-element {
  filter: blur(var(--blur)) brightness(0.6);
}

.video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 16px calc(20px + env(safe-area-inset-bottom)) 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0) 100%);
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.3s;
}

.video-item.locked .video-overlay {
  opacity: 0.3;
}

.video-info {
  pointer-events: auto;
  margin-bottom: 12px;
}

.author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8a5c, #ff4d6d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.author-name {
  font-weight: 700;
  font-size: 16px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.follow-btn {
  margin-left: auto;
  background: var(--accent);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.caption {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}

.music {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 12px;
  border-radius: 40px;
  backdrop-filter: blur(4px);
}

.music .material-icons {
  font-size: 16px;
}

.action-sidebar {
  position: absolute;
  right: 12px;
  bottom: 22%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  z-index: 20;
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.action-item:active {
  transform: scale(0.92);
}

.action-item.liked .action-icon {
  color: var(--accent);
}

.action-icon {
  width: 52px;
  height: 52px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  transition: color 0.2s;
}

.action-count {
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.progress-container {
  position: absolute;
  bottom: 8px;
  left: 16px;
  right: 16px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.25);
  z-index: 30;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
}

.top-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px 16px;
  background: #000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.banner-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.banner-logo .material-icons {
  color: var(--accent);
  font-size: 28px;
}

.banner-title {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.banner-cta {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--cta);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
}

.banner-cta .material-icons {
  font-size: 18px;
}

.sound-control {
  position: fixed;
  top: 80px;
  right: 16px;
  z-index: 200;
  padding: 10px;
  border-radius: 40px;
  background: rgba(0, 0, 0, 0.6);
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform 0.1s;
}

.sound-control:active {
  transform: scale(0.92);
}

.sound-control .material-icons {
  font-size: 24px;
  display: block;
}

.mute-hint {
  position: fixed;
  top: 135px;
  right: 16px;
  z-index: 210;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--accent);
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(255, 59, 111, 0.4);
  transition: opacity 0.4s ease;
}

.mute-hint .material-icons {
  font-size: 14px;
}

.mute-hint::after {
  content: '';
  position: absolute;
  top: -6px;
  right: 16px;
  border-width: 0 6px 6px 6px;
  border-style: solid;
  border-color: transparent transparent var(--accent) transparent;
}

.swipe-hint {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 40px;
  background: rgba(0, 0, 0, 0.6);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0.9;
  z-index: 15;
  transition: opacity 0.5s ease;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
}

.modal.show {
  display: flex;
}

.modal-content {
  position: relative;
  width: 85%;
  max-width: 320px;
  padding: 30px 24px;
  border-radius: 24px;
  background: rgba(20, 20, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  text-align: center;
  animation: fade-in-scale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fade-in-scale {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-icon .material-icons {
  font-size: 48px;
  color: var(--cta);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 1; }
}

.modal-icon {
  margin-bottom: 16px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-status {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 24px;
}

.countdown {
  width: 100%;
  height: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.countdown-loader {
  width: 0;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--cta), #0088cc);
  box-shadow: 0 0 10px rgba(36, 161, 222, 0.5);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  display: none;
}

.modal-content.dismissible .modal-close {
  display: block;
}

.debug-badge {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 500;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

@media (max-width: 600px) {
  .action-icon { width: 44px; height: 44px; font-size: 24px; }
  .action-sidebar { gap: 22px; right: 10px; bottom: 25%; }
  .sound-control { top: 70px; right: 12px; padding: 8px; }
  .sound-control .material-icons { font-size: 20px; }
  .mute-hint { top: 120px; right: 12px; }
}
