/* イラスト→ドット絵変換ツール 専用スタイル */

/* 変換例サンプル（1/2サイズでファーストビューをコンパクトに） */
.sample-showcase {
  background: #ffffff;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  max-width: 50%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.sample-showcase h3 {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: #333;
}

/* サンプル画像：横並び */
.sample-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.5rem 0;
}

.sample-item {
  flex: 1;
  text-align: center;
  max-width: 140px;
}

.sample-item img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.sample-item p {
  margin: 0.25rem 0 0 0;
  font-weight: 600;
  font-size: 0.75rem;
  color: #555;
}

.sample-arrow {
  font-size: 1.5rem;
  color: #888;
  font-weight: bold;
  flex-shrink: 0;
}

.description-compact {
  text-align: center !important;
  background: #f0f8ff;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.description-compact * {
  text-align: center !important;
}

.description-compact p {
  margin: 0.5rem 0;
  line-height: 1.6;
  font-size: 0.95rem;
  text-align: center !important;
}

.pixel-art-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

/* アップロードエリア */
.upload-box {
  border: 2px dashed #94a3b8;
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  transition: border-color 0.2s, background 0.2s;
}

.upload-box:hover,
.upload-box.drag-over {
  border-color: #2563eb;
  background: #eff6ff;
}

.upload-box p {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: #1e293b;
}

.upload-hint {
  font-size: 0.9rem !important;
  color: #64748b !important;
}

/* 調整パネル */
.controls-panel {
  margin: 2rem 0;
}

.controls-panel h3 {
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
}

/* チェックボックス */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-weight: normal;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* プレビューエリア */
.preview-area {
  margin: 2rem 0;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .preview-grid {
    grid-template-columns: 1fr;
  }
}

.preview-box {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.preview-box h4 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: #475569;
}

/* 透過確認用 市松模様 */
.canvas-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  min-height: 200px;
  background-color: #e2e8f0;
  background-image:
    linear-gradient(45deg, #cbd5e1 25%, transparent 25%),
    linear-gradient(-45deg, #cbd5e1 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #cbd5e1 75%),
    linear-gradient(-45deg, transparent 75%, #cbd5e1 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  border-radius: 8px;
  overflow: hidden;
}

.canvas-wrap canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid #cbd5e1;
}

/* ボタン：40% + 20% + 40% */
.action-buttons {
  display: flex;
  width: 100%;
  gap: 0;
  margin: 2rem 0;
}

.btn-download,
.btn-reset {
  height: 80px;
  font-size: 1.3rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  color: white;
}

.btn-download {
  width: 40%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  margin-right: 20%;
}

.btn-reset {
  width: 40%;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-download:hover,
.btn-reset:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.btn-download:active,
.btn-reset:active {
  transform: translateY(0);
}

/* 使い方マニュアル */
.manual-section {
  background: #f9f9f9;
  margin: 2rem 1.5rem;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.manual-section .manual-title {
  color: #1e3a8a;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
}

.manual-section .manual-title:not(:first-child) {
  margin-top: 2rem;
}

.manual-section h3 {
  color: #2563eb;
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem 0;
}

.manual-section h3:first-of-type {
  margin-top: 0;
}

.manual-step .step-icon {
  display: inline-block;
  margin-right: 0.35rem;
  font-weight: 700;
}

.manual-section p,
.manual-section li {
  color: #374151;
  line-height: 1.7;
  margin: 0 0 0.5rem 0;
}

.manual-section ul {
  margin: 0.5rem 0 0 1.5rem;
  padding-left: 0.5rem;
}

.manual-section .manual-recommend {
  margin: 0.5rem 0 0 1.5rem;
  padding-left: 0.5rem;
}

.manual-section .manual-recommend li {
  margin-bottom: 0.5rem;
}

.manual-section .manual-notice {
  background: rgba(254, 243, 199, 0.5);
  border-left: 4px solid #d97706;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin: 0.5rem 0 0 0;
  font-size: 0.9rem;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .sample-showcase {
    max-width: 100%;
  }

  .sample-container {
    flex-direction: column;
  }

  .sample-arrow {
    transform: rotate(90deg);
  }

  .action-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .btn-download,
  .btn-reset {
    width: 100% !important;
    margin-right: 0 !important;
  }
}
