/* ===== 基础重置 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #f4f6f8;
  color: #333;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== 三栏布局 ===== */
.layout {
  display: flex;
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  gap: 16px;
  padding: 16px;
}

/* 左右广告栏容器：仅预留空间，不写占位样式文字 */
.ad-side {
  width: 200px;
  flex-shrink: 0;
}

.main-content {
  flex: 1;
  min-width: 0;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* 屏幕宽度 ≤1200px 时隐藏左右广告栏 */
@media (max-width: 1200px) {
  .ad-side {
    display: none;
  }
}

/* ===== 底部公共区域 ===== */
.ad-footer {
  width: 100%;
  padding: 16px;
  text-align: center;
}

/* ===== SEO 内容区 ===== */
.seo-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  color: #374151;
  font-size: 14px;
  line-height: 1.9;
}

.seo-content h2 {
  font-size: 17px;
  color: #1a1a2e;
  margin: 22px 0 10px;
  padding-left: 10px;
  border-left: 3px solid #409eff;
}

.seo-content h2:first-child { margin-top: 0; }

.seo-content h3 {
  font-size: 14px;
  color: #1a1a2e;
  margin: 14px 0 4px;
}

.seo-content ul,
.seo-content ol { padding-left: 22px; }

.seo-content li { margin-bottom: 4px; }

/* ===== 头部 ===== */
.site-header {
  text-align: center;
  padding: 24px 0 16px;
}

.site-header h1 {
  font-size: 32px;
  color: #1a1a2e;
}

.site-header .subtitle {
  color: #666;
  margin-top: 6px;
}

/* ===== 工具面板 ===== */
.tool-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 24px;
}

/* 上传区域 */
.upload-area {
  border: 2px dashed #c0c8d0;
  border-radius: 12px;
  padding: 60px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: #3b82f6;
  background: #f0f6ff;
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.upload-text {
  font-size: 18px;
  color: #333;
}

.upload-hint {
  font-size: 13px;
  color: #999;
  margin-top: 6px;
}

/* 画布编辑区 */
.editor-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.canvas-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
  text-align: center;
}

#mosaicCanvas {
  max-width: 100%;
  cursor: crosshair;
  display: block;
  margin: 0 auto;
}

/* 控制区 */
.controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-group label {
  font-size: 14px;
  color: #555;
  white-space: nowrap;
}

.control-group input[type="range"] {
  flex: 1;
}

.control-group span {
  font-size: 14px;
  color: #333;
  min-width: 24px;
  text-align: center;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  padding: 10px 20px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn:hover {
  background: #f3f4f6;
}

.btn-primary {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

.btn-primary:hover {
  background: #2563eb;
}

/* ===== 功能特点 ===== */
.features {
  margin-top: 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 24px;
}

.features h2 {
  font-size: 20px;
  color: #1a1a2e;
  margin-bottom: 12px;
}

.features ul {
  padding-left: 20px;
}

.features li {
  margin-bottom: 6px;
  color: #444;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .layout {
    padding: 8px;
  }

  .site-header h1 {
    font-size: 24px;
  }

  .tool-panel,
  .features {
    padding: 16px;
  }

  .upload-area {
    padding: 40px 12px;
  }
}
