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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #FCFCFC;
    color: #333333;
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: auto;
    margin: 0;
    padding: 0;
}

.container {
    position: relative;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 背景动态插画 */
.bg-illustration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
    overflow: hidden;
}

.couple-illustration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,140,148,0.3) 0%, rgba(145,167,255,0.3) 100%);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    50% { transform: translate(-50%, -52%) rotate(2deg); }
}

.hearts {
    position: absolute;
    width: 100%;
    height: 100%;
}

.heart {
    position: absolute;
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #FF8C94, #FF6B8B);
    transform: rotate(45deg);
    animation: heartFloat 8s ease-in-out infinite;
}

.heart::before, .heart::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #FF8C94, #FF6B8B);
    border-radius: 50%;
}

.heart::before {
    top: -10px;
    left: 0;
}

.heart::after {
    top: 0;
    left: -10px;
}

@keyframes heartFloat {
    0%, 100% { transform: translateY(0px) rotate(45deg); opacity: 0; }
    50% { transform: translateY(-20px) rotate(45deg); opacity: 1; }
}

/* 页面通用样式 */
.page {
    width: 100%;
    max-width: 600px;
    background: rgba(252, 252, 252, 0.95);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

/* 引导页样式 */
.guide-content {
    text-align: center;
}

.main-title {
    font-size: 32px;
    font-weight: bold;
    background: linear-gradient(135deg, #FF8C94, #91A7FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #F9E3B4;
    border-radius: 12px;
    font-size: 16px;
    background-color: #FCFCFC;
    color: #333;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #FF8C94;
    box-shadow: 0 0 0 3px rgba(255, 140, 148, 0.1);
}

/* 按钮样式 */
.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px 5px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #FF8C94, #91A7FF);
    color: white;
}

.btn-secondary {
    background-color: #F9E3B4;
    color: #333;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.05);
}

.btn:active {
    transform: translateY(0);
}

.participant-count {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

/* 答题页样式 */
.question-header {
    margin-bottom: 30px;
}

.progress-container {
    text-align: center;
}

.progress-text {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #F0F0F0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF8C94, #91A7FF);
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

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

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.question-content {
    text-align: center;
}

.question-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
    line-height: 1.4;
}

.question-group {
    margin-bottom: 30px;
    text-align: left;
}

.question-subtitle {
    font-size: 18px;
    font-weight: 600;
    color: #FF6B8B;
    margin-bottom: 15px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 2px solid #F0F0F0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #FCFCFC;
}

.option:hover {
    border-color: #F9E3B4;
    background-color: rgba(249, 227, 180, 0.1);
}

.option.selected {
    border-color: #FF8C94;
    background-color: rgba(255, 140, 148, 0.1);
}

.option.selected::before {
    content: '❤️';
    margin-right: 12px;
    font-size: 18px;
}

.option input[type="radio"] {
    display: none;
}

.option-text {
    font-size: 16px;
    color: #333;
}

.navigation-buttons {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 10px;
}

/* 结果页样式 */
.result-content {
    text-align: center;
}

.result-title {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #FF8C94, #91A7FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
}

.result-section {
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

/* 环形进度条样式 */
.ring-progress-section {
    margin: 40px 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    overflow: visible;
    padding: 0;
    box-sizing: border-box;
}

/* 主环形进度条 */
.main-ring-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    height: auto;
    padding: 10px 0;
    overflow: visible;
}

.ring-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.ring-wrapper:hover {
    transform: scale(1.1);
}

.ring-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 环形进度条SVG样式 */
.ring-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    overflow: visible;
}

.ring-bg {
    fill: none;
    stroke: #f0f0f0;
    stroke-width: 15;
    opacity: 0.5;
}

.ring-progress {
    fill: none;
    stroke: url(#ringGradient);
    stroke-width: 15;
    stroke-linecap: round;
    stroke-dasharray: 439.82;
    stroke-dashoffset: 439.82;
    filter: drop-shadow(0 0 5px rgba(255, 140, 148, 0.5));
    transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 环形中心内容 */
.ring-center {
    position: relative;
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.ring-percentage {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #FF8C94, #91A7FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* 移除pulse动画，解决百分比闪动问题 */
}

.ring-icon {
    font-size: 24px;
    animation: float 1.5s ease-in-out infinite;
}

/* 环形下方标签 */
.ring-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    position: absolute;
    bottom: -55px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* 环形信息提示 */
.ring-info {
    position: absolute;
    top: -30px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 20;
}

.ring-wrapper:hover .ring-info {
    opacity: 1;
}

/* 对比环形进度条 */
.comparison-rings {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    flex-wrap: nowrap;
    max-width: 100%;
    margin: 30px auto;
    padding: 0 5px;
    box-sizing: border-box;
    overflow: visible;
    min-height: 120px;
}

.comparison-ring {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    position: relative;
    height: auto;
    min-height: 85px;
    flex: 0 0 55px;
    flex-shrink: 0;
    width: 55px;
    overflow: visible;
    padding: 0;
    margin: 0;
}

/* 小环形容器，用于包裹SVG环形和百分比文字 */
.small-ring-container {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* PC端响应式设计 - 放在常规样式后面，确保优先级 */
@media (min-width: 768px) {
    .comparison-rings {
        gap: 15px !important;
        padding: 0 15px !important;
        min-height: 180px !important;
    }
    
    .comparison-ring {
        gap: 8px !important;
        min-height: 150px !important;
        flex: 0 0 90px !important;
        width: 90px !important;
    }
    
    .small-ring-container {
        width: 80px !important;
        height: 80px !important;
    }
    
    .small-percentage {
        font-size: 18px !important;
    }
    
    .small-label {
        font-size: 14px !important;
        margin-top: 5px !important;
    }
    
    .comparison-label {
        min-width: 90px !important;
        max-width: 120px !important;
        flex: 0 0 90px !important;
        font-size: 16px !important;
        gap: 5px !important;
    }
    
    .comparison-label span {
        font-size: 22px !important;
    }
}

.small-ring {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.small-ring.ring-circle svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
    overflow: visible;
}

.small-percentage {
    position: relative;
    z-index: 10;
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, #FF8C94, #91A7FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    line-height: 1;
    margin: 0;
    padding: 0;
}

.small-ring .ring-bg {
    stroke-width: 8;
}

.small-ring .ring-progress {
    stroke-width: 8;
    stroke-dasharray: 200.96;
    stroke-dashoffset: 200.96;
}



.small-percentage {
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, #FF8C94, #91A7FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    line-height: 1;
    margin: 0;
    padding: 0;
    text-align: center;
    vertical-align: middle;
}

/* 小环形下方标签 */
.small-label {
    font-size: 10px;
    color: #666;
    position: relative;
    display: block;
    text-align: center;
    margin-top: 0;
    opacity: 1;
    width: 100%;
}

/* 认知反差标签 */
.comparison-label {
    font-size: 12px;
    font-weight: 600;
    color: #F9E3B4;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 60px;
    max-width: 70px;
    flex: 0 0 60px;
    flex-shrink: 0;
    line-height: 1.2;
    padding: 0;
    margin: 0;
}

.comparison-label span {
    font-size: 18px;
    background: linear-gradient(135deg, #FF8C94, #91A7FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 环形填充颜色梯度 */
.ring-progress.low {
    stroke: #FFE6EA;
}

.ring-progress.medium-low {
    stroke: #FFC2D1;
}

.ring-progress.medium-high {
    stroke: #DBC6FF;
}

.ring-progress.high {
    stroke: #B19CD9;
}

/* 反差高亮 */
.contrast-highlight {
    stroke: #F9E3B4 !important;
    stroke-width: 12 !important;
    filter: drop-shadow(0 0 3px rgba(249, 227, 180, 0.8));
}

/* 爱心动效 */
.ring-hearts {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ring-heart {
    position: absolute;
    font-size: 20px;
    animation: heartPop 1s ease-out forwards;
    opacity: 0;
}

/* 动画效果 */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes heartPop {
    0% { 
        transform: scale(0) translateY(0); 
        opacity: 0;
    }
    50% { 
        transform: scale(1.2) translateY(-20px); 
        opacity: 1;
    }
    100% { 
        transform: scale(1) translateY(-40px); 
        opacity: 0;
    }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14%, 43% { transform: scale(1.1); }
    28%, 57% { transform: scale(0.9); }
}

/* 心跳震动效果 */
.heartbeat {
    animation: heartbeat 1s ease-in-out infinite;
}

/* 环形放大效果 */
.ring-wrapper:active {
    transform: scale(1.15);
}

/* 渐变定义 */
.ring-circle svg::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FF8C94, #91A7FF);
    filter: blur(20px);
    opacity: 0.3;
    z-index: -1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ring-progress-section {
        width: 100%;
        overflow-x: auto;
        padding: 0 10px;
    }
    
    .main-ring-container {
        height: auto;
        padding: 20px 0;
    }
    
    .ring-wrapper {
        width: 140px;
        height: 140px;
    }
    
    .ring-percentage {
        font-size: 32px;
    }
    
    .comparison-rings {
        gap: 20px;
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .comparison-ring {
        height: 88px;
    }
    
    .small-ring-container {
        width: 90px;
        height: 90px;
    }
    
    .small-ring {
        width: 90px;
        height: 90px;
    }
    
    .small-percentage {
        font-size: 18px;
    }
    
    .comparison-label {
        font-size: 14px;
        width: 100%;
        margin: 10px 0;
    }
    
    /* 修复小环形容器的相对定位问题 */
    .comparison-ring {
        flex: 1;
        min-width: 90px;
        max-width: 120px;
    }
}

/* 结果卡片样式 */
.result-card {
    background-color: #FCFCFC;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    animation: slideUp 0.6s ease-out forwards;
}

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

.tag-title {
    font-size: 24px;
    font-weight: 700;
    color: #FF6B8B;
    margin-bottom: 12px;
}

.tag-psychology {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    text-align: left;
}

/* 占有欲表现样式 */
.performance-content {
    text-align: left;
}

.performance-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.performance-list li {
    padding: 12px 0;
    font-size: 14px;
    color: #333;
    position: relative;
    padding-left: 30px;
    line-height: 1.6;
}

.performance-icon {
    position: absolute;
    left: 0;
    top: 12px;
    font-size: 16px;
    color: #FF8C94;
}

/* 关系满意度分析样式 */
.satisfaction-content {
    text-align: left;
}

.satisfaction-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* 认知反差详情样式 */
.diff-content {
    text-align: center;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
}

.diff-score {
    font-size: 36px;
    font-weight: 700;
    color: #91A7FF;
    margin-bottom: 12px;
    animation: pulse 0.6s ease-out;
    opacity: 1 !important;
    display: block !important;
}

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

.diff-interpretation {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    opacity: 1 !important;
    display: block !important;
}

.diff-detail {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    text-align: center;
    margin-top: 10px;
    padding: 0 20px;
    opacity: 1 !important;
    display: block !important;
}

.diff-question-analysis {
    opacity: 1 !important;
    display: block !important;
    margin-top: 20px;
}

/* 星座匹配分析样式 */
.constellation-match-content {
    text-align: center;
}

.constellation-pair {
    font-size: 24px;
    font-weight: 700;
    color: #FF8C94;
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.constellation-pair::before, .constellation-pair::after {
    content: '✨';
    font-size: 20px;
}

.constellation-analysis {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.easter-egg {
    font-size: 18px;
    font-weight: 600;
    color: #FF6B8B;
    text-align: center;
}

.tips-list {
    list-style: none;
    text-align: left;
}

.tips-list li {
    padding: 12px 0;
    font-size: 16px;
    color: #333;
    position: relative;
    padding-left: 24px;
}

.tips-list li::before {
    content: '💡';
    position: absolute;
    left: 0;
    top: 12px;
}

/* 爱心分割线 */
.heart-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
}

.heart-divider::before, .heart-divider::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, #F9E3B4, transparent);
}

.heart-divider::before {
    margin-right: 15px;
}

.heart-divider::after {
    margin-left: 15px;
}

.heart-divider span {
    font-size: 24px;
    color: #FF8C94;
}

/* 分享按钮 */
.share-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* 爱心弹窗提示 */
.heart-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 48px;
    opacity: 0;
    z-index: 1000;
    pointer-events: none;
    transition: all 0.3s ease;
}

.heart-popup.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    animation: heartPop 0.6s ease-out;
}

@keyframes heartPop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* 烟花动效容器 */
.firework-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 5px;
    }
    
    .page {
        padding: 15px;
        border-radius: 15px;
    }
    
    .main-title {
        font-size: 24px;
    }
    
    .question-title {
        font-size: 16px;
    }
    
    .result-title {
        font-size: 18px;
    }
    
    .tag-title {
        font-size: 18px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .couple-illustration {
        width: 300px;
        height: 300px;
    }
    
    /* 优化结果卡片在手机端的显示 */
    .result-card {
        padding: 16px;
        margin-bottom: 15px;
    }
    
    /* 优化结果部分的标题 */
    .section-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    /* 优化认知反差部分的内容 */
    .diff-content {
        padding: 0 5px;
    }
    
    .diff-score {
        font-size: 28px;
    }
    
    .diff-interpretation {
        font-size: 16px;
    }
    
    .diff-detail {
        font-size: 13px;
        padding: 0 10px;
    }
    
    /* 优化占有欲表现列表 */
    .performance-list li {
        padding: 8px 0;
        padding-left: 25px;
        font-size: 13px;
    }
    
    /* 优化相处技巧列表 */
    .tips-list li {
        padding: 10px 0;
        padding-left: 20px;
        font-size: 14px;
    }
    
    /* 优化星座匹配分析 */
    .constellation-pair {
        font-size: 20px;
    }
    
    .constellation-analysis {
        font-size: 13px;
    }
    
    /* 优化彩蛋显示 */
    .easter-egg {
        font-size: 16px;
    }
    
    /* 优化心形分割线 */
    .heart-divider {
        margin: 20px 0;
    }
}

/* 震动效果 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* 淡入动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}