/* ============================================
   小愈 (Xiaoyu) — VI Theme: Warm Healing
   品牌定位：女性美容美体 · 身心疗愈
   Color: #D4897B / #E8B4B0 / #F5E1DA / #FFF5F0 / #FDF8F5
   Gradient: rose-gold → warm peach
   Font: Noto Serif SC + Noto Sans SC
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700;900&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(160deg, #FDF8F5 0%, #FFF5F0 40%, #F5E1DA 100%);
    color: #4A3728;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: #D4897B; text-decoration: none; font-weight: 500; }
a:hover { color: #C27466; text-decoration: underline; }

/* ===== Page Layout ===== */
.page-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

/* 装饰性背景元素 */
.page-container::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(232,180,176,0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.page-container::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212,137,123,0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.auth-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 44px 36px;
    max-width: 400px;
    width: 100%;
    box-shadow:
        0 2px 4px rgba(212,137,123,0.04),
        0 8px 24px rgba(212,137,123,0.08),
        0 24px 48px -12px rgba(212,137,123,0.12);
    border: 1px solid rgba(232,180,176,0.25);
    text-align: center;
    position: relative;
    z-index: 1;
}

/* 顶部装饰条 */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #D4897B, #E8B4B0, #D4897B, transparent);
    border-radius: 0 0 3px 3px;
}

.brand-logo {
    font-family: 'Noto Serif SC', serif;
    font-size: 34px;
    font-weight: 700;
    color: #4A3728;
    letter-spacing: 8px;
    margin-bottom: 2px;
    position: relative;
    display: inline-block;
}

.brand-logo::after {
    content: '';
    display: block;
    width: 40%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #E8B4B0, transparent);
    margin: 8px auto 0;
}

.brand-slogan {
    font-size: 13px;
    color: #B58A7A;
    letter-spacing: 6px;
    margin-bottom: 28px;
    font-weight: 300;
}

/* ===== Form ===== */
.form-group {
    margin-bottom: 18px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #5A4A3C;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.form-input {
    width: 100%;
    padding: 12px 18px;
    border: 1.5px solid #E8D5CE;
    border-radius: 10px;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 15px;
    background: #FFFBF9;
    color: #4A3728;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.form-input:focus {
    border-color: #D4897B;
    box-shadow: 0 0 0 3px rgba(212,137,123,0.12);
    background: #fff;
}

.form-input::placeholder { color: #CAB5AB; }

.code-row {
    display: flex;
    gap: 10px;
}

.code-row .form-input { flex: 1; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #D4897B, #E8B4B0);
    color: #fff;
    width: 100%;
    padding: 13px;
    box-shadow: 0 4px 12px rgba(212,137,123,0.25);
}
.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #C27466, #D4897B);
    box-shadow: 0 6px 16px rgba(212,137,123,0.35);
    transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(212,137,123,0.2);
}

