:root {
  /* Color System: Editorial & High-Legibility */
  --color-canvas: #FAFAFB;
  --color-surface: #FFFFFF;
  --color-border: #E2E8F0;
  --color-border-subtle: #F1F5F9;
  
  --color-text-main: #0F172A;       /* Slate 900 */
  --color-text-muted: #475569;      /* Slate 600 */
  --color-text-subtle: #94A3B8;     /* Slate 400 */
  
  /* Brand Accent: Signal Coral & Indigo */
  --color-primary: #FF3366;
  --color-primary-hover: #E11D48;
  --color-primary-light: #FFF1F4;
  --color-indigo: #4F46E5;
  --color-indigo-light: #EEF2FF;
  
  /* Semantic Statuses */
  --color-success: #10B981;
  --color-success-light: #ECFDF5;
  --color-warning: #F59E0B;
  --color-danger: #EF4444;
  
  /* Typography Tokens */
  --font-sans: -apple-system, BlinkMacSystemFont, "Outfit", "Inter", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  /* Radii & Shadows */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  
  --shadow-subtle: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-hover: 0 10px 25px -4px rgba(15, 23, 42, 0.08);
  --shadow-focus: 0 0 0 4px rgba(255, 51, 102, 0.15);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[x-cloak] {
  display: none !important;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-canvas);
  color: var(--color-text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Brand Navbar */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 14px 0;
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  height: 44px;
}
.brand-link svg {
  height: 100%;
  width: auto;
  overflow: visible;
}
.brand-link .frame-back {
  animation: logoFrameBack 2.4s ease-in-out infinite alternate;
  transform-origin: 32px 40px;
}
.brand-link .frame-mid {
  animation: logoFrameMid 2.4s ease-in-out infinite alternate;
  transform-origin: 40px 40px;
}
.brand-link .frame-front {
  animation: logoFrameFront 2.4s ease-in-out infinite alternate;
  transform-origin: 46px 40px;
}
.brand-link .play-arrow {
  animation: logoPlayPulse 1.2s ease-in-out infinite alternate;
  transform-origin: 48px 38px;
}

@keyframes logoFrameBack {
  0% { transform: rotate(-8deg) scale(0.95); opacity: 0.5; }
  100% { transform: rotate(-2deg) scale(1.04); opacity: 0.95; }
}

@keyframes logoFrameMid {
  0% { transform: rotate(5deg) scale(1.02); }
  100% { transform: rotate(0deg) scale(0.96); }
}

@keyframes logoFrameFront {
  0% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-1.5px) scale(1.02); }
  100% { transform: translateY(0px) scale(1); }
}

@keyframes logoPlayPulse {
  0% { transform: scale(1) translateX(0); }
  100% { transform: scale(1.18) translateX(2.5px); }
}
.badge-version {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-canvas);
  border: 1px solid var(--color-border);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--color-success);
}

/* Hero & Input Console */
.hero-section {
  padding: 56px 0 40px;
  text-align: center;
}
.hero-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--color-text-main);
  margin-bottom: 14px;
  line-height: 1.15;
}
.hero-subtitle {
  font-size: 18px;
  color: var(--color-text-muted);
  max-width: 620px;
  margin: 0 auto 36px;
}

/* The Extraction Console */
.extractor-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 10px;
  box-shadow: var(--shadow-card);
  max-width: 760px;
  margin: 0 auto;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.extractor-card:focus-within {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus);
}
.extractor-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}
.url-input {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 44px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--color-text-main);
  border: none;
  background: transparent;
  outline: none;
}
.url-input::placeholder {
  color: var(--color-text-subtle);
}
.input-icon {
  position: absolute;
  left: 14px;
  color: var(--color-text-subtle);
  pointer-events: none;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 28px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  background-color: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn-primary:hover {
  background-color: var(--color-primary-hover);
}
.btn-primary:active {
  transform: translateY(1px);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Supported Platforms Pill Bar */
.platform-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: all 0.15s;
}
.platform-pill:hover {
  border-color: var(--color-text-main);
  color: var(--color-text-main);
}

/* Extraction Result Box */
.result-card {
  margin-top: 36px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  text-align: left;
}
@media (max-width: 720px) {
  .result-card {
    grid-template-columns: 1fr;
  }
  .extractor-form {
    flex-direction: column;
  }
  .btn-primary {
    width: 100%;
  }
}

.media-preview-box {
  background: #000000;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 400px;
}
.media-preview-box img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.action-stack {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.btn-copy {
  height: 48px;
  background: var(--color-primary);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-secondary {
  height: 44px;
  background: var(--color-canvas);
  color: var(--color-text-main);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.btn-secondary:hover {
  background: #FFFFFF;
  border-color: var(--color-text-muted);
}
