* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        "Microsoft YaHei UI",
        "Segoe UI",
        Arial,
        sans-serif;
    background: #f4f6f8;
    color: #202124;
}

.page {
    width: 100%;
    min-height: 100vh;
    padding: 42px 20px;
}

.card {
    max-width: 920px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    padding: 34px;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.08);
}

h1 {
    text-align: center;
    margin: 0;
    font-size: 30px;
    font-weight: 650;
}

.subtitle {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 28px;
    color: #6b7280;
    font-size: 15px;
}

.paste-zone {
    width: 100%;
    min-height: 150px;
    border: 2px dashed #b8c0cc;
    border-radius: 14px;
    background: #fafbfc;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    cursor: pointer;
    transition: 0.2s;
    outline: none;
}

.paste-zone:hover,
.paste-zone.active {
    border-color: #4b7bec;
    background: #f7f9ff;
}

.paste-icon {
    font-size: 42px;
    margin-bottom: 14px;
}

.paste-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.paste-desc {
    color: #6b7280;
    margin-top: 4px;
}

.paste-desc.small {
    font-size: 13px;
}

.preview {
    max-width: 100%;
    max-height: 390px;
    object-fit: contain;
}

.hidden {
    display: none !important;
}

.status {
    text-align: center;
    margin: 18px 0 4px;
    min-height: 24px;
    color: #556070;
}

.status.processing {
    color: #1d4ed8;
    font-weight: 600;
}

.status.success {
    color: #15803d;
    font-weight: 600;
}

.status.error {
    color: #b91c1c;
    font-weight: 600;
}

.result-section {
    margin-top: 28px;
}

.section-title {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 15px;
}

.latex-title {
    margin-top: 22px;
}

.formula-preview {
    min-height: 100px;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    padding: 22px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
    font-size: 16px;
}

textarea {
    width: 100%;
    min-height: 130px;
    resize: vertical;
    border: 1px solid #cfd5dc;
    border-radius: 10px;
    padding: 14px;
    font-family:
        Consolas,
        "Courier New",
        monospace;
    font-size: 15px;
    line-height: 1.5;
    outline: none;
}

textarea:focus {
    border-color: #4b7bec;
}

.button-row {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

button {
    border: 0;
    border-radius: 9px;
    padding: 11px 20px;
    cursor: pointer;
    font-size: 14px;
}

.primary-button {
    background: #356ae6;
    color: white;
}

.secondary-button {
    background: #eef1f5;
    color: #30343b;
}

button:hover {
    opacity: 0.9;
}

.tip {
    margin-top: 14px;
    color: #737b86;
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .card {
        padding: 22px;
    }

    h1 {
        font-size: 24px;
    }

    .paste-zone {
        min-height: 230px;
    }
}
