/**
 * LUT-AI 移动端测试主题 - 霓虹赛博朋克风格
 * 版本: v1.0-test
 * 日期: 2026-05-21
 *
 * 设计风格: 深色背景 + 霓虹青/紫 + 磨砂玻璃 + 内发光
 * 说明: 此文件仅在移动端（≤768px）生效，完全不影响PC端样式
 * 重要: 保持所有现有移动端功能和布局不变，仅更新视觉样式
 */

/* ============================================
   CSS 变量定义 - 霓虹赛博朋克配色方案
   ============================================ */

:root {
  /* 主色调 - 霓虹青 (Neon Cyan) */
  --test-primary: #00F0FF;
  --test-primary-light: #5FF5FF;
  --test-primary-dark: #00C8D4;
  --test-secondary: #00D4E0;

  /* 强调色 - 霓虹紫 (Neon Purple) */
  --test-accent: #B000FF;
  --test-accent-hover: #D040FF;
  --test-accent-light: rgba(176, 0, 255, 0.3);

  /* 背景色 - 深色渐变 */
  --test-bg-primary: #0B0C10;
  --test-bg-secondary: #1F2833;
  --test-bg-tertiary: #2E3440;

  /* 霓虹渐变色 (用于装饰) */
  --test-neon-1: #00F0FF;
  --test-neon-2: #00D4E0;
  --test-neon-3: #B000FF;
  --test-neon-4: #D040FF;

  /* 文字颜色 */
  --test-text-primary: #E2E8F0;
  --test-text-secondary: #94A3B8;
  --test-text-muted: #64748B;

  /* 磨砂玻璃效果 - 深色版 */
  --test-glass-bg: rgba(10, 10, 20, 0.7);
  --test-glass-border: rgba(0, 240, 255, 0.3);
  --test-glass-blur: 20px;
  --test-glass-shadow: 0 8px 32px rgba(0, 240, 255, 0.2);

  /* 内发光效果 */
  --test-glow-inner: inset 0 0 10px rgba(0, 240, 255, 0.2);
  --test-glow-outer: 0 0 20px rgba(0, 240, 255, 0.4);
  --test-glow-strong: 0 0 30px rgba(0, 240, 255, 0.6);

  /* 粘土拟态效果 - 深色版 */
  --test-clay-border-width: 2px;
  --test-clay-border-radius: 18px;
  --test-clay-shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  --test-clay-shadow-outer: 0 4px 16px rgba(0, 240, 255, 0.2);
  --test-clay-shadow-hover: 0 8px 24px rgba(0, 240, 255, 0.4);

  /* 触摸目标最小尺寸 */
  --test-touch-min: 44px;

  /* 间距系统 */
  --test-space-xs: 8px;
  --test-space-sm: 12px;
  --test-space-md: 16px;
  --test-space-lg: 20px;
  --test-space-xl: 24px;

  /* 圆角系统 */
  --test-radius-sm: 12px;
  --test-radius-md: 16px;
  --test-radius-lg: 18px;
  --test-radius-xl: 24px;
  --test-radius-2xl: 28px;
  --test-radius-3xl: 32px;
  --test-radius-full: 9999px;

  /* 动画时长 */
  --test-transition-fast: 150ms;
  --test-transition-normal: 200ms;
  --test-transition-slow: 400ms;
  --test-transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* 字体 */
  --test-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

/* ============================================
   移动端基础样式（≤768px）
   ============================================ */

@media (max-width: 768px) {

  /* 全局字体和背景 */
  body.test-theme {
    font-family: var(--test-font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(180deg, var(--test-bg-primary) 0%, var(--test-bg-secondary) 100%);
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
    color: var(--test-text-primary);
  }

  /* 动态粒子背景效果（可选） */
  body.test-theme::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
      radial-gradient(circle at 20% 30%, rgba(0, 240, 255, 0.05) 0%, transparent 50%),
      radial-gradient(circle at 80% 70%, rgba(176, 0, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
  }

  /* ============================================
     移动端底部导航栏 - 磨砂玻璃拟态
     ============================================ */

  body.test-theme .mobile-bottom-nav {
    background: var(--test-glass-bg) !important;
    backdrop-filter: blur(var(--test-glass-blur));
    -webkit-backdrop-filter: blur(var(--test-glass-blur));
    border-top: 2px solid var(--test-glass-border);
    box-shadow: 0 -4px 24px rgba(0, 240, 255, 0.2), var(--test-glow-inner);
  }

  body.test-theme .mobile-bottom-nav .nav-item {
    min-width: var(--test-touch-min);
    min-height: var(--test-touch-min);
    border-radius: var(--test-radius-md);
    transition: all var(--test-transition-normal) var(--test-transition-bounce);
    color: var(--test-text-muted);
  }

  body.test-theme .mobile-bottom-nav .nav-item.active {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2) 0%, rgba(0, 212, 224, 0.2) 100%);
    color: var(--test-primary);
    box-shadow: var(--test-glow-outer), var(--test-glow-inner);
    transform: translateY(-4px);
    border: 1px solid var(--test-glass-border);
  }

  body.test-theme .mobile-bottom-nav .nav-item:active {
    transform: scale(0.95);
  }

  /* ============================================
     浮动工具栏 - 磨砂玻璃拟态
     ============================================ */

  body.test-theme .floating-toolbar {
    background: var(--test-glass-bg) !important;
    backdrop-filter: blur(var(--test-glass-blur));
    -webkit-backdrop-filter: blur(var(--test-glass-blur));
    border: var(--test-clay-border-width) solid var(--test-accent);
    border-radius: var(--test-radius-full);
    box-shadow: var(--test-glass-shadow), var(--test-glow-inner);
  }

  body.test-theme .toolbar-btn {
    min-width: var(--test-touch-min);
    min-height: var(--test-touch-min);
    background: rgba(0, 0, 0, 0.4);
    border-radius: var(--test-radius-full);
    border: 2px solid var(--test-accent);
    box-shadow: var(--test-clay-shadow-outer), var(--test-glow-inner);
    transition: all var(--test-transition-normal) var(--test-transition-bounce);
    color: var(--test-text-primary);
  }

  body.test-theme .toolbar-btn:active {
    transform: scale(0.9);
    box-shadow: var(--test-clay-shadow-inner);
    background: var(--test-accent);
    color: white;
  }

  /* ============================================
     浮动上传按钮 - 霓虹渐变粘土拟态
     ============================================ */

  body.test-theme .floating-upload-btn {
    background: linear-gradient(135deg, var(--test-primary) 0%, var(--test-accent) 100%);
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--test-radius-xl);
    box-shadow: var(--test-glow-strong), var(--test-glow-inner);
    transition: all var(--test-transition-normal) var(--test-transition-bounce);
    min-height: 120px;
    position: relative;
    overflow: hidden;
  }

  body.test-theme .floating-upload-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
  }

  @keyframes shimmer {
    0% {
      transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
      transform: translateX(100%) translateY(100%) rotate(45deg);
    }
  }

  body.test-theme .floating-upload-btn:active {
    transform: scale(0.95);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.8);
  }

  body.test-theme .floating-upload-btn svg {
    filter: drop-shadow(0 4px 8px rgba(255, 255, 255, 0.3));
    position: relative;
    z-index: 1;
  }

  /* ============================================
     浮动滤镜容器 - 磨砂玻璃拟态
     ============================================ */

  body.test-theme .floating-filter-container {
    background: var(--test-glass-bg);
    backdrop-filter: blur(var(--test-glass-blur));
    -webkit-backdrop-filter: blur(var(--test-glass-blur));
    border: var(--test-clay-border-width) solid var(--test-glass-border);
    border-radius: var(--test-radius-lg);
    box-shadow: var(--test-glass-shadow), var(--test-glow-inner);
  }

  body.test-theme .floating-filter-bar {
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--test-radius-md);
    padding: var(--test-space-sm);
    box-shadow: var(--test-clay-shadow-outer);
    border: 2px solid var(--test-glass-border);
  }

  body.test-theme .filter-arrow-btn {
    min-width: var(--test-touch-min);
    min-height: var(--test-touch-min);
    background: rgba(0, 0, 0, 0.6);
    border-radius: var(--test-radius-md);
    border: 2px solid var(--test-glass-border);
    color: var(--test-primary);
    transition: all var(--test-transition-normal) var(--test-transition-bounce);
  }

  body.test-theme .filter-arrow-btn:active {
    transform: scale(0.9);
    background: linear-gradient(135deg, var(--test-primary) 0%, var(--test-accent) 100%);
    color: white;
    box-shadow: var(--test-glow-outer);
  }

  /* ============================================
     移动端全屏查看器 - 深色背景
     ============================================ */

  body.test-theme .mobile-fullscreen-viewer {
    background: linear-gradient(180deg, #000000 0%, var(--test-bg-primary) 100%);
  }

  body.test-theme .fullscreen-top-bar {
    background: var(--test-glass-bg);
    backdrop-filter: blur(var(--test-glass-blur));
    -webkit-backdrop-filter: blur(var(--test-glass-blur));
    border-bottom: 2px solid var(--test-glass-border);
    box-shadow: 0 4px 16px rgba(0, 240, 255, 0.2);
  }

  body.test-theme .fullscreen-close-btn,
  body.test-theme .fullscreen-compare-btn {
    min-width: var(--test-touch-min);
    min-height: var(--test-touch-min);
    background: rgba(0, 0, 0, 0.6);
    border-radius: var(--test-radius-md);
    border: 2px solid var(--test-glass-border);
    box-shadow: var(--test-clay-shadow-outer), var(--test-glow-inner);
    transition: all var(--test-transition-normal) var(--test-transition-bounce);
    color: var(--test-text-primary);
  }

  body.test-theme .fullscreen-close-btn:active,
  body.test-theme .fullscreen-compare-btn:active {
    transform: scale(0.9);
    background: var(--test-primary);
    color: black;
    box-shadow: var(--test-glow-strong);
  }

  body.test-theme .fullscreen-action-btn {
    min-width: 80px;
    min-height: var(--test-touch-min);
    background: var(--test-glass-bg);
    border: 2px solid var(--test-glass-border);
    border-radius: var(--test-radius-lg);
    box-shadow: var(--test-clay-shadow-outer), var(--test-glow-inner);
    transition: all var(--test-transition-normal) var(--test-transition-bounce);
    color: var(--test-primary);
    font-weight: 600;
  }

  body.test-theme .fullscreen-action-btn:active {
    transform: scale(0.95);
    box-shadow: var(--test-clay-shadow-inner);
    background: linear-gradient(135deg, var(--test-primary) 0%, var(--test-accent) 100%);
    color: white;
  }

  /* ============================================
     移动端抽屉 - 磨砂玻璃拟态
     ============================================ */

  body.test-theme .mobile-filter-drawer,
  body.test-theme .mobile-adjust-drawer {
    background: linear-gradient(180deg, var(--test-bg-primary) 0%, var(--test-bg-secondary) 100%);
    border-top-left-radius: var(--test-radius-3xl);
    border-top-right-radius: var(--test-radius-3xl);
    box-shadow: 0 -8px 32px rgba(0, 240, 255, 0.3);
  }

  body.test-theme .drawer-header {
    background: var(--test-glass-bg);
    backdrop-filter: blur(var(--test-glass-blur));
    -webkit-backdrop-filter: blur(var(--test-glass-blur));
    border-bottom: 2px solid var(--test-glass-border);
    padding: var(--test-space-md);
  }

  body.test-theme .drawer-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--test-primary);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
  }

  body.test-theme .drawer-close {
    min-width: var(--test-touch-min);
    min-height: var(--test-touch-min);
    background: rgba(0, 0, 0, 0.6);
    border-radius: var(--test-radius-md);
    border: 2px solid var(--test-glass-border);
    box-shadow: var(--test-clay-shadow-outer);
    transition: all var(--test-transition-normal) var(--test-transition-bounce);
  }

  body.test-theme .drawer-close:active {
    transform: scale(0.9);
  }

  /* ============================================
     控制组 - 粘土拟态
     ============================================ */

  body.test-theme .control-group {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--test-glass-border);
    border-radius: var(--test-clay-border-radius);
    padding: var(--test-space-md);
    margin: var(--test-space-sm) 0;
    box-shadow: var(--test-clay-shadow-inner), var(--test-clay-shadow-outer);
  }

  body.test-theme .control-group label {
    color: var(--test-text-primary);
    font-weight: 600;
    font-size: 0.95rem;
  }

  /* ============================================
     滑块样式 - 霓虹渐变粘土拟态
     ============================================ */

  body.test-theme input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, var(--test-bg-secondary) 0%, var(--test-bg-tertiary) 100%);
    border-radius: var(--test-radius-full);
    border: 2px solid rgba(0, 240, 255, 0.2);
    box-shadow: var(--test-clay-shadow-inner);
    outline: none;
  }

  body.test-theme input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--test-primary) 0%, var(--test-accent) 100%);
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--test-glow-outer), var(--test-glow-inner);
    cursor: pointer;
  }

  body.test-theme input[type="range"]::-moz-range-thumb {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--test-primary) 0%, var(--test-accent) 100%);
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--test-glow-outer), var(--test-glow-inner);
    cursor: pointer;
  }

  /* ============================================
     按钮样式 - 霓虹渐变粘土拟态
     ============================================ */

  body.test-theme .btn,
  body.test-theme button:not(.toolbar-btn):not(.nav-item):not(.drawer-close) {
    min-height: var(--test-touch-min);
    border-radius: var(--test-clay-border-radius);
    border: 2px solid var(--test-glass-border);
    padding: var(--test-space-sm) var(--test-space-lg);
    font-weight: 600;
    box-shadow: var(--test-clay-shadow-outer), var(--test-glow-inner);
    transition: all var(--test-transition-normal) var(--test-transition-bounce);
    cursor: pointer;
  }

  body.test-theme .btn:active,
  body.test-theme button:active {
    transform: scale(0.95);
  }

  body.test-theme .btn-primary {
    background: linear-gradient(135deg, var(--test-primary) 0%, var(--test-accent) 100%);
    color: white;
    border-color: rgba(0, 240, 255, 0.5);
    box-shadow: var(--test-glow-outer), var(--test-glow-inner);
  }

  body.test-theme .btn-secondary {
    background: rgba(0, 0, 0, 0.6);
    color: var(--test-text-primary);
    border-color: var(--test-glass-border);
  }

  body.test-theme .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: var(--test-primary);
  }

  /* ============================================
     LUT滤镜卡片 - 霓虹边框
     ============================================ */

  body.test-theme .lut-card {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--test-glass-border);
    border-radius: var(--test-radius-lg);
    padding: var(--test-space-sm);
    transition: all var(--test-transition-normal) var(--test-transition-bounce);
    box-shadow: var(--test-clay-shadow-outer);
  }

  body.test-theme .lut-card.active {
    border-color: var(--test-primary);
    box-shadow: var(--test-glow-strong);
    transform: scale(1.05);
  }

  body.test-theme .lut-card:active {
    transform: scale(0.95);
  }

  /* ============================================
     模态框 - 磨砂玻璃遮罩
     ============================================ */

  body.test-theme .modal-overlay {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  body.test-theme .modal-content {
    background: var(--test-glass-bg);
    backdrop-filter: blur(var(--test-glass-blur));
    -webkit-backdrop-filter: blur(var(--test-glass-blur));
    border: 2px solid var(--test-glass-border);
    border-radius: var(--test-radius-2xl);
    box-shadow: var(--test-glow-strong), var(--test-glow-inner);
  }

  /* ============================================
     图片预览区 - 霓虹边框
     ============================================ */

  body.test-theme .preview-container {
    border-radius: 0 0 var(--test-radius-xl) var(--test-radius-xl);
    border: 2px solid var(--test-primary);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
  }

  /* ============================================
     加载动画 - 霓虹旋转光圈
     ============================================ */

  body.test-theme .loading-spinner {
    border: 3px solid rgba(0, 240, 255, 0.2);
    border-top-color: var(--test-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
  }

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

  /* ============================================
     Shimmer 流光效果
     ============================================ */

  body.test-theme .shimmer {
    position: relative;
    overflow: hidden;
  }

  body.test-theme .shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.3), transparent);
    animation: shimmer-slide 2s infinite;
  }

  @keyframes shimmer-slide {
    to {
      left: 100%;
    }
  }

  /* ============================================
     滤镜选中状态 - 霓虹对勾和光条
     ============================================ */

  body.test-theme .filter-item.selected {
    position: relative;
    background: rgba(0, 240, 255, 0.1);
    border-left: 4px solid var(--test-primary);
    box-shadow: var(--test-glow-inner);
  }

  body.test-theme .filter-item.selected::before {
    content: '✓';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--test-primary);
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.8);
  }

  /* ============================================
     批量处理缩略图条 - 磨砂玻璃底栏
     ============================================ */

  body.test-theme .thumbnail-bar {
    background: var(--test-glass-bg);
    backdrop-filter: blur(var(--test-glass-blur));
    -webkit-backdrop-filter: blur(var(--test-glass-blur));
    border-top: 2px solid var(--test-glass-border);
    padding: var(--test-space-sm);
    box-shadow: 0 -4px 16px rgba(0, 240, 255, 0.2);
  }

  body.test-theme .thumbnail-item {
    border: 2px solid transparent;
    border-radius: var(--test-radius-sm);
    transition: all var(--test-transition-fast);
  }

  body.test-theme .thumbnail-item.active {
    border-color: var(--test-primary);
    box-shadow: var(--test-glow-outer);
  }

  /* ============================================
     直方图浮层 - 半透明
     ============================================ */

  body.test-theme .histogram-overlay {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--test-glass-border);
    border-radius: var(--test-radius-lg);
    padding: var(--test-space-md);
    box-shadow: var(--test-glow-strong);
  }

  /* ============================================
     保存成功提示 - 霓虹色
     ============================================ */

  body.test-theme .toast-success {
    background: linear-gradient(135deg, var(--test-primary) 0%, var(--test-accent) 100%);
    color: white;
    border-radius: var(--test-radius-lg);
    padding: var(--test-space-md) var(--test-space-lg);
    box-shadow: var(--test-glow-strong);
    font-weight: 600;
  }

  /* ============================================
     无障碍支持
     ============================================ */

  body.test-theme *:focus-visible {
    outline: 3px solid var(--test-primary);
    outline-offset: 2px;
    border-radius: var(--test-radius-sm);
  }

  @media (prefers-reduced-motion: reduce) {
    body.test-theme * {
      animation-duration: 0.01ms !important;
      transition-duration: 0.01ms !important;
    }
  }

  @media (prefers-contrast: high) {
    body.test-theme .mobile-bottom-nav,
    body.test-theme .floating-toolbar {
      border-width: 4px;
    }
  }

  /* ============================================
     防止意外滚动
     ============================================ */

  body.test-theme {
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  /* ============================================
     扫描线效果（可选）
     ============================================ */

  body.test-theme.scanlines::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.1) 0px,
      transparent 1px,
      transparent 2px,
      rgba(0, 0, 0, 0.1) 3px
    );
    pointer-events: none;
    z-index: 9999;
    opacity: 0.3;
  }

}

/* ============================================
   主题切换类
   ============================================ */

/* 当body有test-theme类时，应用测试主题 */
/* 使用JavaScript: document.body.classList.add('test-theme') */
