/* ============================================================
   拒绝宅 - 主样式表 (移动端优先 / 微信生态适配)
   ============================================================ */

:root {
    --primary: #4CAF50;
    --primary-dark: #388E3C;
    --primary-light: #C8E6C9;
    --danger: #f44336;
    --warning: #FF9800;
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --text: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border: #e0e0e0;
    --radius: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --max-width: 1100px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

a { color: var(--primary); text-decoration: none; }

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-size: 20px;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
}
.header-nav { display: flex; gap: 4px; }
.header-nav a {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s;
}
.header-nav a:hover,
.header-nav a.active { background: rgba(255,255,255,0.2); color: white; }

/* Search */
.search-section {
    background: var(--card-bg);
    padding: 16px;
    border-bottom: 1px solid var(--border);
}
.search-form {
    display: flex;
    gap: 8px;
    max-width: var(--max-width);
    margin: 0 auto;
}
.search-input {
    flex: 1;
    height: 42px;
    padding: 0 16px;
    border: 2px solid var(--border);
    border-radius: 21px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    background: var(--bg);
}
.search-input:focus { border-color: var(--primary); }
.search-btn {
    height: 42px;
    padding: 0 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 21px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.search-btn:active { background: var(--primary-dark); }

.filter-tags {
    max-width: var(--max-width);
    margin: 12px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.filter-label { font-size: 13px; color: var(--text-muted); flex-shrink: 0; }
.filter-tag {
    font-size: 13px;
    padding: 4px 12px;
    background: var(--bg);
    border-radius: 14px;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.filter-tag.active,
.filter-tag:hover { background: var(--primary); color: white; }

/* Main */
.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px;
}

.section { margin-bottom: 28px; }
.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Activity Grid (热门) */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.activity-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.activity-card:active { transform: scale(0.98); }
.card-badge {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 0 var(--radius) 0 var(--radius);
    color: white;
    font-weight: 600;
}
.card-badge.hot { background: var(--danger); }
.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-meta {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.meta-tag {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}
.card-location {
    font-size: 13px;
    color: var(--text-secondary);
}
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: auto;
}
.card-arrow { font-size: 18px; color: var(--primary); }

/* Activity List (最新) */
.activity-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s;
}
.activity-item:active { transform: scale(0.99); }
.item-main { flex: 1; min-width: 0; }
.item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.item-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.item-right {
    text-align: right;
    flex-shrink: 0;
    margin-left: 12px;
}
.item-location {
    font-size: 13px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 4px;
}
.item-count {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-text { color: var(--text-muted); margin-bottom: 16px; font-size: 15px; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:active { background: var(--primary-dark); transform: scale(0.97); }

/* Sort Tabs */
.sort-tab {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    color: var(--text-muted);
    background: var(--bg);
    transition: all 0.2s;
}
.sort-tab.active { background: var(--primary); color: white; }

/* Pagination */
.page-btn {
    padding: 8px 16px;
    background: var(--card-bg);
    border-radius: 20px;
    font-size: 13px;
    color: var(--primary);
    box-shadow: var(--shadow);
    transition: background 0.2s;
}
.page-btn:hover { background: var(--primary-light); }

/* Footer */
.site-footer {
    text-align: center;
    padding: 24px 16px 40px;
    color: var(--text-muted);
    font-size: 13px;
}
.footer-sub {
    font-size: 12px;
    margin-top: 4px;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 640px) {
    .activity-grid { grid-template-columns: 1fr; }
    .activity-card { padding: 14px; }
    .card-title { font-size: 14px; }
}

@media (min-width: 641px) and (max-width: 900px) {
    .activity-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 901px) {
    .activity-grid { grid-template-columns: repeat(3, 1fr); }
    .activity-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .activity-list .activity-item { margin-bottom: 0; }
}
