* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #2c3e50;
  background: #f8fafc;
  min-height: 100vh;
}

.v-cloak,
[v-cloak] {
  display: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  text-align: center;
  background: #e9edfc;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
}

.logo {
  width: 100px;
  height: 28px;
  margin: 5px auto;
}

.dot-icon {
  display: inline-block;
  width: 12px; /* 控制整个圆的大小，可按需调整 */
  height: 12px;
  border-radius: 50%; /* 让元素变成圆形 */
  background: radial-gradient(circle at center, #2e58ff 20%, #b3c8ff 20%);
  /* 径向渐变，中心绘制深蓝色小圆（占比 20% 左右），剩余区域填充浅蓝色 */
}

.title {
  font-family: PingFangSC-Semibold;
  font-size: 27px;
  color: #000000;
  font-weight: 600;
  margin: 0px 0 10px 0;
  text-align: center;
}

.subtitle {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.shop-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.shop-btn {
  border-radius: 10px;
  padding: 12.5px;
  font-family: PingFangSC-Medium;
  font-size: 15px;
  color: #ffffff;
  letter-spacing: 0;
  text-align: center;
  font-weight: 500;
  text-decoration: none;
}

.share-png {
  width: 15px;
  height: 12.5px;
  margin-right: 5px;
}

.taobao-btn {
  background-image: linear-gradient(180deg, #ff8800 0%, #ff5000 100%);
}

.pdd-btn {
  background-image: linear-gradient(180deg, #ff6976 0%, #f40009 100%);
}

.shop-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-box {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 17px 16px 17px 44px;
  border: 2px solid rgba(0, 0, 0, 0);
  font-size: 1rem;
  transition: all 0.2s ease;
  background: #FFFFFF;
  box-shadow: 0 2px 5px 0 rgba(93,100,115,0.10);
  border-radius: 10px;
}

.search-input:focus {
  border: 2px solid #e2e8f0;
  outline: none;
  border-color: #3b82f6;
  background: white;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
}

/* 搜索图标 SVG */
.search-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.search-hint {
  font-family: PingFangSC-Regular;
  font-size: 14px;
  color: #9EA3B3;
  font-weight: 400;
  margin: 5px 10px 0 10px;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #64748b;
}

.no-results {
  background-color:  rgba(245,12,22,0.2);
  border-radius: 10px;
  font-family: PingFangSC-Medium;
  font-size: 15px;
  color: #F50C16;
  text-align: center;
  font-weight: 500;
  padding: 17px;
  margin-top: 30px;
}

.group-header {
  margin-top: 20px;
  background-color: rgba(26,92,255,0.1);
  border-radius: 10px 10px 0 0;
  font-family: PingFangSC-Semibold;
  font-size: 18px;
  color: #1A5CFF;
  font-weight: 600;
  padding: 10px 15px;
}

.group-header-icon {
  width: 16px;
  height: 16px;
}

.group-header-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.book-item {
  background: #fff;
  padding: 15px 10px;
  transition: all 0.2s ease;
  border-bottom: 1px solid #EAECF2;
  font-size: 14px;
}

.book-item:last-child{
  border-radius: 0 0 10px 10px;
  border: none;
}

.group-last {
  border-radius: 0 0 10px 10px;
}

.book-item:hover {
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: white;
}

.book-name {
  font-family: PingFangSC-Medium;
  font-size: 18px;
  color: #000000;
  font-weight: 500;
}

.book-row {
  padding: 8.5px 15px;
  display: flex;
  align-items: center;
  width: fit-content;
}

.book-icon {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

.book-title-color {
  color: #1A5CFF;
}

.book-size-section {
  border-radius: 10px;
  background-color: rgba(26,92,255,0.1);
  font-family: PingFangSC-Medium;
  font-size: 15px;
  color: #1A5CFF;
  font-weight: 500;
}

.book-name-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.book-name-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.book-size {
  color: #dc2626;
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.book-size-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.book-size-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.book-details {
  color: #64748b;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.book-details-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.book-details-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.submit-section {
  margin: 30px 0;
}

.submit-title {
  font-size: 18px;
  color: #000000;
  text-align: center;
  font-weight: 600;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.form-input {
  width: 100%;
  padding: 17px 15px;
  background: #FFFFFF;
  box-shadow: 0 4px 10px 0 rgba(93, 100, 115, 0.10);
  border-radius: 10px;
  border: none;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: white;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.submit-btn {
  width: 100%;
  padding: 17px;
  background-color: rgba(26,92,255,1);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 10px;
}

.submit-btn:disabled {
  background-color: rgba(26,92,255,0.3);
  cursor: not-allowed;
}

.submit-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.submit-panel {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 30px));
  background: #ffffff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.18);
  z-index: 1200;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.submit-panel-toggle {
  width: 100%;
  border: none;
  background: linear-gradient(180deg, #5b86ff 0%, #3f73ff 100%);
  color: #ffffff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.submit-panel-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.submit-panel-toggle-icon .el-icon {
  color: #ffffff;
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.submit-panel-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.submit-panel.is-open .submit-panel-body {
  max-height: min(70vh, 520px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.submit-panel .submit-section {
  margin: 0;
  padding: 16px;
}

.submit-panel .submit-title {
  margin-bottom: 16px;
}

.submit-panel .submit-btn {
  margin-top: 6px;
}

.submit-panel-spacer {
  height: 88px;
}

.modal {
  display: flex;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  width: 325px;
  height: 350px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.modal-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 325px;
  height: 350px;
  background-image: url(./assets/pic_coupon@2x.png);
}

.coupon-desc {
  position: absolute;
  top: 178px;
  left: 111px;
}

.coupon-code {
  font-family: PingFangSC-Semibold;
  font-size: 14px;
  color: #000000;
  font-weight: 600;
}

.coupon-validity {
  font-family: PingFangSC-Medium;
  font-size: 12px;
  color: #9EA3B3;
  font-weight: 500;
}

.modal-btn {
  width: 150px;
  height: 47px;
  border: none;
  font-family: PingFangSC-Semibold;
  font-size: 15px;
  color: #FFFFFF;
  font-weight: 600;
  background: #1A5CFF;
  border-radius: 10px;
  cursor: pointer;
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
}

.modal-btn:hover {
  transform: translateX(-50%) translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .title {
    font-size: 1.5rem;
  }

  .shop-btn {
    width: 150px;
  }

  .book-name {
    font-size: 1.05rem; /* 移动端稍小一些 */
  }
}

.search-section {
  margin-top: 10px;
}

.ai-module {
  margin-top: 16px;
  background: linear-gradient(to bottom, #EAF1FF, #F2ECFF);
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
}

.ai-hint {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 10px;
}

.ai-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.ai-upload .el-upload {
  display: inline-flex;
}

.ai-upload-input.ai-upload-hidden .el-upload--picture-card {
  display: none;
}

.ai-upload input[type="file"] {
  display: none;
}

.ai-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: #ffffff;
  border: 2px dashed #94a3b8;
  color: #94a3b8;
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.ai-upload-count {
  font-size: 12px;
  color: #64748b;
  min-height: 16px;
}

.ai-button {
  margin-left: auto;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: #1a5cff;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.ai-button:disabled {
  background: #cbd5f5;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .ai-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .ai-upload {
    width: 100%;
  }

  .ai-upload .el-upload-list--picture-card {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .ai-upload .el-upload-list__item,
  .ai-upload .el-upload--picture-card {
    width: 72px;
    height: 72px;
    margin: 0;
  }

  .ai-button {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }
}

.ai-button.is-loading {
  background: #94a3ff;
}

.ai-result {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  background: #eef2ff;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.ai-result-block + .ai-result-block {
  margin-top: 8px;
}

.ai-thinking {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  padding: 8px 10px;
}

.ai-thinking-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 4px;
}

.ai-thinking-content {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.6;
  white-space: pre-wrap;
}

.ai-thinking-toggle {
  border: none;
  background: transparent;
  color: #1a5cff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.ai-thinking-toggle:hover {
  text-decoration: underline;
}

.ai-result-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 14px;
}

.ai-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(71, 85, 105, 0.3);
  border-top-color: #1a5cff;
  animation: ai-spin 0.8s linear infinite;
}

@keyframes ai-spin {
  to {
    transform: rotate(360deg);
  }
}

.ai-button-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ai-button-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.ai-button-icon .el-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.ai-preview-list {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-preview-item {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.ai-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.ai-preview-delete {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: #ef4444;
  color: #ffffff;
  font-size: 12px;
  line-height: 20px;
  cursor: pointer;
}

.ai-preview-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ai-preview-modal.is-open {
  display: flex;
}

.ai-preview-modal-content {
  position: relative;
  max-width: min(720px, 90vw);
  max-height: 90vh;
  background: #ffffff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.3);
}

.ai-preview-modal-content img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.ai-preview-modal-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #1a5cff;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
}
