* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Hiragino Sans", "ヒラギノ角ゴシック", "Yu Gothic", "メイリオ", sans-serif;
  background: linear-gradient(135deg, #f2aac2 0%, #fbdade 100%);
  min-height: 100vh;
  color: #333;
  position: relative;
  overflow-x: hidden;
}

/* ===== ヘッダー固定 ===== */
.main-header {
  width: 100%;
  z-index: 1000;

}

/* 横幅いっぱい表示 */
.header-image {
  width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 2;
}

.header {
  text-align: center;
  margin-bottom: 40px;
  color: white;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  /* gap: 2rem; */
  /* margin-bottom: 1rem; */
}

.sample-image{
  width: 30%;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.logo-image {
  max-width: 400px;
  width: 100%;
  height: auto;
  filter: drop-shadow(2px 2px 12px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease;
}

.logo-image:hover {
  transform: scale(1.05);
}

.camping-left,
.camping-right {
  display: none;
}

.camping-image-left,
.camping-image-right {
  width: 240px; /* ← 大きくしました（元は120px） */
  height: auto;
  opacity: 1; /* ← 透けをなくしました（元は0.8） */
  filter: drop-shadow(2px 2px 8px rgba(0, 0, 0, 0.3));
}

.camping-image-right {
  transform: scaleX(-1);
}

/* @keyframes gentle-float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes gentle-float-reverse {
  0%,
  100% {
    transform: scaleX(-1) translateY(0px);
  }
  50% {
    transform: scaleX(-1) translateY(-8px);
  }
} */

.subtitle {
  font-size: 1.6rem;
  opacity: 0.95;
  font-weight: 500;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.15);
  padding: 10px 25px;
  border-radius: 25px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.upload-section,
.qr-section {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 35px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.upload-section h2,
.qr-section h2 {
  color: #2d7d7d;
  margin-bottom: 25px;
  font-size: 1.6rem;
  text-align: center;
  font-weight: 600;
}

.upload-area {
  border: 3px dashed #2d7d7d;
  border-radius: 15px;
  padding: 45px 25px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  background: linear-gradient(145deg, #f8fffe 0%, #f0fffe 100%);
  position: relative;
  overflow: hidden;
}

.upload-area::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(45, 125, 125, 0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.upload-area:hover::before {
  opacity: 1;
}

.upload-area:hover {
  border-color: #1a5f5f;
  background: linear-gradient(145deg, #f0fffe 0%, #e6fffd 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(45, 125, 125, 0.15);
}

.upload-area.dragover {
  border-color: #1a5f5f;
  background: linear-gradient(145deg, #e6fffd 0%, #d9fffc 100%);
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(45, 125, 125, 0.2);
}

.upload-content {
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.upload-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.upload-text {
  margin-bottom: 25px;
  color: #666;
  line-height: 1.8;
  font-size: 1.1rem;
}

.upload-button {
  background: linear-gradient(145deg, #2d7d7d 0%, #1a5f5f 100%);
  color: white;
  border: none;
  padding: 15px 35px;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: all;
  box-shadow: 0 4px 15px rgba(45, 125, 125, 0.3);
}

.upload-button:hover {
  background: linear-gradient(145deg, #1a5f5f 0%, #0f4040 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(45, 125, 125, 0.4);
}

.upload-status {
  margin-top: 20px;
  text-align: center;
  font-weight: bold;
  font-size: 1.1rem;
}

.upload-status.success {
  color: #28a745;
}

.upload-status.error {
  color: #dc3545;
}

.qr-container {
  flex-grow: 1; /* 高さをできるだけ埋める */
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #f8f9fa 0%, #f0f2f5 100%);
  border-radius: 15px;
  padding: 25px;
  border: 2px solid rgba(45, 125, 125, 0.1);
}

.qr-placeholder {
  color: #666;
  font-style: italic;
  font-size: 1.1rem;
}

.qr-info {
  margin-top: 20px;
  text-align: center;
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 1000;
  color: white;
  backdrop-filter: blur(5px);
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 6px solid rgba(255, 255, 255, 0.3);
  border-top: 6px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 25px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* デスクトップ表示 */
@media (min-width: 1024px) {
  .camping-left,
  .camping-right {
    display: block;
  }

  .logo-image {
    max-width: 450px;
  }
}

@media (max-width: 768px) {
  .header-content {
    gap: 1rem;
  }

  .main-content {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .logo-image {
    max-width: 300px;
  }

  .subtitle {
    font-size: 1.3rem;
    padding: 8px 20px;
  }

  .upload-section,
  .qr-section {
    padding: 25px;
  }

  .upload-area {
    padding: 35px 20px;
  }
}

@media (max-width: 480px) {
  .logo-image {
    max-width: 250px;
  }

  .subtitle {
    font-size: 1.1rem;
    padding: 6px 16px;
  }
}

/* QRコード表示時のスタイル */
#qrContainer canvas {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

@media (min-width: 769px) {
  .main-content {
    align-items: stretch; /* ← これで高さ揃えが効きやすくなる */
  }

  .upload-section,
  .qr-section {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
}
