@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* 全局与基础样式 */
:root {
    --primary-color: #FF3B30;
    /* 主题红 */
    --secondary-color: #FFD1DC;
    /* 淡粉 */
    --accent-color: #6A5ACD;
    /* 紫色点缀 */
    --text-dark: #2c3e50;
    /* 深灰文字 */
    --text-light: #555;
    /* 浅灰文字 */
    --bg-light: #FDFCFA;
    /* 极浅背景 */
    --bg-card: #FFFFFF;
    /* 卡片背景 */
    --border-light: #E6E6FA;
    /* 浅边框/分割线 */
    --gradient-start: #FFD1DC;
    /* 粉色渐变起始 */
    --gradient-end: #E6E6FA;
    /* 淡紫渐变结束 */
    --shadow-soft: 0 5px 15px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.08);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --transition-fast: all 0.15s ease-out;
    /* Faster for snappy feel */
    --transition-normal: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    /* Bouncy but fast */
    --transition-slow: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* 移除手机端默认点击高亮，由自定义动画接管 */
html, body, button, a, input, textarea, select {
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    overflow-x: hidden;
    /* 禁止水平滚动 */
    width: 100%;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 16px;
    position: relative;
    /* 添加相对定位，以便子元素的绝对定位可以参考 */
    -webkit-font-smoothing: antialiased;
}

/* 多语言切换 */
.zh,
.en,
.ja,
.ru,
.fr,
.es {
    display: none !important;
    font-weight: inherit;
    color: inherit;
    font-size: inherit;
}

body.chinese .zh {
    display: inline !important;
}

body.english .en {
    display: inline !important;
}

body.japanese .ja {
    display: inline !important;
}

body.russian .ru {
    display: inline !important;
}

body.french .fr {
    display: inline !important;
}

body.spanish .es {
    display: inline !important;
}

/* 页眉 */
header {
    background: var(--bg-card);
    padding: 10px 0 0;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    border-bottom: 1px solid var(--border-light);
}

.header-decor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.6;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='%23e9d9f0' fill-opacity='0.1'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3z'/%3E%3C/g%3E%3C/svg%3E");
}

/* 语言切换按钮 */
.lang-switch {
    display: flex;
    padding: 8px;
    background: rgba(255, 182, 193, 0.08);
    border-radius: 24px;
    position: relative;
    border: none;
    backdrop-filter: blur(4px);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
    justify-content: center;
}

.selection-indicator {
    position: absolute;
    height: calc(100% - 12px);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 4px 20px rgba(255, 182, 193, 0.25), 0 0 15px rgba(69, 224, 224, 0.15);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    left: 0;
    top: 6px;
    border: none;
    backdrop-filter: blur(8px);
    transform: translateX(6px);
    will-change: transform;
}

.lang-btn {
    border: none;
    background: transparent;
    padding: 10px 18px;
    border-radius: 20px;
    cursor: pointer;
    color: var(--text-light);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: unset;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    outline: none;
    user-select: none;
}

.lang-btn:focus {
    outline: none;
    box-shadow: none;
}

.lang-btn:hover:not(.active) {
    color: var(--secondary-color);
    transform: translateY(0);
    box-shadow: none;
}

.lang-btn.active {
    color: var(--primary-color);
    font-weight: 600;
    background: transparent;
    box-shadow: none;
    transform: none;
}

/* Logo 和标题 */
header .header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
    padding: 0 20px;
}

header .logo-container {
    width: 50px;
    display: flex;
    align-items: center;
}

header .logo-container img {
    width: 100%;
    height: auto;
    cursor: pointer;
    transition: var(--transition-normal);
}

header .logo-container img:hover {
    transform: scale(1.1) rotate(5deg);
}

header .header-content h1 {
    font-size: 1.6rem;
    color: var(--text-dark);
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
}

/* 表单容器 */
.container {
    max-width: 680px;
    width: 100%;
    margin: 40px auto;
    padding: 0 15px;
}

.form-card {
    width: 100%;
    padding: 35px 30px;
    border-radius: var(--border-radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-medium);
    border-top: 4px solid var(--secondary-color);
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    overflow: visible;
    /* Allow sticky elements to break out if needed */
    padding-bottom: 80px;
    /* Space for sticky footer */
}

/* 在表单卡片添加背景装饰元素 */
.form-card::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    border-radius: 50%;
    opacity: 0.07;
    pointer-events: none;
    z-index: 0;
}

.form-card::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 160px;
    height: 160px;
    background: linear-gradient(225deg, var(--gradient-end) 0%, var(--gradient-start) 100%);
    border-radius: 50%;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

/* 表单元素 */
form {
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: relative;
    z-index: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-group-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    width: 100%;
}

label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

input,
select {
    padding: 13px 15px;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius-md);
    background: #fcfcfc;
    font-size: 16px;
    transition: var(--transition-normal);
    color: var(--text-dark);
    font-family: inherit;
}

input:focus,
select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(106, 90, 205, 0.15);
    outline: none;
    background: #fff;
}

/* MBTI标题和链接的容器 */
.mbti-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

/* MBTI测试链接样式 */
.mbti-test-link {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius-md);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-normal);
}

.mbti-test-link:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* 按钮 */
.btn {
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff6b64 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-normal);
    text-align: center;
    font-size: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 59, 48, 0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 59, 48, 0.4);
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
    transition: all 0.6s ease;
}

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

/* Mobile step navigation - inline layout, no overlay */
@media (max-width: 768px) {
    .step-nav {
        position: static; /* 关键：不再固定在视口底部，避免遮挡表单 */
        width: 100%;
        background: transparent;
        padding: 12px 0;
        box-shadow: none;
        z-index: 1;
        display: flex;
        justify-content: space-between;
        gap: 10px;
        border-top: none;
        animation: none;
    }

    .step-nav button {
        flex: 1;
        margin: 0;
        padding: 12px;
        font-size: 16px;
    }

    /* 让表单卡片自身在底部多留一点空间，按钮不会贴着屏幕边缘 */
    .form-card {
        padding-bottom: 24px;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Loading Spinner */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 59, 48, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Visual Speed Optimizations */
.form-input:focus {
    transform: scale(1.01);
    /* Subtle pop on focus */
}

.btn:active {
    transform: scale(0.96);
    /* Snappy click feedback */
    transition: transform 0.05s;
}

/* 头像和星座 */
.avatar-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Style to visually hide the file input but keep it accessible */
.visually-hidden-file-input {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    white-space: nowrap;
    /* Prevent line breaks */
}

/* Style for the new avatar required label */
.avatar-label-required {
    display: block;
    /* Ensure it takes its own line */
    font-weight: 600;
    margin-bottom: 10px;
    /* Space before the preview */
    color: var(--text-dark);
    font-size: 1rem;
    text-align: center;
    /* Center the label text */
}

/* Style the asterisk within the avatar label */
.avatar-label-required .required-star {
    color: var(--primary-color);
    font-weight: bold;
    /* Make it slightly bolder */
}

/* 头像预览区域 - IG/Tinder 风格圆形头像卡片 */
#avatar-preview {
    position: relative;
    margin: 10px auto 0;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 2px dashed var(--border-light);
    background: radial-gradient(circle at 30% 30%, #ffe5ec 0, #f9f5ff 40%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* 默认占位图标（Font Awesome 用户图标） */
#avatar-preview::before {
    content: "\f007";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 40px;
    color: #c4c4d4;
    opacity: 0.9;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* 鼠标悬停时高亮边框，贴近 App 头像上传体验 */
#avatar-preview:hover {
    border-color: var(--accent-color);
    box-shadow: 0 8px 24px rgba(106, 90, 205, 0.25);
    transform: translateY(-2px);
}

/* 头像图片样式 */
#avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* 当有真实头像图片时，隐藏占位图标 */
#avatar-preview:has(img)::before {
    opacity: 0;
    display: none;
}

/* 星座显示样式 */
#zodiac-display {
    margin: 15px auto 0;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 120px;
    font-size: 0;
    /* 移除文字 */
    position: relative;
}

