/* ============================================
   Urban Pulse - 都市脈動 社群交友平台
   Core Stylesheet
   ============================================ */

/* --- CSS Variables --- */
:root {
    --primary: #FF6B6B;
    --primary-dark: #E85D5D;
    --primary-light: #FF8E8B;
    --primary-gradient: linear-gradient(135deg, #FF8E8B 0%, #FF6B6B 100%);
    --secondary: #F4F1EE;
    --bg-main: #FDFCFB;
    --bg-card: #FFFFFF;
    --bg-card-hover: #FAFAFA;
    --bg-elevated: #FFF9F7;
    --bg-input: #F7F5F2;
    --text-primary: #2D2926;
    --text-secondary: #5C5552;
    --text-muted: #8E8683;
    --border-color: #EFEBE9;
    --border-light: #F4F1EE;
    --vip-gold: #D4AF37;
    --vip-gold-light: #F7E7CE;
    --vip-gradient: linear-gradient(135deg, #FFB75E, #ED8F03);
    --accent-blue: #4A90E2;
    --danger: #FF3B30;
    --warning: #FF9500;
    --success: #34C759;
    --chat-self: #FF6B6B;
    --chat-other: #F4F1EE;
    --glass-bg: rgba(253, 252, 251, 0.85);
    --glass-border: rgba(255, 255, 255, 0.6);
    --shadow-sm: 0 4px 12px rgba(45, 41, 38, 0.04);
    --shadow-md: 0 8px 24px rgba(45, 41, 38, 0.08);
    --shadow-lg: 0 16px 40px rgba(45, 41, 38, 0.12);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 50%;
    --font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
    --navbar-height: 70px;
    --mobile-nav-height: 70px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-family);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-main);
    min-height: 100vh;
    overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-light); }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    outline: none;
    border: none;
}
ul, ol { list-style: none; }

/* --- Container --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 16px; }
.container-xs { max-width: 560px; margin: 0 auto; padding: 0 16px; }

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 20px;
}
.brand-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--primary); background: rgba(255, 107, 107, 0.1); }
.chat-nav-link { position: relative; }
.badge-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* User Dropdown */
.nav-user-dropdown { position: relative; }
.nav-avatar-btn {
    position: relative;
    background: none;
    cursor: pointer;
    padding: 2px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-light);
    transition: border-color 0.2s;
}
.nav-avatar-btn:hover { border-color: var(--primary); }
.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
}
.vip-crown {
    position: absolute;
    top: -6px;
    right: -6px;
    color: var(--vip-gold);
    font-size: 12px;
    filter: drop-shadow(0 1px 2px rgba(45, 41, 38, 0.2));
}
.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 1001;
}
.dropdown-menu.show { display: block; animation: fadeInDown 0.2s ease; }
.dropdown-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.15s;
}
.dropdown-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.dropdown-item.vip-link { color: var(--vip-gold); }
.dropdown-item.vip-link:hover { background: rgba(212, 175, 55, 0.1); }
.dropdown-divider { border-top: 1px solid var(--border-color); margin: 4px 0; }
.text-danger { color: var(--danger) !important; }

.navbar-toggle {
    display: none;
    background: none;
    color: var(--text-primary);
    font-size: 22px;
    cursor: pointer;
    padding: 8px;
}

