/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 背景动画元素 */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    opacity: 0.1;
}

.shape-1 {
    width: 80px;
    height: 80px;
    background: #ff9a9e;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    background: #a8e6cf;
    top: 60%;
    right: 15%;
    animation-delay: 1s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    background: #ffd93d;
    top: 80%;
    left: 20%;
    animation-delay: 2s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    background: #74b9ff;
    top: 10%;
    right: 30%;
    animation-delay: 3s;
}

.shape-5 {
    width: 70px;
    height: 70px;
    background: #fd79a8;
    top: 40%;
    left: 5%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(120deg);
    }
    66% {
        transform: translateY(-10px) rotate(240deg);
    }
}

/* 容器和布局 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page {
    display: none;
    width: 100%;
    animation: fadeInSlide 0.6s ease-out;
}

.page.active {
    display: block;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 卡片样式 */
.welcome-card, .quiz-card, .result-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 40px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.welcome-card::before, .quiz-card::before, .result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #ff9a9e, #fad0c4, #a8e6cf, #74b9ff, #fd79a8);
    background-size: 300% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* 标题和文本 */
.title {
    font-size: 2.5em;
    font-weight: 800;
    color: #2d3436;
    margin-bottom: 15px;
    animation: titleBounce 2s ease-in-out infinite;
}

@keyframes titleBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.subtitle {
    font-size: 1.2em;
    color: #636e72;
    margin-bottom: 30px;
    line-height: 1.6;
}

.mascot {
    font-size: 5em;
    margin: 20px 0;
    animation: mascotDance 2s ease-in-out infinite;
}

@keyframes mascotDance {
    0%, 100% {
        transform: rotate(-5deg) scale(1);
    }
    50% {
        transform: rotate(5deg) scale(1.1);
    }
}

/* 进度条 */
.progress-bar {
    background: #e0e0e0;
    border-radius: 20px;
    height: 10px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #ff9a9e, #fad0c4);
    height: 100%;
    border-radius: 20px;
    transition: width 0.6s ease;
    position: relative;
}

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

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

.progress-text {
    position: absolute;
    top: -25px;
    right: 0;
    font-size: 0.9em;
    color: #636e72;
    font-weight: 600;
}

/* 问题样式 */
.questions-container {
    margin-bottom: 30px;
}

.question-item {
    margin-bottom: 25px;
    text-align: left;
}

.question-title {
    font-size: 1.3em;
    color: #2d3436;
    margin-bottom: 15px;
    font-weight: 700;
    padding: 15px;
    background: linear-gradient(135deg, #ffeef8, #f0f8ff);
    border-radius: 15px;
    border-left: 5px solid #fd79a8;
    animation: questionAppear 0.6s ease-out;
}

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

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-left: 20px;
}

/* 按钮样式 */
.btn, .option-btn {
    position: relative;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    font-family: 'Nunito', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #a8e6cf, #88d8c0);
    color: #2d3436;
    box-shadow: 0 8px 20px rgba(168, 230, 207, 0.4);
}

.option-btn {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #495057;
    text-align: left;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.option-btn:hover {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.option-btn.selected {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
    transform: scale(1.02);
}

.btn:hover:not(.disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

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

.btn-shine {
    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.6s;
}

.btn:hover .btn-shine {
    left: 100%;
}

.pulse {
    animation: pulse 2s infinite;
}

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

/* 结果页面样式 */
.result-header {
    margin-bottom: 30px;
}

.personality-type {
    font-size: 3em;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 15px 0;
    animation: typeGlow 2s ease-in-out infinite;
}

@keyframes typeGlow {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.personality-name {
    font-size: 1.5em;
    color: #636e72;
    font-weight: 600;
}

.personality-emoji {
    font-size: 6em;
    margin: 20px 0;
    animation: emojiRotate 3s ease-in-out infinite;
}

@keyframes emojiRotate {
    0%, 100% {
        transform: rotate(-10deg);
    }
    50% {
        transform: rotate(10deg);
    }
}

.personality-description {
    font-size: 1.2em;
    color: #2d3436;
    margin: 20px 0;
    line-height: 1.6;
    padding: 20px;
    background: linear-gradient(135deg, #ffeef8, #f0f8ff);
    border-radius: 15px;
}

.personality-traits {
    text-align: left;
    margin: 25px 0;
}

.personality-traits h4 {
    color: #2d3436;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.personality-traits ul {
    list-style: none;
    padding-left: 0;
}

.personality-traits li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: #636e72;
    line-height: 1.5;
}

.personality-traits li::before {
    content: '✨';
    position: absolute;
    left: 0;
    top: 10px;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .welcome-card, .quiz-card, .result-card {
        padding: 25px 20px;
    }
    
    .title {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .mascot, .personality-emoji {
        font-size: 4em;
    }
    
    .btn, .option-btn {
        padding: 12px 25px;
        font-size: 1em;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .result-actions .btn {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .options {
        margin-left: 0;
    }
    
    .question-title {
        font-size: 1.1em;
        padding: 12px;
    }
    
    .personality-type {
        font-size: 2.5em;
    }
}

/* 特殊动画效果 */
.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 鼠标悬停特效 */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
} 