#zodiac-display img {
    max-height: 110px;
    width: auto;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-soft);
    transition: var(--transition-normal);
    border: 2px solid #fff;
    padding: 5px;
    background: rgba(255, 255, 255, 0.8);
}

#zodiac-display img:hover {
    transform: scale(1.08) rotate(3deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* 实时照片预览区域 - 增强版 */
.live-photos-preview-area {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 15px !important;
    min-height: 120px !important;
    border: 2px dashed var(--border-light) !important;
    border-radius: 12px !important;
    background-color: rgba(250, 250, 252, 0.9) !important;
    position: relative !important;
    z-index: 5 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
    justify-content: center !important;
    align-items: center !important;
}

/* 预览项样式加强版 */
.live-preview-item,
.mobile-preview-item {
    position: relative !important;
    z-index: 6 !important;
    display: block !important;
    width: 90px !important;
    height: 90px !important;
    overflow: visible !important;
    background-color: #f9f9f9 !important;
    border-radius: 8px !important;
    margin: 5px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
    flex: 0 0 auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* 图片样式加强版 */
.live-preview-item img,
.mobile-preview-item img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 7 !important;
    border: none !important;
    background-color: transparent !important;
    transform: none !important;
    transition: none !important;
}

.empty-state-live-photos {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    padding: 20px !important;
    color: #7a7a8c !important;
    text-align: center !important;
}

/* 照片数量控制对齐 */
.live-photos-preview-area.photo-count-0,
.live-photos-preview-area.photo-count-1,
.live-photos-preview-area.photo-count-2 {
    justify-content: center;
}

.live-photos-preview-area.photo-count-3 {
    justify-content: flex-start;
}

/* 照片项样式 */
.live-preview-item {
    position: relative;
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: calc((100% - 30px) / 3);
    aspect-ratio: 1 / 1;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-normal);
    transform: perspective(800px) rotateY(0deg);
}

.live-preview-item:hover {
    transform: perspective(800px) rotateY(5deg) scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.live-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition-normal);
}

.live-preview-item:hover img {
    transform: scale(1.05);
}

.remove-live {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    opacity: 0;
    transition: var(--transition-normal);
    z-index: 10;
}

.live-preview-item:hover .remove-live {
    opacity: 1;
}

.remove-live:hover {
    background: rgba(255, 59, 48, 0.8);
    transform: scale(1.1);
}

/* 空状态 */
.empty-state-live-photos {
    text-align: center;
    color: #7a7a8c;
    padding: 25px;
    width: 100%;
    font-size: 0.9rem;
    position: relative;
}

.empty-state-live-photos::before {
    content: '＋';
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
    color: #a990d5;
    opacity: 0.7;
    transition: var(--transition-normal);
}

.live-photos-preview-area:hover .empty-state-live-photos::before {
    transform: scale(1.2);
    opacity: 0.9;
}

/* 表单验证 */
.invalid {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.25) !important;
}

/* 邮箱错误提示样式 */
.email-error-message {
    color: #ff4757;
    font-size: 0.85rem;
    margin-top: 5px;
    animation: fadeIn 0.3s ease-in-out;
    background-color: rgba(255, 71, 87, 0.08);
    padding: 6px 10px;
    border-radius: 5px;
    border-left: 3px solid #ff4757;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.email-error-message::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 40%, transparent 50%);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

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

    100% {
        transform: translateX(100%);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

button[type="submit"]:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

/* 必填字段标记 */
.form-group label::after {
    content: '*';
    color: var(--primary-color);
    margin-left: 4px;
}

/* 非必填字段不显示星号 */
.form-group.optional label::after {
    content: '';
}

/* 选填字段文字提示样式 */
.optional-indicator {
    font-size: 0.8em;
    color: #888;
    margin-left: 5px;
    font-weight: normal;
}

/* Height input container styles */
.height-input-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.height-input-container input {
    flex: 1;
}

#feet-inches-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

#feet,
#inches {
    width: 60px;
    text-align: center;
}

.unit-label {
    font-size: 14px;
    color: #666;
    margin-right: 10px;
}

/* 可选字段头部样式 */
.optional-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.optional-header label {
    margin-bottom: 0;
    flex: 1;
}

.optional-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(255, 209, 220, 0.3), rgba(255, 182, 193, 0.2));
    border: 1px solid rgba(255, 209, 220, 0.5);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

/* MBTI可选徽章：用轻微动画代替长文案提醒“选填” */
.form-step[data-step-index="1"].active .mbti-group .optional-badge {
    animation: mbtiOptionalPulse 1.4s ease-out 0.8s 2;
}

@keyframes mbtiOptionalPulse {
    0% {
        transform: scale(1);
        box-shadow: none;
    }
    40% {
        transform: scale(1.06);
        box-shadow: 0 0 0 4px rgba(255, 209, 220, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: none;
    }
}

.optional-hint {
    font-size: 0.9rem;
    color: #666;
    margin: 8px 0 12px 0;
    line-height: 1.5;
    font-style: italic;
}

/* 创伤快速选择按钮 - 简化版 */
.trauma-quick-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 10px;
    margin-bottom: 12px;
}

/* 跳过提示样式 */
.trauma-skip-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: var(--border-radius-md);
    margin: 12px 0;
    animation: fadeIn 0.3s ease-in;
}

.trauma-skip-hint .hint-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

.trauma-skip-hint .hint-text {
    color: #2e7d32;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 可折叠内容区域 */
.trauma-content-wrapper {
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease,
                padding 0.3s ease,
                margin 0.3s ease;
    max-height: 2000px; /* 足够大的初始高度 */
    opacity: 1;
}

.trauma-content-wrapper.collapsed {
    max-height: 0 !important;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
}

/* 折叠后的提示样式 */
.trauma-collapsed-hint {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.08), rgba(76, 175, 80, 0.04));
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: var(--border-radius-md);
    margin-top: 12px;
    animation: fadeInSlide 0.4s ease-out;
}

.trauma-collapsed-hint .hint-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
}

.trauma-collapsed-hint .hint-text {
    flex: 1;
    color: #2e7d32;
    font-size: 0.95rem;
    font-weight: 500;
}

.expand-trauma-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: var(--border-radius-sm);
    color: #2e7d32;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.expand-trauma-btn:hover {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.6);
    transform: translateY(-1px);
}

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

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

