/* 基本变量配置 */
:root {
    --color-bg: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --color-text: #334155;
    --color-text-light: #475569;
    --color-primary: #5a67f2;
    --color-primary-hover: #4c54d1;
    --color-accent-gradient: linear-gradient(135deg, #5a67f2, #8d74ff);
    --color-border-light: #e2e8f0;
    --color-card: #fff;
    --color-inner: #eaeef3;
    --radius-base: 16px;
    --transition-base: 0.3s ease;
    --color-primary-inner: #5a67f2;

}

/* 暗黑主题 */
[data-theme="dark"] {
    --color-bg: rgb(15 23 42 / 1);
    --color-text: #e2e8f0;
    --color-text-light: #cbd5e1;
    --color-border-light: #4b5563;
    --color-inner: #4b5563;
    --color-card: rgb(30 41 59 / 1);
    --color-primary-inner: #cbd5e1;
}

/* 全局样式 */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: var(--color-text);
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin: 0;
    padding: 0;
}

button {
    border: none;
    display: block;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
    display: block;
}

/* 导航栏 */
header {
    width: 100%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

nav {
    max-width: 85%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0px 24px;
    gap: 60px;
}

nav .logo-group {
    display: flex;
}

nav .logo-group .logo {
    display: flex;
    align-items: center;
}

nav .logo-group .logo img {
    width: 48px;
    height: auto;
}

nav .logo-group .logo .title {
    padding-left: 16px;
    font-size: 24px;
    font-weight: bold;
}

nav .logo-group .ver {
    margin-left: 12px;
    font-size: 10px;
    display: flex;
    align-items: flex-start;
    font-weight: bold;
}

nav .actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-grow: 1;
}

nav .actions.collapsed {
    justify-content: flex-end;
}

nav .actions-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

