/* Romance App CSS */
.romance-invite-btn {
    background: linear-gradient(135deg, #f8d7da 0%, #e8b4b8 100%);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 8px 20px rgba(232, 180, 184, 0.4);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.romance-invite-btn:active {
    transform: scale(0.95);
    box-shadow: 0 4px 10px rgba(232, 180, 184, 0.3);
}

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

.heart-breathing {
    animation: heart-breath 3s infinite ease-in-out;
}

.romance-card {
    width: 100%;
    height: 190px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
    box-sizing: border-box;
}

.romance-card:active {
    transform: scale(0.98);
}

.romance-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
    z-index: 0;
    filter: blur(10px);
}

.romance-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.romance-card-avatars {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.romance-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.romance-card-heart {
    color: #e8b4b8;
    font-size: 18px;
    margin: 0 12px;
    animation: heart-breath 2s infinite ease-in-out;
}

.romance-card-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.romance-card-name {
    font-size: 16px;
    font-weight: 600;
    color: #5c4f4f;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.romance-card-days {
    font-size: 28px;
    font-weight: 800;
    color: #e8b4b8;
    font-family: 'Georgia', serif;
    margin-bottom: 4px;
    line-height: 1;
}

.romance-card-days-label {
    font-size: 12px;
    color: #8a7e7e;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Chat Invite Card */
.romance-invite-card {
    background: linear-gradient(145deg, #fff5f6 0%, #fdf0f2 100%);
    border-radius: 20px;
    padding: 20px;
    width: 260px;
    box-shadow: 0 10px 25px rgba(232, 180, 184, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(248, 215, 218, 0.6);
    position: relative;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.romance-invite-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f8d7da, #e8b4b8, #f8d7da);
}

.romance-invite-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #d49a9f;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
}

.romance-invite-card-header i {
    font-size: 16px;
}

.romance-invite-card-avatars {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    gap: 15px;
}

.romance-invite-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(232, 180, 184, 0.3);
}

.romance-invite-heart-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.romance-invite-heart {
    color: #e8b4b8;
    font-size: 24px;
    z-index: 2;
    animation: heart-breath 2s infinite ease-in-out;
}

.romance-invite-heart-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(232, 180, 184, 0.4);
    border-radius: 50%;
    z-index: 1;
    animation: pulse-ring 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(2.5); opacity: 0; }
}

.romance-invite-card-body {
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.6);
    padding: 15px;
    border-radius: 12px;
    border: 1px dashed rgba(232, 180, 184, 0.5);
}

.romance-invite-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #5c4f4f;
    margin-bottom: 8px;
    font-family: 'Georgia', serif;
}

.romance-invite-card-text {
    font-size: 14px;
    color: #8a7e7e;
    line-height: 1.6;
    letter-spacing: 0.5px;
}

.romance-invite-card-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.romance-invite-btn-reject,
.romance-invite-btn-accept {
    flex: 1;
    padding: 10px 0;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.romance-invite-btn-reject {
    background: rgba(255, 255, 255, 0.6);
    color: #a09393;
    border: 1px solid rgba(232, 180, 184, 0.3);
}

.romance-invite-btn-reject:active {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(0.96);
}

.romance-invite-btn-accept {
    background: linear-gradient(135deg, #f8d7da 0%, #e8b4b8 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(232, 180, 184, 0.3);
}

.romance-invite-btn-accept:active {
    transform: scale(0.96);
    box-shadow: 0 2px 6px rgba(232, 180, 184, 0.2);
}

.romance-invite-card-status {
    text-align: center;
    font-size: 13px;
    color: #b8a9a9;
    font-style: italic;
    margin-top: 10px;
    padding: 8px 0;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 12px;
}

.romance-invite-card-result {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.romance-invite-card-result.accepted .result-icon {
    color: #e8b4b8;
    background: #fff5f6;
}

.romance-invite-card-result.rejected .result-icon {
    color: #a09393;
    background: #f5f5f5;
}

.romance-invite-card-result .result-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
}

.romance-invite-card-result .result-text {
    display: flex;
    flex-direction: column;
}

.romance-invite-card-result .result-title {
    font-size: 15px;
    font-weight: 600;
    color: #5c4f4f;
}

.romance-invite-card-result .result-sub {
    font-size: 12px;
    color: #8a7e7e;
    margin-top: 2px;
}

/* Romance Space Modules */
.romance-module-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
}

.romance-module-card:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.romance-module-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #fdf0f2 0%, #f8d7da 100%);
    color: #d49a9f;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(232, 180, 184, 0.2);
}