/* 跳过按钮样式 */
.skip-trauma-btn {
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    border: 2px dashed var(--border-light);
    border-radius: var(--border-radius-md);
    color: #888;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.skip-trauma-btn:hover {
    border-color: #999;
    color: #666;
    background: rgba(0, 0, 0, 0.02);
    transform: translateY(-1px);
}

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

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

.trauma-quick-btn {
    padding: 14px 12px;
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius-md);
    background: #fff;
    color: var(--text-dark);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-normal);
    text-align: center;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trauma-quick-btn:hover {
    border-color: var(--accent-color);
    background: rgba(106, 90, 205, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 90, 205, 0.15);
}

.trauma-quick-btn.active {
    border-color: var(--primary-color);
    background: var(--secondary-color);
    color: var(--text-dark);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.2);
}

.trauma-quick-btn[data-trauma="advanced"] {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--text-dark);
    border-color: var(--secondary-color);
}

/* 兼容旧版创伤切换按钮样式 */
.form-group button#trauma-toggle {
    padding: 12px 18px;
    margin: 5px 0;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    background: linear-gradient(135deg, #e6e6fa, #f8f9fa);
    color: var(--text-dark);
    transition: var(--transition-normal);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    width: 100%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.form-group button#trauma-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
    background: linear-gradient(135deg, #e0e0f5, #f3f4f6);
}

/* 有创伤状态 */
.form-group button#trauma-toggle.has-trauma {
    background: linear-gradient(135deg, #ffd1dc, #d5c8f9);
    color: var(--text-dark);
    box-shadow: 0 6px 15px rgba(147, 112, 219, 0.25);
    animation: pulse 2s infinite;
}

.form-group button#trauma-toggle.has-trauma:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(147, 112, 219, 0.35);
    background: linear-gradient(135deg, #ffccd9, #cebef7);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(147, 112, 219, 0.6);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(147, 112, 219, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(147, 112, 219, 0);
    }
}

/* 密码输入框和显示/隐藏眼睛图标样式 */
.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-container input[type="password"],
.password-container input[type="text"] {
    width: 100%;
    padding-right: 40px;
    /* 为眼睛图标留出空间 */
}

