/* Tailwind CSS CDN */
@import url('tailwind.min.css');
/* 字体引入 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* 全局样式和变量 */
:root {
    --primary-blue: #4f46e5;
    --secondary-blue: #6366f1;
    --light-blue: #eef2ff;
    --accent-blue: #8b5cf6;
    --dark-blue: #3730a3;
    --gradient-blue-1: #4f46e5;
    --gradient-blue-2: #8b5cf6;
    --gradient-blue-3: #a855f7;
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --light-purple: #f3f4f6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

html {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: 'Poppins', 'PingFang SC', 'Helvetica Neue', Helvetica, 'microsoft yahei', arial, sans-serif;
    height: 100vh;
    margin: 0;
    padding: 10px;
    color: var(--text-dark);
    line-height: 1.6;
    position: relative;
}

/* 背景动画元素 - 增强版运动泡泡效果 */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4); /* 再次增加不透明度 */
    backdrop-filter: blur(8px); /* 调整模糊以获得柔和效果 */
    animation: float-enhanced 20s infinite ease-in-out;
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.4); /* 大幅增强辉光 */
}

/* 增加更多运动的泡泡 */
.bg-circle:nth-child(1) {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.bg-circle:nth-child(2) {
    width: 200px;
    height: 200px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
    animation-duration: 18s;
}

.bg-circle:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
    animation-duration: 22s;
}

.bg-circle:nth-child(4) {
    width: 100px;
    height: 100px;
    top: 30%;
    left: 70%;
    animation-delay: 6s;
    animation-duration: 16s;
}

.bg-circle:nth-child(5) {
    width: 120px;
    height: 120px;
    top: 20%;
    left: 40%;
    animation-delay: 3s;
    animation-duration: 20s;
}

.bg-circle:nth-child(6) {
    width: 180px;
    height: 180px;
    top: 70%;
    left: 50%;
    animation-delay: 5s;
    animation-duration: 24s;
}

.bg-circle:nth-child(7) {
    width: 80px;
    height: 80px;
    top: 40%;
    left: 30%;
    animation-delay: 7s;
    animation-duration: 14s;
}

.bg-circle:nth-child(8) {
    width: 250px;
    height: 250px;
    top: 50%;
    left: 10%;
    animation-delay: 8s;
    animation-duration: 28s;
}

.bg-circle:nth-child(9) {
    width: 90px;
    height: 90px;
    top: 15%;
    left: 85%;
    animation-delay: 1s;
    animation-duration: 19s;
}

.bg-circle:nth-child(10) {
    width: 160px;
    height: 160px;
    top: 85%;
    left: 75%;
    animation-delay: 9s;
    animation-duration: 21s;
}

@keyframes float-enhanced {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(1);
        opacity: 0.8;
    }
    25% {
        transform: translateY(-80px) translateX(50px) rotate(100deg) scale(1.3);
        opacity: 1;
    }
    50% {
        transform: translateY(-40px) translateX(100px) rotate(180deg) scale(0.7);
        opacity: 0.9;
    }
    75% {
        transform: translateY(50px) translateX(-30px) rotate(270deg) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translateY(0) translateX(0) rotate(360deg) scale(1);
        opacity: 0.8;
    }
}

.container {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: clamp(10px, 3vw, 20px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    text-align: center;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: calc(100vh - 20px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

@keyframes container-appear {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-size: clamp(1.8em, 5vw, 2.5em);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    display: inline-block;
    animation: title-glow 2s ease-in-out infinite alternate;
}

.test-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-shrink: 0;
    margin-bottom: clamp(8px, 2vw, 12px);
}

.test-title h1 {
    font-size: clamp(1.4em, 3.5vw, 1.8em);
    margin-bottom: 0;
}

.brain-icon {
    width: 32px;
    height: 32px;
    stroke: var(--accent-purple);
    animation: pulse 2s infinite alternate;
}

@keyframes title-glow {
    0% {
        text-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
    }
    100% {
        text-shadow: 0 0 15px rgba(102, 126, 234, 0.6);
    }
}

h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
    border-radius: 3px;
}

h2 {
    font-size: clamp(1.3em, 4vw, 1.8em);
    margin-bottom: 15px;
    color: var(--primary-blue);
    font-weight: 600;
}

h3 {
    font-size: clamp(1.1em, 3.5vw, 1.5em);
    margin-bottom: 15px;
    color: var(--primary-blue);
    font-weight: 600;
    position: relative;
    display: inline-block;
}

h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-purple), transparent);
    border-radius: 2px;
}

