/**
 * custom.css - Custom styles for Klakk Landing Page
 */

/* Fonts - Inter Variable for all text (matching astroship-pro) */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-display: swap;
}

/* All text uses Inter (matching astroship-pro) */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

/* Custom animations */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* FREE Badge Subtle Animation - 柔和的徽章动画 */
@keyframes badge-float {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.05);
  }
}

/* FREE Badge Glow Effect - 发光效果 */
@keyframes badge-glow {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
  }
  50% {
    box-shadow: 0 4px 25px rgba(34, 197, 94, 0.7), 0 0 30px rgba(34, 197, 94, 0.3);
  }
}

/* FREE Badge Styles - 优化的徽章样式 */
.free-badge {
  animation: badge-float 2.5s ease-in-out infinite, badge-glow 2s ease-in-out infinite;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 2px solid rgba(255, 255, 255, 0.8);
  font-weight: 800;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.free-badge-yellow {
  animation: badge-float 2.5s ease-in-out infinite;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
  font-weight: 800;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.free-badge-yellow:hover,
.free-badge:hover {
  animation-play-state: paused;
}

.animate-fade-in {
  animation: fade-in 0.6s ease-out forwards;
}

.animate-on-scroll {
  opacity: 0;
}

/* Gradient backgrounds */
.gradient-purple,
.bg-gradient-purple {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-blue,
.bg-gradient-blue {
  background: linear-gradient(135deg, #667eea 0%, #4facfe 100%);
}

.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero section video/image styling */
.hero-demo {
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Feature cards */
.feature-card {
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 320px; /* Fixed height for all cards - same for all 6 cards */
  min-height: 320px;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Make feature card description grow to fill space */
.feature-card p {
  flex-grow: 1;
}

/* FAQ accordion transitions */
.faq-answer {
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.faq-icon {
  transition: transform 0.3s ease;
}

/* Language dropdown */
.language-dropdown {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* CTA button hover effect */
.btn-primary {
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(102, 126, 234, 0.5);
}

/* Sticky header */
header.scroll-down {
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

header.scroll-up {
  transform: translateY(0);
  transition: transform 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Price comparison styling */
.price-comparison {
  position: relative;
}

.price-strike {
  position: relative;
}

.price-strike::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  background: #ef4444;
  transform: rotate(-5deg);
}

/* Mobile menu overlay */
#mobile-menu {
  backdrop-filter: blur(10px);
}

/* RTL support */
[dir="rtl"] {
  direction: rtl;
}

[dir="rtl"] .rtl\:rotate-180 {
  transform: rotate(180deg);
}

[dir="rtl"] .rtl\:text-right {
  text-align: right;
}

[dir="rtl"] .rtl\:mr-auto {
  margin-right: auto;
  margin-left: 0;
}

/* RTL Layout Fixes */
[dir="rtl"] .space-x-2 > * + * {
  margin-left: 0;
  margin-right: 0.5rem;
}

[dir="rtl"] .space-x-4 > * + * {
  margin-left: 0;
  margin-right: 1rem;
}

[dir="rtl"] .space-x-8 > * + * {
  margin-left: 0;
  margin-right: 2rem;
}

/* RTL: Flip flex direction for certain layouts */
[dir="rtl"] .flex {
  /* Most flex containers should work fine, but we can add specific fixes */
}

[dir="rtl"] .mr-2 {
  margin-right: 0;
  margin-left: 0.5rem;
}

[dir="rtl"] .mr-4 {
  margin-right: 0;
  margin-left: 1rem;
}

[dir="rtl"] .ml-2 {
  margin-left: 0;
  margin-right: 0.5rem;
}

[dir="rtl"] .ml-4 {
  margin-left: 0;
  margin-right: 1rem;
}

/* RTL: Fix text alignment */
[dir="rtl"] .text-left {
  text-align: right;
}

[dir="rtl"] .text-right {
  text-align: left;
}

/* RTL: Dropdown positioning */
[dir="rtl"] .language-dropdown {
  right: auto;
  left: 0;
}

/* RTL: FAQ icon rotation */
[dir="rtl"] .faq-icon {
  transform: scaleX(-1);
}

/* RTL: Mobile menu */
[dir="rtl"] #mobile-menu > div {
  right: auto;
  left: 0;
}

/* Screenshot gallery */
.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Loading state */
.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* Smooth scrolling for the whole page */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar (webkit browsers) */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #764ba2;
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
  ::-webkit-scrollbar-track {
    background: #1f2937;
  }
}

/* Print styles */
@media print {
  header, footer, #language-selector, .cta-button {
    display: none;
  }
}

/* Testimonials Infinite Scroll */
#testimonials-scroll {
  position: relative;
  margin: 0 auto;
  max-width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

#testimonials-track {
  display: flex;
  gap: 1.5rem;
  will-change: transform;
  animation: scroll-testimonials 30s linear infinite;
}

#testimonials-track:hover {
  animation-play-state: paused;
}

@keyframes scroll-testimonials {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.testimonial-card {
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 280px;
  width: 380px;
  min-width: 380px;
  max-width: 380px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Testimonial rating stars */
.testimonial-card .text-yellow-400 {
  letter-spacing: 2px;
}

/* Testimonials Mobile Responsive */
@media (max-width: 768px) {
  #testimonials-track {
    animation-duration: 25s;
  }
  
  .testimonial-card {
    width: 300px;
    min-width: 300px;
    max-width: 300px;
  }
}

/* Responsive adjustments */
@media (max-width: 1023px) {
  #carousel-prev,
  #carousel-next {
    width: 40px;
    height: 40px;
  }
  
  #carousel-prev {
    left: -8px;
  }
  
  #carousel-next {
    right: -8px;
  }
}

@media (max-width: 767px) {
  .testimonial-card {
    min-height: 280px;
  }
  
  #carousel-prev,
  #carousel-next {
    width: 32px;
    height: 32px;
  }
  
  #carousel-prev svg,
  #carousel-next svg {
    width: 20px;
    height: 20px;
  }
}

