:root {
  color-scheme: light;
}

body {
  font-family: 'SF Pro Display', 'SF Pro Text', -apple-system, BlinkMacSystemFont,
    'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.glass-card {
  backdrop-filter: blur(24px);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(14, 116, 144, 0.08);
  box-shadow: 0 25px 45px rgba(14, 116, 144, 0.12);
  border-radius: 28px;
  padding: 28px;
}

.primary-btn {
  background: linear-gradient(135deg, #1d4ed8, #38bdf8);
  color: #fff;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.primary-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(30, 64, 175, 0.35);
}

.tab-btn {
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  background: rgba(191, 219, 254, 0.5);
  color: #1d4ed8;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: linear-gradient(135deg, #0ea5e9, #3b82f6);
  color: #fff;
}

.output-card {
  padding: 24px;
  border-radius: 28px;
  backdrop-filter: blur(24px);
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(14, 165, 233, 0.12);
  box-shadow: 0 18px 35px rgba(37, 99, 235, 0.12);
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  min-height: 600px;
}

@media (min-width: 1024px) {
  .output-card {
    width: 100%;
  }
}

.output-area {
  background: rgba(239, 246, 255, 0.85);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  width: 100%;
  flex: 1;
  resize: vertical;
  overflow-y: auto;
  font-family: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 14px;
  color: #1d4ed8;
  line-height: 1.6;
}

.wechat-preview {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  width: 100%;
  overflow-y: auto;
  color: #1f2937;
}

.wechat-preview section,
.wechat-preview p,
.wechat-preview blockquote,
.wechat-preview span {
  margin: 0;
  padding: 0;
}

.wechat-preview img {
  display: block;
  margin: 8px auto 6px;
}

.wechat-preview p + p,
.wechat-preview p + section,
.wechat-preview section + p,
.wechat-preview section + section,
.wechat-preview p + img,
.wechat-preview img + p,
.wechat-preview img + section,
.wechat-preview section + img {
  margin-top: initial;
}

.ghost-btn {
  border-radius: 999px;
  border: 1px solid rgba(14, 165, 233, 0.4);
  padding: 8px 18px;
  font-size: 14px;
  color: #0ea5e9;
}

.active-view-btn {
  background: linear-gradient(135deg, #0ea5e9, #3b82f6);
  color: #ffffff;
  border-color: transparent;
}

.tab-panel {
  display: none !important;
}

.tab-panel.active {
  display: flex !important;
}

#todayPanel {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  row-gap: 24px;
  width: 100%;
  align-items: stretch;
}

#todayPanel > .flex:first-child {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  width: 100%;
}

#todayPanel > .flex:first-child > div {
  width: 100%;
}

#todayPanel > .flex:first-child > div:last-child {
  align-items: flex-start;
}

#todayPanel > .grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  order: 2;
}

#todayPanel .output-card {
  width: 100%;
  max-width: none;
}

#todayPanel .output-area {
  width: 100%;
  min-width: 0;
}

#weeklyPanel.active {
  display: flex !important;
  flex-direction: column;
}

.bg-grid-light {
  background-image: radial-gradient(rgba(59, 130, 246, 0.08) 1px, transparent 0);
  background-size: 40px 40px;
}
