/* ==========================================================================
   MIKUDESU - OFFICIAL APP STORY SHOWCASE (POWERED BY GSAP ENGINE)
   Dark APK Aesthetic • 60-120 FPS Native Hardware Accelerated
   ========================================================================== */

.story-wrap {
  --story-bg: #090e1a;
  --story-ink: #f8fafc;
  --story-muted: #94a3b8;
  --story-green: #00e5ff;
  --story-green-soft: rgba(0, 229, 255, 0.14);
  --story-gold: #fbbf24;
  --story-card: #0f172a;
  --story-border: rgba(0, 229, 255, 0.22);
  --story-chart: #00e5ff;
  aspect-ratio: 16/9;
  border: 1px solid rgba(0, 229, 255, 0.25);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  border-radius: 16px;
  width: 100%;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 229, 255, 0.08);
}

.story-wrap .story-stage {
  transform-origin: 0 0;
  background: var(--story-bg);
  width: 1600px;
  height: 900px;
  color: var(--story-ink);
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
}

.story-wrap .story-grid {
  z-index: 0;
  background-image: linear-gradient(rgba(0, 229, 255, 0.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(0, 229, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  position: absolute;
  inset: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%);
  mask-image: linear-gradient(90deg, transparent, #000 30%);
}

.story-wrap .story-scene {
  z-index: 5;
  opacity: 0;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: 100px 130px;
  display: flex;
  position: absolute;
  inset: 0;
}

.story-wrap .story-kicker {
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--story-green);
  font-family: 'Outfit', monospace;
  font-size: 22px;
  font-weight: 700;
}

.story-wrap .story-display {
  letter-spacing: -.03em;
  color: var(--story-ink);
  font-weight: 800;
  line-height: 1;
}

.story-wrap .story-icon {
  border-radius: 32px;
  flex: none;
  width: 156px;
  height: 156px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 229, 255, 0.25);
  border: 2px solid rgba(0, 229, 255, 0.4);
}

.story-wrap .story-icon img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
}

.story-wrap .story-s1-row {
  align-items: center;
  gap: 38px;
  display: flex;
}

.story-wrap .story-s1-name {
  font-size: 88px;
  color: #fff;
  font-family: 'Outfit', sans-serif;
}

.story-wrap .story-s1-dev {
  color: var(--story-muted);
  margin-top: 10px;
  font-size: 28px;
  font-weight: 600;
}

.story-wrap .story-s1-dev b {
  color: var(--story-green);
}

.story-wrap .story-s2-big {
  color: var(--story-green);
  font-size: 144px;
  font-family: 'Outfit', sans-serif;
}

.story-wrap .story-s2-sub {
  color: var(--story-muted);
  font-size: 28px;
  font-weight: 600;
}

.story-wrap .story-chart {
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  height: 250px;
  position: absolute;
  bottom: 120px;
  left: 130px;
  right: 130px;
}

.story-wrap .story-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.story-wrap .story-s3-grid {
  align-items: center;
  gap: 76px;
  display: flex;
}

.story-wrap .story-s3-score {
  font-size: 190px;
  line-height: .9;
  font-family: 'Outfit', sans-serif;
  color: #fff;
}

.story-wrap .story-stars {
  gap: 8px;
  margin-top: 8px;
  font-size: 48px;
  display: flex;
}

.story-wrap .story-star {
  color: rgba(255, 255, 255, 0.15);
  position: relative;
}

.story-wrap .story-star .fill {
  color: var(--story-gold);
  white-space: nowrap;
  width: 0%;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.story-wrap .story-histo {
  flex-direction: column;
  flex: 1;
  gap: 13px;
  display: flex;
}

.story-wrap .story-histo-row {
  align-items: center;
  gap: 16px;
  display: flex;
}

.story-wrap .story-histo-label {
  width: 36px;
  color: var(--story-muted);
  font-family: 'Outfit', monospace;
  font-size: 22px;
  font-weight: 700;
}

.story-wrap .story-histo-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  flex: 1;
  height: 16px;
  overflow: hidden;
}

.story-wrap .story-histo-bar {
  background: var(--story-green);
  border-radius: 8px;
  width: 0%;
  height: 100%;
}

.story-wrap .story-s3-count {
  color: var(--story-muted);
  margin-top: 18px;
  font-size: 26px;
  font-weight: 600;
}