.password-toggle-label {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.toggle-password {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Font Awesome 眼睛图标样式 */
.password-toggle-label i {
    font-size: 16px;
    color: #888;
    transition: var(--transition-fast);
}

.password-toggle-label:hover i {
    color: var(--accent-color);
    transform: scale(1.1);
}


/* 邮箱验证码容器样式 */
.email-verification-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.email-verification-container input[type="email"] {
    flex: 1;
}

.send-code-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
    min-width: 100px;
}

.send-code-btn:hover:not(:disabled) {
    background: #5A4FCB;
    transform: translateY(-1px);
}

.send-code-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.email-status-message {
    font-size: 0.85rem;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    min-height: 20px;
}

.email-status-message.success {
    background: rgba(46, 204, 113, 0.1);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.email-status-message.error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.email-status-message.info {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

/* 验证码输入区域 */
.verification-code-group {
    margin-top: 15px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.verification-code-group.show {
    opacity: 1;
    transform: translateY(0);
}

.verification-input-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.verification-input-container input[type="text"] {
    flex: 1;
    text-align: center;
    letter-spacing: 3px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
}

.verify-code-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
    min-width: 80px;
}

.verify-code-btn:hover:not(:disabled) {
    background: #229954;
    transform: translateY(-1px);
}

.verify-code-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.verification-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    min-height: 24px;
}

.countdown-timer {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.countdown-timer.active {
    color: var(--accent-color);
}

.resend-code-btn {
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.resend-code-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-1px);
}

/* 验证成功状态 */
.email-verified {
    position: relative;
}

.email-verified::after {
    content: "✓";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #27ae60;
    font-size: 18px;
    font-weight: bold;
}

/* 移动端创伤选择优化 */
@media (max-width: 768px) {
    .trauma-quick-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .trauma-quick-btn {
        padding: 16px 12px;
        font-size: 16px;
        min-height: 55px;
    }

    .trauma-quick-btn[data-trauma="advanced"] {
        grid-column: span 1;
    }

    .optional-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .optional-badge {
        font-size: 0.8rem;
        padding: 3px 10px;
    }

    .optional-hint {
        font-size: 0.85rem;
        margin: 6px 0 10px 0;
    }

    .trauma-skip-hint {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .trauma-skip-hint .hint-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .skip-trauma-btn {
        padding: 14px 16px;
        font-size: 0.9rem;
        min-height: 48px;
    }

    .trauma-collapsed-hint {
        padding: 12px 16px;
        gap: 10px;
    }

    .trauma-collapsed-hint .hint-icon {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .trauma-collapsed-hint .hint-text {
        font-size: 0.85rem;
    }

    .expand-trauma-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* 移动端视窗高度变量 */
:root {
    --vh: 1vh;
}

/* 移动端创伤模态框适配 */
@media (max-width: 768px) {
    .trauma-modal-content {
        width: 95% !important;
        max-width: 100% !important;
        aspect-ratio: 9/16 !important;
        max-height: 85vh !important;
        padding: 0 !important;
    }

    .trauma-cards-container {
        border-radius: 12px !important;
    }

    .card-content {
        padding: 15px 12px !important;
    }

    .card-content h3 {
        font-size: 24px !important;
        margin-bottom: 15px !important;
    }

    .card-content .card-description {
        font-size: 15px !important;
        margin-bottom: 15px !important;
        line-height: 1.5 !important;
    }

    .card-options {
        gap: 10px !important;
        margin: 15px 0 !important;
    }

    .card-options label {
        padding: 12px 14px !important;
        font-size: 15px !important;
    }

    .card-options input[type="radio"] {
        position: absolute !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        appearance: none !important;
        -webkit-appearance: none !important;
    }

    .card-options label {
        padding-left: 38px !important; /* 移动端稍微减少左侧空间 */
    }

    .card-options label::before {
        width: 18px !important;
        height: 18px !important;
        left: 14px !important;
    }

    .card-nav-buttons {
        padding: 8px 0 !important;
        gap: 8px !important;
    }

    .card-nav-buttons button {
        padding: 10px 16px !important;
        font-size: 15px !important;
        min-height: 44px !important;
    }

    .trauma-modal-content .close-modal {
        top: 8px !important;
        right: 12px !important;
        font-size: 28px !important;
        padding: 4px !important;
    }

    /* 介绍卡片移动端优化 */
    .intro-card .card-content {
        padding: 20px 15px 60px 15px !important;
    }

    .intro-card .card-content h3 {
        font-size: 24px !important;
        margin-bottom: 20px !important;
    }

    .intro-card .card-content .quote-container {
        max-width: 95% !important;
        margin: 15px auto !important;
        padding: 0 15px !important;
    }

    .intro-card .card-content .explanation {
        font-size: 16px !important;
        margin: 15px auto !important;
        padding: 8px !important;
    }
}

/* 小屏幕手机适配 */
@media (max-width: 480px) {
    .trauma-modal-content {
        width: 98% !important;
        max-height: 90vh !important;
    }

    .card-content {
        padding: 12px 10px !important;
    }

    .card-content h3 {
        font-size: 20px !important;
        margin-bottom: 12px !important;
    }

    .card-content .card-description {
        font-size: 14px !important;
        margin-bottom: 12px !important;
    }

    .card-options label {
        padding: 10px 12px !important;
        font-size: 14px !important;
    }

    .card-nav-buttons button {
        padding: 8px 12px !important;
        font-size: 14px !important;
        min-height: 40px !important;
    }
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .email-verification-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .send-code-btn {
        min-width: auto;
        width: 100%;
        padding: 12px 16px;
    }

    .verification-input-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .verify-code-btn {
        min-width: auto;
        width: 100%;
        padding: 12px 16px;
    }

    .verification-status {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        text-align: center;
    }

    .resend-code-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* 服务协议复选框样式 */
.terms-agreement {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 5px 0;
}

.terms-agreement input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    cursor: pointer;
}

.terms-agreement label {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0;
    flex: 1;
}

.terms-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.terms-link:hover {
    text-decoration: underline;
    color: var(--primary-color);
}

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

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

@keyframes shakeLogo {
    0% {
        transform: scale(1);
    }

    20% {
        transform: scale(1.1);
    }

    40% {
        transform: scale(1.15);
    }

    60% {
        transform: scale(1.15);
    }

    80% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes floatHearts {
    0% {
        transform: translateY(0);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-10px);
        opacity: 0.8;
    }

    100% {
        transform: translateY(0);
        opacity: 0.6;
    }
}

/* 保留创伤模态框样式 - 调整以匹配稳定版行为 */
.modal {
    display: none;
    /* 移除!important让JS能够覆盖这个样式 */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    /* Allows scrolling if content is too big, though cards are usually fixed size */
    background-color: rgba(0, 0, 0, 0.4);
    /* From current */
    backdrop-filter: blur(5px);
    /* From current */
    /* Flex centering for the .trauma-modal-content container */
    align-items: center;
    justify-content: center;
    padding: 20px;
    /* Padding around the content area */
}

/* 当模态框显示时，确保是flex布局 */
.modal[style*="display: flex"],
.modal[style*="display:flex"] {
    display: flex !important;
}

/* This is the main container for the card area, needs to match stable .modal-content */
.trauma-modal-content {
    position: relative;
    /* Crucial for absolute positioning of cards inside */
    width: 90%;
    max-width: 540px;
    /* Stable version max-width */
    aspect-ratio: 9/16;
    /* Stable version aspect-ratio */
    max-height: 90vh;
    /* Stable version max-height */
    background-color: transparent;
    /* ESSENTIAL: Must be transparent */
    border-radius: 15px;
    /* Stable version */
    margin: auto;
    /* Centering fallback if .modal flex is not enough */
    /* Remove previous card-like styles */
    padding: 0;
    border: none;
    box-shadow: none;
    animation: none;
    /* Animation will be on cards themselves if needed */
    z-index: 1001;
    /* Keep it above backdrop */
    display: block;
    /* No longer flex, it's a simple container */
}

/* Container for all swipeable cards */
.trauma-cards-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    /* Inherit or set explicitly */
    overflow: hidden;
    /* Clip the cards */
}

/* 确保卡片容器在显示时可见 */
.trauma-cards-container[style*="visibility: visible"],
.trauma-cards-container[style*="visibility:visible"] {
    visibility: visible !important;
}

/* Close button - assuming styles from previous edits are mostly fine, adjust if needed */
.trauma-modal-content .close-modal {
    /* Changed from .close-modal-btn */
    position: absolute;
    top: 10px;
    right: 15px;
    /* Stable version has 15px */
    color: white;
    /* Stable version for visibility on dark images */
    font-size: 32px;
    /* Stable version font-size */
    font-weight: bold;
    /* Stable version */
    cursor: pointer;
    z-index: 1010;
    /* Above cards */
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.9), 0 0 15px rgba(0, 0, 0, 0.8);
    /* Stable version shadow */
    transition: var(--transition-fast);
    line-height: 1;
    padding: 5px;
}

.trauma-modal-content .close-modal:hover {
    color: #f8f8f8;
    /* Stable hover */
    transform: scale(1.1) rotate(90deg);
    /* Keep playful rotation */
}

/* REMOVE generic h2, p, img.modal-image, .modal-actions from .trauma-modal-content as they are superseded by card-specific content */
/* For example, remove:
.trauma-modal-content h2 { ... }
.trauma-modal-content p { ... }
.trauma-modal-content img.modal-image { ... }
.trauma-modal-content .modal-actions { ... }
*/

/* Intro Card Styles (from stable version) */
.intro-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://cdn.getdatelove.com/images/trauma/intro.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 15px;
    /* Match container */
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
    display: none;
    /* JS controls this */
    opacity: 0;
    /* JS controls this */
    z-index: 1;
}

/* 确保卡片在显示时可见 */
.intro-card[style*="display: block"],
.intro-card[style*="display:block"] {
    display: block !important;
}

.intro-card[style*="opacity: 1"],
.intro-card[style*="opacity:1"] {
    opacity: 1 !important;
}

/* General Trauma Card Styles (from stable version) */
.trauma-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    /* Match container */
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
    display: none;
    /* JS controls this */
    opacity: 0;
    /* JS controls this */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* 确保创伤卡片在显示时可见 */
.trauma-card[style*="display: block"],
.trauma-card[style*="display:block"] {
    display: block !important;
}

.trauma-card[style*="opacity: 1"],
.trauma-card[style*="opacity:1"] {
    opacity: 1 !important;
}

/* Specific background images for each trauma type (from stable version) */
.trauma-card[data-trauma-type="loss"] {
    background-image: url('https://cdn.getdatelove.com/images/trauma/loss.webp');
}

.trauma-card[data-trauma-type="abuse"] {
    background-image: url('https://cdn.getdatelove.com/images/trauma/abuse.webp');
}

.trauma-card[data-trauma-type="stress"] {
    background-image: url('https://cdn.getdatelove.com/images/trauma/stress.webp');
}

.trauma-card[data-trauma-type="rejection"] {
    background-image: url('https://cdn.getdatelove.com/images/trauma/rejection.webp');
}

.trauma-card[data-trauma-type="health"] {
    background-image: url('https://cdn.getdatelove.com/images/trauma/health.webp');
}

/* General Card Content Styles (from stable version) */
.card-content {
    /* This class is INSIDE .intro-card and .trauma-card */
    position: relative;
    padding: 20px;
    height: 100%;
    overflow-y: auto;
    /* Allow scrolling for content taller than card */
    background-color: transparent;
    /* ESSENTIAL for text on image */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Pushes nav buttons to bottom */
    box-sizing: border-box;
    /* Important for padding and height */
}

/* Card Title - General (from stable, to be overridden by specific cards) */
.card-content h3 {
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    background-color: transparent;
    padding: 10px;
    border-radius: 5px;
    font-weight: 700;
    color: white;
    /* Default sensible color for text on image */
}

/* Card Description - General (from stable, to be overridden) */
.card-content .card-description {
    margin-bottom: 20px;
    line-height: 1.6;
    background-color: transparent;
    padding: 10px;
    border-radius: 5px;
    font-size: 18px;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    color: white;
    /* Default sensible color */
}

/* Styles for Intro Card Content (from stable version) */
.intro-card .card-content {
    padding: 25px 20px 80px 20px !important;
    /* Specific padding */
    justify-content: flex-start !important;
    /* Top align, use margins for spacing */
    overflow-y: hidden !important;
    overflow-x: hidden !important;
}

.intro-card .card-content h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 28px !important;
    font-weight: 700 !important;
    color: rgb(65, 55, 75) !important;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3) !important;
    text-align: center !important;
    margin-top: 10px !important;
    margin-bottom: 30px !important;
    letter-spacing: 1px !important;
    line-height: 1.3 !important;
    padding: 0 !important;
    order: 1;
}

