/* =========================================
   Loon Hub Design System v5.3 (Hard Fix)
   Theme: Ethereal Mist
   ========================================= */

/* --- 1. 核心变量系统 --- */
:root {
  --primary-hue: 215;
  --accent-hue: 265;
  --primary-color: hsl(var(--primary-hue), 95%, 60%);
  --accent-color: hsl(var(--accent-hue), 90%, 65%);
  --orb-c1: #E0F2FE;
  --orb-c2: #E8EAFF;
  --orb-c3: #D1FAE5;
  --glass-bg: rgba(255, 255, 255, 0.60);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
  --glass-blur: blur(24px);
  --text-main: #1e293b;
  --text-secondary: #64748b;
  --text-subtle: #94a3b8;
  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-full: 9999px;
  /* Light Mode 下拉箭头 (深灰) */
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23334155'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

/* 暗黑模式颜色变量 (修复页脚看不清的问题) */
:root[data-theme="dark"] {
  --orb-c1: #0f172a;
  --orb-c2: #1e1b4b;
  --orb-c3: #312e81;

  --glass-bg: rgba(15, 23, 42, 0.60);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  
  --text-main: #f1f5f9;      /* 主文字：亮白 */
  --text-secondary: #cbd5e1; /* 次要文字：加亮灰 (原 #94a3b8 略暗，提亮一级) */
/* 核心修复：将原来的深灰 #475569 改为浅灰 #94a3b8 */
  --text-subtle: #94a3b8;
  /* Dark Mode 下拉箭头 (浅灰) */
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23cbd5e1'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

/* --- 2. 全局基础 --- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0; padding: 0;
  color: var(--text-main); line-height: 1.6; min-height: 100vh;
  background-image: 
    radial-gradient(at 0% 0%, var(--orb-c1) 0px, transparent 50%),
    radial-gradient(at 100% 0%, var(--orb-c2) 0px, transparent 50%),
    radial-gradient(at 100% 100%, var(--orb-c3) 0px, transparent 50%),
    radial-gradient(at 0% 100%, var(--orb-c1) 0px, transparent 50%);
  background-color: var(--orb-c1);
  background-size: 150% 150%;
  background-attachment: fixed;
  animation: bg-breathe 15s ease-in-out infinite alternate;
}

@keyframes bg-breathe { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }

a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
.container { max-width: 1200px; margin: 0 auto; padding: 40px 24px; position: relative; z-index: 1; }

/* --- 3. 搜索栏 --- */
.search-bar {
  margin-bottom: 30px; display: flex; justify-content: center;
  position: sticky; top: 20px; z-index: 100; pointer-events: none;
}
.search-input-wrapper {
  position: relative; width: 100%; max-width: 600px;
  pointer-events: auto; display: flex; align-items: center;
}
.search-bar input {
  width: 100%; padding: 16px 85px 16px 24px;
  border: 1px solid var(--glass-border); border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  color: var(--text-main); font-size: 1.05em; outline: none;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1); transition: all 0.3s ease;
}
[data-theme="dark"] .search-bar input { background: rgba(30, 30, 40, 0.75); }
.search-bar input:focus { background: rgba(255, 255, 255, 0.95); transform: scale(1.02); border-color: var(--primary-color); }
[data-theme="dark"] .search-bar input:focus { background: rgba(40, 40, 50, 0.95); }

.clear-btn, .filter-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; cursor: pointer; padding: 8px;
  color: var(--text-secondary); z-index: 2;
}
.filter-btn { right: 12px; }
.clear-btn { right: 50px; font-size: 1.4em; line-height: 1; }
.filter-btn:hover, .clear-btn:hover { color: var(--primary-color); }

/* --- 4. Tab 导航 --- */
.tab-container { margin-top: 20px; }
.tab-nav {
  display: flex; justify-content: center; position: relative;
  background: rgba(118, 118, 128, 0.12); backdrop-filter: blur(10px);
  padding: 4px; border-radius: var(--radius-full);
  width: fit-content; min-width: 240px; margin: 0 auto 30px;
}
[data-theme="dark"] .tab-nav { background: rgba(118, 118, 128, 0.24); }

