/*
Theme Name: AI一族矩阵主题
Theme URI: https://aiyizu.com
Author: AI一族团队
Author URI: https://aiyizu.com
Description: 霓虹赛博朋克矩阵风格的WordPress主题，专为AI工具导航和资讯网站设计。支持明暗模式切换、字体大小调节、完美移动端适配。
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aiyizu
Tags: cyberpunk, neon, ai-tools, dark-mode, responsive, seo-friendly
*/

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

:root {
  /* 主色调 - 霓虹色彩 */
  --neon-blue: #00f3ff;
  --neon-purple: #b967ff;
  --neon-pink: #ff2e8c;
  
  /* 背景色 */
  --bg-dark: #0a0a16;
  --bg-card: #121225;
  --bg-hover: #1a1a2e;
  
  /* 文字颜色 */
  --text-primary: #ffffff;
  --text-secondary: #b0b0c8;
  --text-muted: #6b6b8c;
  
  /* 边框和分割线 */
  --border-color: rgba(0, 243, 255, 0.2);
  --border-glow: rgba(0, 243, 255, 0.5);
  
  /* 阴影效果 */
  --shadow-neon-blue: 0 0 10px rgba(0, 243, 255, 0.5);
  --shadow-neon-purple: 0 0 10px rgba(185, 103, 255, 0.5);
  --shadow-neon-pink: 0 0 10px rgba(255, 46, 140, 0.5);
  
  /* 字体大小 - 默认 */
  --font-size-base: 16px;
  --font-size-small: 14px;
  --font-size-large: 18px;
  --font-size-h1: 2.5rem;
  --font-size-h2: 2rem;
  --font-size-h3: 1.5rem;
  
  /* 间距 */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  
  /* 过渡动画 */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* 亮色模式变量 */
body.light-mode {
  --bg-dark: #f5f5f7;
  --bg-card: #ffffff;
  --bg-hover: #e8e8ea;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #8a8a8a;
  --border-color: rgba(0, 0, 0, 0.1);
  --border-glow: rgba(0, 243, 255, 0.3);
  
  /* 明亮模式下的霓虹色调整为更深的颜色，提高对比度 */
  --neon-blue: #0088cc;
  --neon-purple: #7b3fb8;
  --neon-pink: #d91e6e;
}

/* 字体大小调节 */
body.font-size-small {
  --font-size-base: 14px;
  --font-size-h1: 2rem;
  --font-size-h2: 1.75rem;
  --font-size-h3: 1.25rem;
}

body.font-size-large {
  --font-size-base: 18px;
  --font-size-h1: 3rem;
  --font-size-h2: 2.5rem;
  --font-size-h3: 1.75rem;
}

/* ============================================
   全局样式重置
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "微软雅黑", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

/* ============================================
   排版样式
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--spacing-sm);
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }

p {
  margin-bottom: var(--spacing-sm);
}

a {
  color: var(--neon-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--neon-purple);
  text-shadow: var(--shadow-neon-purple);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   容器和布局
   ============================================ */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--spacing-md);
}

/* ============================================
   霓虹发光效果
   ============================================ */

.neon-glow {
  text-shadow: var(--shadow-neon-blue);
  animation: neon-pulse 2s ease-in-out infinite;
}

@keyframes neon-pulse {
  0%, 100% {
    text-shadow: 0 0 5px var(--neon-blue),
                 0 0 10px var(--neon-blue),
                 0 0 20px var(--neon-blue);
  }
  50% {
    text-shadow: 0 0 10px var(--neon-blue),
                 0 0 20px var(--neon-blue),
                 0 0 30px var(--neon-blue);
  }
}

.neon-border {
  border: 2px solid var(--neon-blue);
  box-shadow: 0 0 10px var(--neon-blue),
              inset 0 0 10px rgba(0, 243, 255, 0.2);
  transition: all var(--transition-normal);
}

.neon-border:hover {
  box-shadow: 0 0 20px var(--neon-blue),
              inset 0 0 20px rgba(0, 243, 255, 0.3);
}

/* ============================================
   卡片样式
   ============================================ */

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: var(--spacing-md);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.1), transparent);
  transition: left var(--transition-slow);
}

.card:hover {
  border-color: var(--neon-blue);
  box-shadow: var(--shadow-neon-blue);
  transform: translateY(-5px);
}

.card:hover::before {
  left: 100%;
}

/* ============================================
   按钮样式
   ============================================ */

.btn {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-md);
  border: 2px solid var(--neon-blue);
  border-radius: 4px;
  background-color: transparent;
  color: var(--neon-blue);
  font-size: var(--font-size-base);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background-color: var(--neon-blue);
  transform: translate(-50%, -50%);
  transition: width var(--transition-normal), height var(--transition-normal);
  z-index: -1;
}

.btn:hover {
  color: var(--bg-dark);
  box-shadow: var(--shadow-neon-blue);
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  border-color: var(--neon-blue);
  color: var(--neon-blue);
}

.btn-secondary {
  border-color: var(--neon-purple);
  color: var(--neon-purple);
}

.btn-accent {
  border-color: var(--neon-pink);
  color: var(--neon-pink);
}

/* ============================================
   响应式设计 - 移动端优先
   ============================================ */

/* 手机端 (默认) */
@media (max-width: 767px) {
  :root {
    --font-size-base: 14px;
    --font-size-h1: 1.75rem;
    --font-size-h2: 1.5rem;
    --font-size-h3: 1.25rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
  }
  
  .container {
    padding: 0 var(--spacing-sm);
  }
}

