:root {
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --bg-deep: #090608;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bg-hover: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-border-hover: rgba(255, 255, 255, 0.24);
  --glass-highlight: inset 0 1px 1px rgba(255, 255, 255, 0.16);

  --accent-cyan: #25F4EE;
  --accent-magenta: #FE2C55;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.72);
  --text-muted: rgba(255, 255, 255, 0.42);

  --dock-base-size: 54px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  user-select: none;
}

.bg-wrapper {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-image {
  position: absolute;
  inset: -30px;
  background-image: url('assets/bg.gif');
  background-size: cover;
  background-position: center center;
  filter: blur(12px) brightness(0.68) saturate(1.15);
  transform: scale(1.05);
  transition: filter 0.8s ease;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 35%, rgba(18, 10, 16, 0.2) 0%, rgba(8, 5, 8, 0.72) 100%);
}

.bg-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.045'/%3E%3C/svg%3E");
  opacity: 0.85;
}

.cursor-glow {
  position: absolute;
  width: 650px;
  height: 650px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 44, 85, 0.06) 0%, rgba(255, 120, 160, 0.02) 40%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

.viewport-stage {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100dvh;
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 36px 36px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.top-hud {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.hud-item {
  display: flex;
  align-items: center;
}

.local-clock .hud-mono {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.hud-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.guns-volume-control {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(14, 12, 22, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 9px 15px;
  border-radius: 13px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: all 0.2s ease;
}

.guns-volume-control:hover {
  background: rgba(18, 15, 28, 0.82);
  border-color: rgba(255, 255, 255, 0.22);
}

.volume-icon-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  outline: none;
  transition: opacity 0.2s ease;
}

.volume-icon-btn:hover {
  opacity: 0.82;
}

.volume-icon-btn svg {
  width: 19px;
  height: 19px;
  color: #ffffff;
}

.guns-slider-box {
  position: relative;
  width: 92px;
  height: 9px;
  display: flex;
  align-items: center;
}

.guns-slider-track {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
  position: relative;
}

.guns-slider-fill {
  height: 100%;
  background: #ffffff;
  border-radius: 999px;
  width: 50%;
  transition: width 0.05s ease;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.guns-slider-input {
  position: absolute;
  inset: -6px 0;
  width: 100%;
  height: calc(100% + 12px);
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  margin: 0;
}

.hero-section {
  width: 100%;
  max-width: 800px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: -4px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 4.5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 4px 24px rgba(255, 255, 255, 0.18);
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 1.2vw, 0.88rem);
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-subtitle .divider {
  color: rgba(255, 255, 255, 0.25);
  margin: 0 6px;
}

.hero-bio {
  font-size: clamp(0.85rem, 1.2vw, 0.94rem);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 660px;
  margin-top: 4px;
  font-weight: 350;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 9px;
  border-radius: 5px;
  transition: all 0.2s ease;
}

.tag:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.edits-showcase {
  width: 100%;
  max-width: 1160px;
  display: flex;
  flex-direction: column;
}

.edits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  width: 100%;
}

.edit-card {
  position: relative;
  cursor: pointer;
  border-radius: 18px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-inner {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), var(--glass-highlight);
  backdrop-filter: blur(14px);
  transition: border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}

.edit-card:hover {
  transform: translateY(-6px);
}

.edit-card:hover .card-inner {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65), 0 0 25px rgba(255, 255, 255, 0.1);
}

.media-container.ratio-16-9 {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0d0d11;
}

.card-poster,
.card-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-video {
  opacity: 0;
  pointer-events: none;
}

.edit-card:hover .card-poster {
  transform: scale(1.04);
}

.edit-card:hover .card-video.playing {
  opacity: 1;
  transform: scale(1.02);
}

.card-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.45) 100%);
  pointer-events: none;
}

.play-btn-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.30);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  z-index: 3;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.play-btn-circle svg {
  width: 20px;
  height: 20px;
  margin-left: 2px;
}

.edit-card:hover .play-btn-circle {
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.35);
}

.dock-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.macos-dock {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px 6px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  backdrop-filter: blur(28px) saturate(1.8);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.dock-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  outline: none;
  transform-origin: bottom center;
  transition: transform 0.25s cubic-bezier(0.2, 0, 0.2, 1);
}

.app-icon {
  width: var(--dock-base-size);
  height: var(--dock-base-size);
  border-radius: 22.5%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.icon-gloss {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0) 100%);
  border-radius: 22.5% 22.5% 100% 100% / 22.5% 22.5% 30% 30%;
  pointer-events: none;
  z-index: 2;
}

.tiktok-icon {
  background: linear-gradient(145deg, #18181b 0%, #000000 100%);
  border: 1px solid rgba(255, 255, 255, 0.20);
}

.tiktok-svg {
  width: 30px;
  height: 30px;
  z-index: 1;
}

.dock-active-dot {
  width: 4px;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  margin-top: 5px;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
}

.dock-tooltip {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: rgba(14, 10, 14, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 5px 12px;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
  z-index: 20;
}

.dock-tooltip.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.theater-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 24px;
}

.theater-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(28px);
}

.modal-dialog {
  position: relative;
  z-index: 2;
  width: min(94vw, calc((88vh - 65px) * (16 / 9)));
  max-width: 1420px;
  transform: scale(0.94);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.theater-modal.active .modal-dialog {
  transform: scale(1);
}

.modal-glass {
  background: rgba(18, 12, 18, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.9), var(--glass-highlight);
  backdrop-filter: blur(28px);
}

.modal-header {
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-tags {
  display: flex;
  align-items: center;
}

.modal-title-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.modal-close-btn svg {
  width: 18px;
  height: 18px;
}

.modal-video-wrap.ratio-16-9 {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.modal-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: modalSpin 0.8s linear infinite;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 2;
}

.modal-spinner.active {
  opacity: 1;
}

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

.modal-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

@media (max-width: 960px) {
  html, body {
    overflow-y: auto;
    height: auto;
    min-height: 100%;
  }

  .viewport-stage {
    height: auto;
    min-height: 100vh;
    padding: 16px 20px 90px 20px;
    gap: 24px;
  }

  .hero-section {
    margin-top: 8px;
  }

  .edits-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    gap: 18px;
  }

  .dock-container {
    position: fixed;
    bottom: 16px;
    left: 0;
    right: 0;
    z-index: 80;
  }

  .modal-dialog {
    width: 96vw;
  }
}
