:root {
  --primary-red: #ff1e3e;
  --primary-yellow: #FFCC00;
  --text-black: #111;
  --gray: #555;
  --font-main: 'Noto Sans SC', sans-serif;
  --note-bg: #FFF8E1;
  --header-bg: #F5F5F5;
}

body {
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.editor {
  width: 40%;
  padding: 30px;
  background: #f8f8f8;
  box-sizing: border-box;
  overflow-y: auto;
}

.editor input, .editor textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-family: var(--font-main);
}

.editor label {
  font-weight: bold;
  margin-bottom: 6px;
  display: block;
}

.editor button {
  background: var(--primary-red);
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
}

.preview {
  width: 60%;
  background: #eaeaea;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.card-container {
  width: 540px;  /* 原来是 360px，放大 1.5 倍 */
  height: 720px; /* 原来是 480px，保持相同比例放大 */
  background: white;
  position: relative;
  padding: 45px;  /* 原来是 30px，等比例放大 */
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-container::before {
  content: "";
  position: absolute;
  width: 300px;    /* 原来是 200px */
  height: 300px;   /* 原来是 200px */
  background: radial-gradient(circle, rgba(255,30,62,0.2) 0%, transparent 70%);
  top: -90px;      /* 原来是 -60px */
  right: -90px;    /* 原来是 -60px */
  z-index: 0;
}

.logo {
  width: 90px;  /* 原来是 60px */
  position: absolute;
  top: 30px;   /* 原来是 20px */
  left: 30px;  /* 原来是 20px */
  z-index: 2;
}

.title {
  font-size: 42px;  /* 原来是 28px */
  font-weight: 900;
  color: var(--text-black);
  z-index: 2;
  position: relative;
  margin-top: 90px; /* 原来是 60px */
  display: flex;  /* 添加flex布局 */
  flex-direction: column;  /* 垂直排列 */
  gap: 15px;       /* 原来是 10px */
}

.title span {
  color: var(--primary-red);
  display: inline-block;  /* 确保关键词独立成块 */
}

.title-line {
  display: block;  /* 每行独立显示 */
  line-height: 1.3;  /* 行高 */
}

.secondary-title {
  font-size: 28px; /* 字号介于主标题和副标题之间 */
  font-weight: 700; /* 加粗，但比主标题细 */
  color: var(--text-black); /* 使用主文字颜色 */
  z-index: 2;
  position: relative;
  margin-top: 20px; /* 与上方元素间距 */
  margin-bottom: 10px; /* 与下方元素间距 */
  display: block;
  line-height: 1.3;
}

.subtitle, .tagline, .account-name {
  font-size: 21px;  /* 原来是 14px */
  z-index: 2;
  position: relative;
  color: var(--gray);
  margin-top: 12px; /* 原来是 8px */
}

.subtitle i {
  color: var(--primary-red);
  margin-right: 6px;
}

.template-select {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: white;
  cursor: pointer;
}

.style-controls {
  margin-bottom: 15px;
  border: 1px solid #ddd;
  padding: 12px;
  border-radius: 6px;
  background: white;
}

.color-details {
  margin-top: 8px;
}

.color-details summary {
  cursor: pointer;
  padding: 8px;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 14px;
}

.color-details summary:hover {
  background: #eee;
}

.color-group {
  display: flex;
  align-items: center;
  margin: 10px 0;
  gap: 10px;
}

.color-group label {
  flex: 1;
  font-size: 14px;
  margin: 0;
}

.color-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-input-group input[type="color"] {
  width: 40px;
  height: 24px;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.color-value {
  font-size: 12px;
  color: #666;
  min-width: 60px;
}

/* 添加二维码弹窗样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-size: 20px;
}

/* 苹果备忘录模板样式 */
.apple-note-container {
  width: 540px;
  height: 720px;
  background: #FFFFFF !important; /* 强制使用白色背景 */
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

.header {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  background: #FFFFFF !important; /* 强制使用白色背景 */
  border-bottom: 1px solid #e0e0e0;
}

.back-button {
  font-size: 30px; /* 放大图标，原来是18px */
  color: #FFCC00; /* 修改为更鲜明的黄色 */
  margin-right: 10px;
  display: flex;
  align-items: center;
  z-index: 10; /* 确保按钮在最上层 */
}

/* 备忘录字体样式 */
.header-title {
  flex-grow: 1;
  text-align: left;
  font-size: 22px;
  color: #FFCC00 !important; /* 确保与其他图标颜色一致 */
  font-weight: 500;
}

.header-actions {
  display: flex;
  gap: 27px;
  align-items: center;
}

.header-action {
  color: #FFCC00;
  font-size: 16px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-button {
  position: relative;
}

.more-button {
  position: relative;
}

.note-content {
  flex: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.note-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-black);
  margin-bottom: 25px;
  line-height: 1.3;
}

.content {
  font-size: 18px;
  color: var(--gray);
  line-height: 1.6;
}

.content p {
  margin-bottom: 15px;
}

.timestamp {
  font-size: 14px;
  color: #999;
  margin-top: auto;
  padding-top: 20px;
}

/* 隐藏元素 */
.hidden {
  display: none !important;
}

/* 微信朋友圈模板样式 */
.wechat-moment-container {
  width: 540px;
  height: 720px;
  background: #1c1c1e; /* Lighter dark background */
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

.moment-header {
  display: flex;
  align-items: center;
  padding: 15px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
}

.moment-back {
  margin-left: 10px;
  font-size: 17px;
  line-height: 1;
}

.moment-title {
  flex-grow: 1;
  text-align: center;
  font-size: 19px;
}

.moment-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 20px;
  overflow-y: hidden;  /* Prevent vertical scrolling */
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

.moment-post {
  margin-bottom: 10px;
}

.moment-user {
  display: flex;
  margin-bottom: 15px;
}

.moment-avatar {
  width: 50px;
  height: 50px;
  border-radius: 5px;
  background-color: #1296db;
  margin-right: 12px;
  overflow: hidden;
}

.moment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.moment-user-info {
  flex: 1;
  display: block;
}

.moment-username {
  font-size: 18px;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}

.moment-text {
  font-size: 17px;
  line-height: 1.5;
  margin-bottom: 10px;
  color: #ffffff;
  word-break: break-word;
  white-space: pre-wrap; /* Preserve line breaks from textarea */
}

.moment-image {
  margin-bottom: 15px;
  width: 100%;
  max-height: 200px;
  overflow: hidden;
  border-radius: 5px;
  margin-left: 62px;
  width: calc(100% - 62px);
}

.moment-image img {
  /* width: 100%; */
  object-fit: cover;
  max-height: 200px;
}

.moment-time {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 28px;
}

.moment-more {
  width: 28px;
  text-align: center;
  font-size: 20px;
}

.moment-more .iconfont.icon-more {
  color: #7b7979; /* 你想要的颜色 */
}

/* New styles for the meta line containing time and more icon */
.moment-meta-line {
  /* display: flex; /* Revert: Keep flex commented out or remove */
  /* justify-content: flex-start; /* Revert: Remove this */
  align-items: center;
  margin-bottom: 4px;
  margin-left: 62px; /* Keep this margin */
  width: calc(100% - 62px);
  box-sizing: border-box;
  position: relative; /* Restore: Positioning context is needed */
  min-height: 28px;
}

.moment-actions {
  border-top: 0.5px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Adjust .moment-more styles for its new context - Absolute Positioning */
.moment-meta-line .moment-more {
  position: absolute;
  right: 10px; /* Restore: Position from the right edge */
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 20px;
  padding: 0; /* Restore: Keep padding at 0 */
  cursor: pointer;
  /* margin-left: auto; /* Revert: Remove margin-left: auto */
  line-height: 1;
}

/* Restore rule for the iconfont element if it was removed */
.moment-more .iconfont.icon-more {
    display: block;
}

/* 点赞区样式 */
.moment-like {
  display: flex;
  align-items: center;
  padding-left: 12px; /* Fine-tuned: Shift left further */
  box-sizing: border-box;
  
}

.moment-like-icon {
  color: rgba(255, 255, 255, 0.6);
  width: 22px;  /* Match icon font-size */
  text-align: center;
  margin-right: 13px; /* Compromise for centering with 12px padding */
  flex-shrink: 0;
  display: inline-block;
  box-sizing: border-box;
  font-size: 22px;  /* New icon font-size */
  line-height: 1;
}

.moment-like-avatars {
  margin-left: 2px;
  display: flex;
}

.moment-like-avatar {
  width: 50px;
  height: 50px;
  border-radius: 3px;
  background-color: #666;
  margin-right: 5px;
  margin-left: 0;
  overflow: hidden;
}

.moment-like-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* 评论区样式 */
.moment-comments {
  /* margin-top: 10px; */
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  padding: 10px 10px 10px 0;
}

.moment-comment {
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  box-sizing: border-box;
  padding-left: 14px; /* Recalculated for 22px icon font-size */
}

.moment-comment-icon {
  font-size: 22px;  /* New icon font-size */
  color: rgba(255, 255, 255, 0.6);
  width: 22px;  /* Match icon font-size */
  text-align: center;
  margin-right: 14px; /* Recalculated for 22px icon font-size */
  flex-shrink: 0;
  padding-top: 5px;
  display: inline-block;
  box-sizing: border-box;
  line-height: 1;
}

.moment-comment-avatar {
  width: 50px;
  height: 50px;
  border-radius: 3px;
  margin-right: 8px;
  margin-left: 0;
  overflow: hidden;
  flex-shrink: 0;
}

.moment-comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.moment-comment-content-wrapper {
  flex: 1;
  box-sizing: border-box;
}

.moment-comment-header {
  display: flex;
  align-items: center;
  margin-bottom: 3px;
}

.moment-comment-user {
  font-weight: bold;
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}

.moment-comment-time {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 10px;
  white-space: nowrap;
  text-align: right;
}

.moment-comment-content {
  color: #ffffff;
  word-break: break-word;
  overflow-wrap: break-word;
}

.moment-footer {
  border-top: 0.5px solid rgba(255, 255, 255, 0.1);
  padding: 10px;
  display: flex;
  align-items: center;
}

 /* footer 里面的输入框 */
.moment-input {
  flex: 1;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 8px 15px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
}

/* Style for the smiley icon in the footer */
.moment-smile-icon {
  font-size: 24px; /* Adjust size as needed */
  color: rgba(255, 255, 255, 0.6); /* Match input text color */
  margin-left: 10px; /* Space between input and icon */
  cursor: pointer; /* Optional: Indicate it might be clickable */
}

/* --- Weibo Template Styles --- */

.weibo-container {
  width: 540px;
  height: auto; /* Height based on content */
  min-height: 720px; /* Ensure a minimum height if content is short */
  background: #ffffff;
  position: relative;
  box-sizing: border-box;
  overflow: hidden; /* Prevents content overflow */
  display: flex;
  flex-direction: column;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; /* Common system font stack */
  border: 1px solid #e6e6e6;
}

/* 1. User Info Area */
.weibo-user-info {
  display: flex;
  align-items: flex-start; /* Align items to the top */
  margin-bottom: 15px;
}

.weibo-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%; /* Circular avatar */
  margin-right: 10px;
  object-fit: cover;
  flex-shrink: 0; /* Prevent avatar from shrinking */
}

.weibo-user-details {
  display: flex;
  flex-direction: column;
  justify-content: center; /* Vertically center the text lines */
  min-height: 40px; /* Ensure details area matches avatar height */
}

.weibo-user-line1 {
  display: flex;
  align-items: center;
  margin-bottom: 2px; /* Small space between lines */
}

.weibo-nickname {
  font-size: 16px;
  font-weight: bold;
  color: var(--weibo-nickname-color, #E86E25); /* Use CSS variable, fallback */
  margin-right: 5px;
}

.weibo-cert {
  width: 16px;
  height: 16px;
  background-size: contain;
  background-repeat: no-repeat;
  display: inline-block;
  vertical-align: middle; /* Align with text */
}

/* Add background images for V and Crown icons */
.weibo-cert-v {
  /* Placeholder - Use an actual V icon image or SVG */
   background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="%23FFD700"><circle cx="50" cy="50" r="45" fill="%23F7B500"/><path d="M30 40 L50 65 L70 40 L60 40 L50 55 L40 40 Z" fill="white"/></svg>');
}

.weibo-cert-crown {
   /* Placeholder - Use an actual Crown icon image or SVG */
   background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="%23FFBF00"><path d="M20 80 H80 V70 H20 Z M50 10 L65 35 L85 30 L75 55 L90 70 H10 L25 55 L15 30 L35 35 Z" /></svg>');
}


.weibo-user-line2 {
  display: flex;
  align-items: center;
}

.weibo-time,
.weibo-source {
  font-size: 12px;
  color: var(--weibo-timestamp-color, #999999); /* Use CSS variable */
  margin-right: 5px;
}

/* 2. Content Area */
.weibo-content {
  font-size: 28px; /* Slightly smaller than XHS title, adjust as needed */
  font-weight: bold;
  color: var(--weibo-text-color, #111111); /* Use CSS variable */
  line-height: 1.4;
  margin-bottom: 20px;
  white-space: pre-wrap; /* Respect newlines and spaces */
  word-break: break-word;
}

.weibo-content .highlight {
  color: var(--weibo-highlight-color, #F55353); /* Use CSS variable */
}

/* 3. Stats Area */
.weibo-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 15px;
  margin-top: auto; /* Push stats and everything below it (comments) to the bottom */
}

/* Style for the left group of stats */
.weibo-stats-left {
  display: flex;
  gap: 25px; /* Adjust gap between Repost and Comment */
}

.weibo-stat {
  font-size: 14px;
  color: var(--weibo-text-color, #666666); /* Use text color or a grey */
  display: flex; /* Align text and number nicely */
  align-items: center;
  gap: 4px;
}

.weibo-comment-stat span { /* Target the number span inside the comment stat */
  border-bottom: 2px solid var(--weibo-comment-line-color, #F77D00); /* Use CSS variable */
  padding-bottom: 1px; /* Small space between text and line */
  font-weight: bold; /* Make the number stand out */
}

/* 4. Comment Area */
.weibo-comment {
  display: flex;
  align-items: flex-start;
  padding: 15px;
  background-color: #f9f9f9; /* Light grey background for comment */
  border-radius: 8px;
}

.weibo-comment-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-right: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.weibo-comment-details {
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Take remaining space */
}

.weibo-comment-line1 {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.weibo-comment-nickname {
  font-size: 14px;
  font-weight: bold;
  color: var(--weibo-text-color, #666666); /* Make nickname color lighter grey */
  margin-right: 5px;
}

.weibo-comment-badge {
  font-size: 10px;
  color: #ffffff;
  background-color: #ffa500; /* Example badge color */
  padding: 1px 4px;
  border-radius: 3px;
  margin-right: 5px; /* Space between badge and time/loc */
}

.weibo-comment-content {
  font-size: 15px; /* Increase font size slightly */
  color: var(--weibo-text-color, #222222); /* Make text darker */
  line-height: 1.5;
  margin-bottom: 5px; /* Space between content and time/loc */
  word-break: break-word;
}

.weibo-comment-time-loc {
  font-size: 12px;
  color: var(--weibo-timestamp-color, #999999); /* Use CSS variable */
}

/* Style for the comment replies line */
.weibo-comment-replies {
  font-size: 13px;
  color: var(--weibo-timestamp-color, #888888); /* Use timestamp color or slightly different grey */
  margin-top: 8px; /* Space above the replies line */
  padding: 8px; /* Optional padding inside */
  background-color: #eeeeee; /* Slightly different background */
  border-radius: 4px;
  line-height: 1.4;
}

/* 5. Optional Actions Bar (if added later) */
/*
.weibo-actions {
  display: flex;
  justify-content: space-around;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
}

.weibo-action-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
}

.weibo-action-item i {
  font-size: 18px;
}
*/