.tab-btn {
  flex: 1; border: none; background: transparent; padding: 8px 20px;
  font-size: 0.95em; font-weight: 600; color: var(--text-secondary);
  cursor: pointer; border-radius: var(--radius-full);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; z-index: 1; text-align: center;
}
.tab-btn.active { background: #fff; color: #000; box-shadow: 0 3px 8px rgba(0,0,0,0.12), 0 3px 1px rgba(0,0,0,0.04); }
[data-theme="dark"] .tab-btn.active { background: #636366; color: #fff; }
.tab-pane { display: none; animation: fadeIn 0.4s ease; }
.tab-pane.active { display: block; }

/* --- 5. 卡片组件 --- */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px; margin-top: 40px;
}
.card {
  background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  border-radius: var(--radius-md); padding: 24px;
  display: flex; flex-direction: column; transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-8px); border-color: rgba(255, 255, 255, 0.9); }

@media (min-width: 769px) {
  :root { --radius-md: 32px; }
  .card { padding: 28px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
}

.card-header { display: flex; align-items: center; margin-bottom: 12px; }
.icon-background {
  width: 56px; height: 56px; flex-shrink: 0; margin-right: 16px;
  background: rgba(255, 255, 255, 0.5); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.icon-background::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
  animation: shimmer 2s infinite; pointer-events: none;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.card-icon { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); position: relative; z-index: 1; }
.header-text { display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.card-title { font-size: 1.25em; font-weight: 700; color: var(--text-main); margin: 0; line-height: 1.2; }
.update-time { font-size: 0.8em; color: var(--text-subtle); font-weight: 500; margin-top: 4px; }

.card-description {
  font-size: 0.95em; color: var(--text-secondary); flex-grow: 1; margin-bottom: 24px;
  line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis; min-height: auto;
}

.card-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 16px; border-top: 1px solid rgba(0,0,0,0.05); margin-top: auto;
  min-height: 60px;
}

.footer-author-list { display: flex; align-items: center; gap: -8px; flex-wrap: wrap; overflow: hidden; height: 48px; }
.footer-author-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  border: 3px solid var(--glass-bg); cursor: pointer;
  transition: transform 0.2s, z-index 0.2s; background: #f0f0f0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05); position: relative;
}
.footer-author-avatar:hover { transform: scale(1.15); z-index: 10; border-color: var(--primary-color); }
.footer-author-list.dense { gap: -12px; }
.footer-author-list.dense .footer-author-avatar { width: 28px; height: 28px; border-width: 2px; }

.install-wrapper { position: relative; display: inline-block; flex-shrink: 0; margin-left: 12px; }
.install-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #fff; padding: 8px 24px; border-radius: var(--radius-full);
  font-weight: 600; font-size: 0.9em; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  transition: transform 0.2s ease; border: 0 !important; outline: none !important; cursor: pointer;
  text-decoration: none; display: inline-block;
}
.install-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4); }

.install-dropdown {
  position: absolute; bottom: 100%; right: 0; width: 140px;
  background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  box-shadow: 0 10px 40px -10px rgba(0,0,0,0.2); padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; transform: translateY(10px) scale(0.95); pointer-events: none;
  transition: all 0.2s; z-index: 10; margin-bottom: 8px;
}
.install-dropdown.active { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
[data-theme="dark"] .install-dropdown { background: rgba(30, 30, 40, 0.95); }
.install-option {
  padding: 8px 12px; border-radius: var(--radius-xs); font-size: 0.85em;
  color: var(--text-main); font-weight: 500; transition: background 0.2s; display: block; text-align: left;
}
.install-option:hover { background: rgba(0,0,0,0.05); color: var(--primary-color); }
[data-theme="dark"] .install-option:hover { background: rgba(255,255,255,0.1); }

.card.pinned { border-color: rgba(96, 165, 250, 0.4); background: linear-gradient(145deg, rgba(255,255,255,0.7), rgba(255,255,255,0.5)); }
[data-theme="dark"] .card.pinned { border-color: rgba(96, 165, 250, 0.3); background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.6)); }
/* 1. 公共样式（不包含文字内容） */
.card.pinned::after {
  /* content: '';  <-- 这里删除原来的文字 */
  position: absolute; top: 10px; right: 10px;
  font-size: 0.75em; font-weight: 600; color: var(--primary-color);
  background: rgba(59, 130, 246, 0.1); padding: 4px 8px;
  border-radius: var(--radius-full); border: 1px solid rgba(59, 130, 246, 0.2); z-index: 2;
}

