/**
 * site.css — 淡蓝玫瑰SPA 全站公共样式
 *
 * 本文件分为两部分：
 *   ⚠️ 框架逻辑样式（勿改）—— 认证弹窗、门禁锁定、登录态切换
 *   🎨 视觉设计样式（自由定制）—— 配色、导航、页脚、表单外观
 *
 * 各页面独有的布局样式（文章页、首页板块等）保留在页面内联 <style> 中。
 */

/* ============================================================
   🎨 视觉设计：核心变量
   ============================================================ */
:root {
    --bg-deep: #0a0506;
    --bg-panel: #140a0c;
    --gold-main: #D4AF37;
    --gold-dim: #8a7035;
    --text-light: #f0e6d2;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Montserrat', sans-serif;
    --nav-height: 80px;
    --nav-padding: 5%;
}

/* ============================================================
   🎨 视觉设计：全局基础
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg-deep);
    color: var(--text-light);
    font-family: var(--font-sans);
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
}
a { color: var(--gold-main); text-decoration: none; transition: color 0.3s; }
a:hover { color: #e6c14a; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
input { font-family: inherit; font-size: inherit; }

/* ============================================================
   🎨 视觉设计：导航栏（全站共用）
   ============================================================ */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    height: var(--nav-height);
    background: rgba(10, 5, 6, 0.95);
    backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 var(--nav-padding); z-index: 1000;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}
.logo { display: flex; align-items: center; height: 100%; padding: 15px 0; }
.logo img { height: 80%; width: auto; object-fit: contain; }
.nav-back {
    display: flex; align-items: center; gap: 8px;
    color: var(--gold-main); font-size: 0.9rem; letter-spacing: 0.05em;
}
.nav-back:hover { color: #e6c14a; }

/* 首页导航链接 */
.nav-links { display: flex; list-style: none; gap: 30px; }
.nav-links li a {
    color: var(--text-light); text-decoration: none;
    font-size: 0.9rem; letter-spacing: 0.05em;
    transition: color 0.3s; position: relative;
}
.nav-links li a:hover { color: var(--gold-main); }

/* 汉堡菜单 */
.burger { display: none; cursor: pointer; flex-shrink: 0; }
.burger div { width: 25px; height: 2px; background-color: var(--gold-main); margin: 5px; transition: all 0.3s ease; }
.toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
.toggle .line2 { opacity: 0; }
.toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }

/* ============================================================
   🎨 视觉设计：页脚（全站共用）
   ============================================================ */
footer {
    background: var(--bg-deep);
    padding: 30px 5%;
    text-align: center;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}
footer p { color: rgba(240, 230, 210, 0.4); font-size: 0.78rem; line-height: 1.7; }
footer a { color: rgba(240, 230, 210, 0.55); }
footer a:hover { color: var(--gold-main); }

/* ============================================================
   🎨 视觉设计：认证表单（弹窗 + 独立页共用）
   ============================================================ */
.auth-tabs {
    display: flex; margin-bottom: 28px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}
.auth-tab {
    flex: 1; padding: 12px; text-align: center; cursor: pointer;
    color: rgba(240, 230, 210, 0.45); font-size: 0.95rem;
    letter-spacing: 0.1em; transition: color 0.3s;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    user-select: none; background: none; border-top: none; border-left: none; border-right: none;
}
.auth-tab:hover { color: rgba(240, 230, 210, 0.75); }
.auth-tab.active { color: var(--gold-main); border-bottom-color: var(--gold-main); }
.auth-form { display: none; }
.auth-form.active { display: block; }

.form-group { margin-bottom: 18px; }
.form-group label {
    display: block; font-size: 0.78rem;
    color: rgba(240, 230, 210, 0.55); margin-bottom: 8px;
    letter-spacing: 0.05em;
}
.form-input {
    width: 100%; padding: 12px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--text-light); font-family: var(--font-sans);
    font-size: 0.9rem; transition: border-color 0.3s;
    box-sizing: border-box; border-radius: 4px;
}
.form-input:focus { outline: none; border-color: var(--gold-main); }
.form-input::placeholder { color: rgba(240, 230, 210, 0.25); }

