:root {
    --bg-dark: #0b0e14;
    --card-bg: rgba(20, 28, 40, 0.85);
    --neon-cyan: #00f0ff;
    --neon-purple: #b300ff;
    --neon-orange: #ff6a00;
    --text-primary: #eef4ff;
    --text-secondary: #9aaec2;
    --border-glow: 0 0 10px rgba(0, 240, 255, 0.3);
    --glass-blur: blur(12px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-dark);
    background-image: radial-gradient(circle at 30% 20%, #1a2a3a 0%, #05080c 100%);
    min-height: 100vh;
    color: var(--text-primary);
    padding-bottom: 70px;
    position: relative;
    display: flex;
    flex-direction: column;
}

#app {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ---------- 首页样式 ---------- */
.home-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: url('../img/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    background-color: #0b0e14;
    margin: 0;
    padding: 0;
    width: 100%;
}

.home-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 10, 20, 0.75);
    backdrop-filter: blur(3px);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.main-title {
    font-size: clamp(2.5rem, 12vw, 4.8rem);
    font-weight: 800;
    letter-spacing: 8px;
    background: linear-gradient(45deg, #00f0ff, #b300ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px #00f0ff80;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.5rem;
    color: #b0e0ff;
    margin-bottom: 30px;
}

.hero-desc {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
    color: #9cc;
    flex-wrap: wrap;
}

.hero-desc span {
    background: rgba(20, 40, 60, 0.6);
    padding: 8px 20px;
    border-radius: 40px;
    backdrop-filter: blur(5px);
    border: 1px solid #3a6a8a;
}

.btn-start {
    background: linear-gradient(145deg, #00c8ff, #b300ff);
    border: none;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 18px 50px;
    border-radius: 60px;
    box-shadow: 0 0 40px #00aaffaa;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid #ffffff55;
    margin-top: 10px;
    display: inline-block;
}

.btn-start:hover {
    transform: scale(1.05);
    box-shadow: 0 0 60px #b300ffaa;
}

/* ---------- 答题页容器 ---------- */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px 12px 20px;
}

.test-container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 140px);
}

.progress-header {
    margin-bottom: 20px;
    flex-shrink: 0;
}
.progress-bar-bg {
    height: 6px;
    background: #1e2a36;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px #00000055;
}
.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    box-shadow: 0 0 8px var(--neon-cyan);
    transition: width 0.2s ease;
}
#progress-text {
    display: block;
    text-align: right;
    font-size: 13px;
    margin-top: 5px;
    color: var(--text-secondary);
}

