@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;600&display=swap');

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

[hidden] {
    display: none !important;
}

body {
    min-height: 100vh;
    font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
    color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.page {
    width: min(960px, 90vw);
    background: #fff;
    border-radius: 12px;
    padding: 36px 44px 28px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.hero {
    text-align: center;
    margin-bottom: 40px;
}

.analysis-page .hero {
    margin-bottom: 20px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.logo-mark {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fef9c3;
    border: 3px solid #e3dca9;
    color: #1d7a50;
    font-weight: 600;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.15);
}

.logo-text p {
    font-size: 22px;
    font-weight: 600;
}

.logo-text span {
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.back-link {
    display: inline-block;
    margin-top: 12px;
    color: #2c5f9c;
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover {
    text-decoration: underline;
}

.hero h1 {
    color: #c31919;
    font-size: clamp(32px, 6vw, 52px);
    margin-bottom: 6px;
}

.subtitle {
    color: #5b5b5b;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 12px;
}

.analysis-content {
    display: flex;
    justify-content: center;
}

.upload-card {
    width: min(640px, 100%);
    background: #fff;
    border-radius: 10px;
    padding: 28px 32px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.upload-card h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.upload-card p {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

.analysis-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.upload-field {
    flex: 1;
    min-width: 220px;
    position: relative;
    border: 1px dashed #9aa7c5;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    color: #4a4a4a;
}

.upload-field input {
    opacity: 0;
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.upload-field span {
    font-size: 16px;
}

.upload-btn {
    background: #2c5f9c;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease;
}

.upload-btn:hover {
    background: #214a78;
}

.upload-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: #5b5b5b;
}

.upload-summary {
    margin-bottom: 12px;
    font-size: 15px;
    color: #3a3a3a;
}

.upload-summary .summary-file {
    margin-left: 8px;
    color: #2c5f9c;
    word-break: break-all;
}

.loader {
    width: 22px;
    height: 22px;
    border: 3px solid #d1dae8;
    border-top-color: #2c5f9c;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

.analysis-result {
    background: #f5f7fb;
    border-radius: 8px;
    padding: 16px 18px;
}

.analysis-result h3 {
    margin-bottom: 8px;
    color: #2c2c2c;
}

.result-body {
    color: #414141;
    line-height: 1.7;
}

.result-body ul {
    padding-left: 18px;
}

.result-body li {
    margin-bottom: 4px;
}

.result-meta {
    margin-top: 8px;
    font-size: 14px;
    color: #6b6b6b;
}

.actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    justify-items: center;
}

.action {
    display: inline-block;
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 16px 24px;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    text-decoration: none;
}

.action:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 22px rgba(0, 0, 0, 0.2);
}

.action-fast {
    background: #e85c27;
}

.action-settings {
    background: #8b6cd4;
}

.action-calibration {
    background: #3c96d1;
}

.action-guide {
    background: #2c9364;
}

footer {
    margin-top: 36px;
    text-align: right;
    color: #4a4a4a;
    font-size: 16px;
}

@media (max-width: 600px) {
    .page {
        padding: 30px;
    }

    .logo {
        flex-direction: column;
    }

    footer {
        text-align: center;
    }

    .analysis-form {
        flex-direction: column;
        align-items: stretch;
    }

    .upload-btn {
        width: 100%;
        text-align: center;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