p {
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 15px;
    text-align: left;
    font-size: clamp(1em, 2.5vw, 1.1em);
}

/* 首页欢迎卡片样式 */
.welcome-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: clamp(12px, 3vw, 18px);
    margin: clamp(10px, 3vw, 15px) 0;
    text-align: left;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.welcome-card p {
    font-size: clamp(0.85em, 2.2vw, 0.95em);
    line-height: 1.4;
    margin-bottom: clamp(6px, 2vw, 8px);
    color: var(--text-dark);
}

.welcome-card p:last-child {
    margin-bottom: 0;
}

/* 首页样式 - 单屏显示优化 */
.name-input-container {
    margin: 8px 0;
    text-align: left;
    position: relative;
    transition: all 0.3s ease;
}

.name-input-container label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

#user-name {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 0.95em;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#user-name:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
    background: #ffffff;
}

.error-message {
    color: var(--accent-pink);
    font-size: clamp(0.8em, 2vw, 0.9em);
    margin-top: clamp(5px, 2vw, 8px);
    display: none;
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    transform: translate3d(0, 0, 0);
    text-align: center;
    padding: clamp(8px, 2vw, 12px);
    background: rgba(236, 64, 122, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(236, 64, 122, 0.3);
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.start-button {
    margin-top: 8px;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    letter-spacing: 0.5px;
    transform: translateZ(0);
}

.start-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.7s ease;
}

.start-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

.start-button:hover::before {
    left: 100%;
}

.start-button:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 8px 20px rgba(124, 77, 255, 0.3);
}

/* 删除版权信息 */
.footer {
    display: none;
}

/* 测试页面样式 - 单屏显示优化 */
.progress-section {
    margin-bottom: 6px;
    text-align: left;
    flex-shrink: 0;
}

.progress-text {
    font-size: 0.85em;
    color: #2c3e50;
    margin-bottom: 4px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.6s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 优化问题卡片样式 */
.question-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 6px;
    text-align: left;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: none;
    overflow: hidden;
    border: 1px solid #ecf0f1;
}

@keyframes card-float {
    0% {
        transform: translateY(0);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
    100% {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    }
}

@keyframes card-shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}

