/* ============================================
   Aixos - Global Styles
   Based on JitWord Design System
   ============================================ */

/* Font */
html {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

/* ============ Gradient Text ============ */
.text-gradient {
  background: linear-gradient(135deg, #165DFF 0%, #044AE9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============ Card Hover ============ */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(22, 93, 255, 0.15);
}

/* ============ Navbar Scroll ============ */
.nav-scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* ============ Mobile Menu ============ */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.open {
  transform: translateX(0);
}

/* ============ Animations ============ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}
.animate-float { animation: float 5s ease-in-out infinite; }

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 93, 255, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(22, 93, 255, 0); }
}

/* ============ Scroll Reveal ============ */
.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============ Background Grid ============ */
.bg-grid {
  background-image:
    linear-gradient(rgba(22, 93, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 93, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ============ Glow Effect ============ */
.glow {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(22, 93, 255, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ============ Scrollbar ============ */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ============ Rich Content (Quill output) ============ */
.rich-content h1, .rich-content h2, .rich-content h3 {
  font-weight: 700;
  color: #151515;
  margin: 1.5em 0 0.6em;
  line-height: 1.4;
}
.rich-content h1 { font-size: 1.5rem; }
.rich-content h2 { font-size: 1.25rem; }
.rich-content h3 { font-size: 1.1rem; }
.rich-content p {
  color: #374151;
  line-height: 1.8;
  margin: 0.8em 0;
}
.rich-content a {
  color: #165DFF;
  text-decoration: underline;
  text-decoration-color: rgba(22,93,255,0.3);
}
.rich-content a:hover { text-decoration-color: #165DFF; }
.rich-content img {
  max-width: 100%;
  border-radius: 12px;
  margin: 1em 0;
}
.rich-content blockquote {
  border-left: 3px solid #165DFF;
  padding-left: 1rem;
  color: #6C6F7D;
  font-style: italic;
  margin: 1em 0;
  background: #F0F5FF;
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 1rem;
}
.rich-content code {
  background: #F0F5FF;
  color: #165DFF;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
  font-family: 'Fira Code', 'Consolas', monospace;
}
.rich-content pre {
  background: #1a1a2e;
  color: #e2e8f0;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 1em 0;
  font-size: 0.875rem;
  line-height: 1.6;
}
.rich-content pre code { background: none; color: inherit; padding: 0; }
.rich-content ul, .rich-content ol {
  padding-left: 1.5rem;
  margin: 0.8em 0;
  color: #374151;
  line-height: 1.8;
}
.rich-content ul { list-style: disc; }
.rich-content ol { list-style: decimal; }
.rich-content li { margin: 0.3em 0; }

/* ============ Quill Editor Override ============ */
#quillEditor .ql-toolbar {
  border: none !important;
  border-bottom: 1px solid #E8ECFF !important;
  padding: 10px 12px;
  background: #F8FAFF;
  border-radius: 12px 12px 0 0;
}
#quillEditor .ql-container {
  border: none !important;
  font-size: 15px;
  font-family: inherit;
}
#quillEditor .ql-editor {
  min-height: 260px;
  padding: 16px 20px;
  line-height: 1.8;
}
#quillEditor .ql-editor.ql-blank::before {
  color: #9CA3AF;
  font-style: normal;
}

/* ============ Line Clamp ============ */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ============ Button Glow Effect ============ */
.btn-glow {
  position: relative;
  overflow: hidden;
}
.btn-glow::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left 0.5s;
}
.btn-glow:hover::before { left: 100%; }

/* ============ Tool Card ============ */
.tool-card {
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(22, 93, 255, 0.06);
}
.tool-card:hover {
  border-color: rgba(22, 93, 255, 0.3) !important;
  box-shadow: 0 12px 32px rgba(22, 93, 255, 0.14);
}

/* ============ Toggle Switch ============ */
.toggle-dot {
  transition: transform 0.2s ease;
}

/* ============ View Toggle Buttons ============ */
.view-toggle-btn {
  color: #9CA3AF;
}
.view-toggle-btn.bg-white {
  color: #165DFF;
  box-shadow: 0 1px 4px rgba(22, 93, 255, 0.12);
}

/* ============ Tool List Item ============ */
.tool-list-item {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.tool-list-item:hover {
  border-color: rgba(22, 93, 255, 0.3) !important;
  box-shadow: 0 4px 16px rgba(22, 93, 255, 0.1);
  transform: translateX(4px);
}

/* ============ Tool Table (List View) ============ */
/* mobile: 工具 | 操作 */
.tool-table-cols {
  grid-template-columns: 1fr 36px;
  column-gap: 12px;
}
/* sm+: 工具 | 数据 | 操作 */
@media (min-width: 640px) {
  .tool-table-cols {
    grid-template-columns: 1fr 72px 36px;
    column-gap: 16px;
  }
}
/* md+: 工具 | 描述 | 数据 | 操作 */
@media (min-width: 768px) {
  .tool-table-cols {
    grid-template-columns: 200px 1fr 72px 36px;
    column-gap: 16px;
  }
}
/* lg+: 工具 | 描述 | 标签 | 数据 | 操作 */
@media (min-width: 1024px) {
  .tool-table-cols {
    grid-template-columns: 200px 1fr 200px 72px 36px;
    column-gap: 20px;
  }
}
.tool-table-row {
  text-decoration: none;
  cursor: pointer;
}
.tool-table-row:hover {
  background-color: #EEF4FF !important;
}

/* ============ Like Button Animations ============ */
@keyframes likePop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.3); }
  70%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}
@keyframes likeShake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-4px); }
  75%       { transform: translateX(4px); }
}
.like-pop {
  animation: likePop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.like-shake {
  animation: likeShake 0.4s ease;
}
.like-btn.liked {
  background: #FFF5F5;
  border-color: #FECACA;
  color: #F87171;
}

/* ============ Responsive ============ */
@media (max-width: 640px) {
  .glow { width: 280px; height: 280px; }
}
