/* ===========================
  index.html専用スタイル
  日本風デザイン
=========================== */

/* アニメーションキーフレーム */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* メインコンテンツ */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* セクション共通スタイル */
section {
  animation: fadeInUp 0.8s ease-out;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(212, 175, 55, 0.05));
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 1s ease-out 0.25s both;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 30px;
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #d4af37, #c60c30, #d4af37, transparent);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(28px, 6vw, 42px);
  color: #1a3a52;
  font-weight: bold;
  margin-bottom: 10px;
  letter-spacing: 2px;
/*  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);*/
  filter: drop-shadow(2px 2px 4px black);
}

.section-subtitle {
  font-size: clamp(14px, 3vw, 18px);
  color: #c60c30;
  font-weight: 500;
  margin: 0;
  letter-spacing: 1px;
}

/* ===========================
  ペルソナズセクション
=========================== */
.section-personas {
  padding: 40px;
  border-radius: 12px;
  border-left: 5px solid #c60c30;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.wrap_strokes_list{
    margin: 0 auto;
    display: flex;
    overflow: auto;
    justify-content: flex-start;
}


.strokes_list {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    border: 2px solid transparent;
    animation: scaleUp 0.5s ease-out;
    width: 300px;
    min-width: 300px;
    display: flex;
}
@media screen and (max-width: 480px) {
    .strokes_list {
        width: 200px;
        min-width: 200px;
    }
}

.strokes_list:hover {
  transform: translateY(-12px) scale(1.05);
  box-shadow: 0 12px 28px rgb(198 149 12 / 25%);
  border-color: #d4af37;
  background: linear-gradient(135deg, #fefdfb, #fff);
}

.strokes_name {
  font-size: 15px;
  color: #1a3a52;
  text-align: center;
  margin-bottom: 12px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.strokes_image {
  overflow: hidden;
  border-radius: 6px;
  transition: filter 0.3s ease;
}

.strokes_image:hover {
  filter: brightness(1.1);
}

/* ===========================
  関係図セクション
=========================== */
.section-diagram {
  border-left: 5px solid #1a3a52;
}

.diagram-container {
  max-width: 300px;
  margin: 0 auto;
  animation: fadeInUp 1s ease-out 0.3s both;
  position: relative;
}

.diagram-link {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border: 2px solid rgba(212, 175, 55, 0.3);
}

.diagram-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
  z-index: 1;
}

.diagram-link:hover::before {
  left: 100%;
}

.diagram-link:hover {
  transform: translateY(-12px) scale(1.05);
  box-shadow: 0 12px 28px rgb(198 149 12 / 25%);
  border-color: rgba(212, 175, 55, 0.7);
}

.diagram-link img {
  width: 100%;
  height: auto;
  display: block;
  transition: filter 0.5s ease;
  position: relative;
  z-index: 0;
}

.diagram-link:hover img {
  filter: brightness(1.12) contrast(1.08) saturate(1.05);
}

/* ===========================
  ファンアートセクション
=========================== */
.section-fanart {
  border-left: 5px solid #1a3a52;
}

.fanart-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  animation: fadeInUp 1s ease-out 0.4s both;
  align-items: center;
}

.fanart-card {
  position: relative;
  animation: slideInFromLeft 0.6s ease-out;
}

.fanart-year {
  position: absolute;
  top: -40px;
  left: 0;
  font-size: 70px;
  font-weight: bold;
  color: #c60c30;
  opacity: 0.3;
  z-index: 1;
  letter-spacing: 2px;
}
@media screen and (max-width: 300px) {
    .fanart-year {
        top: -15px;
        font-size: 16px;
    }
}

.fanart-link {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  background: white;
}

.fanart-link:hover {
  transform: translateY(-15px) scale(1.08);
  box-shadow: 0 12px 28px rgb(198 149 12 / 25%);
}

.fanart-link img {
  width: 100%;
  object-fit: contain;
  display: block;
  transition: filter 0.4s ease;
}

.fanart-link:hover img {
  filter: brightness(1.1) saturate(1.1);
}

.fanart-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent, rgba(26, 58, 82, 0.9));
  color: white;
  padding: 30px 20px 20px;
  font-weight: bold;
  font-size: 16px;
  text-align: center;
  transform: translateY(50px);
  transition: transform 0.4s ease;
}

.fanart-link:hover .fanart-overlay {
  transform: translateY(0);
}

/* ===========================
  作者セクション
=========================== */
.section-author {
  border-left: 5px solid #d4af37;
}

.author-container {
  display: flex;
  align-items: center;
  gap: 40px;
  max-width: 600px;
  margin: 0 auto;
  animation: fadeInUp 1s ease-out 0.5s both;
  flex-wrap: wrap;
  justify-content: center;
}

