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

body {
  font-family: "Helvetica Neue", Helvetica, Arial, "Hiragino Sans GB", "Hiragino Sans GB W3", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: #111;
  background: #f6f6f1;
}

a {
  color: #37a;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Navbar */
.navbar {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  padding: 0 20px;
  height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand a {
  font-size: 20px;
  font-weight: bold;
  color: #072;
}

.navbar-menu {
  display: flex;
  gap: 20px;
}

.navbar-menu a {
  color: #072;
}

/* Container */
.container {
  max-width: 990px;
  margin: 0 auto;
  padding: 20px 0;
}

/* Grid Layout */
.grid {
  display: flex;
  gap: 20px;
}

.grid-3 {
  display: flex;
  gap: 20px;
}

.grid-3 > :first-child {
  flex: 1;
}

.grid-3 > :last-child {
  width: 270px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .grid, .grid-3 {
    flex-direction: column;
  }
  .grid-3 > :last-child {
    width: 100%;
  }
}

/* Cards - 豆瓣风格 */
.card {
  background: #fff;
  border: 1px solid #e8e8e8;
  margin-bottom: 10px;
  padding: 15px;
}

.card-title {
  font-size: 14px;
  font-weight: normal;
  margin-bottom: 5px;
}

.card-title a {
  color: #37a;
}

.card-title a:hover {
  color: #072;
}

.card-meta {
  color: #999;
  font-size: 12px;
}

/* Topic Header in Card */
.topic-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
}

.topic-header .avatar-sm {
  width: 24px;
  height: 24px;
}

/* Sidebar - 豆瓣风格 */
.sidebar {
  background: #faf9f5;
  border: 1px solid #e8e8e8;
  margin-bottom: 10px;
}

.sidebar-title {
  font-size: 14px;
  font-weight: bold;
  padding: 10px 15px;
  background: #f0efe8;
  border-bottom: 1px solid #e8e8e8;
  color: #072;
}

.sidebar-list {
  list-style: none;
  padding: 10px 15px;
}

.sidebar-list li {
  padding: 5px 0;
  border-bottom: 1px dotted #e8e8e8;
  font-size: 13px;
}

.sidebar-list li:last-child {
  border-bottom: none;
}

.sidebar-list a {
  color: #37a;
}

/* Buttons - 豆瓣风格 */
.btn {
  display: inline-block;
  padding: 5px 15px;
  border: 1px solid #c7deb8;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  background: linear-gradient(to bottom, #fff 0%, #f0f0f0 100%);
  color: #072;
}

.btn:hover {
  text-decoration: none;
  background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 100%);
}

.btn-primary {
  background: linear-gradient(to bottom, #64c83c 0%, #3ba726 100%);
  border-color: #3ba726;
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(to bottom, #5ab835 0%, #349920 100%);
}

/* Forms */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #666;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  font-size: 13px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #9bc07d;
  outline: none;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

/* Avatar */
.avatar, .avatar-sm, .avatar-xs, .avatar-lg {
  border-radius: 0;
  object-fit: cover;
}

.avatar {
  width: 48px;
  height: 48px;
}

.avatar-sm {
  width: 32px;
  height: 32px;
}

.avatar-xs {
  width: 24px;
  height: 24px;
}

.avatar-lg {
  width: 64px;
  height: 64px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 30px;
  color: #999;
  font-size: 12px;
}

/* Topic Detail - 豆瓣风格 */
.topic-detail {
  background: #fff;
  border: 1px solid #e8e8e8;
}

.topic-detail .topic-header {
  padding: 15px;
  border-bottom: 1px solid #e8e8e8;
  margin-bottom: 0;
}

.topic-group {
  color: #666;
  font-size: 12px;
}

.topic-group:hover {
  color: #072;
}

.group-icon-sm {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 5px;
}

.topic-title {
  font-size: 22px;
  font-weight: normal;
  padding: 20px 15px 10px;
  color: #007722;
}

.topic-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 15px 15px;
  color: #999;
  font-size: 12px;
  border-bottom: 1px solid #e8e8e8;
}

.topic-author {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #37a;
}

.topic-date {
  color: #999;
}

.topic-content {
  padding: 20px 15px;
  line-height: 1.8;
  color: #333;
  border-bottom: 1px solid #e8e8e8;
}

.topic-content p {
  margin-bottom: 10px;
}

/* Comments - 豆瓣风格 */
.comments-section {
  padding: 15px;
}

.comments-section h2 {
  font-size: 14px;
  font-weight: bold;
  color: #072;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8e8e8;
}

.comment-form {
  margin-bottom: 20px;
  padding: 15px;
  background: #faf9f5;
  border: 1px solid #e8e8e8;
}

.comment-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  font-size: 13px;
  margin-bottom: 10px;
}

.comment-list {
  margin-top: 15px;
}

.comment-item {
  padding: 15px 0;
  border-bottom: 1px solid #e8e8e8;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.comment-author {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #37a;
  font-size: 13px;
}

.comment-date {
  color: #999;
  font-size: 12px;
  margin-left: auto;
}

.comment-content {
  color: #333;
  line-height: 1.7;
  padding-left: 34px;
}

.login-hint {
  color: #999;
  padding: 15px;
  background: #faf9f5;
  border: 1px solid #e8e8e8;
  margin-bottom: 15px;
}

.login-hint a {
  color: #072;
}

.no-comments {
  color: #999;
  text-align: center;
  padding: 30px;
}

/* Group Detail - 豆瓣风格 */
.group-detail {
  background: #fff;
  border: 1px solid #e8e8e8;
}