.shake-animation {
    animation: card-shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

.question-card:hover {
    border-color: #667eea;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

.question-text {
    font-size: 0.95em;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.4;
    font-weight: 500;
    word-wrap: break-word;
    padding-right: 8px;
    position: relative;
    flex-shrink: 0;
}

.question-text::before {
    content: '"';
    position: absolute;
    top: -8px;
    left: -4px;
    font-size: 1.5em;
    color: rgba(102, 126, 234, 0.3);
    font-family: Georgia, serif;
}

.options-group {
    display: grid;
    gap: 6px;
    margin-top: auto;
    flex: 1;
    min-height: 0;
}

.option {
    padding: 8px 12px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
    font-size: 0.85em;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    min-height: 36px;
}

.option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.option:hover {
    border-color: #667eea;
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.option:hover::before {
    opacity: 0.05;
}

/* 增强选项点击效果 */
.option.selected {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    color: #2c3e50;
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
    font-weight: 600;
    animation: pulse-option 1s infinite alternate;
}

@keyframes pulse-option {
    0% {
        box-shadow: 0 15px 35px rgba(102, 126, 234, 0.25);
    }
    100% {
        box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
    }
}

.option.selected::after {
    content: '';
    position: absolute;
    right: 12px;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236676ea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    animation: check-mark 0.3s ease-out;
}

@keyframes check-mark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.option-text {
    position: relative;
    z-index: 1;
    margin-left: 8px;
    flex: 1;
}

.option-icon {
    width: 24px;
    height: 24px;
    stroke: var(--accent-purple);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.error-message-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(236, 64, 122, 0.95);
    color: var(--white);
    border: 1px solid rgba(236, 64, 122, 0.3);
    border-radius: 12px;
    padding: 20px 30px;
    text-align: center;
    font-size: 1.1em;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(236, 64, 122, 0.3);
    animation: fadeInDown 0.5s ease-out;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 1000;
    min-width: 300px;
    max-width: 90vw;
    margin: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.error-message-container:hover {
    transform: translate(-50%, -50%) scale(1.02);
    box-shadow: 0 15px 40px rgba(236, 64, 122, 0.4);
}

/* 背景遮罩 */
.error-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 999;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.error-icon {
    stroke: var(--white);
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.error-message-text {
    margin: 0;
    padding: 0;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    flex-shrink: 0;
}

.btn {
    padding: 8px 16px;
    font-size: 0.85em;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    flex: 1;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.7s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

.btn-default {
    background: #ffffff;
    color: #2c3e50;
    border: 2px solid #ecf0f1;
}

.btn-default:hover {
    background: #f8f9fa;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    transform: none !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1) !important;
}

.btn-submit {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: #ffffff !important;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1) !important;
}

.btn-icon {
    stroke: currentColor;
    flex-shrink: 0;
}

/* 结果页面 - 单屏显示优化 */
.result-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 12px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    box-sizing: border-box;
}

.result-container .test-title {
    flex-shrink: 0;
    text-align: center;
    margin-bottom: 4px;
}

.result-container .test-title h1 {
    font-size: 1.4em;
    margin: 0;
    color: #2c3e50;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.result-container .test-title h1::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 1px;
}

.result-main {
    text-align: center;
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    position: relative;
    border: 2px solid #ecf0f1;
}

.result-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #ec4899, #f59e0b);
    border-radius: 16px 16px 0 0;
}

.user-info h2 {
    font-size: 0.95em;
    color: #34495e;
    margin-bottom: 8px;
    font-weight: 600;
    line-height: 1.3;
}

.user-info h2 span {
    color: #667eea;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0 4px;
}

.result-type {
    font-size: 2.5em;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea, #764ba2, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 8px 0;
    letter-spacing: 2px;
    position: relative;
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.result-type::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 1px;
}

.description-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #ecf0f1;
    flex: 1;
    overflow: hidden;
    min-height: 0;
    position: relative;
}

.description-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 12px 12px 0 0;
}

.description-section h3 {
    color: #2c3e50;
    font-size: 1em;
    margin-bottom: 6px;
    font-weight: 700;
    position: relative;
    padding-bottom: 4px;
    text-align: center;
    border-bottom: 1px solid #ecf0f1;
}

.description-section h3::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 1px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 1px;
}

.description-section h4 {
    color: #667eea;
    font-size: 0.9em;
    margin: 8px 0 4px 0;
    font-weight: 600;
    text-align: center;
    position: relative;
}

.description-content p {
    color: #34495e;
    font-size: 0.85em;
    line-height: 1.4;
    margin-bottom: 6px;
    text-align: justify;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.career-list {
    margin-top: 6px;
}

.career-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 6px;
}

.career-list li {
    background: #ffffff;
    color: #34495e;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 500;
    border: 1px solid #ecf0f1;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    font-size: 0.8em;
    position: relative;
    overflow: hidden;
}

.career-list li::before {
    content: '🎯';
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.7em;
    opacity: 0.6;
}

.career-list li:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
    flex-shrink: 0;
}

