* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --blue: #1a6dd4;
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --text2: #515154;
  --text3: #86868b;
  --border: rgba(0,0,0,0.06);
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.app {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Header --- */
.app-header {
  text-align: center;
  padding: 40px 20px 24px;
}
.app-header .logo {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--blue);
  margin-bottom: 8px;
}
.app-header h1 {
  font-size: 24px;
  font-weight: 700;
}
.app-header .subtitle {
  font-size: 13px;
  color: var(--text3);
  margin-top: 4px;
}

/* --- Briefing List --- */
.briefing-list {
  flex: 1;
  padding: 0 16px 24px;
}
.briefing-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 10px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
}
.briefing-card:active {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.briefing-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.briefing-title {
  font-size: 16px;
  font-weight: 600;
}
.briefing-meta {
  font-size: 11px;
  color: var(--text3);
  white-space: nowrap;
}
.briefing-date {
  font-size: 12px;
  color: var(--text3);
  margin-top: 6px;
}
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text3);
}
.empty-state .hint { font-size: 13px; margin-top: 8px; }

/* --- Briefing Detail Header --- */
.briefing-header {
  text-align: center;
  padding: 20px 20px 24px;
  border-bottom: 1px solid var(--border);
}
.back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--blue);
  text-decoration: none;
  margin-bottom: 12px;
}
.header-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--blue);
  margin-bottom: 8px;
}
.briefing-header h1 {
  font-size: 28px;
  font-weight: 700;
}
.briefing-header .date {
  font-size: 13px;
  color: var(--text3);
  margin-top: 4px;
}
.stats-row {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 16px;
  background: rgba(26,109,212,0.04);
  border-radius: 10px;
  padding: 12px;
}
.stat { text-align: center; }
.stat-num { font-size: 20px; font-weight: 700; color: var(--blue); display: block; }
.stat-label { font-size: 11px; color: var(--text3); }

/* --- News Cards --- */
.item-list {
  padding: 16px 16px 8px;
}
.news-card {
  display: block;
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid #ccc;
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 22px;
  margin-bottom: 0;
  text-decoration: none;
  color: inherit;
}
.news-card:first-child { margin-top: 10px; }

