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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* 恋爱大考验界面样式 */
.quiz-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.quiz-content {
    max-width: 700px;
    width: 100%;
    background: white;
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease;
}

.quiz-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: #c44569;
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.quiz-rules {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 10px;
    color: #333;
}

.quiz-rules p {
    margin-bottom: 10px;
    font-size: 1rem;
    line-height: 1.8;
}

.quiz-rules p:last-child {
    margin-bottom: 0;
    font-weight: 500;
    color: #c44569;
}

.quiz-form {
    width: 100%;
}

.question-item {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #c44569;
}

.question-title {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 400;
}

.radio-label {
    display: block;
    margin-bottom: 15px;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.radio-label:hover {
    background: #fff5f8;
    border-color: #ff6b9d;
}

.radio-label input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #c44569;
}

.radio-label input[type="radio"]:checked + span {
    color: #c44569;
    font-weight: 500;
}

.radio-label:has(input[type="radio"]:checked) {
    background: #fff5f8;
    border-color: #ff6b9d;
}

.submit-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 20px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(196, 69, 105, 0.4);
}

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

.error-message {
    background: #fff5f5;
    border: 2px solid #ff6b6b;
    color: #c44569;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    margin-bottom: 20px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 标题区域 */
.header {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 0;
}

.title {
    font-size: 3.5rem;
    font-weight: 300;
    color: #2c3e50;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
    font-weight: 300;
}

/* 章节标题 */
.section-title {
    font-size: 2rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 50px;
    color: #2c3e50;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #ff6b9d, #c44569);
}

/* 时间轴区域 */
.timeline-section {
    margin-bottom: 100px;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #ff6b9d, #c44569);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    display: flex;
    align-items: center;
}

.timeline-date {
    position: absolute;
    width: 200px;
    text-align: center;
    font-size: 1rem;
    color: #c44569;
    font-weight: 500;
    padding: 10px;
    z-index: 5;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

/* 奇数行（卡片在左侧）：日期标签在右侧，靠近时间轴 */
.timeline-item:nth-child(odd) .timeline-date {
    left: calc(50% + 30px);
    transform: translateX(0);
}

/* 偶数行（卡片在右侧）：日期标签在左侧，靠近时间轴 */
.timeline-item:nth-child(even) .timeline-date {
    right: calc(50% + 30px);
    transform: translateX(0);
}

.timeline-content {
    flex: 1;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 45%;
}

/* 奇数行：卡片完全在时间轴左侧 */
.timeline-item:nth-child(odd) {
    justify-content: flex-start;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 0;
    margin-left: 0;
}

/* 偶数行：卡片完全在时间轴右侧 */
.timeline-item:nth-child(even) {
    justify-content: flex-end;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 0;
    margin-right: 0;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.timeline-content h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 400;
}

.timeline-content .location {
    color: #c44569;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.timeline-content .description {
    color: #7f8c8d;
    line-height: 1.8;
}

/* 时间轴照片样式 */
.timeline-photo {
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.timeline-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.timeline-img:not([src=""]) {
    display: block;
}

.timeline-img:not([src=""]) + .photo-placeholder-timeline {
    display: none;
}

.photo-placeholder-timeline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    font-weight: 300;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: #ff6b9d;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #ff6b9d;
    z-index: 10;
}

/* 照片墙区域 */
.photo-wall-section {
    margin-bottom: 30px;
    overflow: hidden;
}

.heart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    min-height: 1000px;
    position: relative;
    overflow: visible;
}

.heart-mask-wrapper {
    width: 900px;
    max-width: 100%;
    min-height: 1000px;
    position: relative;
    overflow: hidden;
}

.photo-wall {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.photo-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    width: fit-content;
    white-space: nowrap;
}

/* 从左到右滚动的行 */
.row-left {
    animation: scrollLeft 30s linear infinite;
}

/* 从右到左滚动的行 */
.row-right {
    animation: scrollRight 30s linear infinite;
}

.photo-item {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-item:hover {
    transform: scale(1.1);
    z-index: 10;
}

/* 滚动动画 */
@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

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



.photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    font-weight: 300;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

.photo-item:hover .photo-placeholder {
    opacity: 0.8;
}


/* 底部 */
.footer {
    text-align: center;
    padding: 20px 0 40px 0;
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .quiz-content {
        padding: 30px 20px;
    }

    .quiz-title {
        font-size: 2rem;
    }

    .question-item {
        padding: 20px;
    }

    .question-title {
        font-size: 1.1rem;
    }

    .title {
        font-size: 2.5rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        flex-direction: row !important;
        padding-left: 50px;
        justify-content: flex-start !important;
    }

    .timeline-item::before {
        left: 20px;
    }

    .timeline-date {
        position: static !important;
        transform: none !important;
        width: auto;
        text-align: left;
        margin-right: 20px;
        font-size: 0.9rem;
        background: transparent;
        right: auto !important;
        left: auto !important;
    }

    .timeline-content {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .heart-container {
        padding: 40px 10px;
        min-height: 800px;
    }

    .heart-mask-wrapper {
        min-height: 800px;
    }

    .photo-wall {
        max-width: 100%;
    }

    .photo-item {
        width: 120px;
        height: 120px;
    }

    .photo-row {
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .timeline-photo {
        height: 150px;
    }

    .photo-placeholder {
        font-size: 0.7rem;
    }
}