.intro-card .card-content .quote-container {
    position: relative;
    max-width: 90%;
    margin: 20px auto;
    padding: 0 20px;
    border-left: 3px solid rgba(180, 180, 180, 0.7);
    order: 2;
    /* Added for explicit ordering */
}

.intro-card .card-content .quote-container blockquote {
    font-style: italic;
    color: rgba(50, 50, 50, 0.95) !important;
    font-weight: 500;
    line-height: 1.5;
    font-size: 15px;
    margin: 0;
    padding: 5px 0px;
    text-shadow: none !important;
}

.intro-card .card-content .quote-container blockquote cite {
    display: block;
    font-style: normal;
    margin-top: 8px;
    text-align: right;
    font-weight: 600;
    font-size: 13px;
    color: rgba(70, 70, 70, 0.9) !important;
}

.intro-card .card-content .explanation {
    font-family: 'Poppins', sans-serif;
    font-style: italic;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: rgb(210, 230, 235) !important;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8) !important;
    text-align: center !important;
    line-height: 1.5 !important;
    margin: 20px auto 20px auto !important;
    /* Adjusted margin */
    padding: 10px !important;
    max-width: 90%;
    order: 3;
    white-space: pre-line;
}

/* Card Navigation Buttons container styling (if needed, though buttons are hidden) */
.card-nav-buttons {
    display: flex;
    justify-content: space-between;
    /* Or center, depending on single/multiple buttons */
    padding: 10px 0 0 0;
    /* Padding above buttons */
    margin-top: auto;
    /* Pushes to bottom if .card-content is flex column with justify-content: space-between */
    width: 100%;
    order: 4;
    /* For intro card ordering */
}

/* 导航按钮样式 - 允许显示以便用户切换 */
.card-nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding: 10px 0;
}

.card-nav-buttons button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition-normal);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.card-nav-buttons button:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card-nav-buttons .next-card {
    background: var(--primary-color);
    color: white;
}

.card-nav-buttons .prev-card {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-dark);
}


/* DETAILED STYLES FOR EACH TRAUMA CARD TYPE (LOSS, ABUSE, STRESS, REJECTION, HEALTH) */
/* These include h3, .card-description, .card-options label, and .card-options input[type="radio"] specific styles */

/* LOSS Card (from stable) */
.trauma-card[data-trauma-type="loss"] .card-content h3 {
    color: #3A2A1D;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 36px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.95), 1px 1px 2px rgba(255, 255, 255, 0.9), -1px -1px 2px rgba(255, 255, 255, 0.9);
    letter-spacing: 0.8px;
    padding: 5px 10px;
    display: inline-block;
}

.trauma-card[data-trauma-type="loss"] .card-content .card-description {
    color: #2C3E50;
    font-weight: 600;
    font-size: 17px;
    line-height: 1.6;
    text-shadow: 0 0 7px rgba(255, 255, 255, 0.95), 1px 1px 2px rgba(255, 255, 255, 0.9), -1px -1px 2px rgba(255, 255, 255, 0.9);
    max-width: 90%;
    margin: 0 auto 20px;
    padding: 8px;
}

.trauma-card[data-trauma-type="loss"] .card-options label {
    color: #2C3E50;
    font-weight: 600;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.95), 1px 1px 1px rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(105, 136, 155, 0.4);
    border-radius: 6px;
}

.trauma-card[data-trauma-type="loss"] .card-options input[type="radio"]:checked+span {
    color: #5E3A1E;
    font-weight: 700;
}

/* ABUSE Card (from stable) */
.trauma-card[data-trauma-type="abuse"] .card-content h3 {
    color: rgba(230, 240, 255, 0.92);
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 36px;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.85), 1px 1px 2px rgba(0, 0, 0, 0.9);
    letter-spacing: 0.8px;
}

.trauma-card[data-trauma-type="abuse"] .card-content .card-description {
    color: rgba(220, 225, 240, 0.9);
    font-weight: 600;
    font-size: 17px;
    line-height: 1.6;
    text-shadow: 0 0 7px rgba(0, 0, 0, 0.8), 1px 1px 2px rgba(0, 0, 0, 0.9);
}

.trauma-card[data-trauma-type="abuse"] .card-options label {
    color: rgba(210, 220, 235, 0.9);
    font-weight: 600;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.8), 1px 1px 1px rgba(0, 0, 0, 0.8);
}

.trauma-card[data-trauma-type="abuse"] .card-options input[type="radio"]:checked+span {
    color: rgba(255, 210, 220, 0.95);
    font-weight: 700;
}

/* STRESS Card (from stable) */
.trauma-card[data-trauma-type="stress"] .card-content h3 {
    color: #5D1E0F;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 36px;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.8), 1px 1px 1px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.8px;
    padding: 5px 10px;
    display: inline-block;
}

.trauma-card[data-trauma-type="stress"] .card-content .card-description {
    color: #3A2A17;
    font-weight: 600;
    font-size: 17px;
    line-height: 1.6;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.6);
    max-width: 92%;
    margin: 0 auto 20px;
    padding: 8px;
}

.trauma-card[data-trauma-type="stress"] .card-options label {
    color: #26180D;
    font-weight: 700;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.8), 1px 1px 1px rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(80, 60, 40, 0.4);
}

.trauma-card[data-trauma-type="stress"] .card-options input[type="radio"]:checked+span {
    color: #5C1900;
    font-weight: 800;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.9);
}

/* REJECTION Card (from stable) */
.trauma-card[data-trauma-type="rejection"] .card-content h3 {
    color: #1A0A2E;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 36px;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.9), 1px 1px 2px rgba(255, 255, 255, 0.8), -1px -1px 2px rgba(255, 255, 255, 0.8);
    letter-spacing: 0.8px;
    padding: 5px 10px;
    display: inline-block;
}

.trauma-card[data-trauma-type="rejection"] .card-content .card-description {
    color: #2B1500;
    font-weight: 700;
    font-size: 17px;
    line-height: 1.6;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.9), 1px 1px 2px rgba(255, 255, 255, 0.8), -1px -1px 2px rgba(255, 255, 255, 0.8);
    max-width: 90%;
    margin: 0 auto 20px;
    padding: 8px;
}

.trauma-card[data-trauma-type="rejection"] .card-options label {
    color: #2B1500;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.9), 1px 1px 2px rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.trauma-card[data-trauma-type="rejection"] .card-options input[type="radio"]:checked+span {
    color: #4F0000;
    font-weight: 800;
}

/* HEALTH Card (from stable) */
.trauma-card[data-trauma-type="health"] .card-content h3 {
    color: rgba(5, 36, 63, 0.92);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 35px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.7px;
}