/* --- Main Content --- */
.main-content {
    padding-top: calc(var(--navbar-height) + 16px);
    padding-bottom: 32px;
    min-height: 80vh;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    line-height: 1.4;
}
.btn-primary { background: var(--primary-gradient); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn-secondary { background: var(--bg-elevated); color: var(--text-primary); border: none; box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--border-color); color: var(--text-primary); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.9; color: #fff; }
.btn-line {
    background: var(--primary-gradient);
    color: #fff;
    padding: 12px 32px;
    font-size: 16px;
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.3);
    font-weight: 700;
}
.btn-line:hover { background: linear-gradient(135deg, #FF6B6B 0%, #E85D5D 100%); color: #fff; box-shadow: 0 8px 32px rgba(255, 107, 107, 0.4); transform: translateY(-2px); }
.btn-vip {
    background: var(--vip-gradient);
    color: #FFFFFF;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}
.btn-vip::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    animation: vipShine 3s ease-in-out infinite;
}
@keyframes vipShine {
    0%, 100% { transform: translateX(-100%) rotate(45deg); }
    50% { transform: translateX(100%) rotate(45deg); }
}
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* --- Cards --- */
.card {
    background: var(--bg-card);
    border: none;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-body { padding: 20px; }
.card-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
}

/* --- Member Card (Waterfall) --- */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.member-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 3/4;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}
.member-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.member-card:hover img { transform: scale(1.05); }
.member-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 16px 16px;
    background: linear-gradient(transparent, rgba(45, 41, 38, 0.9));
    color: #fff;
}
.member-card-name {
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.member-card-info {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
}
.member-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}
.member-card-tags .tag {
    background: rgba(255,255,255,0.15);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: rgba(255,255,255,0.85);
}
/* VIP 金色邊框動畫 */
.member-card.is-vip {
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}
.member-card.is-vip::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--radius-md);
    background: linear-gradient(45deg, #D4AF37, #F7E7CE, #D4AF37, #F7E7CE);
    background-size: 400% 400%;
    z-index: -1;
    animation: vipBorder 4s ease infinite;
}
@keyframes vipBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.crown-icon { color: var(--vip-gold); font-size: 14px; }

/* --- VIP Lock Section --- */
.vip-locked {
    position: relative;
    padding: 32px;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFF9F7 100%);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 183, 94, 0.2);
    box-shadow: var(--shadow-sm);
    text-align: center;
    overflow: hidden;
}
.vip-locked-content { filter: blur(8px); pointer-events: none; user-select: none; opacity: 0.5; }
.vip-locked-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(253, 252, 251, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2;
}
.vip-locked-overlay .lock-icon {
    font-size: 36px;
    color: var(--vip-gold);
    margin-bottom: 12px;
}
.vip-locked-overlay p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 14px;
}

/* --- Forms --- */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: none;
    box-shadow: inset 0 2px 4px rgba(45, 41, 38, 0.02);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: all 0.2s;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { min-height: 100px; resize: vertical; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a0a0a0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* --- Tags --- */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.tag-primary { background: rgba(255, 107, 107, 0.15); color: var(--primary); }
.tag-vip { background: rgba(255, 183, 94, 0.15); color: #ED8F03; }
.tag-danger { background: rgba(255, 59, 48, 0.15); color: var(--danger); }
.tag-muted { background: var(--bg-elevated); color: var(--text-secondary); }

/* --- VIP Badge --- */
.vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--vip-gradient);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

/* --- Chat UI --- */
.chat-container { display: flex; height: calc(100vh - var(--navbar-height) - 32px); background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; border: none; box-shadow: var(--shadow-sm); }
.chat-sidebar { width: 340px; border-right: 1px solid var(--border-color); display: flex; flex-direction: column; background: var(--bg-card); }
.chat-sidebar-header { padding: 20px 16px; border-bottom: 1px solid var(--border-color); }
.chat-sidebar-header h3 { font-size: 18px; font-weight: 700; }
.chat-search { margin-top: 10px; }
.chat-list { flex: 1; overflow-y: auto; }
.chat-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border-color);
}
.chat-list-item:hover, .chat-list-item.active { background: var(--bg-elevated); }
.chat-list-avatar {
    position: relative;
    flex-shrink: 0;
}
.chat-list-avatar img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
}
.chat-list-info { flex: 1; min-width: 0; }
.chat-list-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.chat-list-preview { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.chat-list-meta { text-align: right; flex-shrink: 0; }
.chat-list-time { font-size: 11px; color: var(--text-muted); }
.chat-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    padding: 0 6px;
    margin-top: 4px;
}

