/* ═══════════════════════════════════════════════════════════════
   去 Bug - Apple 风格共享样式
   ═══════════════════════════════════════════════════════════════ */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #fafafa;
  color: #1d1d1f;
  line-height: 1.6;
  min-height: 100vh;
}

/* Header */
header {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  color: #1d1d1f;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.logo span {
  color: #ff2d20;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #515154;
  text-decoration: none;
  border-radius: 20px;
  transition: background 0.2s, color 0.2s;
}

.nav-link:hover {
  background: #f5f5f7;
  color: #1d1d1f;
}

.nav-link.active {
  background: #1d1d1f;
  color: #fff;
}

.nav-link.active:hover {
  background: #424245;
}

.btn-submit-bug {
  background: #0071e3;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}
.btn-submit-bug:hover { background: #0077ed; }

.tagline {
  font-size: 13px;
  color: #86868b;
}

/* Hero */
.hero {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  text-align: center;
}

.hero h1 {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -1.5px;
  margin-bottom: 12px;
  color: #1d1d1f;
}

.hero p {
  font-size: 18px;
  color: #86868b;
  margin-bottom: 40px;
}

/* Page Header */
.page-header {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 24px 40px;
}

.page-header h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 8px;
  color: #1d1d1f;
}

.page-header p {
  font-size: 17px;
  color: #86868b;
}

/* Search */
.search-box {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.search-box input {
  width: 100%;
  height: 52px;
  padding: 0 52px 0 20px;
  font-size: 17px;
  border: 1.5px solid #d2d2d7;
  border-radius: 12px;
  outline: none;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
  border-color: #0071e3;
  box-shadow: 0 0 0 4px rgba(0,113,227,0.12);
}

.search-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #86868b;
  pointer-events: none;
}

/* Content */
.content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* Bug Card */
.bug-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}

.bug-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.bug-card.hidden {
  display: none;
}

.bug-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #ff2d20;
  margin-bottom: 8px;
}

.bug-problem {
  font-size: 17px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 4px;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
}

.bug-error {
  font-size: 13px;
  color: #86868b;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  background: #f5f5f7;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 16px;
}

/* Concept Card */
.concept-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}

.concept-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.concept-card .bug-category { color: #0071e3; }

.concept-tagline {
  font-size: 15px;
  color: #515154;
  margin: 6px 0 0 0;
}

.concept-features {
  margin-bottom: 16px;
}

.concept-features li {
  font-size: 14px;
  color: #1d1d1f;
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
  list-style: none;
}

.concept-features li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: #86868b;
}

.concept-when {
  background: #f5f5f7;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: #515154;
}

.concept-when strong { color: #1d1d1f; }

/* Expanded card details */
.bug-details {
  display: none;
  border-top: 1px solid #e5e5e5;
  padding-top: 20px;
  margin-top: 4px;
}

.bug-card.expanded .bug-details,
.concept-card.expanded .bug-details {
  display: block;
}

.section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #86868b;
  margin-bottom: 6px;
}

.section-cause {
  font-size: 15px;
  color: #1d1d1f;
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 3px solid #ff2d20;
}

.section-solution {
  margin-bottom: 20px;
}

.solution-code {
  background: #1d1d1f;
  color: #a3d9a3;
  padding: 14px 18px;
  border-radius: 8px;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 14px;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.7;
}

.solution-code .comment {
  color: #6a9955;
}

.solution-code .cmd {
  color: #9cdcfe;
}

.expand-hint {
  font-size: 12px;
  color: #86868b;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.expand-hint .arrow {
  transition: transform 0.2s;
}

.bug-card.expanded .expand-hint .arrow,
.concept-card.expanded .expand-hint .arrow {
  transform: rotate(180deg);
}

/* Forum Card */
.forum-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s, transform 0.15s;
}

.forum-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.forum-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.forum-author {
  font-size: 13px;
  color: #86868b;
}

.forum-date {
  font-size: 12px;
  color: #acacac;
}

.forum-title {
  font-size: 17px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 6px;
  text-decoration: none;
  cursor: pointer;
}

.forum-title:hover {
  color: #0071e3;
}

.forum-preview {
  font-size: 14px;
  color: #515154;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.forum-tags {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.forum-tag {
  font-size: 11px;
  font-weight: 500;
  color: #0071e3;
  background: rgba(0,113,227,0.1);
  padding: 3px 10px;
  border-radius: 12px;
}

/* No results */
.no-results {
  text-align: center;
  padding: 60px 0;
  color: #86868b;
  font-size: 15px;
  display: none;
}

.no-results.show {
  display: block;
}

/* Footer */
footer {
  text-align: center;
  padding: 32px 24px;
  color: #86868b;
  font-size: 13px;
  border-top: 1px solid #e5e5e5;
  margin-top: 40px;
}

footer a {
  color: #0071e3;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  padding: 32px;
  position: relative;
}
.modal-close {
  position: absolute;
  right: 20px;
  top: 20px;
  background: none;
  border: none;
  font-size: 24px;
  color: #86868b;
  cursor: pointer;
}
.modal-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.modal-desc { color: #86868b; font-size: 13px; margin-bottom: 24px; }

.form-field { margin-bottom: 16px; }
.form-label {
  font-size: 12px;
  font-weight: 600;
  color: #515154;
  margin-bottom: 6px;
  display: block;
}
.form-label .required { color: #ff3b30; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d2d2d7;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #fff;
  transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: #0071e3; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11px; color: #86868b; margin-top: 4px; }
.form-error { font-size: 12px; color: #ff3b30; margin-top: 4px; display: none; }

.form-category { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.cat-tag {
  padding: 6px 14px;
  border: 1.5px solid #d2d2d7;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.cat-tag:hover { border-color: #0071e3; }
.cat-tag.selected { background: #0071e3; color: #fff; border-color: #0071e3; }

.btn-submit {
  width: 100%;
  height: 46px;
  background: #0071e3;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}
.btn-submit:hover { background: #0077ed; }
.btn-submit:disabled { background: #a8c7e8; cursor: not-allowed; }

.filter-warning {
  background: #fff3e0;
  border: 1px solid #ffcc80;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #e65100;
  margin-bottom: 16px;
  display: none;
}
.filter-warning.show { display: block; }

.submit-success {
  text-align: center;
  padding: 40px 0;
}
.submit-success .icon { font-size: 56px; margin-bottom: 16px; }
.submit-success h3 { font-size: 20px; margin-bottom: 8px; }
.submit-success p { color: #86868b; font-size: 14px; }

/* Dict Index */
.dict-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  padding: 20px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
}

.dict-index-item {
  padding: 6px 12px;
  font-size: 13px;
  color: #515154;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s;
}

.dict-index-item:hover {
  background: #f5f5f7;
}

.dict-index-item.current {
  background: #0071e3;
  color: #fff;
}

/* Responsive */
@media (max-width: 600px) {
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 16px; }
  .page-header h1 { font-size: 28px; }
  .header-inner { height: 56px; padding: 0 12px; }
  .tagline { display: none; }
  .nav-link { padding: 6px 10px; font-size: 13px; }
  .btn-submit-bug { padding: 6px 12px; font-size: 12px; }
  .bug-card, .concept-card, .forum-card { padding: 20px; }
  .modal-box { padding: 24px 16px; }
  .hero { padding: 50px 16px 40px; }
  .page-header { padding: 40px 16px 30px; }
  .content { padding: 0 16px 60px; }
  .dict-index { padding: 12px; }
}
