* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Microsoft Yahei", system-ui, sans-serif;
    background: #0b0c10;
    color: #e5e7eb;
    min-height: 100vh;
}

a { color: inherit; }

nav {
    width: 100%;
    padding: 18px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(11, 12, 16, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.logo {
    font-size: 22px;
    font-weight: bold;
    color: #d4af37;
    letter-spacing: 2px;
    text-decoration: none;
}
.nav-links { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nav-btn {
    padding: 9px 18px;
    background: #d4af37;
    color: #000;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}
.nav-btn:hover { background: #f0c858; }
.nav-btn.ghost {
    background: transparent;
    color: #d4af37;
    border: 1px solid #d4af37;
}
.lang-switch {
    padding: 8px 14px;
    background: transparent;
    color: #d4af37;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.2s;
}
.lang-switch:hover { background: rgba(212, 175, 55, 0.12); border-color: #d4af37; }

.hero {
    width: 100%;
    min-height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 20px;
    background: radial-gradient(circle at center, #1f1d17 0%, #0b0c10 70%);
}
.hero h1 { font-size: clamp(32px, 6vw, 56px); color: #fff; margin-bottom: 16px; }
.hero .accent { color: #d4af37; }
.hero p { font-size: 18px; color: #aaa; max-width: 600px; line-height: 1.8; margin-bottom: 32px; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 28px; }
.hero-buttons a, .btn-primary, .btn-outline {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
    border: none;
    cursor: pointer;
    font-size: 15px;
}
.btn-primary { background: #d4af37; color: #000; }
.btn-primary:hover { background: #f0c858; }
.btn-outline { border: 1px solid #d4af37; color: #d4af37; background: transparent; }
.btn-outline:hover { background: rgba(212, 175, 55, 0.1); }
.btn-primary:disabled, .btn-outline:disabled { opacity: 0.55; cursor: not-allowed; }

.sn-search {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 480px;
}
.sn-search input {
    flex: 1;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 16px;
}
.sn-search button {
    padding: 14px 22px;
    border: none;
    border-radius: 8px;
    background: #d4af37;
    color: #000;
    font-weight: 700;
    cursor: pointer;
}

.section { padding: 80px 20px; max-width: 1200px; margin: 0 auto; }
.title { text-align: center; margin-bottom: 60px; }
.title h2 { font-size: 32px; color: #fff; margin-bottom: 12px; }
.title p { color: #999; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 32px 24px;
    border-radius: 12px;
    transition: 0.25s;
}
.item:hover { transform: translateY(-6px); border-color: #d4af37; }
.item h3 { color: #d4af37; margin-bottom: 12px; font-size: 20px; }
.item p { color: #aaa; line-height: 1.7; }

.page {
    max-width: 800px;
    margin: 40px auto 80px;
    padding: 0 20px;
}
.page h1, .page h2 {
    color: #fff;
    margin-bottom: 8px;
}
.sub { color: #999; margin-bottom: 24px; font-size: 14px; }

.panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 24px;
}

.form-item { margin-bottom: 16px; }
label { display: block; margin-bottom: 6px; font-weight: 500; color: #d1d5db; font-size: 14px; }
input, textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    font-size: 15px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
}
input:focus, textarea:focus {
    outline: none;
    border-color: #d4af37;
}
input[readonly] { color: #9ca3af; }
.row { display: flex; gap: 8px; align-items: center; }
.row input { flex: 1; }

.subgroup {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 8px;
    background: rgba(212, 175, 55, 0.03);
}
.subgroup-title {
    font-size: 13px;
    color: #d4af37;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.sub-scores {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 12px 0 16px;
    padding: 14px;
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 8px;
}
.sub-score { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sub-score span:first-child { color: #9ca3af; font-size: 12px; }
.sub-score span:last-child { color: #d4af37; font-size: 22px; font-weight: 700; }

.card-info-block {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.btn-upload { background: #34a853; color: #fff; }
.btn-upload:hover { filter: brightness(1.08); }
input[type="file"] { display: none; }

#msg, .msg {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    white-space: pre-wrap;
    display: none;
}
#msg.success, .msg.success { display: block; background: rgba(22, 101, 52, 0.35); color: #86efac; }
#msg.error, .msg.error { display: block; background: rgba(127, 29, 29, 0.35); color: #fca5a5; }

.result {
    margin-top: 24px;
    display: none;
}
.result.show { display: block; }
.kv { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; margin-bottom: 8px; color: #ddd; }
.kv span:first-child { color: #9ca3af; }
.grade-lg { font-size: 42px; color: #d4af37; font-weight: 700; letter-spacing: 1px; margin: 8px 0 16px; }
.img-wrap { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 20px; }
.img-item h4 { margin: 0 0 8px; color: #d4af37; font-size: 14px; }
.img-item img {
    max-width: 340px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #111;
}

footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #666;
    font-size: 14px;
}

@media (max-width: 640px) {
    nav { padding: 14px 16px; }
    .page { margin-top: 24px; }
    .row, .sn-search { flex-direction: column; }
    .row button, .sn-search button { width: 100%; }
    .grid4, .grid2 { grid-template-columns: 1fr; }
    .sub-scores { grid-template-columns: repeat(2, 1fr); }
}