/* Scroll to Top Button */
#scroll-to-top {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#scroll-to-top:hover {
  transform: translateY(-4px);
}

#scroll-to-top:active {
  transform: translateY(-2px);
}

/* Theme Toggle Button */
[data-theme-toggle] {
  transition: all 0.2s ease;
}

[data-theme-toggle]:hover {
  transform: scale(1.05);
}

[data-theme-toggle]:active {
  transform: scale(0.95);
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ============================================
   Interactive Demo Styles
   ============================================ */

/* macOS-style Demo Container */
.demo-macos-container {
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  min-height: 400px;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

/* macOS Desktop Background */
.demo-desktop {
  background-image: url('../images/Default.png') !important;
  background-size: 100% 100% !important;
  background-position: 0 0 !important;
  background-repeat: no-repeat !important;
  background-origin: border-box !important;
  background-clip: border-box !important;
  background-color: transparent;
  border-radius: 12px;
  overflow: hidden;
  width: 100% !important;
  height: 100% !important;
  position: relative;
  min-height: 400px;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  box-sizing: border-box;
  display: block;
}

/* macOS Menu Bar - 配置在文件底部统一定义 */

/* Klakk Menu Icon */
.demo-klakk-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 5px;
  transition: background-color 0.2s;
}

.demo-klakk-icon:hover {
  background: rgba(0, 0, 0, 0.05);
}

.dark .demo-klakk-icon:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Dropdown Menu */
.demo-menu {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  min-width: 220px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.dark .demo-menu {
  background: rgba(50, 50, 50, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Menu Items */
.demo-menu-item {
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
}

.demo-menu-item:first-child {
  border-radius: 8px 8px 0 0;
}

.demo-menu-item:last-child {
  border-radius: 0 0 8px 8px;
}

.demo-menu-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.dark .demo-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Keyboard Area */
.demo-keyboard-area {
  cursor: pointer;
  outline: none;
}

.demo-keyboard-area:focus {
  outline: 2px solid rgba(255, 255, 255, 0.3);
  outline-offset: -2px;
}

/* Key Display Animation */
.demo-key-display {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Sound Wave Animation */
@keyframes sound-wave {
  0%, 100% {
    transform: scaleY(0.5);
    opacity: 0.5;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.demo-sound-wave {
  transition: opacity 0.3s ease;
}

.demo-sound-wave > div {
  animation: sound-wave 0.6s ease-in-out infinite;
}

.demo-sound-wave > div:nth-child(1) {
  animation-delay: 0s;
}

.demo-sound-wave > div:nth-child(2) {
  animation-delay: 0.1s;
}

.demo-sound-wave > div:nth-child(3) {
  animation-delay: 0.2s;
}

.demo-sound-wave > div:nth-child(4) {
  animation-delay: 0.1s;
}

.demo-sound-wave > div:nth-child(5) {
  animation-delay: 0s;
}

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.2s ease-out;
}

/* Pulse Animation for Instructions */
/* Keyboard Key Style - for interactive prompts */
.demo-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2em;
  padding: 0.25em 0.5em;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9em;
  font-weight: 600;
  line-height: 1.4;
  color: #1d1d1f;
  background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-bottom-width: 3px;
  border-radius: 6px;
  box-shadow: 
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 2px 4px rgba(0, 0, 0, 0.1);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.15s ease;
}

.dark .demo-kbd {
  color: #f5f5f7;
  background: linear-gradient(180deg, #4a4a4a 0%, #2d2d2d 100%);
  border-color: rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
  box-shadow: 
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 2px 4px rgba(0, 0, 0, 0.3);
}

.demo-kbd:hover {
  transform: translateY(-1px);
  box-shadow: 
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 3px 6px rgba(0, 0, 0, 0.15);
}

/* Interactive Prompt Highlight */
.demo-interactive-prompt {
  position: relative;
  display: inline-block;
  padding: 0.25em 0.75em;
  background: rgba(147, 51, 234, 0.15);
  border-left: 4px solid rgb(147, 51, 234);
  border-radius: 8px;
  animation: prompt-glow 2s ease-in-out infinite;
  vertical-align: baseline;
  line-height: 1;
}

@keyframes prompt-glow {
  0%, 100% {
    background: rgba(147, 51, 234, 0.15);
    box-shadow: 0 0 0 rgba(147, 51, 234, 0.3);
  }
  50% {
    background: rgba(147, 51, 234, 0.25);
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.4);
  }
}

/* Keyboard Icon Animation */
@keyframes keyboard-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.demo-keyboard-icon {
  display: inline-block;
  animation: keyboard-bounce 2s ease-in-out infinite;
}

/* App Icon in Menu Bar */
.demo-app-icon {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  min-width: 24px;
  max-width: 24px;
  min-height: 24px;
  max-height: 24px;
}

/* Klakk Icon States */
.demo-klakk-icon {
  /* 紧凑的选中状态背景，只是轻微包裹图标 */
}

.demo-klakk-icon:hover {
  background: rgba(0, 0, 0, 0.05);
}

.dark .demo-klakk-icon:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Active state (when menu is open) - 淡灰色背景 */
.demo-klakk-icon-active {
  background: rgba(0, 0, 0, 0.12);
}

.dark .demo-klakk-icon-active {
  background: rgba(255, 255, 255, 0.15);
}

/* Always visible menu styling */
#demo-menu {
  /* Menu is always visible, not hidden */
  display: block !important;
}

/* Key Marquee at Bottom Left */
.demo-key-marquee {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-size: 23px;
  font-weight: 600;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: fit-content;
  box-sizing: border-box;
}

.demo-key-marquee-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 16px;
  min-width: 52px;
  height: 42px;
  font-size: 23px;
  animation: keySlideIn 0.3s ease-out;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  box-sizing: border-box;
}

@keyframes keySlideIn {
  from {
    opacity: 0;
    transform: translateX(30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.demo-key-marquee-item.fade-out {
  animation: keyFadeOut 0.2s ease-out forwards;
}

@keyframes keyFadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.8);
  }
}

.demo-key-marquee-item.slide-out-left {
  animation: keySlideOutLeft 0.15s ease-out forwards;
  pointer-events: none;
}

@keyframes keySlideOutLeft {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(-50px) scale(0.7);
  }
}

/* Placeholder when no keys are pressed - ForgeUI Text Shimmer Effect */
.demo-key-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  font-weight: 500;
  font-style: italic;
  padding: 8px 16px;
  height: 42px;
  
  /* ForgeUI Text Shimmer Implementation */
  position: relative;
  --spread: 60px;
  --base-color: rgba(255, 255, 255, 0.3);
  --shimmer-color: rgba(255, 255, 255, 0.9);
  
  background-image: 
    linear-gradient(
      90deg,
      transparent calc(50% - var(--spread)),
      var(--shimmer-color),
      transparent calc(50% + var(--spread))
    ),
    linear-gradient(var(--base-color), var(--base-color));
  background-size: 250% 100%, auto;
  background-position: 105% center, 0 0;
  background-repeat: no-repeat, no-repeat;
  background-clip: text, text;
  -webkit-background-clip: text, text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  
  animation: forgeShimmer 2.5s linear infinite;
}

@keyframes forgeShimmer {
  0% {
    background-position: 105% center, 0 0;
  }
  100% {
    background-position: -5% center, 0 0;
  }
}

/* Desktop area with better spacing - removed duplicate, using inline styles in HTML */

/* Instruction text improvements */
.demo-instruction {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ===== macOS Native Menu System - 1:1 Restoration ===== */

/* Main Menu (Left Side) */
.demo-main-menu {
  background: rgb(249, 249, 249);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), 0 0 1px rgba(0, 0, 0, 0.25);
  min-width: 280px;
  max-width: 280px;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
}

.dark .demo-main-menu {
  background: rgb(50, 50, 50);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Submenu (Right Side - Sound Pack List) */
.demo-submenu {
  background: rgb(249, 249, 249);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), 0 0 1px rgba(0, 0, 0, 0.25);
  min-width: 240px;
  max-width: 240px;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  position: absolute;
  padding: 4px 0;
}

.dark .demo-submenu {
  background: rgb(50, 50, 50);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Menu Item (Main Menu) */
.demo-menu-item {
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.08s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  line-height: 1.4;
  color: #1d1d1f;
  white-space: nowrap;
  position: relative;
}

.dark .demo-menu-item {
  color: #f5f5f7;
}

/* Menu icon styling - invert in dark mode */
.demo-menu-item img {
  filter: brightness(0) saturate(100%);
}

.dark .demo-menu-item img {
  filter: brightness(0) saturate(100%) invert(100%);
}

.demo-menu-item:hover {
  background: rgba(0, 125, 250, 0.15);
}

/* Active Item (Sound Pack with submenu open) */
.demo-menu-item.demo-menu-active {
  background: rgba(0, 125, 250, 1);
  color: white;
}

.dark .demo-menu-item.demo-menu-active {
  background: rgba(10, 132, 255, 1);
  color: white;
}

.demo-menu-item.demo-menu-active svg {
  color: white;
}

/* Active item icon - make it white */
.demo-menu-item.demo-menu-active img {
  filter: brightness(0) saturate(100%) invert(100%) !important;
}

.dark .demo-menu-item.demo-menu-active img {
  filter: brightness(0) saturate(100%) invert(100%) !important;
}

/* Submenu Item - 菜单选项，大缩进 */
.demo-submenu-item {
  padding: 2px 16px 2px 12px;
  cursor: pointer;
  transition: background 0.08s ease;
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 16px;
  line-height: 1.4;
  color: #1d1d1f;
  white-space: nowrap;
  min-height: 26px;
  position: relative;
}

.dark .demo-submenu-item {
  color: #f5f5f7;
}

.demo-submenu-item:hover {
  background: rgba(0, 125, 250, 0.15);
}

/* 子菜单项中的文本内容 - 比 section 标题再往右 */
.demo-submenu-item > span:last-child {
  margin-left: 36px;
}

/* Trial Info */
.demo-menu-trial {
  padding: 4px 12px 6px 12px;
  font-size: 11px;
  color: #86868b;
  cursor: default;
  pointer-events: none;
}

.dark .demo-menu-trial {
  color: #a1a1a6;
}

/* Submenu Category - 类别标题，在 checkmark 右侧 */
.demo-submenu-category {
  padding: 4px 16px 1px 26px;
  font-size: 15px;
  font-weight: 400;
  color: #86868b;
  letter-spacing: 0.01em;
  pointer-events: none;
  margin-top: 0;
  line-height: 1.3;
  text-align: left;
}

.dark .demo-submenu-category {
  color: #a1a1a6;
}

/* 第一个类别标题顶部无 margin */
.demo-submenu-category:first-child {
  padding-top: 3px;
}

/* Separator */
.demo-menu-separator {
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  margin: 4px 0;
}

.dark .demo-menu-separator {
  background: rgba(255, 255, 255, 0.08);
}

/* Checkmark (Main Menu - Green) */
.demo-checkmark-green {
  width: 18px;
  font-size: 16px;
  color: #30d158;
  font-weight: 600;
  text-align: center;
  margin-left: -2px;
  margin-right: 2px;
}

.dark .demo-checkmark-green {
  color: #32d74b;
}

/* Checkmark (Submenu - Black/White) - 最左侧 */
.demo-checkmark {
  width: 18px;
  font-size: 15px;
  color: #1d1d1f;
  font-weight: 600;
  text-align: left;
  position: absolute;
  left: 12px;
  margin: 0;
  padding: 0;
}

.dark .demo-checkmark {
  color: #f5f5f7;
}

/* macOS Desktop Container */
.demo-macos-container {
  background: transparent;
  border-radius: 12px;
  overflow: visible; /* 改为 visible，让菜单显示在外面 */
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  height: 660px;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.demo-desktop {
  background-image: url('../images/Default.png') !important;
  background-size: 100% 100% !important;
  background-position: 0 0 !important;
  background-repeat: no-repeat !important;
  background-origin: border-box !important;
  background-clip: border-box !important;
  background-color: transparent;
  border-radius: 12px;
  overflow: visible;
  width: 100% !important;
  height: 660px !important;
  position: relative;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  box-sizing: border-box;
  display: block;
}

.demo-menubar {
  /* macOS 菜单栏 - 灰黑色半透明 + 毛玻璃 */
  background: rgba(200, 200, 200, 0.7);
  background-origin: border-box;
  background-clip: border-box;
  /* 毛玻璃效果 */
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  height: 40px;
  border-radius: 12px 12px 0 0;
  overflow: visible;
  position: relative;
  z-index: 1;
  margin: 0;
  box-sizing: border-box;
  width: 100%;
  display: flex;
}

.dark .demo-menubar {
  /* macOS 深色模式菜单栏 */
  background: rgba(50, 50, 50, 0.85);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* Menu Container z-index */
.demo-menu-container {
  position: relative;
}

/* Ensure menus appear above desktop */
.demo-main-menu {
  z-index: 100;
}

.demo-submenu {
  z-index: 101;
}

/* Apple Logo specific styling */
.demo-menubar > div:first-child > div {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  height: 100%;
}


/* Submenu Separator - 子菜单分隔线 */
.demo-submenu-separator {
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  margin: 3px 0;
}

.dark .demo-submenu-separator {
  background: rgba(255, 255, 255, 0.08);
}

/* ===================================================================
   BLOG STYLES - Blog-specific styling
   =================================================================== */

/* Blog Card Styles */
.blog-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
}

.blog-card-image {
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.blog-card-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease;
}

.blog-card:hover .blog-card-image::before {
  background: rgba(0, 0, 0, 0.2);
}

/* Blog Article Content Styles - Enhanced Typography */
.blog-article {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #374151;
  max-width: 100%;
}

.dark .blog-article {
  color: #d1d5db;
}

/* Blog Article Intro Paragraph (Lead) */
.blog-article > p:first-of-type {
  font-size: 1.25rem;
  line-height: 1.7;
  color: #4b5563;
  margin-bottom: 2rem;
}

.dark .blog-article > p:first-of-type {
  color: #9ca3af;
}

.blog-article h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  color: #111827;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.dark .blog-article h2 {
  color: #f9fafb;
}

.blog-article h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: #1f2937;
  line-height: 1.4;
}

.dark .blog-article h3 {
  color: #f3f4f6;
}

.blog-article h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: #374151;
}