/* Chat Main */
.chat-main { flex: 1; display: flex; flex-direction: column; }
.chat-main-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
}
.chat-main-user { display: flex; align-items: center; gap: 12px; }
.chat-main-user img { width: 40px; height: 40px; border-radius: var(--radius-full); object-fit: cover; }
.chat-main-user-info h4 { font-size: 15px; font-weight: 600; }
.chat-main-user-info span { font-size: 12px; color: var(--text-muted); }
.chat-main-actions { display: flex; gap: 8px; }
.chat-main-actions button {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 14px;
}
.chat-main-actions button:hover { background: var(--border-light); color: var(--text-primary); }
.chat-main-actions button.btn-danger-icon:hover { background: rgba(255, 59, 48, 0.2); color: var(--danger); }

/* Messages */
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.chat-date-divider { text-align: center; color: var(--text-muted); font-size: 12px; margin: 16px 0; }
.chat-bubble { max-width: 70%; padding: 12px 16px; border-radius: var(--radius-lg); font-size: 14px; line-height: 1.5; position: relative; word-break: break-word; box-shadow: var(--shadow-sm); }
.chat-bubble-self { align-self: flex-end; background: var(--primary-gradient); color: #fff; border-bottom-right-radius: 4px; }
.chat-bubble-other { align-self: flex-start; background: var(--chat-other); color: var(--text-primary); border-bottom-left-radius: 4px; }
.chat-bubble-time { font-size: 10px; opacity: 0.6; margin-top: 4px; text-align: right; }
.chat-bubble-image { padding: 4px; }
.chat-bubble-image img { max-width: 240px; max-height: 240px; border-radius: var(--radius-sm); cursor: pointer; object-fit: cover; }
.chat-read-status { font-size: 10px; color: var(--text-muted); text-align: right; margin-top: 2px; }

/* Chat Composer */
.chat-composer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: flex-end;
    gap: 12px;
    background: var(--bg-card);
}
.chat-composer-input {
    flex: 1;
    background: var(--bg-input);
    border: none;
    box-shadow: inset 0 2px 4px rgba(45, 41, 38, 0.02);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    color: var(--text-primary);
    max-height: 120px;
    resize: none;
    line-height: 1.5;
    font-size: 14px;
}
.chat-composer-input:focus { border-color: var(--primary); }
.chat-composer-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
    border: none;
    font-size: 16px;
}
.chat-upload-btn { background: var(--bg-elevated); color: var(--text-secondary); }
.chat-upload-btn:hover { background: var(--border-light); color: var(--text-primary); }
.chat-send-btn { background: var(--primary-gradient); color: #fff; }
.chat-send-btn:hover { background: linear-gradient(135deg, #FF6B6B 0%, #E85D5D 100%); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3); }

/* Chat Disabled */
.chat-disabled {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    text-align: center;
}
.chat-disabled p { color: var(--text-muted); font-size: 13px; margin-bottom: 8px; }

/* Chat Empty */
.chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}
.chat-empty i { font-size: 48px; margin-bottom: 16px; opacity: 0.3; }
.chat-empty p { font-size: 15px; }

/* --- Forum --- */
.forum-post-card {
    background: var(--bg-card);
    border: none;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.forum-post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: var(--bg-card-hover); }
.forum-post-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.forum-post-avatar { width: 40px; height: 40px; border-radius: var(--radius-full); object-fit: cover; }
.forum-post-author { font-weight: 600; font-size: 14px; }
.forum-post-meta { font-size: 12px; color: var(--text-muted); }
.forum-post-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.forum-post-excerpt { font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.forum-post-image { width: 100%; max-height: 300px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 12px; }
.forum-post-stats { display: flex; gap: 20px; font-size: 13px; color: var(--text-muted); }
.forum-post-stats span { display: flex; align-items: center; gap: 4px; }

/* Forum VIP Area */
.forum-vip-section {
    background: linear-gradient(135deg, #FFF9F7 0%, #FFFFFF 100%);
    border: 1px solid rgba(255, 183, 94, 0.3);
    box-shadow: var(--shadow-sm);
}

/* --- Profile Page --- */
.profile-cover {
    height: 240px;
    background: linear-gradient(135deg, #FFB75E 0%, #FF6B6B 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: relative;
}
.profile-avatar-wrapper {
    position: absolute;
    bottom: -50px;
    left: 24px;
    z-index: 2;
}
.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-lg);
    border: 4px solid var(--bg-card);
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}
.profile-avatar-wrapper.is-vip .profile-avatar {
    border: 3px solid var(--vip-gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}
.profile-info { padding: 60px 24px 24px; }
.profile-name {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.profile-details { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 14px; color: var(--text-secondary); }
.profile-details span { display: flex; align-items: center; gap: 4px; }
.profile-bio { margin-top: 16px; font-size: 15px; line-height: 1.7; color: var(--text-secondary); }
.profile-section { margin-top: 24px; }
.profile-section h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border-color); }

/* Photo Grid */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-grid img { aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; transition: opacity 0.2s; }
.photo-grid img:hover { opacity: 0.8; }

/* --- VIP Page --- */
.vip-hero {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #FFF9F7 0%, #FFFFFF 50%, #FFF9F7 100%);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: 48px;
    border: 1px solid rgba(255, 183, 94, 0.2);
}
.vip-hero h1 { font-size: 36px; font-weight: 700; margin-bottom: 12px; }
.vip-hero h1 span { background: var(--vip-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.vip-hero p { color: var(--text-secondary); font-size: 16px; }
.vip-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-bottom: 40px; }
.vip-plan-card {
    background: var(--bg-card);
    border: none;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-xl);
    padding: 40px 24px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
}
.vip-plan-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.vip-plan-card.popular { border: 2px solid #FFB75E; box-shadow: var(--shadow-md); }
.vip-plan-card.popular::before {
    content: '最受歡迎';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--vip-gradient);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 20px;
}
.vip-plan-name { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.vip-plan-price { font-size: 40px; font-weight: 700; color: var(--vip-gold); margin-bottom: 4px; }
.vip-plan-price small { font-size: 16px; color: var(--text-muted); }
.vip-plan-period { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.vip-plan-features { text-align: left; margin-bottom: 24px; }
.vip-plan-features li { padding: 8px 0; font-size: 14px; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.vip-plan-features li i { color: var(--primary); font-size: 12px; }

/* --- Modal --- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(45, 41, 38, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.show { display: flex; animation: fadeIn 0.2s; }
.modal {
    background: var(--bg-card);
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}
.modal-header {
    padding: 20px 24px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close { background: none; color: var(--text-muted); font-size: 20px; cursor: pointer; padding: 4px; }
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border-color); display: flex; gap: 10px; justify-content: flex-end; }

/* --- Login Page --- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
    position: relative;
    overflow: hidden;
}
.login-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #FFF9F7 0%, #FDFCFB 100%);
}
.login-card {
    position: relative;
    z-index: 1;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.login-card h1 { font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.login-card p { color: var(--text-secondary); margin-bottom: 32px; }
.login-card .btn-line { width: 100%; padding: 14px; font-size: 16px; margin-bottom: 16px; }
.login-features { margin-top: 32px; text-align: left; }
.login-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}
.login-features li i { color: var(--primary); width: 20px; text-align: center; }

/* --- Hero Section --- */
.hero {
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
}
.hero h1 { font-size: 42px; font-weight: 700; line-height: 1.3; margin-bottom: 16px; }
.hero h1 .highlight { color: var(--primary); }
.hero p { font-size: 18px; color: var(--text-secondary); max-width: 560px; margin: 0 auto 32px; }

/* --- Section --- */
.section { padding: 48px 0; }
.section-title { font-size: 24px; font-weight: 700; margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }

/* --- Stats Cards --- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat-card {
    background: var(--bg-card);
    border: none;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.stat-card .stat-value { font-size: 32px; font-weight: 700; color: var(--primary); }
.stat-card .stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* --- Pagination --- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 24px; }
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}
.pagination a { background: var(--bg-card); color: var(--text-secondary); border: none; box-shadow: var(--shadow-sm); }
.pagination a:hover { background: var(--bg-elevated); color: var(--text-primary); }
.pagination .active { background: var(--primary-gradient); color: #fff; border: none; box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3); }

/* --- Alert --- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success { background: rgba(52, 199, 89, 0.1); color: var(--success); border: 1px solid rgba(52, 199, 89, 0.2); }
.alert-danger { background: rgba(255, 59, 48, 0.1); color: var(--danger); border: 1px solid rgba(255, 59, 48, 0.2); }
.alert-warning { background: rgba(255, 149, 0, 0.1); color: var(--warning); border: 1px solid rgba(255, 149, 0, 0.2); }
.alert-info { background: rgba(0, 122, 255, 0.1); color: var(--accent-blue); border: 1px solid rgba(0, 122, 255, 0.2); }

/* --- Filter Bar --- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: none;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}
.filter-bar .form-control { width: auto; min-width: 140px; }

/* --- Image Preview Modal --- */
.image-preview-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(45, 41, 38, 0.85);
    backdrop-filter: blur(8px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.image-preview-overlay.show { display: flex; }
.image-preview-overlay img { max-width: 90%; max-height: 90vh; object-fit: contain; border-radius: var(--radius-sm); }

/* --- Mobile Nav --- */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-nav-height);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
}
.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 12px;
    color: var(--text-muted);
    font-size: 11px;
    border-radius: var(--radius-sm);
    transition: color 0.15s;
    position: relative;
}
.mobile-nav-item i { font-size: 20px; }
.mobile-nav-item.active { color: var(--primary); }
.mobile-nav-center {
    background: var(--primary-gradient);
    color: #fff !important;
    border-radius: var(--radius-full);
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
    margin-top: -12px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}
.mobile-nav-center i { font-size: 18px; }
.mobile-nav-center span { display: none; }
.mobile-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 0 4px;
}

/* --- Footer --- */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 24px;
    margin-top: 60px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 24px; }
.footer-col h4 { font-size: 16px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.footer-col p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.footer-col a { display: block; font-size: 13px; color: var(--text-secondary); padding: 4px 0; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border-color); padding-top: 16px; text-align: center; font-size: 12px; color: var(--text-muted); }

/* --- Animations --- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* --- Responsive --- */
@media (max-width: 768px) {
    .navbar-menu { display: none; position: fixed; top: var(--navbar-height); left: 0; right: 0; background: var(--bg-card); border-bottom: 1px solid var(--border-color); flex-direction: column; padding: 16px; gap: 4px; }
    .navbar-menu.show { display: flex; animation: fadeInDown 0.2s; }
    .navbar-toggle { display: block; }
    .mobile-nav { display: flex; }
    .main-content { padding-bottom: calc(var(--mobile-nav-height) + 16px); }
    .site-footer { margin-bottom: var(--mobile-nav-height); }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 15px; }
    .member-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .chat-container { flex-direction: column; height: auto; }
    .chat-sidebar { width: 100%; max-height: 40vh; }
    .vip-plans { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .profile-cover { height: 140px; }
    .profile-avatar { width: 80px; height: 80px; }
    .profile-avatar-wrapper { bottom: -40px; }
    .profile-info { padding-top: 48px; }
    .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
    .filter-bar { flex-direction: column; }
    .filter-bar .form-control { width: 100%; }
}

@media (max-width: 480px) {
    .member-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .member-card { aspect-ratio: 2/3; }
    .login-card { padding: 32px 24px; }
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex-1 { flex: 1; }
.hidden { display: none !important; }