.trauma-card[data-trauma-type="health"] .card-content .card-description {
    color: rgba(3, 40, 69, 0.9);
    font-weight: 600;
    font-size: 17px;
    line-height: 1.6;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

.trauma-card[data-trauma-type="health"] .card-options label {
    color: rgba(3, 40, 69, 0.9);
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(88, 140, 200, 0.25);
}

.trauma-card[data-trauma-type="health"] .card-options input[type="radio"]:checked+span {
    color: rgba(0, 70, 127, 0.95);
    font-weight: 700;
}

/* General Card Options Styling (from stable) */
.card-options {
    /* This is INSIDE .card-content for each .trauma-card */
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
    /* Or adjust as needed for layout */
}

.card-options label {
    /* General label style for radio buttons */
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 14px 16px 14px 42px; /* 左侧留出空间给自定义指示器 */
    background-color: rgba(0, 0, 0, 0.35);
    /* Default from stable, can be overridden */
    border-radius: 10px;
    transition: none; /* 移除过渡，选中状态立即生效 */
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: relative;
    /* color: white; Default for text on darkish background */
}

.card-options label:hover {
    background-color: rgba(0, 0, 0, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease; /* 只保留hover过渡 */
}

/* 完全隐藏原生radio按钮，移除内圈紫色方框 */
.card-options input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    border: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    pointer-events: auto; /* 保持可点击 */
}

/* 使用伪元素创建自定义选中指示器 - 只显示圆圈高亮 */

.card-options label::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background: transparent;
    transition: none; /* 移除过渡动画，立即显示 */
    pointer-events: none;
    z-index: 1;
}

/* 选中状态的label样式 - 使用品牌色，移除过渡动画，立即显示最终状态 */
.card-options label:has(input[type="radio"]:checked) {
    background: linear-gradient(135deg, rgba(255, 209, 220, 0.25), rgba(255, 182, 193, 0.2)) !important;
    /* 使用品牌色 --secondary-color (#FFD1DC) 的变体 */
    border: 2px solid rgba(255, 209, 220, 0.7) !important;
    box-shadow: 0 4px 12px rgba(255, 209, 220, 0.3), inset 0 0 20px rgba(255, 209, 220, 0.1) !important;
    transition: none; /* 移除过渡，立即显示最终状态 */
}

/* 选中状态的圆圈高亮 - 使用品牌色，立即显示最终状态，无2阶段变化 */
.card-options label:has(input[type="radio"]:checked)::before {
    border-color: rgba(255, 209, 220, 0.95); /* 使用品牌色 */
    border-width: 3px;
    box-shadow: 0 0 12px rgba(255, 209, 220, 0.6), 0 0 20px rgba(255, 209, 220, 0.3);
    background: transparent; /* 完全透明，不显示内圈 */
    transform: translateY(-50%); /* 移除scale放大效果 */
    transition: none; /* 移除过渡，立即显示最终状态 */
}

/* Ensure spans within labels also get a sensible default color if not overridden */
.card-options label span {
    color: inherit;
    /* Inherit from label or override per card */
}


/* Swipe Hint (from stable) */
.swipe-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    z-index: 1500;
    /* Above cards */
    opacity: 0;
    /* JS controls this */
    transition: opacity 0.5s ease;
    pointer-events: none;
    /* Allow clicks through if needed, though it's visual */
    animation: pulseHint 1.5s infinite ease-in-out;
    /* from stable */
}

.swipe-hint.visible {
    /* from stable */
    opacity: 1 !important;
}

@keyframes pulseHint {

    /* from stable */
    0% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    70% {
        transform: translateX(-50%) scale(1.05);
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }

    100% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Native language option should always be visible */
.native-lang {
    display: block !important;
}

/* Styles that were previously in @media (max-width: 768px) are now global */
/* 重置一些基本样式 */
.form-card {
    padding: 20px 15px;
    margin-top: 10px;
    overflow: hidden;
    position: relative;
}

/* 语言选项卡移动端优化 */
.lang-switch {
    flex-wrap: nowrap;
    justify-content: center;
    padding: 8px;
    gap: 4px;
    background: rgba(255, 182, 193, 0.08);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.5);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 10px 10px 10px;
    width: calc(100% - 20px);
    white-space: nowrap;
    position: relative;
}

.lang-switch::-webkit-scrollbar {
    display: none;
}

.lang-btn {
    margin: 0;
    padding: 8px 10px;
    background: transparent;
    font-size: 14px;
    white-space: nowrap;
    min-width: fit-content;
    flex: 0 0 auto;
}

.selection-indicator {
    display: block;
    height: calc(100% - 10px);
    top: 5px;
    box-shadow: 0 2px 8px rgba(255, 182, 193, 0.2);
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease-out;
}

.lang-btn.active {
    background: transparent;
    color: var(--primary-color);
}

/* 标题部分移动端优化 */
header .header-content {
    padding: 8px 15px;
    margin: 5px 0;
}

header .logo-container {
    width: 40px;
}

header .header-content h1 {
    font-size: 1.4rem;
}

/* 步骤指示器容器 */
.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    padding: 0;
    position: relative;
    z-index: 5;
}

/* 步骤指示器点 */
.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ddd;
    margin: 0 5px;
    transition: all 0.3s ease;
}

/* 当前步骤指示器点 */
.step-dot.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(247, 108, 108, 0.4);
}

/* 步骤容器 - 优化动画，提升流畅度 */
.form-steps-container {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 100%;
    position: relative;
    will-change: transform;
}

/* 步骤进入动画 */
.form-step {
    animation: stepEnter 0.3s ease-out;
}

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

/* 按钮点击反馈动画 */
.btn:active {
    animation: buttonPress 0.1s ease-out;
}

@keyframes buttonPress {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}


/* PC端优化 */
@media (min-width: 769px) {
    .container {
        max-width: 600px;
        margin: 30px auto;
    }

    .form-card {
        padding: 40px 40px;
    }

    /* PC端键盘导航优化 */
    input:focus, select:focus, button:focus {
        outline: 2px solid var(--accent-color);
        outline-offset: 2px;
    }

    /* 悬停效果增强 */
    .btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(255, 59, 48, 0.3);
    }

    .trauma-quick-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    }

    /* PC端多列布局优化 */
    .form-group-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    /* 改善大屏幕显示 */
    @media (min-width: 1200px) {
        .container {
            max-width: 700px;
        }

        .form-card {
            padding: 50px 50px;
        }
    }
}

/* 输入框聚焦动画增强 */
input:focus, select:focus {
    animation: inputFocus 0.2s ease-out;
}

@keyframes inputFocus {
    0% { transform: scale(1); }
    100% { transform: scale(1.01); }
}

/* 每个步骤 */
.form-step {
    flex: 0 0 100%;
    padding: 10px 5px;
    box-sizing: border-box;
}

/* 步骤标题 */
.step-title {
    text-align: center;
    margin-bottom: 25px;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
}

/* 步骤导航按钮 */
.step-nav {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
    width: 100%;
}

/* 上一步按钮 */
.prev-step {
    background-color: #f0f0f0;
    color: #333;
    margin-right: auto;
}

