/* ==========================================================================
   橘子邮箱 (Orange Mail) - 现代橘橙企业设计系统样式表
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* 橘子主题专属变量 */
  --orange-primary: #f97316;
  --orange-hover: #ea580c;
  --orange-active: #c2410c;
  --orange-glow: rgba(249, 115, 22, 0.4);
  --warm-dark-bg: #100c09;
  --warm-dark-card: #18120e;
  --warm-dark-border: #2c221a;
}

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code, pre, .font-mono {
  font-family: var(--font-mono);
}

/* 自定义橘子风格滚动条 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(251, 146, 60, 0.35);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(249, 115, 22, 0.7);
}
.dark ::-webkit-scrollbar-thumb {
  background: rgba(234, 88, 12, 0.4);
}
.dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(249, 115, 22, 0.85);
}

/* 导航项专属暖橙主题样式 */
.nav-tab-btn {
  color: #5c4d41;
  font-weight: 700;
  border: 1px solid transparent;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
  position: relative;
}
.dark .nav-tab-btn {
  color: #c9b8aa;
}

.nav-tab-btn svg,
.nav-tab-btn i {
  color: #ea580c !important;
  stroke: #ea580c !important;
  transition: all 0.2s ease;
}
.dark .nav-tab-btn svg,
.dark .nav-tab-btn i {
  color: #fb923c !important;
  stroke: #fb923c !important;
}

.nav-tab-btn:hover {
  color: #ea580c !important;
  background: #fff7ed;
  border-color: #fed7aa;
  transform: translateX(2px);
}
.dark .nav-tab-btn:hover {
  color: #ffedd5 !important;
  background: rgba(249, 115, 22, 0.15);
  border-color: rgba(249, 115, 22, 0.35);
  transform: translateX(2px);
}
.nav-tab-btn:hover svg,
.nav-tab-btn:hover i {
  color: #f97316 !important;
  stroke: #f97316 !important;
  transform: scale(1.1);
}

/* 导航激活高亮状态（亮眼橙色渐变 + 纯白高对比文字与图标） */
.nav-tab-btn.active {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 55%, #f59e0b 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 18px -2px rgba(249, 115, 22, 0.5) !important;
  border: 1px solid rgba(254, 215, 170, 0.45) !important;
  transform: translateX(2px);
}
.nav-tab-btn.active svg,
.nav-tab-btn.active i {
  color: #ffffff !important;
  stroke: #ffffff !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
  transform: scale(1.05);
}
.nav-tab-btn.active span {
  color: #ffffff !important;
}
.nav-tab-btn.active .nav-badge {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

/* 橘子光晕特效 */
.orange-glow {
  box-shadow: 0 0 30px var(--orange-glow);
}

@keyframes citrus-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.45);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 0 22px 6px rgba(249, 115, 22, 0.3);
  }
}

.animate-citrus {
  animation: citrus-pulse 3s infinite ease-in-out;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-modal {
  animation: fadeInScale 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 全局 Toast 通知容器 */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast-item {
  pointer-events: auto;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 文本截断 */
.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;
}

/* 下拉菜单动画与无缝悬浮桥接 */
.dropdown-menu.is-open {
  display: block !important;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.animate-dropdown {
  animation: dropdownFadeIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 邮件沙箱预览容器 */
.email-content-frame {
  width: 100%;
  min-height: 440px;
  border: none;
  background-color: transparent;
}