.questions-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.question-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid #2a3a4a;
    border-radius: 24px;
    padding: 24px 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px -10px #00000080, var(--border-glow);
    display: flex;
    flex-direction: column;
}
.question-text {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 28px;
    line-height: 1.4;
    text-shadow: 0 0 5px #00f0ff44;
}
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.option-item {
    background: #0f1a22;
    border: 1px solid #2e4a5e;
    border-radius: 40px;
    padding: 14px 20px;
    font-size: 1rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    box-shadow: 0 2px 5px #00000033;
}
.option-item.selected {
    background: linear-gradient(135deg, #00667a, #1a3a5c);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px #00f0ff66;
    transform: scale(1.01);
}

/* 导航按钮 */
.nav-buttons {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}
.test-container .nav-buttons,
.test-container .btn-submit {
    margin-top: auto;
}
.btn-primary, .btn-secondary, .btn-submit {
    flex: 1;
    padding: 16px 0;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
}
.btn-primary {
    background: linear-gradient(145deg, #00c8ff, #0066cc);
    color: white;
    box-shadow: 0 0 20px #00aaff;
}
.btn-primary:disabled {
    background: #1e2f3f;
    box-shadow: none;
    color: #6a8a9a;
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-secondary {
    background: #1e2f3f;
    color: #ccddee;
    border: 1px solid #3f5568;
}
.btn-submit {
    background: linear-gradient(145deg, var(--neon-purple), #7a00b3);
    box-shadow: 0 0 20px #b300ff;
    color: white;
    width: 100%;
    margin-top: 16px;
}
.btn-submit:disabled {
    background: #2a3a4a;
    box-shadow: none;
    color: #6a8a9a;
    opacity: 0.5;
    cursor: not-allowed;
}

/* 结果卡片 */
.result-container {
    padding-bottom: 20px;
}
.result-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid #2a4a6a;
    border-radius: 32px;
    padding: 24px 18px;
    box-shadow: 0 20px 40px #00000060, var(--border-glow);
}
.personality-header {
    text-align: left;
}
.personality-header h2 {
    font-size: 2.8rem;
    letter-spacing: 4px;
    background: linear-gradient(45deg, #00f0ff, #b300ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px #00f0ff66;
    margin-bottom: 4px;
    display: inline-block;
}
.personality-header h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}
.tag {
    background: #1e3a5a;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    color: #b0e0ff;
}
.radar-container {
    margin: 10px 0 5px;
    display: flex;
    justify-content: center;
}
.scores-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    margin: 15px 0;
    text-align: center;
}
.score-item {
    background: #11212e;
    border-radius: 20px;
    padding: 8px 2px;
}
.score-item span:first-child {
    display: block;
    font-size: 0.7rem;
    color: #aac;
}
.score-item span:last-child {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--neon-cyan);
}
.personality-desc p {
    font-size: 1rem;
    line-height: 1.6;
    margin: 16px 0;
    color: #d0e2ff;
}
.meta-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #9cc;
    border-top: 1px dashed #2a4a6a;
    padding-top: 12px;
    flex-wrap: wrap;
}
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}
.btn-share {
    background: var(--neon-orange);
    box-shadow: 0 0 15px #ff6a00;
    color: #000;
    flex: 1;
    padding: 16px 0;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    flex: 1;
    padding: 16px 0;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
}

/* 底部固定栏 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 14px 10px;
    background: #0b1015cc;
    backdrop-filter: blur(8px);
    border-top: 1px solid #1f3a4a;
    z-index: 5;
}
.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.footer-links a {
    display: inline-flex;
    align-items: center;
    color: #8aaac0;
    text-decoration: none;
    transition: color 0.2s;
    line-height: 1.4;
    padding: 4px 0;
}
.footer-links a:hover {
    color: #00f0ff;
}
.footer-links .divider {
    color: #3f5a6a;
    margin: 0 4px;
}
.social-icon {
    width: 20px;
    height: 20px;
    margin-right: 6px;
    vertical-align: middle;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}
.footer-social-link:hover .social-icon {
    opacity: 1;
}

/* 页面底部备案号（非固定，靠 flex 推到极下方） */
.beian-footer {
    text-align: center;
    padding: 20px 10px 30px;
    background: transparent;
    width: 100%;
    margin-top: auto;
}
.beian-link {
    color: #6a8a9a;
    text-decoration: none;
    font-size: 0.8rem;
    opacity: 0.6;
}
.beian-link:hover {
    opacity: 1;
    color: #8aaac0;
}

/* 分享模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000e0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-content {
    position: relative;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    background: #0f1e28;
    border-radius: 30px;
    padding: 16px;
    border: 1px solid #00ccff;
    overflow-y: auto;
    box-sizing: border-box;
}
.share-img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    margin-top: 8px;
    display: block;
}
.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 36px;
    color: white;
    cursor: pointer;
    z-index: 10;
}
.modal-tip {
    color: #aad;
    margin-bottom: 8px;
    text-align: center;
    font-size: 16px;
}
.btn-download {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 14px 0;
    background: linear-gradient(145deg, #00c8ff, #0066cc);
    border: none;
    border-radius: 40px;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 0 15px #00aaffaa;
    transition: 0.2s;
}
.btn-download:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px #00aaff;
}

/* 响应式 */
@media (max-width: 480px) {
    .question-text {
        font-size: 1.2rem;
    }
    .hero-desc span {
        padding: 6px 16px;
        font-size: 0.85rem;
    }
    .btn-start {
        font-size: 1.3rem;
        padding: 16px 40px;
    }
    .option-item {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
}