.dark .blog-article h4 {
  color: #e5e7eb;
}

.blog-article p {
  margin-bottom: 1.5rem;
  text-align: left;
}

.blog-article ul,
.blog-article ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.blog-article li {
  margin-bottom: 0.5rem;
}

.blog-article blockquote {
  border-left: 4px solid #9333ea;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #6b7280;
}

.dark .blog-article blockquote {
  border-left-color: #a855f7;
  color: #9ca3af;
}

.blog-article a {
  color: #9333ea;
  text-decoration: underline;
  transition: color 0.2s;
}

.blog-article a:hover {
  color: #7e22ce;
}

.dark .blog-article a {
  color: #a855f7;
}

.dark .blog-article a:hover {
  color: #9333ea;
}

/* Blog Code Blocks */
.blog-article code {
  background: #f3f4f6;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
}

.dark .blog-article code {
  background: #1f2937;
}

.blog-article pre {
  background: #1f2937;
  color: #f9fafb;
  padding: 1.5rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 2rem 0;
}

.blog-article pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* Blog Table Styles */
.blog-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 1rem;
}

.blog-article table th,
.blog-article table td {
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.dark .blog-article table th,
.dark .blog-article table td {
  border-color: #374151;
}

.blog-article table th {
  background: #f9fafb;
  font-weight: 600;
}

.dark .blog-article table th {
  background: #1f2937;
}

.blog-article table tr:nth-child(even) {
  background: #f9fafb;
}

.dark .blog-article table tr:nth-child(even) {
  background: #111827;
}

/* Blog CTA Buttons */
.blog-cta {
  display: inline-block;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
  color: white !important;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 6px -1px rgba(147, 51, 234, 0.3);
}

.blog-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(147, 51, 234, 0.4);
  color: white !important;
}

/* Blog Reading Progress Bar */
.blog-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #9333ea 0%, #a855f7 100%);
  z-index: 100;
  transition: width 0.1s ease;
}

/* Blog Table of Contents */
.blog-toc {
  background: #f9fafb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 2rem 0;
}

.dark .blog-toc {
  background: #1f2937;
}

.blog-toc h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #111827;
}

.dark .blog-toc h3 {
  color: #f9fafb;
}

.blog-toc ul {
  list-style: none;
  padding: 0;
}

.blog-toc li {
  margin-bottom: 0.5rem;
}

.blog-toc a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-toc a:hover {
  color: #9333ea;
}

.dark .blog-toc a {
  color: #9ca3af;
}

.dark .blog-toc a:hover {
  color: #a855f7;
}

/* Responsive Blog Styles */
@media (max-width: 768px) {
  .blog-article {
    font-size: 1rem;
  }
  
  .blog-article h2 {
    font-size: 1.5rem;
  }
  
  .blog-article h3 {
    font-size: 1.25rem;
  }
  
  .blog-article pre {
    padding: 1rem;
    font-size: 0.875rem;
  }
}

/* Line clamp utility for article excerpts */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