nav a {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function:
        cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

nav a:hover {
    color: var(--color-primary);
}

nav a.active:hover {
    color: var(--color-text-light);
}

/* 按钮样式 */
.form-group {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: center;
}

.btn-group {
    display: flex;
    flex-direction: row;
    gap: 24px;
    flex-wrap: wrap;
}

.btn {
    font-size: 14px;
    display: flex;
    align-items: center;
    background-color: transparent;
    border: 1px solid var(--color-border-light);
    border-radius: 9999px;
    border-width: 1px;
    box-shadow: 0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition-property: all;
    transition-timing-function:
        cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
    animation-duration: 200ms;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn.extraction {
    padding: 8px 12px;
    color: var(--color-text);
}

.btn.extraction.gg:hover {
    border-color: rgb(96 165 250/ 1);
    color: rgb(96 165 250/ 1);
    background-color: rgba(239 246 255 .5)
}

.btn.extraction.ff:hover {
    border-color: rgb(251 146 60/1);
    color: rgb(251 146 60/1);
    background-color: rgba(255 247 237 .5)
}

.btn.extraction.ed:hover {
    border-color: rgb(34 197 94);
    color: rgb(34 197 94);
    background-color: rgba(224 255 224 .5);
}

.btn.extraction img {
    width: 16px;
    height: 16px;
}

.btn.extraction span {
    margin-left: 8px;
}

.btn.action {
    padding: 8px 20px;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

.btn.action:hover {
    background-color: var(--color-primary);
    color: #fff;
}

.btn.inner {
    padding: 8px 20px;
    border: 1px solid var(--color-primary);
    background-color: var(--color-primary);
    color: #fff;
}

.btn.inner:hover {
    background-color: var(--color-primary-hover);
}

.btn.tip {
    padding: 8px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    background: var(--color-accent-gradient);
    color: #fff;
}

.btn.tip img {
    width: 24px;
    height: auto;
}

.btn.tip:hover {
    opacity: 0.9;
}

/* 下拉框 */
select {
    font-size: 14px;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-base);
    background-color: var(--color-card);
    color: var(--color-text);
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    width: auto;
}

select:focus {
    border-color: var(--color-primary);
    outline: none;
}

select option {
    padding: 8px;
    background-color: var(--color-card);
    color: var(--color-text);
}

select:hover {
    border-color: var(--color-primary-hover);
}

/* 主要内容区域 */
main {
    padding-top: 88px;
}

.main-container {
    max-width: 85%;
    margin: 0 auto;
    padding: 32px 16px;
    display: flex;
    flex-direction: row;
    gap: 32px;
}

.main-container aside {
    flex: 0 0 300px;
    /* 或你想要的固定宽度 */
}

.main-container aside h1 {
    font-size: 20px;
    color: var(--color-text);
    margin-bottom: 16px;
}

.main-container aside h1 span {
    color: var(--color-primary);
}

.main-container aside .desc {
    font-size: 14px;
    color: var(--color-text-light);
}

.main-container .tools-group {
    flex: 1 1 calc(100% - 300px);
    display: flex;
    flex-direction: column;
    gap: 36px;
}

/* 卡片/面板样式 */
.card {
    background: var(--color-card);
    border-radius: var(--radius-base);
    padding: 24px;
    box-shadow: 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 6px 8px rgba(102, 119, 136, 0.03), 0 1px 2px rgba(102, 119, 136, 0.3);
    transition: box-shadow var(--transition-base);
}

.card .bar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.card h2 {
    display: flex;
    flex-direction: row;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    align-items: center;
    white-space: nowrap;
}

.card h2 .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    background: var(--color-accent-gradient);
}

.card h2 .icon i {
    color: #fff;
}

.card.extraction {
    display: flex;
    flex-direction: row;
    gap: 48px;
}

.card.extraction .text {
    flex: 6;
}

.card.extraction .text h2 {
    margin-bottom: 16px;
    font-size: 24px;
}

.card.extraction .text p {
    margin-bottom: 16px;
    font-size: 16px;
}

.card.extraction .text p a {
    color: var(--color-primary);
}

.card.extraction .text p a:hover {
    color: var(--color-primary-hover);
}

.card.extraction .img {
    flex: 4;
}

article {
    padding: 24px;
}

article h2 {
    margin-bottom: 16px;
}

article p {
    margin-bottom: 16px;
}

article.qa h2 {
    text-align: center;
}

article.qa p {
    text-align: center;
}

/* qa卡片 */
.qa .content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qa-card {
    overflow: hidden;
    border-radius: 0.75rem;
    background: var(--color-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--color-border-light);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.qa-button {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    text-align: left;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function:
        cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
    background-color: transparent;
    cursor: pointer;
}

.qa-button span {
    font-weight: bold;
    font-size: 16px;
    color: var(--color-text);
}

.qa-icon {
    height: 20px;
    width: 20px;
    transform: rotate(0deg);
    color: var(--color-text-light);
    transition-property: transform;
    transition-timing-function:
        cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.qa-icon.rotate {
    transform: rotate(180deg);
}

.qa-content {
    padding-left: 24px;
    padding-right: 24px;
    padding-bottom: 16px;
}

.qa-content .qa-text {
    color: var(--color-text-light);
    text-align: left !important;
}

/* 表格编辑区域 */
.table-editor {
    width: 100%;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-base);
    overflow: auto;
}

/* 外层容器：限制宽度 + 居中 */
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 横向分栏：桌面4列，平板2列，手机1列 */
.footer-sections {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px 24px;
    text-align: left;
    /* 栏目左对齐 */
    margin: 0 auto 12px auto;
    padding: 8px 0;
}

/* 栏目标题与列表 */
.f-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.f-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.f-links a {
    color: var(--color-text-light);
    text-decoration: none;
}

.f-links a:hover {
    color: var(--color-primary);
}

/* 版权行：最底部单行居中 */
footer {
    padding: 36px;
    text-align: center;
    font-size: 16px;
    color: var(--color-text-light);
    background-color: var(--color-card);
    border-top: 1px solid var(--color-border-light);
    margin-top: 24px;
}

footer hr {
    margin: 36px auto;
    border: none;
    border-top: 1px solid var(--color-border-light);
}

.footer-copy {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-copy .sep {
    opacity: .5;
}

.coming-soon{
    width: 100%;
    height: 300px;
    font-size: 48px;
    text-align: center;
    padding: 80px;
}

/* 响应式断点 */
@media (max-width: 1024px) {
    .footer-sections {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .footer-sections {
        grid-template-columns: 1fr;
    }
}


/* 响应式设计：小屏幕 */
@media screen and (max-width: 1200px) {
    nav {
        max-width: 95%;
    }

    .main-container {
        max-width: 95%;
        flex-direction: column;
    }

    .main-container aside {
        flex: 0;
    }

    .main-container .tools-group {
        flex: 0;
    }

    .card {
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    nav {
        max-width: 100%;
    }

    .main-container {
        max-width: 100%;
        flex-direction: column;
    }

    .main-container aside {
        flex: 0;
    }

    .main-container .tools-group {
        flex: 0;
    }

    .card {
        width: 100%;
    }
}

/* 响应式设计：超小屏幕（例如手机） */
@media screen and (max-width: 480px) {
    .main-container {
        padding: 16px;
    }

    nav .actions-group {
        flex-direction: column;
        align-items: flex-start;
    }

    nav .actions-group a {
        margin-bottom: 8px;
    }
}