:root {
    --primary: #667eea;
    --sec: #764ba2;
    --dark: #1a202c;
    --gray: #718096;
    --light: #f7fafc;
    --white: #fff;
    --radius: 12px;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.6; color: var(--dark); background: var(--light); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 导航 */
.navbar { background: linear-gradient(135deg, var(--primary), var(--sec)); color: var(--white); padding: 1rem 0; position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow); }
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-brand img { height: 36px; }
.nav-brand h1 { font-size: 1.4rem; font-weight: 800; }
.nav-links a { color: var(--white); text-decoration: none; margin-left: 1.5rem; font-weight: 500; opacity: 0.9; transition: 0.3s; }
.nav-links a:hover { opacity: 1; }

/* Hero */
.hero { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: var(--white); text-align: center; padding: 5rem 0; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: url('../images/decorative-bg.png') center/cover; opacity: 0.15; }
.hero .container { position: relative; z-index: 1; }
.hero h2 { font-size: 2.8rem; margin-bottom: 1rem; font-weight: 800; text-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.hero p { font-size: 1.2rem; margin-bottom: 2rem; opacity: 0.95; }

/* 按钮 */
.btn { display: inline-block; padding: 0.8rem 2rem; border-radius: 50px; text-decoration: none; font-weight: 600; transition: all 0.3s; border: none; cursor: pointer; }
.btn-primary { background: var(--white); color: var(--primary); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.btn-test { background: linear-gradient(135deg, var(--primary), var(--sec)); color: var(--white); width: 100%; text-align: center; margin-top: 1rem; }
.btn-test:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* 测试列表 */
.tests-section { padding: 4rem 0; }
.section-title { text-align: center; font-size: 2rem; margin-bottom: 3rem; color: var(--dark); font-weight: 800; }
.tests-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; }
.test-card { background: var(--white); border-radius: var(--radius); padding: 2rem; text-align: center; box-shadow: var(--shadow); transition: transform 0.3s, box-shadow 0.3s; border: 1px solid #e2e8f0; }
.test-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.test-icon img { width: 70px; height: 70px; margin-bottom: 1rem; object-fit: contain; }
.test-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.test-desc { color: var(--gray); font-size: 0.9rem; margin-bottom: 1rem; min-height: 40px; }
.price { font-size: 1.5rem; color: var(--primary); font-weight: 800; margin: 0.5rem 0; }

/* 测试页 */
.test-container { max-width: 800px; margin: 3rem auto; background: var(--white); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.progress-bar { height: 8px; background: #e2e8f0; border-radius: 4px; margin-bottom: 2rem; overflow: hidden; }
.progress { height: 100%; background: linear-gradient(90deg, var(--primary), var(--sec)); width: 0%; transition: width 0.4s ease; }
.question { padding: 1.5rem; background: #f8fafc; border-radius: 8px; border: 1px solid #e2e8f0; margin-bottom: 1.5rem; }
.question-text { font-size: 1.2rem; font-weight: 600; margin-bottom: 1rem; }
.option { padding: 1rem; margin-bottom: 0.8rem; background: var(--white); border: 2px solid #e2e8f0; border-radius: 8px; cursor: pointer; transition: 0.2s; }
.option:hover { border-color: var(--primary); background: #f0f4ff; }
.option.selected { border-color: var(--primary); background: var(--primary); color: var(--white); }

/* 弹窗 */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 200; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.modal.active { display: flex; }
.modal-content { background: var(--white); padding: 2rem; border-radius: var(--radius); width: 90%; max-width: 400px; text-align: center; animation: slideUp 0.3s; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.qr-code img { width: 220px; height: 220px; margin: 1rem 0; border: 1px solid #eee; padding: 5px; border-radius: 8px; }

/* 结果页 */
.result-container { max-width: 800px; margin: 3rem auto; background: var(--white); padding: 2.5rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.result-type { font-size: 2.5rem; font-weight: 800; background: linear-gradient(135deg, var(--primary), var(--sec)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-align: center; margin: 1rem 0; }
.result-section { background: #f7fafc; padding: 1.5rem; border-radius: 8px; margin-top: 1.5rem; border-left: 4px solid var(--primary); }

/* 后台 */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin: 20px 0; }
.stat-card { background: var(--white); padding: 20px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.stat-card h3 { font-size: 28px; color: var(--primary); margin: 5px 0; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.admin-table th, .admin-table td { padding: 14px; text-align: left; border-bottom: 1px solid #eee; }
.admin-table th { background: #f8fafc; font-weight: 600; }
.btn-sm { padding: 6px 12px; font-size: 12px; background: #48bb78; color: white; border: none; border-radius: 6px; cursor: pointer; }
.btn-danger { background: #f56565; }

/* 页脚 */
.footer { background: var(--dark); color: var(--white); padding: 2rem 0; text-align: center; margin-top: 4rem; }

/* 响应式 */
@media (max-width: 768px) {
    .hero h2 { font-size: 2rem; }
    .tests-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .test-container, .result-container { margin: 1rem; padding: 1.5rem; }
}