/* リセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ベーススタイル */
body {
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  background: linear-gradient(135deg, #1a0033 0%, #330066 50%, #1a0033 100%);
  color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

/* 星の背景 */
.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.star {
  position: absolute;
  background: #ffd700;
  border-radius: 50%;
  animation: twinkle 2s infinite alternate;
}

@keyframes twinkle {
  0% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* メインコンテナ */
.main-container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ヒーローセクション */
.hero-section {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0px 0;
}

.hero-banner {
  width: 100%;
  max-width: 1024px;
  margin-bottom: 30px;
  padding: 0 16px;
}

.hero-banner img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 2px solid #ffd700;
}

.banner-pc {
  display: none;
}

.banner-sp {
  display: block;
}

@media (min-width: 768px) {
  .banner-pc {
    display: block;
  }
  .banner-sp {
    display: none;
  }
}

.campaign-badge {
  background: linear-gradient(45deg, #ff4444, #ffaa00);
  color: #330066;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: bold;
  font-size: 1.1rem;
  box-shadow: 0 8px 20px rgba(255, 170, 0, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* キャンペーン煽り文セクション */
.promo-section {
  background: linear-gradient(145deg, rgba(255, 165, 0, 0.2), rgba(255, 69, 0, 0.3));
  border: 2px solid #ff8c00;
  border-radius: 24px;
  padding: 32px;
  margin: 32px 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.promo-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.promo-content {
  text-align: center;
  margin-bottom: 32px;
}

.promo-badge {
  display: inline-block;
  background: linear-gradient(45deg, #ff8c00, #ff4500);
  color: white;
  padding: 8px 16px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
  animation: pulse 3s infinite;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .promo-badge {
    font-size: 1rem;
  }
}

.promo-text {
  font-size: 1.1rem;
  color: #ffd4aa;
  line-height: 1.75;
  font-weight: 500;
}

@media (min-width: 768px) {
  .promo-text {
    font-size: 1.25rem;
  }
}

.book-covers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 512px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .book-covers {
    gap: 32px;
  }
}

.book-cover-item {
  background: linear-gradient(145deg, rgba(255, 140, 0, 0.1), rgba(255, 69, 0, 0.2));
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 140, 0, 0.3);
  text-align: center;
}

.book-cover-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: 12px;
  transition: transform 0.3s ease;
}

.book-cover-item:hover .book-cover-img {
  transform: scale(1.05);
}

.book-cover-text {
  color: #ffd4aa;
  font-size: 0.875rem;
  font-weight: 500;
}

@media (min-width: 768px) {
  .book-cover-text {
    font-size: 1rem;
  }
}

/* コンテンツセクション */
.content-section {
  background: linear-gradient(145deg, rgba(91, 33, 182, 0.8), rgba(88, 28, 135, 0.9));
  border: 2px solid #ffd700;
  border-radius: 24px;
  padding: 32px;
  margin: 32px 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.content-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  font-size: 2rem;
  color: #ffd700;
  text-align: center;
  margin-bottom: 32px;
  font-weight: bold;
  position: relative;
}

.section-title::after {
  content: "✨";
  position: absolute;
  right: -32px;
  top: 0;
  animation: bounce 1s infinite;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.25rem;
  }
}

@media (min-width: 1024px) {
  .section-title {
    font-size: 2.5rem;
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.section-content {
  font-size: 1.1rem;
  color: #e9d5ff;
  text-align: center;
  line-height: 1.75;
}

@media (min-width: 768px) {
  .section-content {
    font-size: 1.125rem;
  }
}

.section-content p {
  margin-bottom: 16px;
}

.section-content strong {
  color: #ffd700;
}

/* ステッカーグリッド */
.sticker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
  align-items: center;
}

@media (min-width: 768px) {
  .sticker-grid {
    gap: 32px;
  }
}

.sticker-card {
  background: linear-gradient(145deg, rgba(126, 34, 206, 0.5), rgba(88, 28, 135, 0.7));
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  border: 1px solid rgba(255, 215, 0, 0.3);
  transition: transform 0.3s ease;
}

.sticker-card:hover {
  transform: translateY(-5px);
}

.sticker-card img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: 16px;
}

.sticker-card p {
  color: #e9d5ff;
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .sticker-card p {
    font-size: 1rem;
  }
}

/* キーワードグリッド */
.keyword-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
  align-items: center;
}

@media (min-width: 768px) {
  .keyword-grid {
    gap: 32px;
  }
}

.keyword-card {
  background: linear-gradient(145deg, rgba(126, 34, 206, 0.3), rgba(88, 28, 135, 0.5));
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(255, 215, 0, 0.2);
  transition: transform 0.3s ease;
}

.keyword-card:hover {
  transform: translateY(-3px);
}

.keyword-card img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  margin-bottom: 16px;
}

.keyword-card p {
  color: #e9d5ff;
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .keyword-card p {
    font-size: 1rem;
  }
}

/* 3つのステップグリッド */
.steps-grid-three {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .steps-grid-three {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

.step-card {
  background: linear-gradient(145deg, rgba(45, 212, 191, 0.1), rgba(91, 33, 182, 0.8));
  border: 2px solid #2dd4bf;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: transform 0.3s ease;
}

.step-card:hover {
  transform: translateY(-5px);
}

.step-number {
  background: linear-gradient(45deg, #2dd4bf, #0891b2);
  color: #330066;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.25rem;
  margin: 0 auto 16px;
  box-shadow: 0 6px 20px rgba(45, 212, 191, 0.4);
}

.step-card h3 {
  color: #2dd4bf;
  font-size: 1.125rem;
  margin-bottom: 12px;
  font-weight: bold;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .step-card h3 {
    font-size: 1.25rem;
  }
}

.step-card p {
  color: #e9d5ff;
  font-size: 0.875rem;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .step-card p {
    font-size: 1rem;
  }
}

/* 開催店舗 */
.store-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .store-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

.store-button {
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.2), rgba(91, 33, 182, 0.4));
  border: 2px solid #3b82f6;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  display: block;
}

.store-button:hover {
  transform: translateY(-5px) scale(1.05);
  border-color: #60a5fa;
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.store-button h3 {
  color: #93c5fd;
  font-weight: bold;
  font-size: 0.875rem;
  margin-bottom: 4px;
  transition: color 0.3s ease;
}

@media (min-width: 768px) {
  .store-button h3 {
    font-size: 1rem;
  }
}

.store-button:hover h3 {
  color: #dbeafe;
}

.store-button p {
  color: #e9d5ff;
  font-size: 0.75rem;
  transition: color 0.3s ease;
}

.store-button:hover p {
  color: white;
}

.store-notice {
  text-align: center;
}

.store-notice p {
  color: #c4b5fd;
  font-size: 0.875rem;
}

/* 注意事項 */
.notice-list {
  margin-bottom: 32px;
}

.notice-item {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.1), rgba(251, 191, 36, 0.1));
  border-left: 4px solid #ef4444;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.notice-item h4 {
  color: #ef4444;
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 1rem;
}

@media (min-width: 768px) {
  .notice-item h4 {
    font-size: 1.125rem;
  }
}

.notice-item p {
  color: #e9d5ff;
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .notice-item p {
    font-size: 1rem;
  }
}

/* ポプラ社リンク */
.poplar-link {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 215, 0, 0.3);
}

