/* 核心配色：绿色主题 */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent: #00b341;
    --border-color: #e5e7eb;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0; /* 移除默认外边距 */
    padding: 0; /* 移除默认内边距 */
}

/* 移除am-with-topbar-fixed-top类带来的顶部间距 */
body.am-with-topbar-fixed-top {
    padding-top: 0 !important;
}

/* 顶部导航栏样式 - 绿色主题 */
.header-nav {
    width: 90%;
    max-width: none;
    margin: 16px auto 20px;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* 电脑端样式 */
@media (min-width: 768px) {
    .header-nav {
        width: 50%;
    }
}

/* 为内容区域添加顶部间距，避免被固定导航栏遮挡 */
#tool-body {
    margin-top: 80px;
}

.header-nav a {
    text-decoration: none;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo {
    font-size: 20px;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    color: white;
    border-radius: 50%;
}

.nav-left .logo img {
    width: 100%;
    height: 100%;
}

.site-name {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 600;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 下拉菜单样式 - 绿色主题 */
.dropdown {
    position: relative;
}

.dropdown-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.dropdown-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 120px;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 179, 65, 0.1);
    border: 1px solid var(--border-color);
    display: none;
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown-menu a:hover {
    background: var(--bg-secondary);
    color: var(--accent);
}

.share-btn {
    padding: 6px 12px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: var(--accent);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn:hover {
    background: white;
    color: var(--accent);
}

/* 工具卡片增加圆角 */
.tool-item {
    border-radius: 8px !important;
    transition: all 0.3s ease;
}

/* 优化标题样式 */
.tool-sub-title {
    color: var(--text-primary);
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 3px solid #e0e0e0;
    background: rgba(255, 255, 255, 0.7);
    padding: 8px 10px;
    border-radius: 0 4px 4px 0;
}

.flex {
    display: flex;
}

.justify-center {
    justify-content: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.font-bold {
    font-weight: 700;
}

.text-sm {
    font-size: 0.875rem;
}

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

.mb-8 {
    margin-bottom: 2rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mt-8 {
    margin-top: 2rem;
}

.p-4 {
    padding: 1rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.font-medium {
    font-weight: 500;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.text-xs {
    font-size: 0.75rem;
}

.space-y-1 > * + * {
    margin-top: 0.25rem;
}

/* 工具主体样式 */
.logo2 {
    width: 180px;
    height: auto;
    margin-bottom: 40px;
}

.box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 90%;
    width: 600px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.text {
    margin-bottom: 40px;
    line-height: 1.6;
    font-size: 18px;
    text-align: left;
    white-space: pre-wrap;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 10px;
}

button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

button:active {
    transform: scale(0.98);
}

#copyBtn {
    background: #606060;
}

/* 盒子容器样式 */
.box-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

/* 客服SDK样式 */
.qa-sdk-wrapper {
  position: fixed;
  width: 400px;
  right: -600px;
  max-height: 530px;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
  transition: all 0.5s ease-in-out;
  background: #fff;
}

.qa-sdk-close-btn {
  display: inline-block;
  width: 18px;
  height: 18px;
  cursor: pointer;
  position: absolute;
  top: 16px;
  right: 16px;
}

.qa-sdk-close-btn:hover {
  border-radius: 50%;
  background-color: #d5d9df;
}

#qa-sdk-iframe {
  width: 400px;
}

@media (min-width: 1024px) and (max-width: 1366px) {
  .qa-sdk-wrapper{
    width: 356px;
  }
  #qa-sdk-iframe {
    width: 356px;
  }
}

/* AI辅助样式 */
.ai-assist-highlight {
  background: yellow;
}

@media print {
  #ai-assist-root-bangs,
  #ai-assist-root-bilibili,
  #ai-assist-root-new {
    display: none !important;
  }
}
