:root {
    --accent: rgb(254, 110, 52);
    --text: #1f1f1f;
    --muted: #676767;
    --border: #ececec;
    --light: #f8f9fb;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

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

html,
body {
    scroll-behavior: smooth;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 15%, rgba(254, 110, 52, 0.09), transparent 26%),
        radial-gradient(circle at 90% 20%, rgba(0, 0, 0, 0.06), transparent 24%),
        linear-gradient(135deg, #ffffff 0%, #fafafa 35%, #ffffff 100%);
    min-height: 100vh;
    line-height: 1.6;
}

.texture {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(120deg, rgba(0, 0, 0, 0.03) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.03) 50%, rgba(0, 0, 0, 0.03) 75%, transparent 75%, transparent);
    background-size: 22px 22px;
    opacity: 0.4;
    z-index: -1;
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

nav {
    margin-top: 20px;
    border-radius: 14px;
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow);
}

.side-nav {
    position: fixed;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    opacity: 0.58;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.side-nav:hover {
    opacity: 1;
    transform: translateY(-50%) translateX(2px);
}

.side-menu {
    list-style: none;
    display: grid;
    gap: 8px;
    background: var(--accent);
    border-radius: 12px;
    padding: 10px 8px;
    box-shadow: var(--shadow);
}

.side-menu a {
    display: block;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    padding: 6px 10px;
    opacity: 0.9;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.side-menu a:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.16);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}

.menu {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.menu li {
    font-size: 14px;
    opacity: 0.96;
    cursor: pointer;
}

.menu a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.15s ease;
}

.menu a:hover {
    opacity: 0.85;
}

.menu a.active {
    opacity: 1;
    position: relative;
}

.menu a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 999px;
}

.side-menu a.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.hero {
    margin-top: 26px;
    padding: 34px 28px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 22px;
}

.hero h1 {
    font-size: 36px;
    line-height: 1.2;
    margin-bottom: 14px;
}

.highlight {
    color: var(--accent);
}

.hero p {
    color: var(--muted);
    max-width: 680px;
}

.hero-note {
    background: #111;
    color: #fff;
    border-radius: 14px;
    padding: 18px;
    align-self: center;
}

.hero-note h3 {
    color: var(--accent);
    margin-bottom: 8px;
    font-size: 18px;
}

.grid {
    margin: 26px 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.card h2 {
    font-size: 22px;
    margin-bottom: 10px;
}

.card p {
    color: var(--muted);
    margin-bottom: 14px;
}

.btn {
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-dark {
    background: #131313;
    color: #fff;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

input[type="file"],
input[type="text"],
select {
    width: 100%;
    border: 1px solid #dddddd;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
    font-size: 14px;
}

input[type="file"] {
    border-style: dashed;
    background: #fcfcfc;
}

.status {
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
    min-height: 22px;
}

.result-wrap {
    margin-top: 8px;
    border-radius: 12px;
    background: #fcfcfe;
    border: 1px solid var(--border);
    padding: 14px;
}

#result {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 15px;
}

.panel {
    margin-bottom: 28px;
    background: var(--light);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 22px;
}

.panel h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-size: 13px;
    color: var(--muted);
}

.hint {
    margin-top: 8px;
    color: #7b7b7b;
    font-size: 13px;
}

.api-test-status {
    margin-top: 8px;
    font-size: 13px;
    min-height: 18px;
    color: #3f3f3f;
}

.data-intro {
    color: #4a4a4a;
    margin-bottom: 12px;
}

.data-list {
    list-style: none;
    display: grid;
    gap: 10px;
}

.data-list li {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
}

.data-list strong {
    color: #101010;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.feature-item {
    background: #fff;
    border: 1px solid #efefef;
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
}

.history-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-row {
    margin-top: 12px;
}

.history-list {
    list-style: none;
    margin-top: 12px;
    display: grid;
    gap: 10px;
    max-height: 320px;
    overflow: auto;
    padding-right: 4px;
}

.history-item {
    background: #fff;
    border: 1px solid #ececec;
    border-left: 4px solid #111;
    border-radius: 10px;
    padding: 10px 12px;
}

.history-item.active-item {
    border-left-color: var(--accent);
    background: #fff8f4;
}

.item-title {
    font-weight: 600;
    color: #181818;
}

.item-subtext {
    color: #777;
    font-size: 12px;
    margin-top: 4px;
}

.history-meta {
    display: flex;
    justify-content: space-between;
    color: #757575;
    font-size: 12px;
    margin-bottom: 4px;
    gap: 8px;
}

.history-text {
    font-size: 14px;
    color: #212121;
    white-space: pre-wrap;
    word-break: break-word;
}

.history-empty {
    color: #888;
    font-size: 14px;
    padding: 8px 0;
}

.result-list {
    margin-top: 14px;
}

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 24px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #111;
    color: #fff;
    cursor: pointer;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 20;
}

.back-to-top.show {
    opacity: 0.95;
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-2px);
}

.site-footer {
    margin: 34px 0 24px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid #262626;
}

.footer-top-line {
    height: 6px;
    background: var(--accent);
}

.footer-main {
    background: linear-gradient(135deg, #141414 0%, #1e1e1e 100%);
    color: #fff;
    padding: 22px 22px 18px;
}

.footer-brand h4 {
    font-size: 20px;
    letter-spacing: 0.5px;
}

.footer-brand p {
    margin-top: 6px;
    color: #d0d0d0;
    font-size: 14px;
}

.footer-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.footer-col {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    padding: 12px;
}

.footer-col h5 {
    color: #fff;
    font-size: 15px;
    margin-bottom: 6px;
}

.footer-col p {
    color: #d6d6d6;
    font-size: 13px;
    margin-bottom: 4px;
}

.footer-copy-btn {
    margin-top: 5px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 7px;
    padding: 3px 9px;
    line-height: 1.2;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.footer-copy-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.4);
}

.footer-copy-status {
    min-height: 18px;
    margin-top: 4px;
    color: #ffd8c8;
}

.footer-bottom {
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 14px;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .side-nav {
        display: none;
    }
    .hero {
        grid-template-columns: 1fr;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    .feature-list {
        grid-template-columns: 1fr;
    }
    .config-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 30px;
    }
}
