/* ===== ベース設定 ===== */
body {
    font-family: 'Noto Sans JP', sans-serif;
    background: #e6e6e6;
    margin: 0;
    padding: 20px;
    text-align: center;
}

header h1 {
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 28px;
  color: #333;
}

header h2 {
  margin-bottom: 20px;
  font-weight: 400;
  font-size: 14px;
  color: #666;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

#langSwitch {
  margin-top: 10px;
  padding: 5px 10px;
  border: 1px solid #833ab4;
  background: #fff;
  color: #833ab4;
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.3s;
}
#langSwitch:hover {
  background: #833ab4;
  color: #fff;
}

/* ===== メインコンテナ ===== */
.main-container {
    width: 90%;
    max-width: 700px;
    margin: 30px auto;
    background: #fff;
    padding: 3% 0;
}

.top-area, .middle-area, .bottom-area {
  margin-bottom: 30px;
}

.middle-area {
  /*display: flex;
  justify-content: space-between;
  gap: 20px;*/
}

.left-column, .right-column {
  flex: 1;
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.right-column {
  /*display: flex;
  flex-direction: column;
  align-items: center;*/
}
.right-column .box{
        width: 84%;
    padding: 0% 2% 4% 2%;
    margin: 6% auto;
    border: 1px solid #eee;
    background-color: #f3f3f3;
}
/* ===== ステップタイトル（pタグ版） ===== */
.step-title {
      font-size: 22px;
    color: #555;
    margin: 20px 0 10px;
    font-weight: bold;
}

/* ===== 各パーツ ===== */
.upload-area {
  width: 100%;
  max-width: 500px;
  height: 200px;
  border: 2px dashed #aaa;
  border-radius: 10px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  color: #777;
  cursor: pointer;
  transition: all 0.3s;
}
.upload-area:hover {
  background: #eee;
}

.split-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.split-buttons button {
  padding: 10px 20px;
  font-size: 16px;
  border: 2px solid #833ab4;
  background: #fff;
  color: #833ab4;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
}
.split-buttons button.active,
.split-buttons button:hover {
  background: #833ab4;
  color: #fff;
}

.message {
  font-size: 14px;
  color: #555;
}

.color-picker-area {
  font-size: 16px;
}
#bgColorPicker {
  margin-left: 10px;
  width: 50px;
  height: 30px;
  cursor: pointer;
}

.cropper-area {
  max-width: 500px;
  margin: 0 auto;
  background: #ddd;
  position: relative;
}

.cropper-buttons button {
  background: linear-gradient(90deg, #00c6ff, #0072ff);
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.3s;
}
.cropper-buttons button:hover {
  background: linear-gradient(90deg, #0072ff, #00c6ff);
}

/* ===== プレビューエリア ===== */
.preview-area {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 2% auto;
    padding: 2% 0;
}

.preview-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.preview-item img {
  width: 100px;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.preview-item button {
  margin-top: 8px;
}

.preview-area img {
  width: 100px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-radius: 5px;
}

/* ===== 個別ダウンロードボタン ===== */
.single-download {
    margin-top: 5px;
    padding: 6px 12px;
    font-size: 12px;
    background: #eaeaea;
    color: #000000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}
.single-download:hover {
    background: #eed8ff;
}
/* ===== 全体ダウンロードボタン ===== */
.download-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px 0;
}
.download-buttons button {
  background: linear-gradient(90deg, #fd1d1d, #833ab4);
  color: #fff;
  border: none;
  width: 300px;
  height: 100px;
  font-size: 20px;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.3s ease;
}
.download-buttons button.show {
  opacity: 1;
}
.download-buttons button:hover {
  transform: scale(1.05);
  background: linear-gradient(90deg, #833ab4, #fd1d1d);
}

/* ===== スピナー（ローディング） ===== */
#loadingSpinner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  display: none;
}
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #833ab4;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== 表示制御 ===== */
.hide {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.show {
  display: block !important;
  opacity: 1;
}

/* ===== フッター ===== */
footer {
  margin-top: 50px;
  font-size: 12px;
  color: #aaa;
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
  .middle-area {
    flex-direction: column;
    gap: 30px;
  }
  .upload-area {
    width: 90%;
  }
  .cropper-area {
    width: 90%;
  }
}
