/* 爱情520 - 完整样式 v2.0 */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 15px; }

/* ===== Header ===== */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.logo h1 { font-size: 22px; }
.logo h1 a { color: #e74c3c; }
.main-nav { display: flex; align-items: center; gap: 5px; }
.main-nav a {
    padding: 8px 16px;
    color: #555;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.2s;
    position: relative;
}
.main-nav a:hover, .main-nav a.active { background: #fce4ec; color: #e74c3c; }
.badge-dot {
    position: absolute; top: 2px; right: 4px;
    width: 8px; height: 8px; background: #e74c3c; border-radius: 50%;
}
.btn-register { background: #e74c3c !important; color: #fff !important; }
.btn-register:hover { background: #c0392b !important; }

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #fff;
    text-align: center;
    padding: 80px 20px;
}
.hero h2 { font-size: 42px; margin-bottom: 15px; }
.hero p { font-size: 18px; margin-bottom: 30px; opacity: 0.9; }
.btn-hero {
    display: inline-block;
    padding: 14px 40px;
    background: #fff;
    color: #e74c3c;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s;
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(0,0,0,0.2); }

/* ===== Cards ===== */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    padding: 20px;
    margin-bottom: 16px;
}
.card-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; }

/* ===== Member Grid ===== */
.section-title { text-align: center; margin-bottom: 30px; font-size: 28px; }
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.member-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: all 0.3s;
}
.member-card:hover { transform: translateY(-3px); box-shadow: 0 5px 20px rgba(0,0,0,0.1); }
.member-avatar { width: 100%; height: 200px; overflow: hidden; position: relative; }
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-status {
    position: absolute; top: 8px; right: 8px;
    background: rgba(0,0,0,0.5); color: #fff;
    padding: 2px 8px; border-radius: 10px; font-size: 11px;
}
.verify-badge {
    display: inline-block; background: #2196F3; color: #fff;
    font-size: 11px; padding: 1px 6px; border-radius: 8px; margin-left: 4px;
}
.avatar-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 48px; color: #fff;
}
.avatar-placeholder.male { background: linear-gradient(135deg, #667eea, #764ba2); }
.avatar-placeholder.female { background: linear-gradient(135deg, #f093fb, #f5576c); }
.avatar-placeholder-sm {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #e74c3c; color: #fff; font-size: 18px;
}
.member-info { padding: 12px; }
.member-info h4 { font-size: 16px; margin-bottom: 4px; }
.member-info .member-city { color: #999; font-size: 13px; }
.member-info .member-tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
    display: inline-block; padding: 2px 8px; border-radius: 10px;
    font-size: 11px; background: #f0f0f0; color: #666;
}
.tag-vip { background: #fff3e0; color: #e65100; }
.tag-verified { background: #e3f2fd; color: #1565c0; }
.tag-gender-m { background: #e8eaf6; color: #3949ab; }
.tag-gender-f { background: #fce4ec; color: #c62828; }

/* ===== Auth Pages ===== */
.auth-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    padding: 20px;
}
.auth-box {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.auth-box h1 { text-align: center; margin-bottom: 5px; }
.auth-box h1 a { color: #e74c3c; font-size: 24px; }
.auth-box h2 { text-align: center; color: #666; font-size: 18px; margin-bottom: 25px; font-weight: normal; }

/* ===== Forms ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; color: #555; font-size: 14px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border 0.2s;
    background: #fff;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231,76,60,0.1);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .half { flex: 1; min-width: 120px; }
.input-group { display: flex; gap: 8px; }
.input-group input { flex: 1; }
.input-group .btn-code {
    white-space: nowrap; padding: 10px 16px;
    background: #f0f0f0; border: 1px solid #ddd; border-radius: 8px;
    font-size: 13px; cursor: pointer; color: #555;
}
.input-group .btn-code:disabled { color: #ccc; cursor: not-allowed; }
.form-hint { font-size: 12px; color: #999; margin-top: 4px; }
.form-checkbox { display: flex; align-items: center; gap: 8px; }
.form-checkbox input[type="checkbox"] { width: auto; }
.form-checkbox label { margin: 0; font-size: 13px; font-weight: normal; }

.btn-submit {
    width: 100%;
    padding: 12px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-submit:hover { background: #c0392b; }
.btn-submit:disabled { background: #ccc; cursor: not-allowed; }

.auth-link { text-align: center; margin-top: 18px; color: #888; font-size: 14px; }
.auth-link a { color: #e74c3c; }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #ffe0e0; color: #c0392b; }
.alert-success { background: #d4edda; color: #155724; }
.alert-info { background: #e3f2fd; color: #1565c0; }

/* ===== Buttons ===== */
.btn { display: inline-block; padding: 8px 20px; border-radius: 20px; font-size: 14px; border: none; cursor: pointer; transition: all 0.2s; }
.btn-primary { background: #e74c3c; color: #fff; }
.btn-primary:hover { background: #c0392b; }
.btn-outline { background: transparent; border: 1px solid #e74c3c; color: #e74c3c; }
.btn-outline:hover { background: #fce4ec; }
.btn-sm { padding: 5px 14px; font-size: 12px; }
.btn-block { width: 100%; text-align: center; }
.btn-secondary { background: #f0f0f0; color: #555; }
.btn-secondary:hover { background: #e0e0e0; }
.btn-like { background: #ffe0e0; color: #e74c3c; }
.btn-chat { background: #e3f2fd; color: #1976d2; }
.btn-danger { background: #ffebee; color: #c62828; }
.btn-success { background: #e8f5e9; color: #2e7d32; }

/* ===== Page Layout ===== */
.page-content { padding: 30px 0; min-height: 400px; }
.page-title { font-size: 24px; margin-bottom: 20px; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }

/* ===== Filters ===== */
.filter-bar {
    background: #fff; border-radius: 12px; padding: 16px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04); margin-bottom: 20px;
}
.filter-bar .filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filter-bar select, .filter-bar input {
    padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px;
    background: #fff;
}
.btn-search {
    padding: 8px 20px; background: #e74c3c; color: #fff; border: none; border-radius: 6px; cursor: pointer;
}
.no-results { text-align: center; color: #999; padding: 60px 20px; font-size: 16px; }

/* ===== Profile ===== */
.profile-header {
    display: flex; gap: 30px; background: #fff; border-radius: 12px;
    padding: 30px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); flex-wrap: wrap;
}
.profile-avatar-big { width: 150px; height: 150px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.profile-avatar-big img { width: 100%; height: 100%; object-fit: cover; }
.avatar-placeholder-big {
    width: 150px; height: 150px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 60px; color: #fff;
}
.avatar-placeholder-big.male { background: linear-gradient(135deg, #667eea, #764ba2); }
.avatar-placeholder-big.female { background: linear-gradient(135deg, #f093fb, #f5576c); }
.profile-detail { flex: 1; min-width: 200px; }
.profile-detail h2 { font-size: 24px; margin-bottom: 5px; }
.profile-basic-info { color: #888; margin-bottom: 12px; font-size: 14px; }
.profile-basic-info span { margin-right: 12px; }

.section-box { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.section-box h3 { font-size: 16px; margin-bottom: 12px; color: #333; font-weight: 600; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.info-item { font-size: 14px; }
.info-item .label { color: #999; margin-right: 6px; }

.profile-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.tags-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-item { padding: 4px 12px; border-radius: 14px; font-size: 13px; background: #f0f0f0; color: #555; }

/* ===== Tabs ===== */
.tabs { display: flex; border-bottom: 2px solid #eee; margin-bottom: 20px; }
.tabs a {
    padding: 10px 20px; color: #888; font-size: 14px;
    border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s;
}
.tabs a:hover, .tabs a.active { color: #e74c3c; border-bottom-color: #e74c3c; }

/* ===== Chat ===== */
.chat-header { display: flex; align-items: center; gap: 20px; margin-bottom: 15px; flex-wrap: wrap; }
.chat-box {
    background: #fff; border-radius: 12px; padding: 20px;
    height: 450px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 12px;
}
.chat-msg { max-width: 75%; }
.msg-self { align-self: flex-end; }
.msg-other { align-self: flex-start; }
.msg-bubble { padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.msg-self .msg-bubble { background: #e74c3c; color: #fff; border-bottom-right-radius: 4px; }
.msg-other .msg-bubble { background: #f0f0f0; color: #333; border-bottom-left-radius: 4px; }
.msg-time { font-size: 11px; color: #bbb; margin-top: 3px; }
.msg-self .msg-time { text-align: right; }
.chat-form { display: flex; gap: 10px; margin-top: 12px; }
.chat-form input {
    flex: 1; padding: 12px 16px; border: 1px solid #ddd; border-radius: 24px; font-size: 14px;
}
.chat-form button {
    padding: 12px 24px; background: #e74c3c; color: #fff;
    border: none; border-radius: 24px; cursor: pointer; font-size: 14px;
}

/* ===== Messages List ===== */
.conversations-list { background: #fff; border-radius: 12px; overflow: hidden; }
.conversation-item {
    display: flex; align-items: center; padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0; transition: background 0.2s;
}
.conversation-item:hover { background: #fafafa; }
.conv-avatar { margin-right: 12px; }
.conv-avatar img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.conv-info { flex: 1; display: flex; flex-direction: column; }
.conv-name { font-weight: 500; font-size: 15px; }
.conv-preview { color: #999; font-size: 13px; }
.unread-badge {
    background: #e74c3c; color: #fff;
    min-width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; padding: 0 4px;
}

/* ===== Moments ===== */
.moment-card { background: #fff; border-radius: 12px; padding: 16px 20px; margin-bottom: 16px; }
.moment-header { display: flex; align-items: center; margin-bottom: 10px; }
.moment-avatar { width: 36px; height: 36px; border-radius: 50%; margin-right: 10px; object-fit: cover; }
.moment-author { font-weight: 500; font-size: 14px; }
.moment-time { font-size: 12px; color: #999; margin-left: auto; }
.moment-content { font-size: 14px; line-height: 1.7; margin-bottom: 10px; white-space: pre-wrap; }
.moment-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.moment-images img { width: 100%; height: 150px; object-fit: cover; border-radius: 8px; }
.moment-actions { display: flex; gap: 20px; padding-top: 10px; border-top: 1px solid #f0f0f0; }
.moment-actions a { font-size: 13px; color: #888; cursor: pointer; }
.moment-actions a:hover { color: #e74c3c; }

/* ===== Notifications ===== */
.notif-list { background: #fff; border-radius: 12px; overflow: hidden; }
.notif-item {
    display: flex; align-items: flex-start; padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0; transition: background 0.2s;
}
.notif-item.unread { background: #fff8f8; }
.notif-item:hover { background: #fafafa; }
.notif-icon { margin-right: 12px; font-size: 20px; }
.notif-info { flex: 1; }
.notif-text { font-size: 14px; }
.notif-time { font-size: 12px; color: #999; margin-top: 2px; }

/* ===== Feature blocks ===== */
.features { padding: 60px 0; background: #fff; }
.features .container { display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; }
.feature-card { text-align: center; padding: 30px; border-radius: 10px; flex: 1; min-width: 200px; max-width: 300px; }
.feature-icon { font-size: 48px; margin-bottom: 15px; }
.feature-card h3 { margin-bottom: 8px; color: #333; }
.feature-card p { color: #888; font-size: 14px; }

/* ===== Members Section ===== */
.members-section { padding: 60px 0; }

/* ===== Footer ===== */
.site-footer {
    background: #333; color: #999;
    text-align: center; padding: 20px; font-size: 13px;
}

/* ===== Edit Profile ===== */
.edit-form { background: #fff; border-radius: 12px; padding: 25px; max-width: 700px; }
.edit-form .form-group { margin-bottom: 18px; }
.current-avatar { margin-bottom: 10px; }
.current-avatar img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.avatar-upload { position: relative; display: inline-block; }
.avatar-upload input[type="file"] { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; }

/* ===== Grid 2 cols ===== */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .two-col { grid-template-columns: 1fr; } }

/* ===== Admin ===== */
.admin-layout { display: flex; min-height: calc(100vh - 60px); }
.admin-sidebar {
    width: 220px; background: #2c3e50; color: #fff; padding: 20px 0; flex-shrink: 0;
}
.admin-sidebar a {
    display: block; padding: 10px 20px; color: rgba(255,255,255,0.7); font-size: 14px; transition: all 0.2s;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,0.1); color: #fff; }
.admin-sidebar .sidebar-title {
    padding: 10px 20px; font-size: 12px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 1px;
}
.admin-content { flex: 1; padding: 24px; background: #f5f6fa; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-header h2 { font-size: 20px; }

.data-table {
    width: 100%; background: #fff; border-radius: 8px; overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.data-table th, .data-table td { padding: 12px 16px; text-align: left; font-size: 13px; border-bottom: 1px solid #f0f0f0; }
.data-table th { background: #fafafa; font-weight: 600; color: #555; }
.data-table tr:hover td { background: #fafafa; }
.data-table .text-center { text-align: center; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.04); }
.stat-card .stat-num { font-size: 28px; font-weight: bold; color: #e74c3c; }
.stat-card .stat-label { font-size: 13px; color: #888; margin-top: 4px; }

/* Utility */
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #999; font-size: 13px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-10 { gap: 10px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Modal overlay */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 999; align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-box { background: #fff; border-radius: 12px; padding: 24px; max-width: 480px; width: 90%; max-height: 80vh; overflow-y: auto; }
.modal-box h3 { margin-bottom: 16px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero h2 { font-size: 28px; }
    .hero { padding: 50px 20px; }
    .profile-header { flex-direction: column; align-items: center; text-align: center; }
    .profile-actions { justify-content: center; }
    .member-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .admin-sidebar { width: 60px; }
    .admin-sidebar a { padding: 10px; text-align: center; font-size: 0; }
    .admin-sidebar a:before { font-size: 14px; }
    .filter-bar .filter-row { flex-direction: column; }
}