.poplar-text {
  text-align: center;
  margin-bottom: 16px;
}

.poplar-title {
  color: #ffd700;
  font-weight: bold;
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.poplar-description {
  color: #e9d5ff;
  font-size: 0.875rem;
}

.poplar-banner {
  text-align: center;
}

.poplar-banner-link {
  display: inline-block;
  transition: all 0.3s ease;
}

.poplar-banner-link:hover {
  transform: scale(1.05);
}

.poplar-banner img {
  width: 100%;
  max-width: 512px;
  height: auto;
  border-radius: 12px;
  border: 2px solid rgba(255, 215, 0, 0.5);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.poplar-banner-link:hover img {
  border-color: #ffd700;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* ボタンとバッジ */
.cta-center,
.info-center {
  text-align: center;
}

.cta-button {
  display: inline-block;
  background: linear-gradient(45deg, #ef4444, #ec4899);
  color: white;
  padding: 15px 30px;
  border-radius: 50px;
  font-weight: bold;
  font-size: 1.1rem;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
  animation: pulse 2s infinite;
}

.info-badge {
  display: inline-block;
  background: linear-gradient(45deg, #8b5cf6, #a855f7);
  color: white;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

/* 書籍一覧 */
.loading {
  text-align: center;
  padding: 32px 0;
}

.spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-top: 2px solid #ffd700;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading p {
  color: #e9d5ff;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (min-width: 768px) {
  .book-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .book-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.book-item {
  background: linear-gradient(145deg, rgba(126, 34, 206, 0.3), rgba(88, 28, 135, 0.5));
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  text-align: center;
  transition: transform 0.3s ease;
}

.book-item:hover {
  transform: translateY(-5px) scale(1.05);
}

.book-cover {
  display: block;
  text-decoration: none;
  color: inherit;
}

.book-cover img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: 12px;
  transition: box-shadow 0.3s ease;
}

.book-cover:hover img {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.book-title {
  color: #e9d5ff;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .book-title {
    font-size: 0.875rem;
  }
}

.trial-link {
  display: inline-block;
  background: linear-gradient(45deg, #ffd700, #ff8c00);
  color: #330066;
  padding: 6px 12px;
  border-radius: 25px;
  font-size: 0.75rem;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3);
}

.trial-link:hover {
  background: linear-gradient(45deg, #ffed4e, #ffa500);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 215, 0, 0.4);
}

.error-message {
  text-align: center;
  padding: 32px 0;
}

.error-message p {
  color: #e9d5ff;
}

/* フッター */
.footer {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid rgba(255, 215, 0, 0.3);
  margin-top: 64px;
}

.footer p {
  color: #a855f7;
  font-size: 0.875rem;
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
  .main-container {
    padding: 0 15px;
  }

  .content-section,
  .promo-section {
    padding: 20px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-title::after {
    right: -20px;
  }
}

/* スクロールバーカスタマイズ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a0033;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #ffd700, #2dd4bf);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #ffed4e, #0891b2);
}
