/* Metamorphosis Aura - Design System & Custom Styles */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');

:root {
  --color-surface: #fbf9f7;
  --color-surface-dim: #dbdad8;
  --color-surface-bright: #fbf9f7;
  --color-surface-container: #efedec;
  --color-surface-container-low: #f5f3f1;
  --color-surface-container-lowest: #ffffff;
  --color-surface-container-high: #eae8e6;
  --color-on-surface: #1b1c1b;
  --color-on-surface-variant: #4f453e;
  --color-outline: #81756c;
  --color-outline-variant: #d2c4ba;
  --color-primary: #c5a48a;
  --color-primary-dark: #b0927a;
  --color-on-primary: #ffffff;
  --color-primary-container: #c5a48a;
  --color-secondary: #545e76;
  --color-ai-indigo: #6366F1;
  --color-rose-gold-glow: #F4E4D7;
  --color-charcoal-trust: #2C2C2C;
  --color-success-mint: #A8DADC;
  
  --font-headline: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
  background-color: #121214;
  background-image: 
    radial-gradient(at 0% 0%, rgba(197, 164, 138, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.12) 0px, transparent 50%);
  color: var(--color-on-surface);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* 60FPS GPU Hardware Accelerated Ultra-Smooth Transitions & No-Outline Focus */
.nav-item {
  will-change: background-color, border-color, color, box-shadow;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
  backface-visibility: hidden;
  outline: none !important;
}

.nav-item:focus,
.nav-item:focus-visible,
.nav-item:active,
button:focus,
button:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.content-tab-btn, .record-tab-btn, .config-tab-btn, .quick-date-btn {
  will-change: background-color, color;
  transition: all 0.12s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
}

/* Material Symbols configuration */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}
.material-symbols-outlined.filled {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(197, 164, 138, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(197, 164, 138, 0.6);
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Glassmorphism Styles */
.glass-panel {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.glass-panel-dark {
  background: rgba(27, 28, 27, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 4px 20px -2px rgba(44, 44, 44, 0.04);
  border: 1px solid rgba(228, 226, 224, 0.6);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  box-shadow: 0 8px 30px -4px rgba(197, 164, 138, 0.12);
}

/* Shimmer Button Effect */
.shimmer-btn {
  background: linear-gradient(90deg, #c5a48a 0%, #dcc0aa 50%, #c5a48a 100%);
  background-size: 200% 100%;
  animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Step Indicator */
.step-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  margin-right: 8px;
}

/* Slide Up Animation */
.animate-slide-up {
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Fix Native Date Picker Indicator Icon Visibility on Dark Themes */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.9) sepia(1) saturate(5) hue-rotate(350deg) brightness(1.2);
  cursor: pointer;
  padding: 3px;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  filter: invert(1) brightness(1.5);
  background-color: rgba(245, 158, 11, 0.4);
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Fade In Animation */
.animate-fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* Float Animation */
.animate-float {
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Pulse Slow */
.animate-pulse-slow {
  animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Toast Container */
#toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(44, 44, 44, 0.9);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.3s ease forwards;
  pointer-events: auto;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.pb-safe {
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

/* Marquee Announcement Animation - Non-stop Seamless Loop */
@keyframes marqueeSeamless {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  display: inline-block;
  white-space: nowrap;
  animation: marqueeSeamless 16s linear infinite;
}

.animate-marquee:hover {
  animation-play-state: running;
}

/* Fabric Poster Editor Canvas Optimization */
.canvas-container {
  margin: 0 auto !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

#editor-canvas-box canvas {
  display: block;
}

/* Hide video controls overflow menu (download, playback speed, picture-in-picture) */
video::-webkit-media-controls-overflow-button,
video::-internal-media-controls-overflow-button,
video::-webkit-media-controls-overflow-menu-list {
  display: none !important;
}

/* 画面内容输入框顶部的激活标签（风格标签 + 控图标签），确保视觉尺寸、字号、高度、间距 100% 绝对一致 */
.editor-active-tag,
#active-style-tag,
.control-tag-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  height: 22px !important;
  max-height: 22px !important;
  line-height: 1 !important;
  padding: 0 7px !important;
  background-color: #f7f2ee !important;
  border: 1px solid #e8dbd0 !important;
  color: #c5a48a !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  border-radius: 9999px !important;
  flex-shrink: 0 !important;
  letter-spacing: -0.025em !important;
  user-select: none !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
}

.editor-active-tag span,
#active-style-tag span,
.control-tag-pill span {
  font-size: 11px !important;
  line-height: 1 !important;
  color: #c5a48a !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  letter-spacing: -0.025em !important;
}

.editor-active-tag button,
#active-style-tag button,
.control-tag-pill button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  cursor: pointer !important;
  color: #c5a48a !important;
  transition: opacity 0.15s ease !important;
  line-height: 1 !important;
}

.editor-active-tag button:hover,
#active-style-tag button:hover,
.control-tag-pill button:hover {
  opacity: 0.7 !important;
}

.editor-active-tag button .material-symbols-outlined,
#active-style-tag button .material-symbols-outlined,
.control-tag-pill button .material-symbols-outlined {
  font-size: 11px !important;
  width: 11px !important;
  height: 11px !important;
  line-height: 11px !important;
  color: #c5a48a !important;
  display: block !important;
}

