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

    body {
      font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
      color: #000;
      background: #fff;
      line-height: 1.6;
      padding: 1.2rem;
      font-size: 16px;
    }

    a {
      color: #000;
      text-decoration: none;
      min-height: 44px;
      display: inline-flex;
      align-items: center;
    }

    a:hover {
      text-decoration: underline;
    }

    /* 顶部 */
    header {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin-bottom: 1.8rem;
      align-items: center;
      border-bottom: 1px solid #efefef;
    }

    .logo {
      font-size: 1.4rem;
      font-weight: bold;
    }
    
     .logo img {
      width: 90px;
      
    }
    .search {
      flex: 1;
      min-width: 80px;
    }

   /* 搜索框容器 */
.search-box {
    margin: 10px 0 20px;
}

/* 搜索表单 - 使用 Flex 布局 */
.search-form {
    display: flex;
    gap: 8px; /* 元素间距 */
    align-items: center;
    flex-wrap: wrap; /* 小屏自动换行 */
}

/* 搜索输入框 - 弹性增长，最小宽度保证可用性 */
.search-form input[type="text"] {
    flex: 1; /* 占据剩余空间 */
    min-width: 120px; /* 防止在极窄屏压缩到看不见 */
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px; /* iOS 避免小于 16px 触发缩放 */
    line-height: 1.4;
}

/* 搜索按钮 - 自动适配内容宽度 */
.search-form button {
    padding: 8px 16px;
    background: #010101;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap; /* 防止文字换行 */
    min-width: 60px; /* 保证最小点击区域 */
}

.search-form button:hover {
    background: #0056b3;
}

/* 取消搜索链接 - 小屏时显示在下一行 */
.cancel-search {
    font-size: 14px;
    margin-top: 8px; /* 换行时与上一行有间距 */
    text-decoration: underline;
    color: #555;
    align-self: flex-start; /* 左对齐 */
}

/* 超小屏优化（如 iPhone SE 320px 宽度） */
@media (max-width: 375px) {
    .search-form {
        gap: 6px;
    }
    
    .search-form input[type="text"] {
        font-size: 14px; /* 避免 iOS Safari 自动放大 */
        padding: 7px 10px;
    }
    
    .search-form button {
        padding: 7px 12px;
        font-size: 13px;
    }
}
    /* 网站统计 */
    .stats-bar {
      margin: 16px 0;
      padding: 2px;
      background: #f9f9f9;
      border-radius: 6px;
      font-size: 14px;
      color: #555;
      text-align: center;
    }

    /* 分页 */
    .pagination { 
      text-align: center; 
      margin: 20px 0; 
    }
    .pagination a, .pagination span { 
      display: inline-block;  
      margin: 0 2px; 
      text-decoration: none; 
      border: 1px solid #020202;
      padding: 2px 10px;
      color: #000;
      border-radius: 3px;
      min-height: 2px;
    margin: 2px;
    }
    .pagination .current { 
      background: #0073aa; 
      color: white; 
    }

    /* 帖子区 */
    .posts h1 {
      font-size: 1.1rem;
      color: #666;
      margin-bottom: 0.4rem;
      font-weight: normal;
    }

    .post {
      padding-bottom: 0.4rem;
      margin-bottom: 0.4rem;
      border-bottom: 1px solid #eee;
    }

    .post:last-child {
      border-bottom: none;
      margin-bottom: 0;
      padding-bottom: 0;
    }

    .post-title {
      font-size: 14px;
      margin-bottom: 6px;
      line-height: 1.4;
      font-weight: 600;
    }
    
    .post-title a {
      min-height: 20px;
    }

    .post-meta {
      font-size: 0.75rem;
      color: #777;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }
    
    .post-meta img {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      object-fit: cover;
      border: 1px solid #ddd;
    }

    .post-stats {
      margin-left: auto;
      white-space: nowrap;
      font-size: 10px;
    }

    @media (min-width: 768px) {
      body {
        max-width: 800px;
        margin: 0 auto;
        padding: 2rem;
      }
      .post-meta {
        justify-content: space-between;
      }
    }

    footer {
      margin-top: 0.5rem;
      padding-top: 0.5rem;
      border-top: 1px solid #eee;
      color: #888;
      font-size: 0.9rem;
      text-align: center;
    }

    /* 用户下拉菜单 */
    .user-dropdown {
        position: relative;
        display: inline-block;
        margin: 10px 0;
    }
    .user-button {
        background: none;
        border: none;
        font-size: 16px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 4px 8px;
        border-radius: 4px;
    }
    .user-button img {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        object-fit: cover;
        border: 1px solid #ddd;
    }
    .dropdown-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: white;
        border: 1px solid #eee;
        border-radius: 6px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        min-width: 160px;
        z-index: 1000;
        margin-top: 4px;
    }
    .dropdown-menu a {
        display: block;
        padding: 10px 16px;
        color: #333;
        text-decoration: none;
    }
    .dropdown-menu a:hover {
        background-color: #f9f9f9;
    }
    .dropdown-menu a.logout {
        color: #d32f2f;
        border-top: 1px solid #f5f5f5;
    }
    .user-dropdown:hover .dropdown-menu,
    .user-button:focus + .dropdown-menu,
    .dropdown-menu:focus-within {
        display: block;
    }

    /* 搜索提示 */
    .search-hint {
        margin-bottom: 12px;
        color: #555;
        font-size: 0.9rem;
        padding: 6px 0;
        text-align: center;
    }
    .search-hint a {
        font-size: 0.9em;
        margin-left: 8px;
    }