/* Border colors by tag */
.border-模型 { border-left-color: #7c3aed; }
.border-行业 { border-left-color: #b45309; }
.border-进展 { border-left-color: #047857; }
.border-安全 { border-left-color: #dc2626; }
.border-融资 { border-left-color: #be185d; }
.border-政策 { border-left-color: #4338ca; }
.border-工具 { border-left-color: #0e7490; }
.border-观点 { border-left-color: #4b5563; }
.border-产品 { border-left-color: #0e7490; }
.border-开源 { border-left-color: #0e7490; }
.border-榜单 { border-left-color: #047857; }

/* Tag tabs */
.news-tab {
  position: absolute;
  top: -13px;
  left: -1px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 12px 4px;
  border-radius: 6px 6px 0 0;
  letter-spacing: 0.5px;
}
.tag-模型 { background: #ede9fe; color: #6d28d9; }
.tag-行业 { background: #fef3c7; color: #92400e; }
.tag-进展 { background: #d1fae5; color: #065f46; }
.tag-安全 { background: #fee2e2; color: #b91c1c; }
.tag-融资 { background: #fce7f3; color: #9d174d; }
.tag-政策 { background: #e0e7ff; color: #3730a3; }
.tag-工具 { background: #cffafe; color: #155e75; }
.tag-观点 { background: #f3f4f6; color: #374151; }
.tag-产品 { background: #cffafe; color: #155e75; }
.tag-开源 { background: #cffafe; color: #155e75; }
.tag-榜单 { background: #d1fae5; color: #065f46; }

.news-seq {
  font-size: 17px;
  font-weight: 800;
  color: var(--blue);
  margin-right: 5px;
}
.news-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}
.news-desc {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.8;
  margin-top: 8px;
}

/* --- Action Bar --- */
.action-bar {
  padding: 16px;
  display: flex;
  gap: 10px;
  justify-content: center;
}
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  flex: 1;
  max-width: 160px;
}
.btn-download {
  background: var(--blue);
  color: #fff;
}
.btn-action svg {
  width: 15px;
  height: 15px;
  margin-right: 5px;
  flex-shrink: 0;
  vertical-align: -2px;
  display: inline-block;
}
.btn-download svg { fill: #fff; }
.btn-share svg { fill: var(--text2); }
.btn-share {
  background: #f0f0f2;
  color: var(--text);
}
.btn-share:active {
  background: #e4e4e7;
}
/* Toast */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 13px;
  padding: 10px 24px;
  border-radius: 20px;
  z-index: 200;
  animation: toastIn 0.2s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* --- Article Detail --- */
.article-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.article-header h1 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  margin-top: 10px;
}
.tag-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  margin-top: 8px;
}
.section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text3);
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.article-desc {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
}
.disclaimer {
  font-size: 11px;
  color: var(--text3);
  margin-top: 10px;
  font-style: italic;
}
.context-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text2);
}
.source-link {
  display: inline-block;
  font-size: 14px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}

/* Q&A */
.qa-item {
  margin-bottom: 16px;
}
.qa-q {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.qa-a {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
  padding-left: 12px;
  border-left: 2px solid var(--blue);
}
.qa-input-wrap {
  display: flex;
  gap: 8px;
}
.qa-input-wrap input {
  flex: 1;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
}
.qa-input-wrap input:focus {
  border-color: var(--blue);
}
.qa-input-wrap button {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.qa-answer-box {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  padding: 14px;
  background: rgba(26,109,212,0.04);
  border-radius: 8px;
}
.qa-answer-box p { margin-bottom: 8px; }
.qa-answer-box p:last-child { margin-bottom: 0; }
.qa-answer-box strong { color: var(--blue); }
.qa-answer-box ul, .qa-answer-box ol { padding-left: 18px; margin-bottom: 8px; }
.qa-answer-box li { margin-bottom: 4px; }
.qa-answer-box code {
  background: rgba(0,0,0,0.06);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 13px;
}
.qa-answer-box pre {
  background: #1d1d1f;
  color: #e0e0e0;
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 12px;
  margin: 8px 0;
}
.qa-answer-box pre code {
  background: none;
  padding: 0;
  color: inherit;
}
.thinking {
  color: var(--text3);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- History Section --- */
.history-section {
  padding: 16px;
  margin-top: 8px;
}
.history-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text3);
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding-left: 4px;
}
.history-briefing-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
}
.history-briefing-card:active {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.hb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hb-title {
  font-size: 16px;
  font-weight: 700;
}
.hb-stats {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text3);
}
.hb-stat strong {
  color: var(--blue);
  font-weight: 700;
}
.hb-dot { color: var(--text3); }
.hb-date {
  font-size: 11px;
  color: var(--text3);
  margin-top: 4px;
}
.hb-preview {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hb-preview-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hb-preview-tag {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}
.hb-preview-text {
  font-size: 12px;
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb-arrow {
  margin-top: 10px;
  font-size: 12px;
  color: var(--blue);
  text-align: right;
}
.history-more {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--blue);
  text-decoration: none;
  padding: 10px;
}

/* --- Article Bottom Nav --- */
.article-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 460px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  z-index: 100;
}
.nav-arrow {
  font-size: 16px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 10px;
  background: rgba(26,109,212,0.06);
  min-width: 100px;
  text-align: center;
  transition: background 0.15s;
}
.nav-arrow:active {
  background: rgba(26,109,212,0.15);
}
.nav-pos {
  font-size: 14px;
  color: var(--text3);
  font-weight: 700;
}

/* --- Feedback Form --- */
.feedback-section {
  padding: 20px 16px;
  margin-top: 8px;
}
.feedback-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text3);
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.feedback-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.feedback-form textarea {
  width: 100%;
  min-height: 80px;
  font-size: 14px;
  line-height: 1.6;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  resize: vertical;
  outline: none;
  font-family: inherit;
}
.feedback-form textarea:focus {
  border-color: var(--blue);
}
.feedback-form input {
  width: 100%;
  font-size: 14px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 8px;
  outline: none;
  font-family: inherit;
}
.feedback-form input:focus {
  border-color: var(--blue);
}
.feedback-submit {
  width: 100%;
  margin-top: 10px;
  padding: 11px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.feedback-submit:disabled {
  opacity: 0.5;
}
.feedback-thanks {
  text-align: center;
  padding: 20px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  display: none;
}

/* --- Footer --- */
.app-footer {
  text-align: center;
  padding: 20px;
  font-size: 11px;
  color: var(--text3);
  line-height: 1.8;
}
.app-footer .byline {
  display: block;
  font-size: 10px;
  color: #c0c0c0;
  margin-top: 4px;
}
.app-footer .icp {
  display: block;
  margin-top: 8px;
}
.app-footer .icp a {
  font-size: 11px;
  color: #c0c0c0;
  text-decoration: none;
}
.app-footer .icp a:hover {
  color: var(--text3);
}
