/* BBS Styles */

/* Nav */
.top-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 24px; background: #1a1a2e; color: #eee;
  border-bottom: 1px solid #333;
}
.nav-brand a { color: #0ff; text-decoration: none; margin-right: 12px; }
.nav-brand a:hover { text-decoration: underline; }
.user-badge { background: #333; padding: 4px 12px; border-radius: 12px; font-size: 14px; margin-right: 8px; }
.btn-sm {
  background: transparent; border: 1px solid #555; color: #ccc;
  padding: 4px 12px; border-radius: 6px; cursor: pointer; font-size: 13px;
}
.btn-sm:hover { border-color: #0ff; color: #0ff; }

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

/* Category Tabs */
.category-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.cat-tab {
  background: #16213e; border: 1px solid #333; color: #aaa;
  padding: 6px 16px; border-radius: 16px; cursor: pointer; font-size: 14px;
  transition: all 0.2s;
}
.cat-tab:hover { border-color: #0ff; color: #0ff; }
.cat-tab.active { background: #0ff; color: #111; border-color: #0ff; font-weight: 600; }

/* Thread List */
.thread-list { display: flex; flex-direction: column; gap: 12px; }
.new-thread-btn {
  align-self: flex-end; margin-bottom: 8px;
  background: #0ff; color: #111; border: none; padding: 8px 20px;
  border-radius: 8px; cursor: pointer; font-size: 15px; font-weight: 600;
}
.new-thread-btn:hover { background: #0dd; }
.thread-card {
  background: #16213e; border: 1px solid #2a2a4a; border-radius: 10px;
  padding: 16px 20px; cursor: pointer; transition: all 0.2s;
}
.thread-card:hover { border-color: #0ff; transform: translateY(-1px); }
.thread-cat { font-size: 12px; color: #0ff; margin-bottom: 4px; }
.thread-title { margin: 4px 0; color: #eee; font-size: 16px; }
.thread-preview { color: #888; font-size: 14px; margin: 6px 0; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-meta { display: flex; gap: 12px; font-size: 12px; color: #666; margin-top: 8px; }
.thread-meta span::before { content: '· '; margin-right: -6px; }
.thread-meta span:first-child::before { content: ''; }
.empty { text-align: center; color: #666; padding: 40px; font-size: 16px; }

/* Thread Detail */
.thread-detail { background: #16213e; border-radius: 10px; padding: 24px; margin-bottom: 24px; }
.thread-cat-badge {
  display: inline-block; background: #0ff; color: #111;
  padding: 2px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; margin-bottom: 8px;
}
.thread-detail-title { color: #eee; margin: 8px 0 4px; font-size: 22px; }
.thread-body { color: #ccc; line-height: 1.7; margin-top: 16px; white-space: pre-wrap; }

/* Replies */
.replies-section { margin-top: 20px; }
.replies-section h3 { color: #aaa; margin-bottom: 16px; }
.reply-card {
  background: #1a1a2e; border: 1px solid #2a2a4a; border-radius: 8px;
  padding: 14px 18px; margin-bottom: 10px;
}
.reply-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.reply-author { color: #0ff; font-weight: 600; font-size: 14px; }
.reply-time { color: #555; font-size: 12px; }
.reply-body { color: #bbb; line-height: 1.6; white-space: pre-wrap; }

/* Reply Form */
.reply-form { margin-top: 20px; }
.reply-form textarea {
  min-height: 120px;
  width: 100%; background: #16213e; border: 1px solid #333; color: #ddd;
  padding: 12px; border-radius: 8px; font-size: 14px; resize: vertical;
  box-sizing: border-box;
}
.reply-form textarea:focus { outline: none; border-color: #0ff; }
.reply-form button { margin-top: 10px; }

/* Auth */
.auth-container { display: flex; justify-content: center; align-items: center; min-height: 70vh; }
.auth-card {
  background: #16213e; border: 1px solid #2a2a4a; border-radius: 12px;
  padding: 32px; width: 360px;
}
.auth-card h2 { color: #0ff; margin-bottom: 20px; text-align: center; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; color: #888; font-size: 13px; margin-bottom: 4px; }
.form-group input {
  width: 100%; background: #1a1a2e; border: 1px solid #333; color: #ddd;
  padding: 10px 12px; border-radius: 6px; font-size: 14px; box-sizing: border-box;
}
.form-group input:focus { outline: none; border-color: #0ff; }
.error-msg { color: #f55; font-size: 13px; margin-bottom: 12px; }
.auth-switch { text-align: center; margin-top: 16px; color: #666; font-size: 14px; }
.switch-link { color: #0ff; cursor: pointer; text-decoration: none; }

/* Modal */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.7); z-index: 1000; justify-content: center; align-items: center; }
.modal-content { background: #16213e; border-radius: 12px; padding: 24px; width: 500px; max-width: 90%; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-header h3 { color: #0ff; }
.close-btn { background: none; border: none; color: #888; font-size: 24px; cursor: pointer; }
.modal-body select, .modal-body input, .modal-body textarea {
  width: 100%; background: #1a1a2e; border: 1px solid #333; color: #ddd;
  padding: 10px 12px; border-radius: 6px; font-size: 14px; margin-bottom: 12px; box-sizing: border-box;
}
.modal-body textarea { resize: vertical; }
.modal-body select:focus, .modal-body input:focus, .modal-body textarea:focus { outline: none; border-color: #0ff; }

/* Buttons */
.btn-primary {
  background: #0ff; color: #111; border: none; padding: 10px 24px;
  border-radius: 8px; cursor: pointer; font-size: 15px; font-weight: 600;
  transition: background 0.2s;
}
.btn-primary:hover { background: #0dd; }
.hidden { display: none !important; }


/* ===== BBS Top Bar Layout ===== */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background: rgba(10,10,30,0.95);
  border-bottom: 1px solid #1a1a3e;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand a {
  color: #0ff;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
}
.bbs-top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bbs-top-right .lang-switcher {
  display: flex;
  gap: 4px;
  position: static;
  margin: 0;
}
.bbs-top-right .lang-switcher button {
  background: transparent;
  border: 1px solid #333;
  color: #888;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 3px;
  cursor: pointer;
}
.bbs-top-right .lang-switcher button.active,
.bbs-top-right .lang-switcher button:hover {
  border-color: #0ff;
  color: #0ff;
}
.user-badge { color: #0f0; font-weight: bold; font-size: 13px; }
.btn-sm {
  background: transparent; border: 1px solid #555; color: #ccc;
  padding: 4px 12px; font-size: 12px; border-radius: 4px; cursor: pointer;
}
.btn-sm:hover { border-color: #0ff; color: #0ff; }