/* 2. 中文环境下的文字 (当 html lang="zh-CN" 时) */
:lang(zh) .card.pinned::after {
  content: '建议置顶';
}

/* 3. 英文环境下的文字 (当 html lang="en" 时) */
:lang(en) .card.pinned::after {
  content: 'Pinned';  /* 或者用 'Recommended' */
}
.card.pinned .card-header { padding-right: 70px; }
.card.no-icon .card-header { display: block; padding-right: 0; }
.card.no-icon .header-text { align-items: flex-start; }

/* --- 6. 警告框与公告 --- */
.main-warning, .alert {
  background: var(--glass-bg); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  margin-bottom: 24px; color: var(--text-main); box-shadow: var(--glass-shadow);
  padding: 16px; position: relative;
}
.main-warning {
  border-left: 4px solid #ef4444; color: #b91c1c; background: rgba(254, 242, 242, 0.7);
  font-weight: 500; font-size: 0.95em; display: flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 12px 16px; line-height: 1.4;
  user-select: none; -webkit-user-select: none; cursor: default;
}
[data-theme="dark"] .main-warning { background: rgba(69, 10, 10, 0.6); color: #fca5a5; }

.rotating-alert-box {
  border-left: 4px solid #eab308; background: rgba(254, 252, 232, 0.6); color: #854d0e;
  height: 54px; padding: 0 40px; overflow: hidden; display: flex; align-items: center;
  justify-content: center; cursor: pointer; user-select: none; -webkit-user-select: none;
}
[data-theme="dark"] .rotating-alert-box { background: rgba(66, 32, 6, 0.6); color: #fde047; }

/* 核心优化：移除所有动画过渡，配合 JS 实现瞬间切换 */
.alert-message {
  position: absolute; width: 100%; left: 0; text-align: center;
  opacity: 0; 
  /* transition: none;  <-- 删除过渡动画 */
  pointer-events: none; display: flex; justify-content: center; padding: 0 10px;
  /* 隐藏状态 */
  visibility: hidden;
}
.alert-message.active {
  opacity: 1; pointer-events: auto; visibility: visible;
}
.alert-text-content { white-space: nowrap; display: inline-block; }

/* --- 7. 模态框 --- */
.filter-modal, .author-modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  z-index: 2000; display: none; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease;
}
.filter-modal.visible { opacity: 1; display: flex; }
.filter-modal-content, .author-popover {
  background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border); border-radius: var(--radius-md);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); color: var(--text-main);
  transform: scale(0.95); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.filter-modal.visible .filter-modal-content { transform: scale(1); }
[data-theme="dark"] .filter-modal-content, [data-theme="dark"] .author-popover { background: rgba(30, 30, 40, 0.9); }
.filter-modal-content { width: 90%; max-width: 500px; max-height: 80vh; overflow-y: auto; padding: 24px; }
.filter-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid rgba(0,0,0,0.05); padding-bottom: 10px; }
.filter-modal-title { margin: 0; font-size: 1.2em; font-weight: 700; }
.filter-modal-close { background: none; border: none; font-size: 1.5em; color: var(--text-secondary); cursor: pointer; }
.filter-options { display: flex; flex-wrap: wrap; gap: 12px; }
.filter-option-tag { padding: 8px 16px; border: 1px solid var(--glass-border); background: rgba(255,255,255,0.4); border-radius: var(--radius-full); cursor: pointer; transition: all 0.2s; }
.filter-option-tag.active { background: var(--primary-color); color: white; border-color: transparent; }