.btn-secondary {
    background: #F5E1DA;
    color: #5A4A3C;
    white-space: nowrap;
}
.btn-secondary:hover:not(:disabled) { background: #E8D5CE; }

.btn-accent {
    background: linear-gradient(135deg, #E8B4B0, #D4897B);
    color: #fff;
    box-shadow: 0 4px 12px rgba(232,180,176,0.3);
}
.btn-accent:hover:not(:disabled) {
    box-shadow: 0 6px 16px rgba(232,180,176,0.4);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 13px;
    letter-spacing: 1px;
}

/* ===== Messages ===== */
.message {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
    line-height: 1.6;
    backdrop-filter: blur(4px);
}

.message.error {
    display: block;
    background: rgba(254, 226, 226, 0.8);
    color: #C53030;
    border: 1px solid #FECACA;
}

.message.success {
    display: block;
    background: rgba(236, 253, 245, 0.8);
    color: #276749;
    border: 1px solid #C6F6D5;
}

.message.info {
    display: block;
    background: rgba(254, 243, 242, 0.8);
    color: #8B5E52;
    border: 1px solid #FED7D0;
}

/* ===== Auth Footer ===== */
.auth-footer {
    margin-top: 22px;
    font-size: 12px;
    color: #B58A7A;
    line-height: 1.8;
}
.auth-footer a { color: #D4897B; font-weight: 500; }

/* ===== Protocol Links ===== */
.protocol-links {
    margin-top: 16px;
    font-size: 12px;
    color: #B58A7A;
    line-height: 1.8;
}

.protocol-links a {
    color: #D4897B;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(212,137,123,0.3);
}

.protocol-links a:hover {
    color: #C27466;
    text-decoration-color: #C27466;
}

/* ===== Profile Page ===== */
.profile-container {
    max-width: 620px;
    width: 100%;
    margin: 40px auto;
    padding: 0 20px;
}

.profile-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 40px 32px;
    box-shadow:
        0 2px 4px rgba(212,137,123,0.04),
        0 8px 24px rgba(212,137,123,0.08);
    border: 1px solid rgba(232,180,176,0.25);
    position: relative;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #D4897B, #E8B4B0, #D4897B, transparent);
    border-radius: 0 0 3px 3px;
}

.profile-card .brand-logo { font-size: 24px; letter-spacing: 6px; }

/* Avatar */
.avatar-section {
    text-align: center;
    margin-bottom: 28px;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F5E1DA, #FDF8F5);
    border: 2px dashed #E8D5CE;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.25s;
}

.avatar-preview:hover {
    border-color: #D4897B;
    background: linear-gradient(135deg, #F5E1DA, #FFF5F0);
    box-shadow: 0 0 0 4px rgba(212,137,123,0.08);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-preview .no-avatar {
    font-size: 42px;
    color: #CAB5AB;
}

.avatar-preview .upload-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(212,137,123,0.7));
    color: #fff;
    font-size: 11px;
    padding: 4px;
    text-align: center;
    letter-spacing: 1px;
}

/* Gender Select */
.gender-select {
    display: flex;
    gap: 12px;
}

.gender-option {
    flex: 1;
    padding: 11px;
    border: 1.5px solid #E8D5CE;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    background: #FFFBF9;
}

.gender-option:hover {
    border-color: #D4897B;
    background: #FFF5F0;
}

.gender-option.selected {
    border-color: #D4897B;
    background: linear-gradient(135deg, #FFF5F0, #F5E1DA);
    color: #7B4E42;
    font-weight: 600;
}

/* Textarea */
.form-textarea {
    width: 100%;
    padding: 12px 18px;
    border: 1.5px solid #E8D5CE;
    border-radius: 10px;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 15px;
    background: #FFFBF9;
    color: #4A3728;
    outline: none;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.form-textarea:focus {
    border-color: #D4897B;
    box-shadow: 0 0 0 3px rgba(212,137,123,0.12);
    background: #fff;
}

/* Progress */
.progress-bar {
    height: 4px;
    background: #F5E1DA;
    border-radius: 2px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, #E8B4B0, #D4897B, #C27466);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ===== Subscription Page ===== */
.plan-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 24px 0;
}

.plan-card {
    background: #FFFBF9;
    border: 1.5px solid #E8D5CE;
    border-radius: 14px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
}

.plan-card:hover {
    border-color: #D4897B;
    background: #FFF5F0;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212,137,123,0.1);
}

.plan-card.recommended {
    border-color: #D4897B;
    background: linear-gradient(135deg, #FFF5F0, #FDF8F5);
    box-shadow: 0 0 0 2px rgba(212,137,123,0.15);
}

.plan-card.recommended::after {
    content: '推荐';
    position: absolute;
    top: -8px;
    right: 16px;
    background: linear-gradient(135deg, #D4897B, #E8B4B0);
    color: #fff;
    font-size: 11px;
    padding: 2px 12px;
    border-radius: 10px;
    letter-spacing: 1px;
    font-weight: 500;
}

.plan-card .plan-name {
    font-family: 'Noto Serif SC', serif;
    font-size: 20px;
    font-weight: 700;
    color: #4A3728;
}

.plan-card .plan-price {
    font-size: 30px;
    font-weight: 700;
    color: #D4897B;
    margin: 12px 0 8px;
    letter-spacing: -1px;
}

.plan-card .plan-price::before {
    content: '¥';
    font-size: 18px;
    font-weight: 600;
    vertical-align: super;
}

.plan-card .plan-desc {
    font-size: 13px;
    color: #B58A7A;
    line-height: 1.6;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    display: none;
    max-width: 90%;
    text-align: center;
    backdrop-filter: blur(8px);
}
.toast.success { background: rgba(236, 253, 245, 0.95); color: #276749; border: 1px solid #C6F6D5; }
.toast.error { background: rgba(254, 226, 226, 0.95); color: #C53030; border: 1px solid #FECACA; }
.toast.info { background: rgba(254, 243, 242, 0.95); color: #7B4E42; border: 1px solid #FED7D0; }

/* ===== Loading ===== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(212,137,123,0.2);
    border-radius: 50%;
    border-top-color: #D4897B;
    animation: spin 0.6s linear infinite;
}

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

/* ===== Notification ===== */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 16px 28px;
    border-radius: 12px;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    max-width: 420px;
    width: 90%;
    text-align: center;
    animation: slideDown 0.3s ease;
    border: 1px solid transparent;
    backdrop-filter: blur(8px);
}
.notification.success { background: rgba(236, 253, 245, 0.95); color: #276749; border-color: #C6F6D5; }
.notification.error { background: rgba(254, 226, 226, 0.95); color: #C53030; border-color: #FECACA; }
.notification.info { background: rgba(254, 243, 242, 0.95); color: #7B4E42; border-color: #FED7D0; }
.notification .close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    cursor: pointer;
    opacity: 0.4;
    font-size: 18px;
    transition: opacity 0.2s;
}
.notification .close-btn:hover { opacity: 0.7; }

@keyframes slideDown {
    from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ===== Accordion / Collapse ===== */
.accordion-section {
    margin-bottom: 16px;
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #FFFBF9;
    border: 1px solid #E8D5CE;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #4A3728;
    transition: all 0.2s;
    letter-spacing: 1px;
}

.accordion-header:hover {
    border-color: #D4897B;
    background: #FFF5F0;
}

.accordion-header .arrow {
    transition: transform 0.2s;
    color: #CAB5AB;
}

.accordion-header.active .arrow {
    transform: rotate(180deg);
    color: #D4897B;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 18px;
}

.accordion-content.open {
    max-height: 500px;
    padding: 16px 18px;
}

/* ===== Checkbox (custom) ===== */
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #5A4A3C;
}

.custom-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid #E8D5CE;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.custom-checkbox input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #D4897B, #E8B4B0);
    border-color: #D4897B;
}

.custom-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.custom-checkbox input[type="checkbox"]:hover {
    border-color: #D4897B;
}

/* ===== Tag / Badge ===== */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
}

.tag-primary {
    background: linear-gradient(135deg, #FFF5F0, #F5E1DA);
    color: #7B4E42;
    border: 1px solid rgba(212,137,123,0.2);
}

.tag-success {
    background: rgba(236, 253, 245, 0.8);
    color: #276749;
    border: 1px solid #C6F6D5;
}

.tag-warning {
    background: rgba(254, 249, 235, 0.8);
    color: #92400E;
    border: 1px solid #FDE68A;
}

/* ===== Divider ===== */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #CAB5AB;
    font-size: 12px;
    letter-spacing: 2px;
}

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

.divider::before { margin-right: 16px; }
.divider::after { margin-left: 16px; }

/* ===== Float Label ===== */
.float-label-group {
    position: relative;
    margin-bottom: 18px;
}

.float-label-group .form-input {
    padding-top: 18px;
    padding-bottom: 6px;
}

.float-label-group .float-label {
    position: absolute;
    left: 18px;
    top: 12px;
    font-size: 12px;
    color: #B58A7A;
    transition: all 0.2s;
    pointer-events: none;
    letter-spacing: 1px;
}

/* ===== Decorative Elements ===== */
.deco-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.08;
}

.deco-circle-1 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #D4897B, transparent);
    top: -60px;
    right: -60px;
}

.deco-circle-2 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, #E8B4B0, transparent);
    bottom: -40px;
    left: -40px;
}

/* ===== Card List ===== */
.card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: #FFFBF9;
    border: 1px solid #E8D5CE;
    border-radius: 12px;
    transition: all 0.2s;
    cursor: pointer;
}

.card-list-item:hover {
    border-color: #D4897B;
    background: #FFF5F0;
    transform: translateX(2px);
}

.card-list-item .item-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F5E1DA, #E8B4B0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.card-list-item .item-content {
    flex: 1;
}

.card-list-item .item-title {
    font-size: 14px;
    font-weight: 500;
    color: #4A3728;
}

.card-list-item .item-subtitle {
    font-size: 12px;
    color: #B58A7A;
    margin-top: 2px;
}

/* ===== Pulse Animation ===== */
@keyframes gentlePulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.pulse {
    animation: gentlePulse 2s ease-in-out infinite;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .auth-card { padding: 32px 24px; border-radius: 16px; }
    .brand-logo { font-size: 28px; letter-spacing: 6px; }
    .brand-slogan { font-size: 12px; letter-spacing: 4px; }
    .plan-grid { grid-template-columns: 1fr; }
    .profile-card { padding: 28px 20px; }
    .page-container::before,
    .page-container::after { display: none; }
}
