/* ============================================================
   OpenClaw.Salon - 全局样式
   深色主题 · 参考 osuaiclub.com 风格
   ============================================================ */

/* 基础 */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #111118; }
::-webkit-scrollbar-thumb { background: #4a4b57; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #5b5d6b; }

/* 导航 */
.nav-scrolled { background: rgba(17,17,24,0.92); backdrop-filter: blur(20px) saturate(180%); border-bottom: 1px solid rgba(255,255,255,0.05); }
.nav-link { color: #8e919e; }
.nav-link:hover { color: #f4f4f5; background: rgba(255,255,255,0.05); }
.nav-link.active { color: #f4734f; background: rgba(239,68,35,0.08); }

/* 英雄区 */
.hero-glow {
  position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 500px;
  background: radial-gradient(ellipse, rgba(239,68,35,0.12) 0%, rgba(239,68,35,0.04) 40%, transparent 70%);
  pointer-events: none; z-index: 0;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 70%);
  pointer-events: none;
}

/* 卡片 */
.card-hover { transition: all 0.3s cubic-bezier(0.4,0,0.2,1); }
.card-hover:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.glass { background: rgba(255,255,255,0.03); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.06); }

/* 活动卡片 */
.event-card { position: relative; overflow: hidden; border-radius: 1rem; }
.event-card .cover-img { transition: transform 0.5s cubic-bezier(0.4,0,0.2,1); }
.event-card:hover .cover-img { transform: scale(1.08); }
.event-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(239,68,35,0.0) 0%, rgba(239,68,35,0.06) 100%);
  opacity: 0; transition: opacity 0.3s; pointer-events: none; border-radius: 1rem;
}
.event-card:hover::after { opacity: 1; }

/* 标签 */
.tag { display: inline-flex; align-items: center; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 500; }
.tag-online { background: rgba(16,185,129,0.12); color: #34d399; }
.tag-offline { background: rgba(139,92,246,0.12); color: #a78bfa; }

/* 价格卡片 */
.pricing-card { position: relative; border-radius: 1.25rem; overflow: hidden; transition: all 0.4s; }
.pricing-card:hover { transform: translateY(-8px); }
.pricing-card.featured { border: 2px solid rgba(249,115,22,0.4); }
.pricing-card.featured::before {
  content: ''; position: absolute; inset: -1px;
  background: linear-gradient(135deg, rgba(249,115,22,0.15), transparent 50%);
  pointer-events: none; border-radius: 1.25rem;
}

/* 进度条 */
.progress-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.06); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 2px; transition: width 1s cubic-bezier(0.4,0,0.2,1); }

/* 统计数字动画 */
.stat-number { font-variant-numeric: tabular-nums; }

/* 讨论列表 */
.discuss-item { transition: all 0.2s; border-left: 3px solid transparent; }
.discuss-item:hover { background: rgba(255,255,255,0.03); border-left-color: #ef4423; }
.discuss-item.hot::before {
  content: '热'; position: absolute; top: 0.75rem; right: 0.75rem;
  padding: 0.125rem 0.5rem; border-radius: 9999px; font-size: 0.625rem; font-weight: 700;
  background: rgba(239,68,35,0.15); color: #f4734f;
}

/* 模态框 */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal-content {
  background: #1a1b23; border: 1px solid rgba(255,255,255,0.08); border-radius: 1.25rem;
  max-width: 600px; width: 90%; max-height: 85vh; overflow-y: auto;
  transform: translateY(20px) scale(0.97); transition: transform 0.3s;
}
.modal-overlay.show .modal-content { transform: translateY(0) scale(1); }

/* 筛选按钮 */
.filter-btn { transition: all 0.2s; }
.filter-btn.active { background: rgba(239,68,35,0.15) !important; color: #f4734f !important; border-color: rgba(239,68,35,0.3) !important; }

/* 浮动粒子 */
@keyframes float { 0%,100% { transform: translateY(0px); } 50% { transform: translateY(-20px); } }
.float-particle { animation: float var(--duration, 6s) ease-in-out infinite; animation-delay: var(--delay, 0s); }

/* 淡入动画 */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.fade-in-up { animation: fadeInUp 0.6s ease-out forwards; }
.fade-in-up-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-up-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-up-delay-3 { animation-delay: 0.3s; opacity: 0; }
.fade-in-up-delay-4 { animation-delay: 0.4s; opacity: 0; }

/* 脉冲光点 */
@keyframes pulse-glow { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }
.pulse-dot { animation: pulse-glow 2s ease-in-out infinite; }

/* 图片占位 */
.img-placeholder {
  background: linear-gradient(135deg, #1a1b23 0%, #2a2b33 100%);
  display: flex; align-items: center; justify-content: center;
}

/* ============================================================
   管理后台样式
   ============================================================ */
/* 管理后台侧边栏 */
.admin-tab { position: relative; }
.admin-tab::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 0; background: #ef4423; border-radius: 0 3px 3px 0;
  transition: height 0.2s;
}
.admin-tab.bg-claw-500\/10::before { height: 60%; }

/* 管理后台表格 */
.admin-table-row { transition: all 0.15s; }
.admin-table-row:hover { background: rgba(255,255,255,0.02); }

/* 自定义滚动条（小尺寸） */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* select 元素在深色主题下的样式 */
select option { background: #1a1b23; color: #f4f4f5; }

/* 复选框样式 */
input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px; border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 4px; background: rgba(255,255,255,0.05);
  cursor: pointer; position: relative; transition: all 0.2s;
}
input[type="checkbox"]:checked {
  background: #ef4423; border-color: #ef4423;
}
input[type="checkbox"]:checked::after {
  content: ''; position: absolute; left: 4px; top: 1px;
  width: 5px; height: 9px; border: solid white; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Toast 动画 */
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* 响应式 */
@media (max-width: 640px) {
  .hero-glow { width: 400px; height: 300px; top: -60px; }
}

/* 日期输入框颜色修复 */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.6);
  cursor: pointer;
}