.author-link {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.author-image {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #d4af37;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.author-link:hover .author-image {
  transform: scale(1.1) translateY(-8px);
  box-shadow: 0 12px 36px rgba(198, 12, 48, 0.35);
  border-color: #c60c30;
}

.author-info {
  flex: 1;
  min-width: 250px;
  animation: slideInFromLeft 0.6s ease-out 0.5s both;
}

.author-name {
  font-size: 28px;
  color: #1a3a52;
  margin-bottom: 8px;
  font-weight: bold;
  letter-spacing: 1px;
}

.author-description {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
  line-height: 1.6;
}

.author-portfolio {
  font-size: 15px;
  color: #c60c30;
  font-weight: bold;
  margin: 0;
  letter-spacing: 0.5px;
}

/* ===========================
  レスポンシブ
=========================== */
@media screen and (max-width: 768px) {
  .main-content {
    padding: 25px 15px;
    gap: 40px;
  }

  section {
    padding: 25px !important;
  }

  .section-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
  }

  .section-title {
    font-size: clamp(22px, 5vw, 32px);
  }

  .section-subtitle {
    font-size: clamp(12px, 2.5vw, 16px);
  }

  .fanart-columns {
    gap: 25px;
  }

  .author-container {
    gap: 25px;
  }


/* 作者セクション - 新しいカードレイアウト */
.section-author {
  padding: 30px;
  background: linear-gradient(135deg, rgba(26,58,82,0.03), rgba(255,255,255,0.5));
  border-radius: 12px;
  border: 2px solid rgba(212,175,55,0.12);
  box-shadow: 0 8px 28px rgba(0,0,0,0.06);
}

.author-card {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 980px;
  margin: 18px auto 0 auto;
}

.author-image-link {
  display: block;
  flex: 0 0 120px;
}

.author-image {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  object-fit: cover;
  border: 3px solid rgba(26,58,82,0.08);
  box-shadow: 0 8px 24px rgba(26,58,82,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.author-image-link:hover .author-image {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 14px 36px rgba(26,58,82,0.12);
}

.author-info {
  flex: 1 1 auto;
}

.author-name {
  font-family: "HGRGY";
  font-size: 22px;
  margin: 0 0 6px 0;
  color: #1a3a52;
}

.author-role {
  margin: 0 0 10px 0;
  color: #334a5a;
  font-weight: 600;
}

.author-bio {
  margin: 0 0 12px 0;
  color: #4a5a66;
  line-height: 1.5;
}

.author-links {
  display: flex;
  align-items: center;
  gap: 12px;

}

.author-portfolio {
  display: inline-block;
  background: linear-gradient(135deg,#d4af37,#b8860b);
  color: #fff;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
}

.author-x {
  padding: 0;
  border-radius: 6px;
  transition: background 0.18s ease, transform 0.12s ease;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 28px;
  height: 28px;
}

.author-x img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.author-x:hover {
  background: rgba(26,58,82,0.06);
  transform: translateY(-2px);
}

@media screen and (max-width: 768px) {
  .author-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }
  .author-image {
    width: 110px;
    height: 110px;
    border-radius: 10px;
  }
  .author-portfolio {
    padding: 8px 12px;
  }
}
  .author-image {
    width: 100px;
    height: 100px;
  }

  .author-name {
    font-size: 22px;
  }
}

@media screen and (max-width: 480px) {
  .main-content {
    padding: 15px 10px;
    gap: 30px;
  }

  section {
    padding: 15px !important;
    border-radius: 8px;
  }

  .section-header {
    margin-bottom: 20px;
  }

  .section-title {
    font-size: clamp(20px, 5.5vw, 28px);
  }

  .strokes_name {
    font-size: 12px;
  }

  .fanart-columns {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .author-container {
    flex-direction: column;
    gap: 20px;
  }

  .author-image {
    width: 120px;
    height: 120px;
  }

  .author-name {
    font-size: 20px;
  }

  .author-info {
    text-align: center;
  }
}

/* ===========================
  相関図モーダル
=========================== */
.diagram-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.diagram-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.diagram-modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  width: 90%;
  max-width: 90%;
  height: 85%;
  max-height: 85%;
  display: flex;
  flex-direction: column;
  animation: scaleUp 0.3s ease;
}

.diagram-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 2px solid #d4af37;
  background: linear-gradient(90deg, #1a3a52, #2d5a76);
  color: white;
  border-radius: 12px 12px 0 0;
}

.diagram-modal-header h2 {
  margin: 0;
  font-family: "HGRGY";
  font-size: 24px;
}

.diagram-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 0;
  width: 32px;
  height: 32px;
}

.diagram-close-btn:hover {
  color: #d4af37;
}

.diagram-modal-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background: #f9f9f9;
  border-bottom: 1px solid #e0e0e0;
}

.diagram-zoom-btn {
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.diagram-zoom-btn:hover {
  background: linear-gradient(135deg, #e8c547, #d4af37);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
  transform: scale(1.05);
}

.diagram-zoom-level {
  margin-left: auto;
  font-weight: bold;
  color: #1a3a52;
  min-width: 60px;
  text-align: right;
}

.diagram-modal-body {
  flex: 1;
  /* Disable native scrolling inside modal; we handle pan/zoom by transforms */
  overflow: hidden;
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: #f5f5f5;
  touch-action: none;
}

.diagram-modal-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  touch-action: none;
}

.diagram-note {
  margin: 8px 20px 0 20px;
  color: #1a3a52;
  text-align: center;
  font-size: 14px;
  opacity: 0.95;
}

.diagram-modal-image {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  cursor: grab;
  user-select: none;
  transition: transform 0.2s ease;
  touch-action: none;
  transform-origin: center center;
}

.diagram-modal-image.dragging {
  cursor: grabbing;
}

/* モバイル対応 */
@media screen and (max-width: 768px) {
  .diagram-modal-content {
    width: 95%;
    height: 90%;
  }

  .diagram-modal-header h2 {
    font-size: 18px;
  }

  .diagram-close-btn {
    font-size: 28px;
  }

  .diagram-zoom-btn {
    padding: 6px 12px;
    font-size: 14px;
  }
}