.author-popover {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9);
  width: 280px; padding: 30px 20px; text-align: center; z-index: 3001; opacity: 0; display: none; flex-direction: column; align-items: center;
}
.author-popover.visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.popover-avatar { width: 80px; height: 80px; border-radius: 50%; border: 4px solid rgba(255,255,255,0.2); margin-bottom: 16px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.popover-name { font-size: 1.4em; font-weight: 700; margin: 0 0 4px 0; }
.popover-github { font-size: 0.9em; color: var(--text-secondary); margin-bottom: 24px; }
.popover-btn {
  background: var(--text-main); color: var(--glass-bg); padding: 10px 24px; border-radius: var(--radius-full);
  font-weight: 600; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform 0.2s;
}
.popover-btn:hover { transform: scale(1.05); }
.github-icon-svg { width: 20px; height: 20px; fill: currentColor; }

/* --- 8. 页脚与工具 --- */
.site-footer {
  margin-top: 80px; padding: 40px 20px 60px; border-top: none;
  background: radial-gradient(ellipse at top, rgba(255,255,255,0.3), transparent 70%);
  text-align: center; font-size: 0.85em; color: var(--text-subtle);
}
.site-footer a { color: var(--text-secondary); margin: 0 8px; font-weight: 500; }
.site-footer a:hover { color: var(--primary-color); }
.brand-name { font-weight: 600; color: inherit; opacity: 0.9; }

.back-to-top-btn {
  position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
  border-radius: 50%; background: var(--glass-bg); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px); border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); color: var(--text-main);
  font-size: 1.2em; cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 1000; opacity: 0; transform: translateY(20px) scale(0.8);
  pointer-events: none; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.back-to-top-btn.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.back-to-top-btn:hover { background: var(--primary-color); color: white; transform: translateY(-5px); }

/* --- 9. Hero 区域 --- */
.hero-section { text-align: center; padding: 80px 20px 40px; position: relative; z-index: 2; }
.hero-title {
  font-size: 4em; font-weight: 800; margin: 0; letter-spacing: -0.03em; line-height: 1.1;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--text-secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}
.hero-subtitle { font-size: 1.2em; color: var(--text-secondary); margin-top: 16px; font-weight: 500; }

/* --- 10. 移动端适配 (Mobile) --- */
@media (max-width: 768px) {
  .container { padding: 16px 16px 80px; }
  .hero-section { padding: 50px 16px 30px; }
  .hero-title { font-size: 2.5em; }
  .main-warning { font-size: 0.85em; text-align: left; justify-content: flex-start; }
  .rotating-alert-box { font-size: 0.9em; padding: 0 16px; }
  .search-bar { top: 10px; }
  .search-bar input { padding: 12px 80px 12px 20px; }
  .tab-nav { width: 100%; min-width: auto; margin-bottom: 20px; }
  .card-grid { grid-template-columns: 1fr; gap: 16px; }
  .card { padding: 16px; min-height: auto; }
  .card-description { font-size: 0.9em; min-height: auto; margin-bottom: 16px; }
  .footer-author-avatar { width: 32px; height: 32px; border-width: 2px; }
  .footer-author-list.dense .footer-author-avatar { width: 24px; height: 24px; }
  .card-footer { min-height: 48px; padding-top: 12px; }
}

/* --- 11. 关于页面与表单 --- */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-bottom: 40px; }
.about-card-content { color: var(--text-secondary); font-size: 0.95em; line-height: 1.8; }
.about-card-content strong { color: var(--text-main); }
.feedback-section { width: 100%; margin: 0 auto; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--text-main); font-size: 0.95em; }
.required-asterisk { color: #ef4444; margin-left: 4px; }

/* 核心优化：修复下拉选择框看不清文字的问题 */
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 12px 16px; border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  background-color: rgba(255, 255, 255, 0.4); 
  color: var(--text-main); /* 强制字体颜色 */
  
  /* 强制文字不透明，解决 iOS select 文字颜色浅的问题 */
  -webkit-text-fill-color: var(--text-main);
  opacity: 1;
  
  font-family: inherit; font-size: 1em;
  transition: all 0.3s ease; outline: none;
}