.group-header {
  display: flex;
  gap: 15px;
  padding: 20px;
  background: #faf9f5;
  border-bottom: 1px solid #e8e8e8;
}

.group-icon {
  width: 80px;
  height: 80px;
}

.group-info {
  flex: 1;
}

.group-info h1 {
  font-size: 20px;
  font-weight: normal;
  color: #072;
  margin-bottom: 8px;
}

.group-description {
  color: #666;
  font-size: 13px;
  margin-bottom: 10px;
  line-height: 1.6;
}

.group-meta {
  display: flex;
  gap: 20px;
  color: #999;
  font-size: 12px;
}

.group-actions {
  display: flex;
  align-items: flex-start;
}

.member-badge {
  background: #faf9f5;
  border: 1px solid #c7deb8;
  color: #072;
  padding: 5px 15px;
  font-size: 12px;
}

.group-content {
  padding: 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8e8e8;
}

.section-header h2 {
  font-size: 14px;
  font-weight: bold;
  color: #072;
}

.topic-list {
  display: flex;
  flex-direction: column;
}

.topic-item {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px dotted #e8e8e8;
}

.topic-item:last-child {
  border-bottom: none;
}

.topic-info {
  flex: 1;
}

.topic-info h3 {
  font-size: 14px;
  font-weight: normal;
  margin-bottom: 3px;
}

.topic-info h3 a {
  color: #37a;
}

.topic-info h3 a:hover {
  color: #072;
}

.topic-info .topic-meta {
  display: flex;
  gap: 10px;
  padding: 0;
  border: none;
  color: #999;
  font-size: 12px;
}

.no-content {
  color: #999;
  text-align: center;
  padding: 40px;
}

/* Home Page Specific */
.main-content h2 {
  font-size: 14px;
  font-weight: bold;
  color: #072;
  padding-bottom: 10px;
  margin-bottom: 15px;
  border-bottom: 1px solid #e8e8e8;
}

/* User Profile - 豆瓣风格 */
.user-profile {
  background: #fff;
  border: 1px solid #e8e8e8;
}

.profile-header {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: #faf9f5;
  border-bottom: 1px solid #e8e8e8;
}

.profile-info h1 {
  font-size: 20px;
  font-weight: normal;
  color: #072;
  margin-bottom: 5px;
}

.profile-username {
  color: #999;
  font-size: 13px;
  margin-bottom: 10px;
}

.profile-bio {
  color: #666;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 10px;
}

.profile-meta {
  color: #999;
  font-size: 12px;
}

.profile-content {
  padding: 20px;
}

.profile-section {
  margin-bottom: 25px;
}

.profile-section h2 {
  font-size: 14px;
  font-weight: bold;
  color: #072;
  padding-bottom: 10px;
  margin-bottom: 15px;
  border-bottom: 1px solid #e8e8e8;
}

.topic-simple-list,
.comment-simple-list {
  list-style: none;
}

.topic-simple-list li,
.comment-simple-list li {
  padding: 8px 0;
  border-bottom: 1px dotted #e8e8e8;
}

.topic-simple-list li:last-child,
.comment-simple-list li:last-child {
  border-bottom: none;
}

.topic-simple-list a {
  color: #37a;
}

.topic-simple-list .meta,
.comment-simple-list .meta {
  color: #999;
  font-size: 12px;
  margin-left: 10px;
}

.comment-preview {
  color: #666;
  font-size: 13px;
  margin-bottom: 5px;
}

/* New Topic Page */
.new-topic-page {
  background: #fff;
  border: 1px solid #e8e8e8;
  padding: 20px;
}

.page-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e8e8e8;
}

.page-header h1 {
  font-size: 18px;
  font-weight: normal;
  color: #072;
  margin-bottom: 5px;
}

.page-subtitle {
  color: #999;
  font-size: 13px;
}

.topic-form .form-group {
  margin-bottom: 20px;
}

.topic-form label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: bold;
}

.topic-form input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  font-size: 14px;
}

.topic-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  font-size: 14px;
  min-height: 200px;
}

.topic-form input:focus,
.topic-form textarea:focus {
  border-color: #9bc07d;
  outline: none;
}

.form-actions {
  display: flex;
  gap: 10px;
}

/* Topic Table - 豆瓣风格 */
.topic-table {
  width: 100%;
  border-collapse: collapse;
}

.topic-table th {
  text-align: left;
  font-size: 12px;
  font-weight: normal;
  color: #999;
  padding: 8px 0;
  border-bottom: 1px solid #e8e8e8;
}

.topic-table td {
  padding: 10px 0;
  border-bottom: 1px dotted #e8e8e8;
  vertical-align: middle;
}

.topic-table tr:last-child td {
  border-bottom: none;
}

.topic-table-title {
  width: auto;
}

.topic-table-title a {
  color: #37a;
  font-size: 14px;
}

.topic-table-title a:hover {
  color: #072;
}

.topic-table-author {
  width: 100px;
  text-align: center;
}

.topic-table-author a {
  color: #666;
  font-size: 12px;
}

.topic-table-count {
  width: 50px;
  text-align: center;
  color: #999;
  font-size: 12px;
}

.topic-table-date {
  width: 100px;
  text-align: right;
  color: #999;
  font-size: 12px;
}

@media (max-width: 768px) {
  .topic-table-author,
  .topic-table-count {
    display: none;
  }

  .topic-table th:nth-child(2),
  .topic-table th:nth-child(3) {
    display: none;
  }
}
