/* === CSS Variables & Reset === */
:root {
    --primary: #C60A1E;
    --primary-dark: #9E0818;
    --primary-light: #FEF0F0;
    --accent-gold: #B8860B;
    --text-dark: #1A1A1A;
    --text-body: #333333;
    --text-gray: #666666;
    --text-light: #999999;
    --bg-page: #F5F6F8;
    --bg-white: #FFFFFF;
    --border: #E5E7EB;
    --border-light: #F0F0F0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.04), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.06), 0 4px 10px rgba(0,0,0,0.04);
    --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: var(--text-body);
    background: var(--bg-page);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* === Top Accent Line === */
.top-accent {
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, #E8342E 50%, var(--primary) 100%);
    position: sticky;
    top: 0;
    z-index: 101;
}

/* === Header === */
.header {
    background: var(--bg-white);
    padding: 0 40px;
    height: 64px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 0 var(--border);
    position: sticky;
    top: 3px;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-img {
    height: 36px;
    width: auto;
}

.header-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
}

.header-dept {
    font-size: 15px;
    color: var(--text-dark);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-badge {
    font-size: 13px;
    color: var(--primary);
    background: var(--primary-light);
    padding: 6px 16px;
    border-radius: 4px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 2px;
    background: var(--bg-page);
    padding: 3px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.lang-btn {
    background: transparent;
    color: var(--text-gray);
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 500;
}

.lang-btn:hover { color: var(--text-dark); background: var(--bg-white); }
.lang-btn.active { background: var(--primary); color: #fff; }

/* === Notice Bar === */
.notice-bar {
    background: #FFF7ED;
    border-bottom: 1px solid #FDEBD0;
    padding: 12px 40px;
}

.notice-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #C2410C;
}

.notice-icon { flex-shrink: 0; color: #EA580C; }

/* === Main Content === */
.main-content { padding: 32px 40px; min-height: calc(100vh - 200px); }
.container { max-width: 1200px; margin: 0 auto; }

/* === Notice Section === */
.notice-section {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 36px 40px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.notice-title {
    font-size: 20px;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary);
    line-height: 1.5;
    font-weight: 600;
}

.notice-body p {
    margin-bottom: 14px;
    text-indent: 2em;
    font-size: 14px;
    line-height: 1.9;
    color: #444;
}

.highlight-text {
    background: var(--primary-light);
    padding: 12px 18px;
    border-left: 3px solid var(--primary);
    border-radius: 0 4px 4px 0;
    text-indent: 0 !important;
    margin-top: 20px !important;
    font-size: 14px;
    color: var(--text-body);
}

/* === Form Section === */
.form-section { margin-bottom: 24px; }

.form-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 36px 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    position: relative;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: var(--radius) var(--radius) 0 0;
}

.form-header { text-align: center; margin-bottom: 28px; }
.form-header h2 { font-size: 22px; color: var(--text-dark); margin-bottom: 8px; font-weight: 600; }
.form-desc { color: var(--text-gray); font-size: 13px; }

.form-group-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group-title svg { color: var(--primary); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-dark);
    margin-bottom: 6px;
    font-weight: 500;
}

.required { color: var(--primary); margin-left: 2px; }

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    outline: none;
    font-family: inherit;
    background: var(--bg-white);
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(198, 10, 30, 0.08);
}

.form-group input::placeholder { color: #bbb; }
.form-group input.error { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08); }

.password-wrapper { position: relative; display: flex; align-items: center; }
.password-wrapper input { padding-right: 42px; }

.toggle-pwd {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    padding: 4px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.toggle-pwd:hover { color: var(--primary); }

.form-tip { text-align: center; color: var(--text-light); font-size: 12px; margin: 16px 0; }

.field-hint {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
    line-height: 1.4;
}

.form-actions { text-align: center; margin-top: 24px; }

.btn-submit {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 64px;
    font-size: 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 600;
    letter-spacing: 2px;
}

.btn-submit:hover { background: var(--primary-dark); box-shadow: var(--shadow-md); }
.btn-submit:active { transform: scale(0.98); }
.btn-submit:disabled { background: #ccc; cursor: not-allowed; box-shadow: none; }

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* === Result Panel === */
.result-panel {
    text-align: center;
    padding: 40px 20px;
    margin-top: 20px;
    background: var(--bg-page);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

.result-icon { font-size: 48px; margin-bottom: 16px; }
.result-icon.success { color: #16a34a; }
.result-icon.warning { color: #ea580c; }
.result-title { font-size: 20px; margin-bottom: 10px; color: var(--text-dark); font-weight: 600; }
.result-desc { color: var(--text-gray); font-size: 14px; line-height: 1.8; margin-bottom: 20px; }

/* Score Detail */
.score-detail {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-white);
    border-radius: 6px;
    border: 1px solid var(--border-light);
}

.score-bar-container {
    width: 100%;
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.score-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.score-label {
    font-size: 13px;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 12px;
}

.score-issues {
    font-size: 13px;
    color: var(--text-gray);
}

.score-issues strong {
    color: var(--text-dark);
}

.score-issues ul {
    margin: 6px 0 0 18px;
    padding: 0;
}

.score-issues li {
    margin-bottom: 4px;
    line-height: 1.6;
}

.btn-retry {
    background: var(--bg-white);
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 10px 28px;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 500;
}

.btn-retry:hover { background: var(--primary); color: #fff; }

/* === Requirements Section === */
.requirements-section {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 36px 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.requirements-section h2 {
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-left: 14px;
    border-left: 3px solid var(--primary);
    font-weight: 600;
}

.req-list { display: flex; flex-direction: column; gap: 12px; }

.req-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: var(--bg-page);
    border-radius: 6px;
    border: 1px solid var(--border-light);
    transition: all 0.2s;
}

.req-item:hover { border-color: var(--border); box-shadow: var(--shadow-sm); }

.req-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.req-item strong { display: block; margin-bottom: 4px; color: var(--text-dark); font-size: 14px; }
.req-item p { color: var(--text-gray); font-size: 13px; line-height: 1.7; }

/* === Manual Download === */
.manual-download {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-page);
    border-radius: 6px;
    border: 1px dashed var(--border);
}

.manual-download h3 { font-size: 14px; color: var(--text-dark); margin-bottom: 10px; font-weight: 600; }

.download-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    padding: 8px 16px;
    background: var(--bg-white);
    border: 1px solid var(--primary);
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
}

.download-link:hover { background: var(--primary); color: #fff; }
.download-link:hover svg { stroke: #fff; }

/* === Footer === */
.footer {
    background: #1F2937;
    color: #9CA3AF;
    text-align: center;
    padding: 28px 40px;
    font-size: 13px;
    margin-top: 40px;
}

.footer p { margin-bottom: 4px; }
.copyright { font-size: 12px; color: #6B7280; }

/* === Error Toast === */
.error-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #ef4444;
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 13px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
    animation: toastIn 0.25s ease-out;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* === Responsive === */
@media (max-width: 768px) {
    .header { padding: 12px 20px; }
    .header-inner { flex-direction: column; gap: 10px; }
    .header-left { flex-wrap: wrap; justify-content: center; }
    .logo-img { height: 28px; }
    .lang-switcher { order: -1; }
    .notice-bar { padding: 10px 20px; }
    .main-content { padding: 20px; }
    .notice-section, .form-card, .requirements-section { padding: 24px 20px; }
    .notice-title { font-size: 17px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .form-header h2 { font-size: 18px; }
    .btn-submit { width: 100%; padding: 12px; }
    .req-item { flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
    .header { padding: 10px 16px; }
    .logo-img { height: 24px; }
    .header-dept { font-size: 13px; }
    .main-content { padding: 16px; }
    .notice-title { font-size: 15px; }
    .form-group input { padding: 9px 12px; font-size: 13px; }
    .btn-submit { font-size: 14px; }
}