.form-select {
  /* 移除默认箭头 */
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  /* 使用 SVG 箭头 */
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.2em;
  padding-right: 2.5rem; 
  cursor: pointer;
}

/* 强制下拉选项背景色 (解决下拉菜单透明导致的看不清) */
.form-select option {
  background-color: #ffffff;
  color: #333333;
}

[data-theme="dark"] .form-input, [data-theme="dark"] .form-select, [data-theme="dark"] .form-textarea { background-color: rgba(0, 0, 0, 0.2); }
[data-theme="dark"] .form-select option { background-color: #1e1e1e; color: #f1f5f9; }

.form-input:focus, .form-select:focus, .form-textarea:focus { background-color: var(--glass-bg); border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }

.submit-btn {
  width: 100%; padding: 14px; background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white; border: none; border-radius: var(--radius-full); font-weight: 600; font-size: 1em;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4); }

.static-tip-box {
  background: rgba(240, 242, 245, 0.5); 
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.05); border-left: 4px solid #94a3b8; border-radius: var(--radius-sm);
  padding: 16px 20px; margin-bottom: 30px; color: var(--text-secondary); font-size: 0.95em; line-height: 1.6;
  display: flex; align-items: flex-start; gap: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
[data-theme="dark"] .static-tip-box {
  background: rgba(39, 39, 42, 0.5); border-color: rgba(255, 255, 255, 0.05); border-left-color: #6b7280; color: #d1d5db;
}
.tip-icon { font-size: 1.2em; flex-shrink: 0; margin-top: 1px; }

/* =========================================
   Loon Hub v5.4 - Placeholder Polish
   ========================================= */

/* 1. 输入框与文本域的提示词 (Input/Textarea Placeholder) */
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-secondary); /* 使用次要文字颜色 */
  opacity: 0.5; /* 关键：降低不透明度，让它看起来像“水印” */
  font-weight: 400; /* 字重调细一点 */
}

/* 2. 下拉菜单未选择时的提示词 (Select Placeholder) */
/* 原理：利用 HTML 中的 required 属性，当值为空时匹配 :invalid */
.form-select:required:invalid {
  color: var(--text-secondary);
  opacity: 0.6;
}

/* 3. 针对暗黑模式的微调 */
[data-theme="dark"] .form-input::placeholder,
[data-theme="dark"] .form-textarea::placeholder {
  opacity: 0.4; /* 暗色背景下稍微更淡一点更好看 */
}

/* --- 语言切换按钮 (Pro 版) --- */
.lang-switch-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 1000;
  
  /* 玻璃拟态背景 */
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  
  /* 布局与字体 */
  display: flex;
  align-items: center;
  gap: 6px; /* 图标和文字的间距 */
  padding: 8px 16px; /* 稍微宽一点的内边距 */
  
  color: var(--text-main); /* 使用主文字颜色，更清晰 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.85em;
  font-weight: 700; /* 加粗字体，像标签一样 */
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 按钮内的图标样式 */
.lang-icon {
  width: 18px;
  height: 18px;
  fill: currentColor; /* 跟随文字颜色 */
  opacity: 0.8;
}

/* 悬停效果：轻微上浮 + 品牌色高亮 */
.lang-switch-btn:hover {
  background: #fff;
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.2);
}

/* 暗黑模式适配 */
[data-theme="dark"] .lang-switch-btn {
  background: rgba(30, 30, 40, 0.5);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}
[data-theme="dark"] .lang-switch-btn:hover {
  background: rgba(50, 50, 60, 0.8);
  color: var(--primary-color);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .lang-switch-btn {
    top: 16px;
    right: 16px;
    padding: 6px 12px;
  }
}