.action-buttons .btn {
    min-width: 120px;
    flex: 1;
    max-width: 160px;
    padding: 10px 16px;
    font-size: 0.9em;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.action-buttons .btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.action-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

.action-buttons .btn-default {
    background: #ffffff;
    color: #34495e;
    border: 2px solid #ecf0f1;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.action-buttons .btn-default:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

/* 响应式设计 - 单屏显示优化 */
@media (max-width: 768px) {
    .result-container {
        padding: 8px;
        gap: 6px;
    }
    
    .result-container .test-title h1 {
        font-size: 1.2em;
    }
    
    .result-main {
        padding: 12px;
    }
    
    .user-info h2 {
        font-size: 0.85em;
        margin-bottom: 6px;
    }
    
    .result-type {
        font-size: 2em;
        margin: 6px 0;
        letter-spacing: 1px;
    }
    
    .description-section {
        padding: 10px;
    }
    
    .description-section h3 {
        font-size: 0.95em;
        margin-bottom: 5px;
    }
    
    .description-section h4 {
        font-size: 0.85em;
        margin: 6px 0 3px 0;
    }
    
    .description-content p {
        font-size: 0.8em;
        margin-bottom: 5px;
        padding: 6px;
    }
    
    .career-list {
        margin-top: 5px;
    }
    
    .career-list ul {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    
    .career-list li {
        padding: 6px 8px;
        font-size: 0.75em;
    }
    
    .action-buttons {
        gap: 8px;
        margin-top: 6px;
    }
    
    .action-buttons .btn {
        min-width: 100px;
        max-width: 140px;
        padding: 8px 12px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .result-container {
        padding: 6px;
        gap: 4px;
    }
    
    .result-container .test-title h1 {
        font-size: 1.1em;
    }
    
    .result-main {
        padding: 8px;
    }
    
    .user-info h2 {
        font-size: 0.8em;
        margin-bottom: 4px;
    }
    
    .result-type {
        font-size: 1.6em;
        margin: 4px 0;
        letter-spacing: 1px;
    }
    
    .description-section {
        padding: 8px;
    }
    
    .description-section h3 {
        font-size: 0.9em;
        margin-bottom: 4px;
    }
    
    .description-section h4 {
        font-size: 0.8em;
        margin: 6px 0 2px 0;
    }
    
    .description-content p {
        font-size: 0.75em;
        margin-bottom: 4px;
        padding: 5px;
    }
    
    .career-list {
        margin-top: 4px;
    }
    
    .career-list ul {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 3px;
    }
    
    .career-list li {
        padding: 4px 6px;
        font-size: 0.7em;
    }
    
    .action-buttons {
        gap: 6px;
        margin-top: 4px;
    }
    
    .action-buttons .btn {
        min-width: 80px;
        max-width: 120px;
        padding: 6px 10px;
        font-size: 0.8em;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .result-container {
        padding: 4px;
        gap: 3px;
    }
    
    .result-container .test-title h1 {
        font-size: 1em;
    }
    
    .result-main {
        padding: 6px;
    }
    
    .user-info h2 {
        font-size: 0.75em;
        margin-bottom: 3px;
    }
    
    .result-type {
        font-size: 1.4em;
        margin: 3px 0;
    }
    
    .description-section {
        padding: 6px;
    }
    
    .description-section h3 {
        font-size: 0.85em;
        margin-bottom: 3px;
    }
    
    .description-section h4 {
        font-size: 0.75em;
        margin: 4px 0 2px 0;
    }
    
    .description-content p {
        font-size: 0.7em;
        margin-bottom: 3px;
        padding: 4px;
    }
    
    .career-list {
        margin-top: 3px;
    }
    
    .career-list ul {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 2px;
    }
    
    .career-list li {
        padding: 3px 5px;
        font-size: 0.65em;
    }
    
    .action-buttons {
        gap: 4px;
        margin-top: 3px;
    }
    
    .action-buttons .btn {
        min-width: 60px;
        max-width: 100px;
        padding: 4px 8px;
        font-size: 0.75em;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 点击波纹效果 - 增强版冒泡特效 */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.6) 0%, rgba(118, 75, 162, 0.4) 50%, transparent 70%);
    transform: scale(0);
    animation: bubble-ripple 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

@keyframes bubble-ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(2);
        opacity: 0.8;
    }
    100% {
        transform: scale(6);
        opacity: 0;
    }
}

/* 增强的点击冒泡效果 */
.bubble-effect {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.6));
    animation: bubble-float 1.5s ease-out forwards;
    pointer-events: none;
    z-index: 15;
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.4);
}

