* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background: #0d1117;
    color: #e6edf3;
    font-family: 'Segoe UI', 'Noto Serif SC', system-ui, serif;
    padding: 24px 20px 40px;
    min-height: 100vh;
}
.container {
    max-width: 960px;
    margin: 0 auto;
}
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid #30363d;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.header h1 {
    font-size: 26px;
    font-weight: 500;
    letter-spacing: 2px;
    color: #e6edf3;
}
.header h1 span {
    color: #58a6ff;
}
.btn {
    background: transparent;
    border: 1px solid #30363d;
    color: #e6edf3;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.btn:hover {
    border-color: #58a6ff;
    color: #58a6ff;
    background: rgba(88, 166, 255, 0.06);
}
.btn-primary {
    background: #58a6ff;
    border-color: #58a6ff;
    color: #0d1117;
    font-weight: 500;
}
.btn-primary:hover {
    background: #79c0ff;
    border-color: #79c0ff;
    color: #0d1117;
}
.btn-secondary {
    border-color: #30363d;
}
.btn-secondary:hover {
    border-color: #58a6ff;
    background: rgba(88, 166, 255, 0.06);
    color: #58a6ff;
}
.btn-success {
    background: #238636;
    border-color: #238636;
    color: #ffffff;
}
.btn-success:hover {
    background: #2ea043;
    border-color: #2ea043;
}
.card {
    background: #161b22;
    border-radius: 14px;
    border: 1px solid #30363d;
    padding: 24px;
    margin-bottom: 24px;
}
.card-title {
    font-size: 16px;
    font-weight: 500;
    color: #e6edf3;
    margin-bottom: 6px;
}
.card-sub {
    font-size: 13px;
    color: #8b949e;
    margin-bottom: 14px;
}
.input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.input-row input[type="datetime-local"] {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 10px 14px;
    color: #e6edf3;
    font-size: 14px;
    font-family: inherit;
    flex: 1;
    min-width: 220px;
}
.input-row input[type="datetime-local"]:focus {
    outline: none;
    border-color: #58a6ff;
}
.input-row .btn {
    flex-shrink: 0;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
@media (max-width: 700px) {
    .result-grid {
        grid-template-columns: 1fr;
    }
}
.result-box {
    background: #0d1117;
    border-radius: 10px;
    padding: 14px 16px;
    border: 1px solid #21262d;
}
.result-box .label {
    font-size: 11px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.result-box .value {
    font-size: 18px;
    font-weight: 500;
    margin-top: 2px;
    font-family: 'Noto Serif SC', serif;
}
.ke-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 20px;
    margin-top: 4px;
}
.ke-item {
    font-size: 15px;
    color: #e6edf3;
}
.ke-item .ke-label {
    color: #8b949e;
    font-size: 12px;
    margin-right: 6px;
}
.chuan-flow {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.chuan-node {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 6px 16px;
    text-align: center;
}
.chuan-node .chuan-name {
    font-size: 11px;
    color: #8b949e;
}
.chuan-node .chuan-value {
    font-size: 18px;
    font-weight: 500;
    color: #e6edf3;
}
.chuan-arrow {
    color: #58a6ff;
    font-size: 20px;
}
.shensha-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-top: 4px;
}
.shensha-item {
    font-size: 13px;
    color: #b1bac4;
}
.shensha-item .shensha-name {
    color: #8b949e;
}

/* ===== 复制 & AI 区域（改动核心） ===== */
.copy-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #30363d;
}
.copy-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.copy-row .btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
    padding: 10px 18px;
}
.copy-row .btn-success {
    flex: 0 1 auto;
    min-width: 100px;
}
textarea#outputText {
    width: 100%;
    min-height: 160px;
    background: #0d1117;
    border: 1px solid #21262d;
    border-radius: 8px;
    color: #e6edf3;
    font-size: 13px;
    font-family: 'Consolas', monospace;
    padding: 12px 14px;
    resize: vertical;
    line-height: 1.6;
}
textarea#outputText:focus {
    outline: none;
    border-color: #58a6ff;
}

/* AI 平台选项（复制后内联展开） */
.platform-grid-inline {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0 4px;
    border-top: 1px dashed #30363d;
    margin-top: 4px;
    animation: fadeSlideDown 0.25s ease;
}
.platform-grid-inline.open {
    display: flex;
}
.platform-grid-inline .btn {
    flex: 1;
    min-width: 70px;
    text-align: center;
    padding: 8px 12px;
    background: #0d1117;
    border-color: #30363d;
    font-size: 13px;
}
.platform-grid-inline .btn:hover {
    border-color: #58a6ff;
    background: rgba(88, 166, 255, 0.06);
    color: #58a6ff;
}
.platform-grid-inline .hint {
    width: 100%;
    font-size: 12px;
    color: #8b949e;
    text-align: center;
    margin-bottom: 2px;
}

@keyframes fadeSlideDown {
    0% { opacity: 0; transform: translateY(-6px); }
    100% { opacity: 1; transform: translateY(0); }
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #161b22;
    border: 1px solid #58a6ff;
    color: #e6edf3;
    padding: 10px 26px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.toast.show {
    opacity: 1;
}
.hidden {
    display: none !important;
}
.text-muted {
    color: #8b949e;
}
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.loading-tip {
    color: #58a6ff;
    font-size: 13px;
    text-align: center;
    padding: 10px;
}
.mt-8 {
    margin-top: 8px;
}
/* ===== 视图切换开关 ===== */
.view-toggle {
    display: flex;
    gap: 4px;
    background: #0d1117;
    border-radius: 8px;
    padding: 3px;
    border: 1px solid #30363d;
}
.view-toggle .toggle-btn {
    background: transparent;
    border: none;
    color: #8b949e;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.view-toggle .toggle-btn:hover {
    color: #e6edf3;
}
.view-toggle .toggle-btn.active {
    background: #58a6ff;
    color: #0d1117;
    font-weight: 500;
}

/* ===== 推导教程样式 ===== */
.step-guide {
    margin-top: 8px;
}
.step-guide .step-block {
    background: #0d1117;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 14px;
    border-left: 3px solid #58a6ff;
    border: 1px solid #21262d;
    border-left-width: 3px;
}
.step-guide .step-block .step-title {
    font-weight: 600;
    color: #58a6ff;
    font-size: 15px;
    margin-bottom: 4px;
}
.step-guide .step-block .step-desc {
    color: #b1bac4;
    font-size: 14px;
    line-height: 1.8;
}
.step-guide .step-block .step-desc .highlight {
    color: #f0883e;
    font-weight: 500;
}
.step-guide .step-block .step-desc .value {
    color: #e6edf3;
    font-weight: 500;
}
.step-guide .step-block .step-result {
    margin-top: 8px;
    padding: 8px 14px;
    background: #161b22;
    border-radius: 6px;
    font-family: 'Consolas', monospace;
    font-size: 13px;
    color: #e6edf3;
    border: 1px solid #21262d;
}
.step-guide .step-block .step-result .label {
    color: #8b949e;
    font-size: 12px;
}
.step-guide .step-divider {
    height: 1px;
    background: #21262d;
    margin: 16px 0;
}