/* 平板端 */
@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --font-size-base: 15px;
  }
}

/* 桌面端 */
@media (min-width: 1024px) {
  :root {
    --font-size-base: 16px;
  }
}

/* ============================================
   辅助工具类
   ============================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* ============================================
   加载动画 - 量子效果
   ============================================ */

.quantum-loader {
  width: 50px;
  height: 50px;
  position: relative;
  margin: var(--spacing-lg) auto;
}

.quantum-loader::before,
.quantum-loader::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid var(--neon-blue);
  border-radius: 50%;
  animation: quantum-spin 1.5s linear infinite;
}

.quantum-loader::after {
  border-color: var(--neon-purple);
  animation-delay: -0.75s;
}

@keyframes quantum-spin {
  0% {
    transform: rotate(0deg) scale(1);
    opacity: 1;
  }
  50% {
    transform: rotate(180deg) scale(0.8);
    opacity: 0.5;
  }
  100% {
    transform: rotate(360deg) scale(1);
    opacity: 1;
  }
}

/* ============================================
   打印样式
   ============================================ */

@media print {
  body {
    background-color: white;
    color: black;
  }
  
  .no-print {
    display: none !important;
  }
}
/* ============================================
   自定义滚动条 - 赛博朋克霓虹风格
   ============================================ */

/* 整个网站的滚动条 */
::-webkit-scrollbar {
    width: 10px; /* 垂直滚动条宽度 */
    height: 8px; /* 水平滚动条高度 */
}

/* 滚动条轨道 */
::-webkit-scrollbar-track {
    background: var(--bg-card); /* 使用你的卡片背景色 */
    border-radius: 8px;
    border: 1px solid rgba(0, 243, 255, 0.1); /* 轻微的霓虹边框 */
}

/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.8), rgba(185, 103, 255, 0.8));
    border-radius: 8px;
    border: 2px solid var(--bg-card); /* 与背景融合 */
    transition: all var(--transition-fast);
}

/* 滚动条滑块悬停效果 */
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    box-shadow: var(--shadow-neon-blue);
}

/* 滚动条滑块激活状态 */
::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, #00d4ff, #a855f7);
}

/* Firefox浏览器兼容 */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 243, 255, 0.8) var(--bg-card);
}

/* 亮色模式适配 */
body.light-mode ::-webkit-scrollbar-track {
    background: var(--bg-card);
    border: 1px solid rgba(0, 136, 204, 0.2);
}

body.light-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.8), rgba(123, 63, 184, 0.8));
}

body.light-mode ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0088cc, #7b3fb8);
    box-shadow: 0 0 10px rgba(0, 136, 204, 0.5);
}

body.light-mode * {
    scrollbar-color: rgba(0, 136, 204, 0.8) var(--bg-card);
}

/* 小屏幕设备更细的滚动条 */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    
    ::-webkit-scrollbar-thumb {
        border: 1px solid var(--bg-card);
    }
}
/* ========== 用户头像按钮样式 ========== */

/* 头像容器 */
.tool-btn.user-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* 头像图片 */
.tool-btn.user-btn img.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(0, 243, 255, 0.3);
    transition: all 0.3s ease;
    object-fit: cover;
}

/* 头像悬停效果 */
.tool-btn.user-btn:hover img.avatar {
    border-color: #00f3ff;
    box-shadow: 
        0 0 15px rgba(0, 243, 255, 0.5),
        inset 0 0 10px rgba(0, 243, 255, 0.2);
    transform: scale(1.05);
}

/* 在线状态指示点 */
.tool-btn.user-btn::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: #00f3ff;
    border-radius: 50%;
    border: 2px solid #0a0a1a;
    box-shadow: 0 0 5px #00f3ff;
    z-index: 2;
}

/* ========== 登录按钮样式 ========== */

.tool-btn.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #00f3ff;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 登录按钮霓虹边框 */
.tool-btn.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid transparent;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* 登录按钮悬停效果 */
.tool-btn.login-btn:hover {
    color: #00f3ff;
    text-shadow: 0 0 10px #00f3ff;
}

.tool-btn.login-btn:hover::before {
    border-color: #00f3ff;
    box-shadow: 0 0 10px #00f3ff;
}

/* ========== 响应式调整 ========== */

@media (max-width: 768px) {
    .tool-btn.user-btn,
    .tool-btn.login-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .tool-btn.user-btn::after {
        width: 6px;
        height: 6px;
    }
}
/* ============================================
   网站站名 - 无特效版本
   ============================================ */

/* 覆盖 .neon-glow 类的所有特效 */
.site-title a.neon-glow {
  animation: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  filter: none !important;
  transition: none !important;
  color: var(--neon-blue) !important;
}

/* 覆盖站名链接的悬停效果 */
.site-title a.neon-glow:hover,
.site-title a.neon-glow:focus,
.site-title a.neon-glow:active {
  color: var(--neon-blue) !important; /* 保持相同颜色，不变化 */
  text-shadow: none !important;
  box-shadow: none !important;
  filter: none !important;
  background: none !important;
  transform: none !important;
  text-decoration: none !important;
}

/* 确保全局a:hover样式不影响站名 */
.site-title a {
  color: var(--neon-blue) !important;
}

.site-title a:hover {
  color: var(--neon-blue) !important;
  text-shadow: none !important;
}