.story-wrap .story-shots {
  justify-content: center;
  align-items: center;
  gap: 32px;
  display: flex;
  width: 100%;
}

.story-wrap .story-shot {
  background: var(--story-card);
  border: 1.5px solid rgba(0, 229, 255, 0.35);
  border-radius: 22px;
  flex: none;
  height: 520px;
  max-width: 1100px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 229, 255, 0.15);
}

.story-wrap .story-shot img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.story-wrap .story-badges {
  flex-direction: column;
  gap: 24px;
  display: flex;
}

.story-wrap .story-badge {
  background: var(--story-card);
  border: 1px solid rgba(255, 255, 255, 0.15);
  opacity: 0;
  border-radius: 16px;
  align-items: center;
  gap: 28px;
  padding: 26px 36px;
  display: flex;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.story-wrap .story-tag {
  color: var(--story-green);
  background: var(--story-green-soft);
  white-space: nowrap;
  border-radius: 10px;
  padding: 8px 18px;
  font-family: 'Outfit', monospace;
  font-size: 36px;
  font-weight: 700;
}

.story-wrap .story-tag.gold {
  color: var(--story-gold);
  background: rgba(251, 191, 36, 0.15);
}

.story-wrap .story-badge-desc {
  color: var(--story-ink);
  font-size: 34px;
  font-weight: 700;
}

.story-wrap .story-s5 {
  text-align: center;
  justify-content: center;
  align-items: center;
}

.story-wrap .story-s5-title {
  font-size: 72px;
  color: #fff;
  font-family: 'Outfit', sans-serif;
}

.story-wrap .story-s5-cta {
  font-size: 32px;
  font-weight: 700;
}

.story-wrap .story-s5-cta .cta-main {
  color: var(--story-green);
}

.story-wrap .story-s5-cta .cta-sub {
  color: var(--story-muted);
  font-weight: 600;
}

.story-wrap .story-topbar {
  z-index: 20;
  opacity: 0;
  align-items: center;
  gap: 22px;
  display: flex;
  position: absolute;
  top: 56px;
  left: 130px;
}

.story-wrap .story-topbar .story-topbar-icon {
  border-radius: 16px;
  flex: none;
  width: 72px;
  height: 72px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.story-wrap .story-topbar .story-topbar-icon img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
}

.story-wrap .story-topbar .story-topbar-name {
  letter-spacing: -.02em;
  color: var(--story-ink);
  font-size: 40px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
}

.story-wrap .story-wipe {
  z-index: 30;
  background: #040810;
  transform-origin: 0;
  position: absolute;
  inset: 0;
  transform: scaleX(0);
}

.app-story-inline {
  cursor: pointer;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  border-radius: 16px;
}

.app-story-inline .story-actions {
  z-index: 40;
  gap: 8px;
  display: flex;
  position: absolute;
  bottom: 12px;
  right: 12px;
}

.story-action {
  color: #f1f5f9;
  cursor: pointer;
  background: rgba(13, 20, 36, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  transition: all .2s;
  display: inline-flex;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.story-action:hover, .story-action:active {
  background: #1e293b;
  border-color: rgba(0, 229, 255, 0.5);
  color: #00e5ff;
}

.story-toast {
  z-index: 2147483647;
  color: #fff;
  opacity: 0;
  background: #0f172af2;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 10px;
  padding: 11px 18px;
  font: 600 14px 'Plus Jakarta Sans', system-ui, sans-serif;
  transition: opacity .18s, transform .18s;
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%) translateY(10px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

.story-toast.visible {
  opacity: 1;
  transform: translate(-50%) translateY(0);
}

.story-overlay {
  background: transparent;
  border: none;
  max-width: 100vw;
  max-height: 100vh;
  padding: 0;
  margin: auto;
}

.story-overlay::backdrop {
  background: rgba(4, 7, 14, 0.92);
}

.story-overlay .story-overlay-actions {
  z-index: 50;
  gap: 12px;
  display: flex;
  position: absolute;
  top: 16px;
  right: 16px;
}

.story-overlay .story-wrap {
  width: min(92vw, 1280px);
}

@media (max-width: 600px) {
  .story-action {
    width: 38px;
    height: 38px;
  }
  .story-overlay .story-overlay-actions {
    top: auto;
    bottom: calc(100% + 10px);
    right: 0;
  }
}