/* 下一步按钮 */
.next-step {
    background-color: var(--primary-color);
    color: white;
    margin-left: 10px;
}

/* 导航按钮共享样式 */
.prev-step,
.next-step {
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    min-width: 110px;
    text-align: center;
    border: none;
}

/* 导航按钮悬停效果 */
.prev-step:hover,
.next-step:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 添加点击状态 */
.prev-step:active,
.next-step:active {
    transform: scale(0.95);
    opacity: 0.9;
}

/* 添加涟漪效果 */
.prev-step::after,
.next-step::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.prev-step:active::after,
.next-step:active::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }

    20% {
        transform: scale(25, 25);
        opacity: 0.5;
    }

    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

/* 确保错误抖动动画正确定义 */
.shake-error {
    animation: shakeError 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shakeError {

    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);
    }
}

/* 确保表单步骤样式正确 */
.form-step {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-step.active {
    display: block;
    opacity: 1;
}

/* 调整进度条样式 */
.progress-bar {
    width: 100%;
    height: 5px;
    background-color: #eee;
    border-radius: 5px;
    margin: 15px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    width: 20%;
    /* 默认第一步 */
    transition: width 0.5s ease;
}

/* 头像和生活照特殊处理 */
.mobile-photo-upload {
    margin: 15px 0;
}

.mobile-photo-upload #avatar-preview {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 60px;
}

.mobile-live-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 15px;
}

/* 创伤按钮移动端样式 */
.form-group button#trauma-toggle {
    width: 100%;
    padding: 12px;
    border-radius: 25px;
    font-size: 1rem;
}

/* 服务协议样式 */
.terms-agreement {
    margin-top: 20px;
    text-align: center;
}

/* 适配模态窗口 */
.terms-modal-content,
.trauma-modal-content {
    width: 90%;
    max-height: 80vh;
}

/* 修复移动端表单组样式 */
.form-group-row {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 15px;
}

.form-group-row .form-group {
    width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
}

/* 确保所有必填字段标签显示正确 */
.form-group label::after {
    content: " *";
    color: var(--primary-color);
    font-weight: bold;
}

.form-group.optional label::after {
    content: none;
}

/* 确保移动端头像预览可见（在新样式基础上微调阴影与背景） */
#avatar-preview {
    box-shadow: 0 4px 12px rgba(106, 90, 205, 0.2);
    z-index: 5;
    background: radial-gradient(circle at 30% 30%, #faf7fe 0, #f7f0fe 40%, #ffffff 100%);
}

#avatar-preview img {
    display: block !important;
    opacity: 1 !important;
}

/* 强化星座显示 */
#zodiac-display {
    margin: 10px auto;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 100px;
    z-index: 10;
    /* 增加层级确保显示 */
}

#zodiac-display img {
    max-height: 80px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    object-fit: contain;
    z-index: 10;
    position: relative;
}

/* 强化生活照预览样式 */
.live-photos-preview-area {
    padding: 15px;
    min-height: 120px;
    border-width: 2px;
    background-color: rgba(250, 250, 252, 0.8);
    z-index: 5;
    position: relative;
}

.live-preview-item {
    flex-basis: calc(33% - 10px);
    aspect-ratio: 1/1;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 6;
    background-color: #f9f9f9;
    overflow: visible !important;
}

.live-preview-item img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 7 !important;
    pointer-events: auto !important;
    border-radius: var(--border-radius-md);
}

/* 强制确保图片可见性 */
img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 100%;
}

/* 强化移除按钮可见性 */
.remove-live {
    opacity: 1;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.7);
    z-index: 15;
    position: absolute;
    top: 5px !important;
    right: 5px !important;
}

/* 添加专门的移动端照片预览强化样式 */
/* (The following was previously in a second @media (max-width: 768px) block) */
/* 确保生活照片预览的基本容器样式 */
/* 生活照预览容器 - 类似 Tinder/Instagram 的照片墙卡片 */
.live-photos-preview-area {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 14px !important;
    padding: 16px !important;
    border: 1px dashed var(--border-light) !important;
    border-radius: 14px !important;
    min-height: 140px !important;
    background: linear-gradient(135deg, rgba(255, 209, 220, 0.12), rgba(230, 230, 250, 0.12)) !important;
    position: relative !important;
    z-index: 5 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    margin: 15px 0 !important;
    visibility: visible !important;
}

/* 每张生活照预览 - 默认两列，接近 App 卡片尺寸 */
.live-preview-item,
.mobile-preview-item {
    position: relative !important;
    z-index: 6 !important;
    display: block !important;
    flex: 0 0 calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
    aspect-ratio: 3 / 4 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background-color: #f8f8f8 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12) !important;
    margin: 0 !important;
    min-width: 110px !important;
    min-height: 140px !important;
    cursor: pointer !important;
}

/* 单张照片时，居中放大展示，便于 review */
.live-photos-preview-area.photo-count-1 .live-preview-item,
.live-photos-preview-area.photo-count-1 .mobile-preview-item {
    flex: 0 0 100% !important;
    max-width: 360px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 小屏幕时单列展示，图片更大 */
@media (max-width: 480px) {
    .live-preview-item,
    .mobile-preview-item {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* 图片样式 */
.live-preview-item img,
.mobile-preview-item img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    z-index: 7 !important;
    border-radius: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 确保删除按钮样式 */
.remove-live {
    display: block !important;
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    color: white !important;
    border: none !important;
    cursor: pointer !important;
    text-align: center !important;
    line-height: 24px !important;
    font-size: 14px !important;
    z-index: 15 !important;
    opacity: 1 !important;
}

/* 处理照片数量不同时的对齐方式 */
.live-photos-preview-area.photo-count-0 {
    justify-content: center !important;
    align-items: center !important;
}

.live-photos-preview-area.photo-count-1 {
    justify-content: center !important;
}

.live-photos-preview-area.photo-count-2 {
    justify-content: center !important;
}

.live-photos-preview-area.photo-count-3 {
    justify-content: space-between !important;
}

/* 增强空状态可见性 + 引导文案展示 */
.empty-state-live-photos {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    color: #7a7a8c !important;
    text-align: center !important;
    font-size: 14px !important;
    padding: 30px 10px !important;
}

.empty-state-live-photos::before {
    content: '＋' !important;
    font-size: 30px !important;
    margin-bottom: 10px !important;
    color: #a990d5 !important;
    opacity: 0.7 !important;
}

/* 移除调试信息容器样式 */
/* End of styles previously in @media (max-width: 768px) */


/* 小屏幕手机适配 */
@media (max-width: 480px) {
    .form-card {
        padding: 20px 15px;
    }

    .live-preview-item {
        flex-basis: calc((100% - 15px) / 2);
    }

    .live-photos-preview-area.photo-count-0,
    .live-photos-preview-area.photo-count-1,
    .live-photos-preview-area.photo-count-2,
    .live-photos-preview-area.photo-count-3 {
        justify-content: center;
    }

    .remove-live {
        opacity: 0.7;
    }

    .form-group button#trauma-toggle {
        font-size: 0.85rem;
    }

    /* 语言选项卡小屏幕优化 */
    .lang-switch {
        padding: 6px;
        margin: 0 5px 8px 5px;
    }

    .lang-btn {
        padding: 6px 8px;
        font-size: 13px;
        margin: 0 2px;
    }

    .selection-indicator {
        height: calc(100% - 8px);
        top: 4px;
    }

    /* 标题部分小屏幕优化 */
    header .header-content {
        padding: 5px 10px;
    }

    header .logo-container {
        width: 32px;
    }

    header .header-content h1 {
        font-size: 1.2rem;
    }
}

/* 手机端点击反馈动画：头像 & 生活照卡片 */
@media (max-width: 768px) {
    #avatar-preview {
        transition: transform 0.08s ease-out, box-shadow 0.08s ease-out;
    }

    #avatar-preview:active {
        transform: scale(0.96);
        box-shadow: 0 6px 18px rgba(106, 90, 205, 0.35);
    }

    .live-preview-item,
    .mobile-preview-item {
        transition: transform 0.08s ease-out, box-shadow 0.08s ease-out;
    }

    .live-preview-item:active,
    .mobile-preview-item:active {
        transform: scale(0.97);
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
    }
}