.romance-module-title {
    font-size: 15px;
    font-weight: 600;
    color: #5c4f4f;
    margin-bottom: 4px;
    letter-spacing: 2px;
    text-align: center;
    width: 100%;
}

.romance-module-desc {
    font-size: 11px;
    color: #a09393;
    letter-spacing: 0.5px;
    text-align: center;
}

/* ======== 模块全屏浮层 ======== */
.romance-fullscreen-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: none;
    overflow-y: auto;
    box-sizing: border-box;
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

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

.romance-timeline-header {
    display: flex;
    align-items: center;
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #5c4f4f;
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.romance-timeline-header .back-btn {
    margin-right: 15px;
    font-size: 20px;
    cursor: pointer;
    color: #d49a9f;
}

/* ======== 时光轴 (Timeline) ======== */
.timeline-bg {
    background: linear-gradient(135deg, #fff0f3 0%, #fde4e8 100%);
}

.romance-timeline-container {
    padding: 30px 20px;
    position: relative;
}

.romance-timeline-container::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 30px;
    bottom: 30px;
    width: 2px;
    background: rgba(232, 180, 184, 0.4);
}

.timeline-item {
    position: relative;
    padding-left: 50px;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    left: 14px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e8b4b8;
    box-shadow: 0 0 0 4px rgba(232, 180, 184, 0.3);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 20px rgba(232, 180, 184, 0.15);
}

.timeline-title {
    font-size: 16px;
    font-weight: 600;
    color: #5c4f4f;
    margin-bottom: 6px;
}

.timeline-anchor {
    font-size: 12px;
    color: #a09393;
    margin-bottom: 12px;
    font-style: italic;
}

.timeline-monologue {
    font-family: 'Kaiti', 'STKaiti', serif; /* AI手写体感觉 */
    font-size: 14px;
    color: #8a7e7e;
    line-height: 1.6;
    padding: 10px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    position: relative;
}

.breathing-text {
    animation: text-breath 4s infinite ease-in-out;
}

@keyframes text-breath {
    0% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.01); }
    100% { opacity: 0.8; transform: scale(1); }
}


/* ======== 珍贵物品 (3D Items) ======== */
.items-bg {
    background: linear-gradient(135deg, #fdf0f2 0%, #f8d7da 100%);
}

.romance-items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
}

.romance-item-card {
    background: transparent;
    width: 100%;
    aspect-ratio: 1 / 1.1;
    perspective: 1000px;
    cursor: pointer;
}

.romance-item-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), -webkit-transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.romance-item-card.flipped .romance-item-inner {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
}