.sms-group { display: flex; gap: 10px; }
.sms-group .form-input { flex: 1; }
.sms-btn {
    padding: 12px 18px; background: transparent;
    border: 1px solid var(--gold-dim); color: var(--gold-main);
    font-family: var(--font-sans); font-size: 0.8rem;
    cursor: pointer; white-space: nowrap; transition: all 0.3s;
    border-radius: 4px;
}
.sms-btn:hover:not(:disabled) { background: rgba(212, 175, 55, 0.1); border-color: var(--gold-main); }
.sms-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.auth-submit {
    width: 100%; padding: 14px;
    background: var(--gold-main); border: none;
    color: #0a0506; font-family: var(--font-sans);
    font-size: 0.95rem; letter-spacing: 0.15em;
    cursor: pointer; transition: background 0.3s;
    margin-top: 10px; border-radius: 4px;
}
.auth-submit:hover { background: #e6c14a; }
.auth-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.form-error {
    color: #d4756a; font-size: 0.8rem; margin-top: 6px;
    min-height: 1.2em; display: block; line-height: 1.4;
}
.form-hint {
    font-size: 0.75rem; color: rgba(240, 230, 210, 0.35);
    margin-top: 16px; line-height: 1.6; text-align: center;
}

/* ============================================================
   ⚠️ 框架逻辑（勿改）：认证弹窗
   ============================================================ */
.auth-modal {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.92); z-index: 3000;
    justify-content: center; align-items: center;
    overflow-y: auto; padding: 20px;
}
.auth-modal.active { display: flex; animation: fadeIn 0.3s ease; }
.auth-modal-content {
    width: 100%; max-width: 420px; position: relative;
    background: var(--bg-panel);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 40px; box-sizing: border-box;
}
.auth-modal-close {
    position: absolute; top: 12px; right: 20px;
    color: var(--text-light); font-size: 2rem;
    cursor: pointer; line-height: 1; opacity: 0.5;
    transition: opacity 0.3s, color 0.3s; user-select: none;
    background: none; border: none;
}
.auth-modal-close:hover { opacity: 1; color: var(--gold-main); }
.auth-modal-title {
    font-family: var(--font-serif); color: var(--gold-main);
    font-size: 1.5rem; text-align: center; margin-bottom: 5px; font-weight: 400;
}
.auth-modal-subtitle {
    text-align: center; font-size: 0.7rem;
    color: rgba(240, 230, 210, 0.4);
    letter-spacing: 0.25em; text-transform: uppercase; margin-bottom: 28px;
}
.auth-modal-prompt {
    text-align: center; color: var(--gold-main); font-size: 0.82rem;
    margin-bottom: 22px; padding: 10px 16px;
    background: rgba(212, 175, 55, 0.08);
    border-left: 2px solid var(--gold-main); display: none;
}
.auth-modal-prompt.visible { display: block; }

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

/* ============================================================
   ⚠️ 框架逻辑（勿改）：技师卡片门禁锁定（CSS 类驱动）
   未登录：.locked 模糊 + 遮罩锁
   已登录：body.is-logged-in 解除模糊，显示"进入会员"按钮
   ============================================================ */
.therapist-media.locked { position: relative; }
.therapist-media.locked::after {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.72); z-index: 5;
    pointer-events: none; transition: background 0.3s;
}
.therapist-media.locked:hover::after { background: rgba(0, 0, 0, 0.55); }
.therapist-media.locked img { filter: blur(5px); }
.lock-overlay {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); z-index: 6; pointer-events: none;
}
.lock-overlay svg { width: 52px; height: 52px; filter: drop-shadow(0 2px 10px rgba(0,0,0,0.7)); }

/* 已登录：解除锁定效果 */
body.is-logged-in .therapist-media.locked::after { display: none; }
body.is-logged-in .therapist-media.locked img { filter: none; }
body.is-logged-in .lock-overlay { display: none; }

/* 已登录：显示"进入会员中心"按钮（未登录时隐藏） */
.member-enter-btn {
    display: none; position: absolute; bottom: 10px; left: 50%;
    transform: translateX(-50%); z-index: 7;
    padding: 6px 16px; background: rgba(212, 175, 55, 0.9);
    color: #0a0506; font-size: 0.75rem; letter-spacing: 0.05em;
    border-radius: 4px; white-space: nowrap; transition: background 0.3s;
}
.member-enter-btn:hover { background: var(--gold-main); color: #0a0506; }
body.is-logged-in .member-enter-btn { display: block; }

/* ============================================================
   ⚠️ 框架逻辑（勿改）：导航栏登录态按钮切换
   ============================================================ */
.auth-only { display: inline-flex; }
body.is-logged-in .auth-only { display: none; }
.member-only { display: none; }
body.is-logged-in .member-only { display: inline-flex; }

/* ============================================================
   🎨 视觉设计：SEO 隐藏文本
   ============================================================ */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

/* ============================================================
   🎨 视觉设计：通用响应式
   ============================================================ */
@media screen and (max-width: 768px) {
    .navbar { padding: 0 20px; }
    .logo { min-width: 0; flex-shrink: 1; }
    .logo img { height: 40px; width: auto; max-width: 56vw; object-fit: contain; }
    .nav-links {
        position: absolute; right: 0; height: 100vh; top: var(--nav-height);
        background-color: var(--bg-deep); flex-direction: column;
        width: 100%; transform: translateX(100%); transition: transform 0.4s ease-in;
        padding-top: 10px; padding-left: 40px;
        border-left: 1px solid var(--gold-dim);
    }
    .nav-active { transform: translateX(0%); }
    .nav-links li { width: 100%; border-bottom: 1px solid rgba(212, 175, 55, 0.2); }
    .nav-links li a { display: block; width: 100%; padding: 7px 0; }
    .burger { display: block; }
    .auth-modal-content { padding: 30px 22px; }
    .auth-modal-title { font-size: 1.3rem; }
}