@keyframes bubble-float {
    0% {
        transform: translateY(0) scale(0);
        opacity: 1;
    }
    50% {
        transform: translateY(-30px) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-60px) scale(0.5);
        opacity: 0;
    }
}

.option {
    position: relative;
    overflow: hidden;
}

/* 选项点击时的额外特效 */
.option.clicked {
    animation: option-click-effect 0.6s ease-out;
}

@keyframes option-click-effect {
    0% {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 15px 35px rgba(102, 126, 234, 0.25);
    }
    50% {
        transform: translateY(-5px) scale(1.05);
        box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
    }
    100% {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 15px 35px rgba(102, 126, 234, 0.25);
    }
}

/* 确保内容不溢出 */
/* 删除重复的result-container样式，使用上面定义的样式 */

/* 针对超小屏幕的额外优化 */
@media (max-width: 480px) {
    .container {
        padding: clamp(6px, 2vw, 12px);
        margin: clamp(3px, 1vw, 8px);
        border-radius: 10px;
    }
    
    .question-card {
        padding: clamp(10px, 3vw, 16px);
        min-height: 120px;
    }
    
    .question-text {
        font-size: clamp(0.9em, 2.3vw, 1em);
        margin-bottom: clamp(8px, 2.5vw, 12px);
    }
    
    .option {
        padding: clamp(6px, 2.5vw, 10px) clamp(10px, 3vw, 16px);
        min-height: 32px;
        font-size: clamp(0.85em, 2.2vw, 0.9em);
    }
    
    .btn {
        padding: clamp(6px, 2.5vw, 10px) clamp(10px, 3.5vw, 18px);
        min-height: 36px;
        font-size: clamp(0.8em, 2.2vw, 0.85em);
    }
    
    .progress-text {
        font-size: clamp(0.75em, 1.8vw, 0.85em);
    }
    
    .progress-bar {
        height: 8px;
    }
    
    .test-title h1 {
        font-size: clamp(1.2em, 3vw, 1.5em);
    }
    
    .result-container {
        padding: 3px;
        gap: 2px;
    }
    
    .result-main {
        padding: 4px;
        margin-bottom: 2px;
    }
    
    .description-section {
        padding: 3px;
        margin-bottom: 2px;
    }
    
    .action-buttons {
        gap: 2px;
        margin-top: 2px;
    }
    
    .action-buttons .btn {
        min-width: 50px;
        max-width: 70px;
        padding: 3px 6px;
        font-size: clamp(0.7em, 1.6vw, 0.8em);
    }
    
    .welcome-card {
        padding: clamp(6px, 2vw, 10px);
        margin: clamp(4px, 1.5vw, 6px) 0;
    }
    
    .welcome-card p {
        font-size: clamp(0.75em, 1.8vw, 0.85em);
        margin-bottom: clamp(3px, 1vw, 4px);
    }
    
    .career-list li {
        padding: 1px 4px;
        margin: 1px 0;
        font-size: clamp(0.6em, 1.4vw, 0.7em);
    }
}