.acrylic-panel {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    background: rgba(255, 245, 248, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 10px 30px rgba(232, 180, 184, 0.15), inset 0 0 20px rgba(255,255,255,0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.romance-item-front {
    /* Front is default */
}

.romance-item-back {
    transform: rotateY(180deg);
    background: rgba(255, 245, 248, 0.5);
}

.romance-item-icon {
    font-size: 32px;
    color: #e8b4b8;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 6px rgba(232, 180, 184, 0.3));
}

.romance-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #5c4f4f;
    text-align: center;
}

.romance-item-date {
    font-size: 12px;
    color: #a09393;
    margin-bottom: 12px;
    font-weight: 500;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 4px;
    width: 100%;
    text-align: center;
}

.romance-item-monologue {
    font-size: 10px;
    color: #999;
    text-align: center;
    line-height: 1.5;
    font-style: italic;
}

/* ======== 专属情书 (Love Letters) ======== */
.letters-bg {
    background-color: #fff5f6; /* 温馨的淡粉色背景 */
    background-image: radial-gradient(#ffd1d6 1px, transparent 1px);
    background-size: 20px 20px;
}

.letters-header {
    display: flex;
    align-items: center;
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #5c4f4f;
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 245, 246, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(232, 180, 184, 0.2);
}

.letters-header .back-btn {
    margin-right: 15px;
    font-size: 20px;
    cursor: pointer;
    color: #d49a9f;
}

.letters-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 15px 20px;
}

.letter-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e8b4b8;
    color: #d49a9f;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(232, 180, 184, 0.15);
}

.letter-btn:active {
    background: #fdf0f2;
    transform: scale(0.95);
    box-shadow: 0 2px 5px rgba(232, 180, 184, 0.1);
}

.letters-list {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding-bottom: 40px;
}

.letter-envelope {
    position: relative;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(232, 180, 184, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    border: 1px solid rgba(232, 180, 184, 0.3);
}

.letter-envelope-body {
    padding: 25px;
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #fff 0%, #fdf0f2 100%);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.letter-envelope-body::before {
    content: '\f004';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 15px;
    right: 20px;
    color: #e8b4b8;
    font-size: 24px;
    opacity: 0.5;
}

.letter-envelope-title {
    font-size: 18px;
    color: #5c4f4f;
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 30px;
    font-family: 'Georgia', serif;
}

.letter-envelope-date {
    font-size: 13px;
    color: #a09393;
    letter-spacing: 1px;
}

.letter-envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to bottom, #fdf0f2, #fff);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    transform-origin: top;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border-bottom: 1px solid rgba(232, 180, 184, 0.2);
}

.letter-paper {
    position: absolute;
    top: 20px;
    left: 5%;
    width: 90%;
    background: #fff;
    padding: 30px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    z-index: 1;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    box-sizing: border-box;
    background-image: repeating-linear-gradient(transparent, transparent 31px, rgba(232, 180, 184, 0.2) 32px);
    line-height: 32px;
    border: 1px solid rgba(232, 180, 184, 0.1);
}

.letter-envelope.open .letter-envelope-flap {
    transform: rotateX(180deg);
    z-index: 1;
}

.letter-envelope.open .letter-paper {
    transform: translateY(30px);
    opacity: 1;
    position: relative;
    z-index: 2;
    margin-bottom: 70px;
    padding-top: 20px;
}

.letter-content-text {
    font-size: 15px;
    color: #5c4f4f;
    min-height: 120px;
    white-space: pre-wrap;
    letter-spacing: 0.5px;
    margin-top: 0px;
}

.letter-sender {
    text-align: right;
    margin-top: 30px;
    font-size: 15px;
    color: #d49a9f;
    font-weight: 500;
    font-style: italic;
}

/* ======== 情侣问答 (Couple Q&A) ======== */
.qa-bg {
    background: linear-gradient(135deg, #fff0f3 0%, #fde4e8 100%);
}

.qa-header {
    display: flex;
    align-items: center;
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #5c4f4f;
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 240, 243, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.qa-header .back-btn {
    margin-right: 15px;
    font-size: 20px;
    cursor: pointer;
    color: #d49a9f;
}

.qa-container {
    padding: 20px;
    padding-bottom: 50px;
}

.qa-select-title {
    font-size: 16px;
    font-weight: 600;
    color: #5c4f4f;
    margin-bottom: 15px;
}

.qa-themes {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.qa-theme-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 4px 15px rgba(232, 180, 184, 0.15);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
}

.qa-theme-card:active {
    transform: scale(0.98);
}

.qa-theme-card i {
    font-size: 24px;
    color: #e8b4b8;
    margin-bottom: 10px;
}

.qa-theme-card.nsfw i {
    color: #d49a9f;
}

.qa-theme-name {
    font-size: 16px;
    font-weight: 600;
    color: #5c4f4f;
    margin-bottom: 4px;
}

.qa-theme-desc {
    font-size: 12px;
    color: #8a7e7e;
}

.qa-archives-title {
    font-size: 15px;
    font-weight: 600;
    color: #5c4f4f;
    margin-bottom: 15px;
}

.qa-archives-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qa-empty {
    text-align: center;
    color: #a09393;
    font-size: 13px;
    padding: 20px;
}

.qa-archive-item {
    background: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(232, 180, 184, 0.1);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.qa-archive-theme {
    font-size: 14px;
    font-weight: 500;
    color: #5c4f4f;
}

.qa-archive-date {
    font-size: 12px;
    color: #a09393;
}

.qa-progress {
    text-align: center;
    font-size: 14px;
    color: #a09393;
    margin-bottom: 20px;
    font-weight: 500;
}

.qa-question-card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(232, 180, 184, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.qa-q-text {
    font-size: 18px;
    font-weight: 600;
    color: #5c4f4f;
    margin-bottom: 20px;
    line-height: 1.5;
    text-align: center;
}

.qa-textarea {
    width: 100%;
    height: 120px;
    border: 1px solid rgba(232, 180, 184, 0.4);
    border-radius: 12px;
    padding: 15px;
    font-size: 15px;
    color: #5c4f4f;
    resize: none;
    box-sizing: border-box;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.6);
    outline: none;
    transition: border-color 0.2s;
}

.qa-textarea:focus {
    border-color: #e8b4b8;
}

.qa-next-btn {
    width: 100%;
    background: linear-gradient(135deg, #f8d7da 0%, #e8b4b8 100%);
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(232, 180, 184, 0.3);
}

.qa-next-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 6px rgba(232, 180, 184, 0.2);
}

.qa-result-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.qa-result-card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(232, 180, 184, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.qa-res-q {
    font-size: 15px;
    font-weight: 600;
    color: #5c4f4f;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(232, 180, 184, 0.2);
    padding-bottom: 10px;
}

.qa-res-answers {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.qa-res-my, .qa-res-ta {
    font-size: 14px;
    color: #5c4f4f;
    line-height: 1.5;
}

.qa-res-label {
    font-size: 12px;
    font-weight: 600;
    color: #d49a9f;
    margin-bottom: 4px;
}

.qa-res-os {
    margin-top: 8px;
    padding: 10px;
    background: rgba(232, 180, 184, 0.1);
    border-radius: 8px;
    font-size: 13px;
    color: #8a7e7e;
    font-style: italic;
    border-left: 3px solid #e8b4b8;
}

.qa-finish-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    color: #d49a9f;
    border: 1px solid rgba(232, 180, 184, 0.6);
    padding: 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.qa-finish-btn:active {
    background: #fff;
    transform: scale(0.98);
}

/* ======== Q&A Chat ======== */
.qa-chat-container {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(232, 180, 184, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    height: 70vh;
    margin-bottom: 20px;
    overflow: hidden;
}

.qa-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.qa-chat-sys {
    text-align: center;
    font-size: 12px;
    color: #a09393;
    margin-bottom: 10px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    align-self: center;
}

.qa-chat-msg {
    display: flex;
    max-width: 85%;
}

.qa-chat-msg.mine {
    align-self: flex-end;
}

.qa-chat-msg.ta {
    align-self: flex-start;
}

.qa-chat-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.qa-chat-msg.mine .qa-chat-bubble {
    background: linear-gradient(135deg, #f8d7da 0%, #e8b4b8 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.qa-chat-msg.ta .qa-chat-bubble {
    background: #fff;
    color: #5c4f4f;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(232, 180, 184, 0.3);
}

.qa-chat-input-area {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.6);
    border-top: 1px solid rgba(232, 180, 184, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 10;
}

.qa-chat-input-area input {
    flex: 1 1 0%;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 15px;
    border: 1px solid rgba(232, 180, 184, 0.4);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    color: #5c4f4f;
}

.qa-chat-input-area input:focus {
    border-color: #e8b4b8;
}

.qa-send-btn {
    background: #e8b4b8;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
    position: relative;
    z-index: 11;
}

.qa-send-btn:active {
    background: #d49a9f;
    transform: scale(0.96);
}

/* ======== Q&A Extra UI ======== */
.qa-choices-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.qa-choice-label {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(232, 180, 184, 0.4);
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.qa-choice-label:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: #e8b4b8;
}

.qa-choice-label:has(input:checked) {
    background: #fff0f3;
    border-color: #e8b4b8;
    box-shadow: 0 2px 8px rgba(232, 180, 184, 0.2);
}

.qa-choice-label input[type="radio"] {
    display: none;
}

.qa-choice-text {
    font-size: 15px;
    color: #5c4f4f;
    line-height: 1.4;
}

.qa-choice-label:has(input:checked) .qa-choice-text {
    font-weight: 600;
    color: #d49a9f;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 5px;
    align-items: center;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #a09393;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.qa-call-reply-btn {
    background: transparent;
    color: #d49a9f;
    border: 1px solid #e8b4b8;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.qa-call-reply-btn:active {
    background: #fff0f3;
    transform: scale(0.96);
}

.qa-memory-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #8a7e7e;
    cursor: pointer;
}

.qa-memory-checkbox input {
    accent-color: #e8b4b8;
    cursor: pointer;
}

.qa-loading-container, .qa-resume-container {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 24px;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 10px 30px rgba(232, 180, 184, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.9);
    margin-top: 30px;
}

.qa-loading-icon {
    font-size: 50px;
    color: #e8b4b8;
    margin-bottom: 25px;
}

.qa-loading-title {
    font-size: 18px;
    font-weight: 600;
    color: #5c4f4f;
    margin-bottom: 10px;
}

.qa-loading-subtitle {
    font-size: 13px;
    color: #a09393;
}

/* ======== 交换人生 (Life Swap) ======== */
.life-swap-choice-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    color: #e5e5e5;
    font-size: 15px;
    line-height: 1.5;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    align-items: center;
}

.life-swap-choice-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.life-swap-choice-btn:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.life-swap-choice-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 12px;
    font-size: 10px;
    color: #aaa;
    flex-shrink: 0;
}

.life-swap-text-line {
    opacity: 0;
    transform: translateY(10px);
    animation: lifeSwapTextFadeIn 0.8s ease forwards;
    margin-bottom: 15px;
}

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

.resonance-warm {
    box-shadow: inset 0 0 100px rgba(232, 180, 184, 0.6) !important;
}

.resonance-cold {
    box-shadow: inset 0 0 100px rgba(180, 200, 232, 0.6) !important;
}

.resonance-warning {
    box-shadow: inset 0 0 100px rgba(255, 100, 100, 0.5) !important;
}

/* ======== 前世今生 (Past Life) ======== */
#pastlife-scroll-area {
    font-family: 'Kaiti', 'STKaiti', 'Georgia', serif;
}

#pastlife-scroll-area p {
    text-indent: 2em;
    margin-bottom: 24px;
}

#pastlife-scroll-area strong {
    color: #b56a71;
    font-weight: bold;
    font-size: 1.05em;
    text-shadow: 0 1px 2px rgba(181, 106, 113, 0.1);
}

.pastlife-setting-box {
    background: rgba(255, 245, 246, 0.8);
    border: 1px solid rgba(232, 180, 184, 0.6);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(232, 180, 184, 0.15), inset 0 0 20px rgba(255, 255, 255, 0.9);
    position: relative;
    text-indent: 0; /* Override paragraph indent if applied */
}

.pastlife-setting-box::before {
    content: '';
    position: absolute;
    top: 8px; left: 8px; right: 8px; bottom: 8px;
    border: 1px dashed rgba(232, 180, 184, 0.5);
    border-radius: 14px;
    pointer-events: none;
}

.pastlife-identities {
    font-size: 18px;
    font-weight: 600;
    color: #a35d64;
    margin-bottom: 12px;
    letter-spacing: 2px;
    font-family: 'Georgia', serif;
}

.pastlife-background {
    font-size: 14px;
    color: #7a6a6a;
    line-height: 1.8;
    letter-spacing: 1px;
}
