/* ============================================
   莲舟 (Lianzhou) — VI Theme: Ocean Wisdom
   Color: #1A3A5C / #2D5F7A / #4A8FAC / #D4C5B5 / #F5F0EB
   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: #F5F0EB;
    color: #2C1810;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: #2D5F7A; text-decoration: none; }
a:hover { color: #1A3A5C; text-decoration: underline; }

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

.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(26,58,92,0.08);
    border: 1px solid #E8E0D8;
    text-align: center;
}

.brand-logo {
    font-family: 'Noto Serif SC', serif;
    font-size: 32px;
    font-weight: 900;
    color: #1A3A5C;
    letter-spacing: 6px;
    margin-bottom: 2px;
}

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

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

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #4A4A4A;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 11px 16px;
    border: 1.5px solid #D4C5B5;
    border-radius: 8px;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 15px;
    background: #fff;
    color: #2C1810;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    border-color: #4A8FAC;
    box-shadow: 0 0 0 3px rgba(74,143,172,0.12);
}

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

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

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

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 28px;
    border: none;
    border-radius: 8px;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
}

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

.btn-primary {
    background: #2D5F7A;
    color: #fff;
    width: 100%;
    padding: 12px;
}
.btn-primary:hover:not(:disabled) { background: #1A3A5C; }

.btn-secondary {
    background: #D4C5B5;
    color: #2C1810;
    white-space: nowrap;
}
.btn-secondary:hover:not(:disabled) { background: #C0AFA0; }

.btn-accent {
    background: #4A8FAC;
    color: #fff;
}
.btn-accent:hover:not(:disabled) { background: #3A7A94; }

.btn-sm {
    padding: 8px 18px;
    font-size: 13px;
}

/* ===== Messages ===== */
.message {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
    line-height: 1.5;
}

.message.error {
    display: block;
    background: #FDF2F0;
    color: #C53030;
    border: 1px solid #FED7D7;
}

.message.success {
    display: block;
    background: #F0FFF4;
    color: #276749;
    border: 1px solid #C6F6D5;
}

.message.info {
    display: block;
    background: #EBF4F8;
    color: #2D5F7A;
    border: 1px solid #BEE3E8;
}

/* ===== Auth Footer ===== */
.auth-footer {
    margin-top: 20px;
    font-size: 12px;
    color: #8C7A6A;
}
.auth-footer a { color: #2D5F7A; }

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

.profile-card {
    background: #fff;
    border-radius: 16px;
    padding: 36px 28px;
    box-shadow: 0 8px 32px rgba(26,58,92,0.08);
    border: 1px solid #E8E0D8;
}

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

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

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #F5F0EB;
    border: 2px dashed #D4C5B5;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.avatar-preview:hover { border-color: #4A8FAC; background: #EBF4F8; }

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

.avatar-preview .no-avatar {
    font-size: 40px;
    color: #B8A89A;
}

.avatar-preview .upload-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26,58,92,0.7);
    color: #fff;
    font-size: 11px;
    padding: 4px;
    text-align: center;
}

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

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

.gender-option:hover { border-color: #4A8FAC; }

.gender-option.selected {
    border-color: #2D5F7A;
    background: #EBF4F8;
    color: #1A3A5C;
    font-weight: 500;
}

/* Textarea */
.form-textarea {
    width: 100%;
    padding: 11px 16px;
    border: 1.5px solid #D4C5B5;
    border-radius: 8px;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 15px;
    background: #fff;
    color: #2C1810;
    outline: none;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-textarea:focus {
    border-color: #4A8FAC;
    box-shadow: 0 0 0 3px rgba(74,143,172,0.12);
}

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

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

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

.plan-card {
    background: #fff;
    border: 1.5px solid #E8E0D8;
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.plan-card:hover { border-color: #4A8FAC; }

.plan-card.recommended {
    border-color: #2D5F7A;
    background: #F5F8FA;
}

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

.plan-card .plan-price {
    font-size: 28px;
    font-weight: 700;
    color: #2D5F7A;
    margin: 12px 0 8px;
}

.plan-card .plan-desc {
    font-size: 13px;
    color: #8C7A6A;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    display: none;
    max-width: 90%;
    text-align: center;
}
.toast.success { background: #276749; color: #fff; }
.toast.error { background: #C53030; color: #fff; }
.toast.info { background: #2D5F7A; color: #fff; }

/* ===== Loading ===== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    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: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    max-width: 420px;
    width: 90%;
    text-align: center;
    animation: slideDown 0.3s ease;
    border: 1px solid transparent;
}
.notification.success { background: #F0FFF4; color: #276749; border-color: #C6F6D5; }
.notification.error { background: #FDF2F0; color: #C53030; border-color: #FED7D7; }
.notification.info { background: #EBF4F8; color: #2D5F7A; border-color: #BEE3E8; }
.notification .close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    cursor: pointer;
    opacity: 0.5;
    font-size: 16px;
}
.notification .close-btn:hover { opacity: 1; }

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

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .auth-card { padding: 28px 20px; }
    .brand-logo { font-size: 26px; }
    .plan-grid { grid-template-columns: 1fr; }
    .profile-card { padding: 24px 16px; }
}