/* 横屏模式优化 */
@media (orientation: landscape) and (max-height: 500px) {
    .container {
        padding: clamp(5px, 1.5vw, 10px);
        margin: clamp(3px, 1vw, 6px);
    }
    
    .test-title h1 {
        font-size: clamp(1em, 2.5vw, 1.3em);
        margin-bottom: 2px;
    }
    
    .progress-section {
        margin-bottom: 5px;
    }
    
    .progress-text {
        font-size: clamp(0.75em, 1.8vw, 0.85em);
        margin-bottom: 3px;
    }
    
    .question-card {
        padding: clamp(8px, 2.5vw, 12px);
        margin-bottom: 5px;
        min-height: 100px;
    }
    
    .question-text {
        font-size: clamp(0.85em, 2.2vw, 0.95em);
        margin-bottom: 6px;
    }
    
    .options-group {
        gap: clamp(4px, 1.5vw, 6px);
    }
    
    .option {
        padding: clamp(5px, 2vw, 8px) clamp(8px, 2.5vw, 12px);
        min-height: 28px;
        font-size: clamp(0.8em, 2vw, 0.9em);
    }
    
    .navigation-buttons {
        gap: clamp(4px, 1.5vw, 6px);
        margin-top: 5px;
    }
    
    .btn {
        padding: clamp(5px, 2vw, 8px) clamp(10px, 3vw, 16px);
        min-height: 32px;
        font-size: clamp(0.8em, 2vw, 0.9em);
    }
    

    

}

/* 装饰性元素 */
.decoration {
    position: absolute;
    z-index: -1;
    opacity: 0.5;
    pointer-events: none;
}

.decoration-1 {
    top: 10%;
    left: 5%;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #667eea, transparent);
    border-radius: 50%;
    filter: blur(20px);
    animation: float-slow 10s infinite alternate ease-in-out;
}

.decoration-2 {
    bottom: 10%;
    right: 5%;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #764ba2, transparent);
    border-radius: 50%;
    filter: blur(25px);
    animation: float-slow 15s infinite alternate-reverse ease-in-out;
}

@keyframes float-slow {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(20px, -20px);
    }
}

/* 添加MBTI类型图标样式 */
.mbti-icon {
    display: inline-block;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    margin: 0 auto 20px;
    position: relative;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite alternate;
}

.mbti-icon::before {
    content: attr(data-type);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 1.5em;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    100% {
        box-shadow: 0 0 0 15px rgba(102, 126, 234, 0);
    }
}

/* 全局优化 - 确保内容在一个屏幕内显示 */
html, body {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

body {
    padding: clamp(3px, 1vw, 8px);
}

/* 确保容器不会超出视窗 */
.container {
    max-height: calc(100vh - 16px);
    overflow: hidden;
}

/* 优化滚动条 */
::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* 确保所有内容都能在一个屏幕内显示 */
@media (max-height: 600px) {
    .container {
        padding: clamp(5px, 1.5vw, 10px);
    }
    
    .test-title h1 {
        font-size: clamp(1.2em, 3vw, 1.5em);
        margin-bottom: 2px;
    }
    
    .progress-section {
        margin-bottom: 4px;
    }
    
    .question-card {
        padding: clamp(8px, 2.5vw, 12px);
        margin-bottom: 4px;
    }
    
    .question-text {
        font-size: clamp(0.9em, 2.3vw, 1em);
        margin-bottom: 6px;
    }
    
    .options-group {
        gap: clamp(4px, 1.5vw, 6px);
    }
    
    .option {
        padding: clamp(6px, 2vw, 8px) clamp(10px, 3vw, 14px);
        min-height: 30px;
    }
    
    .navigation-buttons {
        gap: clamp(4px, 1.5vw, 6px);
        margin-top: 4px;
    }
    
    .btn {
        padding: clamp(6px, 2vw, 8px) clamp(12px, 3.5vw, 18px);
        min-height: 32px;
    }
    
    .welcome-card {
        padding: clamp(6px, 2vw, 10px);
        margin: clamp(4px, 1.5vw, 6px) 0;
    }
    

}

/* 加载动画 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: opacity 0.3s ease;
}

.loading p {
    margin-top: 20px;
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 500;
    text-align: center;
    padding: 16px 24px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #ecf0f1;
}

.spinner-svg {
    width: 60px;
    height: 60px;
    stroke: #667eea;
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}