/* 服务协议模态框样式 */
#terms-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    /* 高于创伤模态框的z-index */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.terms-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    background-color: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-medium);
    animation: fadeInUp 0.5s ease-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 新的关闭按钮样式 */
.close-modal-wrapper {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    background-color: var(--bg-light);
    border-radius: 20px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-light);
    z-index: 2001;
}

.close-modal-wrapper:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.close-modal-icon {
    font-size: 16px;
    margin-right: 6px;
    display: flex;
    align-items: center;
}

.close-modal-text {
    font-size: 14px;
    font-weight: 500;
}

/* 保留向后兼容的样式 */
#terms-modal .close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-dark);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 2001;
}

#terms-modal .close-modal:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.terms-content {
    overflow-y: auto;
    max-height: calc(80vh - 120px);
    /* 为底部按钮预留空间 */
    padding-right: 15px;
    margin-bottom: 20px;
}

.terms-content h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.terms-date {
    text-align: center;
    font-style: italic;
    margin-bottom: 25px;
    color: var(--text-light);
}

.terms-content h3 {
    margin: 20px 0 10px;
    color: var(--accent-color);
    font-size: 1.4rem;
}

.terms-content h4 {
    margin: 25px 0 15px;
    color: var(--text-dark);
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 5px;
}

.terms-content p {
    margin: 10px 0;
    line-height: 1.6;
}

.terms-content ul {
    padding-left: 20px;
    margin: 10px 0;
}

.terms-content ul li {
    margin: 5px 0;
    line-height: 1.5;
}

.terms-content strong {
    font-weight: 600;
    color: var(--accent-color);
}

.terms-section {
    display: none;
    margin-bottom: 30px;
}

body.chinese .terms-section.zh,
body.english .terms-section.en,
body.japanese .terms-section.ja,
body.russian .terms-section.ru,
body.french .terms-section.fr {
    display: block;
}

.terms-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.terms-actions .btn {
    min-width: 150px;
}

/* 为用户点击后的服务协议样式 */
.terms-link.visited {
    color: #9370DB;
    /* 淡紫色，表示已访问 */
}

/* 响应式调整 */
@media (max-width: 768px) {
    .terms-modal-content {
        padding: 20px 15px;
        max-height: 85vh;
        width: 95%;
    }

    .terms-content {
        max-height: calc(85vh - 130px);
        padding-right: 10px;
    }

    .terms-content h2 {
        font-size: 1.5rem;
    }

    .terms-content h3 {
        font-size: 1.2rem;
    }

    .terms-content h4 {
        font-size: 1.1rem;
    }

    .terms-actions {
        margin-top: 15px;
        padding-top: 15px;
    }

    .terms-actions .btn {
        min-width: 120px;
        padding: 10px 15px;
    }

    /* 移动端关闭按钮样式优化 */
    .close-modal-wrapper {
        top: 8px;
        right: 8px;
        padding: 5px 10px;
    }

    .close-modal-icon {
        font-size: 14px;
        margin-right: 4px;
    }

    .close-modal-text {
        font-size: 12px;
    }
}


/* 确保在所有视口大小下都保持良好的图片预览 */
.live-preview-item img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 增加修复多重样式选择器，确保最高优先级 */
div#live-preview.preview-container.live-photos-preview-area {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 14px !important;
    padding: 16px !important;
    min-height: 140px !important;
    border: 1px dashed var(--border-light) !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, rgba(255, 209, 220, 0.12), rgba(230, 230, 250, 0.12)) !important;
    position: relative !important;
    z-index: 5 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
    justify-content: center !important;
    align-items: center !important;
}

/* 增加强制样式，指向具体DOM结构 */
div#live-preview.preview-container.live-photos-preview-area div.live-preview-item,
div#live-preview.preview-container.live-photos-preview-area div.mobile-preview-item {
    position: relative !important;
    z-index: 6 !important;
    display: block !important;
    width: calc(50% - 10px) !important;
    height: auto !important;
    overflow: hidden !important;
    background-color: #f9f9f9 !important;
    border-radius: 8px !important;
    margin: 0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
    flex: 0 0 auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* 最高优先级图片样式 */
div#live-preview.preview-container.live-photos-preview-area div.live-preview-item img,
div#live-preview.preview-container.live-photos-preview-area div.mobile-preview-item img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 12px !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 7 !important;
    transform: none !important;
    transition: none !important;
    border: none !important;
}

/* 覆盖可能存在的冲突样式 */
.live-preview-item,
.live-preview-item *,
.mobile-preview-item,
.mobile-preview-item * {
    transform: none !important;
    transition: none !important;
}

/* 生活照大图预览 Lightbox */
.photo-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.photo-lightbox.open {
    opacity: 1;
    pointer-events: auto;
}

.photo-lightbox-backdrop {
    position: absolute;
    inset: 0;
}

.photo-lightbox-inner {
    position: relative;
    max-width: min(90vw, 480px);
    max-height: 90vh;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
    background: #000;
    z-index: 1;
}

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

.photo-lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.photo-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

/* 提交按钮右对齐 */
button[type="submit"],
.submit-btn {
    display: block;
    margin-left: auto;
    margin-top: 30px;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    min-width: 110px;
    text-align: center;
    border: none;
}

button[type="submit"]:hover,
.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button[type="submit"]:active,
.submit-btn:active {
    transform: scale(0.95);
    opacity: 0.9;
}

button[type="submit"]:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    color: #999;
    transform: none;
    box-shadow: none;
}

/* 生日错误提示样式 */
.birthday-error-message {
    color: #ff6b47;
    font-size: 0.85rem;
    margin-top: 5px;
    animation: fadeIn 0.3s ease-in-out;
    background-color: rgba(255, 107, 71, 0.08);
    padding: 6px 10px;
    border-radius: 5px;
    border-left: 3px solid #ff6b47;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.birthday-error-message::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 40%, transparent 50%);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

.email-error-message::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 40%, transparent 50%);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid #f3f3f3;
    border-top: 2.5px solid #f35b5b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* 完成动画关键帧 */
@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes checkMarkDraw {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* 隐藏第一步的上一步按钮 */
.form-step[data-step-index="0"] .prev-step {
    display: none;
}

