/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #2e2e2e;
  color: white;
  text-align: center;
  margin: 0;
  padding: 20px;
}

/* 主容器 */
.container {
  max-width: 90%;
  margin: auto;
  background: #333;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
  font-size: 24px;
  margin-bottom: 20px;
}

/* 标签按钮 */
.tab-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.tab-buttons button {
  background-color: #555;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}
.tab-buttons button:hover {
  background-color: #777;
}

/* iframe 内容区 */
.tab-content {
  display: none;
  width: 100%;
  min-height: 2000px;
  border: none;
}
.tab-content.active {
  display: block;
}

/* 登录区 */
#auth-container {
  margin-bottom: 20px;
}
#logout-btn {
  display: none;
  background-color: red;
}

/* 留言板容器 */
#comment-section {
  max-width: 90%;
  margin: 40px auto;
  padding: 20px;
  background: #333;
  border: 1px solid #444;
  border-radius: 8px;
  text-align: left;
}
#comment-section h2 {
  font-size: 1.5em;
  margin-bottom: 16px;
  border-bottom: 1px solid #444;
  padding-bottom: 8px;
}

/* 评论列表 */
ol.comment-list,
ol.children {
  list-style: none;
  padding: 0;
  margin: 0;
}
ol.comment-list > li.comment {
  padding: 16px 0;
  border-bottom: 1px solid #444;
}
ol.comment-list > li.comment:last-child {
  border-bottom: none;
}
ol.comment-list > li > ol.children {
  padding-left: 2em;
}
ol.comment-list > li > ol.children > li.comment {
  padding: 16px 0;
  border-bottom: none;
}

.comment-main {
  display: flex;
  align-items: flex-start;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1em;
  margin-right: 16px;
  flex-shrink: 0;
}
.comment-body {
  flex: 1;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.9em;
  color: #ccc;
  margin-bottom: 8px;
}
.comment-actions span {
  margin-left: 12px;
  cursor: pointer;
  color: #64b5f6;
}
.comment-quote-tag {
  font-style: italic;
  color: #aaa;
  margin-bottom: 8px;
}
.comment-content {
  margin-bottom: 12px;
}

/* 回覆表单 */
#respond-container {
  margin-top: 24px;
}
#respond {
  border-top: 1px solid #444;
  padding-top: 16px;
}
#respond input[type="text"],
#respond textarea {
  width: 100%;
  padding: 8px;
  margin-bottom: 12px;
  background: #2e2e2e;
  border: 1px solid #444;
  color: white;
  border-radius: 4px;
}
#respond button {
  padding: 8px 16px;
  background: #64b5f6;
  border: none;
  color: #121212;
  cursor: pointer;
  border-radius: 4px;
}
#cancel-reply {
  margin-left: 12px;
  background: #e57373;
}

/* RWD 响应式设计 */
@media (max-width: 900px) {
  .container {
    max-width: 100%;
    padding: 10px;
  }
  .tab-buttons button {
    font-size: 14px;
    padding: 8px 10px;
  }
  #comment-section {
    max-width: 100%;
    padding: 10px;
  }
}

@media (max-width: 600px) {
  body {
    padding: 5px;
  }
  .container {
    max-width: 100vw;
    padding: 5px;
    border-radius: 0;
  }
  h1 {
    font-size: 18px;
  }
  .tab-buttons {
    gap: 5px;
  }
  .tab-buttons button {
    font-size: 12px;
    padding: 6px 6px;
  }
  .tab-content {
    min-height: 400px;
  }
  #comment-section {
    padding: 10px;
    margin: 20px auto;
  }
}
