:root {
  --primary-green: #059669;
  --primary-emerald: #10b981;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-color: #e2e8f0;
  --bg-light: #f8fafc;
  --card-shadow: 0 10px 15px -3px rgb(15 23 42 / 0.08), 0 4px 6px -4px rgb(15 23 42 / 0.08);
}

/* 基础重置 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  margin: 0;
  padding: 0;
  background: #f1f5f9;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 主容器 - 模拟手机屏幕 */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-light);
  position: relative;
  padding-bottom: 72px; /* 为底部导航留出空间 */
  box-shadow: 0 0 30px rgba(15, 23, 42, 0.1);
  overflow-x: hidden;
}

/* 顶部状态栏 */
.status-bar {
  background: #ffffff;
  padding: 10px 20px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* App 头部 */
.app-header {
  background: #ffffff;
  padding: 14px 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 40;
}

.app-header .title-area h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0;
  color: #0f172a;
}

.app-header .title-area p {
  font-size: 11px;
  color: #059669;
  font-weight: 600;
  margin: -2px 0 0;
}

/* 搜索框 */
.search-wrapper {
  position: relative;
  width: 148px;
}

.search-wrapper input {
  width: 100%;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 8px 14px 8px 36px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.search-wrapper input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.search-wrapper .search-icon {
  position: absolute;
  left: 14px;
  top: 9px;
  color: #94a3b8;
  pointer-events: none;
}

/* 主内容区域 */
.main-content {
  padding: 20px 16px 24px;
}

/* 分区标题 */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 2px;
}

.section-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.3px;
}

.section-header .more-link {
  font-size: 12px;
  color: #059669;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 2px;
}

.section-header .more-link:active {
  opacity: 0.7;
}

/* 6个大按钮网格 */
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* 游戏/功能卡片 */
.game-card {
  display: block;
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e2e8f0;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.game-card:active {
  transform: scale(0.96);
  box-shadow: 0 4px 6px -1px rgb(15 23 42 / 0.1), 
              0 2px 4px -2px rgb(15 23 42 / 0.1);
}

/* 卡片顶部彩色区域 */
.game-card .card-header {
  height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.game-card .card-header .icon {
  font-size: 52px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
  transition: transform 0.3s ease;
}

.game-card:active .card-header .icon {
  transform: scale(0.9);
}

/* 卡片底部文字区域 */
.game-card .card-body {
  padding: 14px 16px 15px;
}

.game-card .card-body .title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.3px;
  margin: 0 0 3px;
}

.game-card .card-body .subtitle {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  margin: 0;
}

/* 卡片徽章 */
.game-card .badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.95);
  color: #dc2626;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  letter-spacing: 0.5px;
}

.game-card .badge.hot {
  color: #d97706;
}

/* 社区动态区 */
.community-feed {
  margin-top: 32px;
}

.feed-item {
  background: #ffffff;
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgb(15 23 42 / 0.05);
  cursor: pointer;
  transition: background-color 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.feed-item:active {
  background-color: #f8fafc;
}

.feed-item .avatar {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #e0e7ff;
}

.feed-item .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feed-item .content {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.feed-item .content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.feed-item .group-name {
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
}

.feed-item .tag {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: #d1fae5;
  color: #059669;
  margin-left: 6px;
}

.feed-item .time {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}

.feed-item .post-text {
  font-size: 14px;
  color: #334155;
  line-height: 1.45;
  margin: 4px 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-item .meta {
  font-size: 12px;
  color: #64748b;
}

.feed-item .meta .author {
  color: #059669;
  font-weight: 600;
}

/* 查看更多按钮 */
.view-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 9999px;
  text-decoration: none;
  margin-top: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: all 0.2s ease;
}

.view-more-btn:active {
  background: #f1f5f9;
  transform: translateY(1px);
}

/* 底部导航栏 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0 6px;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  width: 48px;
  padding: 2px 0;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav a:active {
  color: #334155;
}

.bottom-nav a.active,
.bottom-nav a:first-child {
  color: #059669;
  font-weight: 700;
}

.bottom-nav a .nav-icon {
  font-size: 22px;
  margin-bottom: 1px;
  line-height: 1;
}

.bottom-nav a .nav-label {
  font-size: 10px;
  line-height: 1;
}

/* 工具类 */
.text-emerald-600 { color: #059669; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* 响应式微调 */
@media (max-width: 360px) {
  .game-card .card-header {
    height: 108px;
  }
  .game-card .card-body .title {
    font-size: 15.5px;
  }
}