/* ==========================================================================
   Design System & Variable Declarations
   ========================================================================== */
:root {
  --bg-color: #05060b;
  --bg-darker: #020204;
  --panel-bg: rgba(12, 15, 28, 0.6);
  --panel-border: rgba(207, 160, 84, 0.15);
  --gold-color: #bf953f;
  --gold-light: #fcf6ba;
  --gold-dark: #aa771c;
  --gold-gradient: linear-gradient(135deg, #bf953f 0%, #fcf6ba 25%, #b38728 50%, #fbf5b7 75%, #aa771c 100%);
  --crimson-color: #e50914;
  --crimson-glow: rgba(229, 9, 20, 0.4);
  --text-main: #f3f4f6;
  --text-sub: #9ca3af;
  
  --font-serif: 'Cinzel', 'Times New Roman', serif;
  --font-sans: 'Noto Sans JP', sans-serif;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

body {
  position: relative;
  background: radial-gradient(circle at 50% 30%, #10152b 0%, var(--bg-color) 70%);
  -webkit-font-smoothing: antialiased;
}

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-color);
}

/* ==========================================================================
   Utility Classes & Layout
   ========================================================================== */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 24px;
  position: relative;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  text-align: center;
  font-weight: 700;
  letter-spacing: 4px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  position: relative;
}

.section-subtitle {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  text-align: center;
  color: var(--text-sub);
  letter-spacing: 6px;
  margin-bottom: 60px;
  text-transform: uppercase;
}

/* ==========================================================================
   Navigation Header
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 50px;
  z-index: 1000;
  background: rgba(5, 6, 11, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: var(--transition-smooth);
}

.navbar-logo a {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  gap: 35px;
}

.nav-item {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 1px;
  position: relative;
  padding: 8px 0;
  transition: var(--transition-smooth);
  opacity: 0.8;
}

.nav-item:hover {
  opacity: 1;
  color: var(--gold-light);
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--gold-gradient);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav-item:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.discord-btn-small {
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 4px;
  border: 1px solid var(--gold-color);
  background: transparent;
  color: var(--gold-light);
  font-size: 0.85rem;
  font-weight: bold;
  letter-spacing: 1px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.discord-btn-small:hover {
  background: var(--gold-gradient);
  color: var(--bg-darker);
  box-shadow: 0 0 15px rgba(191, 149, 63, 0.4);
  border-color: transparent;
}

/* モバイル対応ナビゲーション */
@media (max-width: 768px) {
  .navbar {
    padding: 15px 24px;
  }
  .nav-links {
    display: none; /* シンプルにするためモバイルでは非表示に（スクロールで遷移可） */
  }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  padding: 0 20px;
}

.dark-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, transparent 20%, rgba(2, 2, 4, 0.95) 90%);
  z-index: 1;
}

.hero-fog {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400" viewBox="0 0 800 400"><filter id="fog"><feTurbulence type="fractalNoise" baseFrequency="0.01" numOctaves="4" result="noise"/><feColorMatrix type="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 0.15 0"/></filter><rect width="800" height="400" filter="url(%23fog)" fill="%23ffffff" opacity="0.3"/></svg>') repeat-x;
  opacity: 0.25;
  z-index: 2;
  animation: fogMovement 60s linear infinite;
  pointer-events: none;
}

@keyframes fogMovement {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

.hero-content {
  position: relative;
  z-index: 5;
  max-width: 800px;
  animation: fadeInDown 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.ship-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.ship-icon {
  width: 100px;
  height: auto;
  filter: drop-shadow(0 0 8px rgba(191, 149, 63, 0.4));
  margin-bottom: 10px;
  animation: shipFloat 4s ease-in-out infinite;
}

@keyframes shipFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(-1deg); }
}

.badge-text {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  letter-spacing: 4px;
  color: var(--gold-light);
  opacity: 0.8;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 5rem;
  font-weight: 700;
  letter-spacing: 8px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(170, 119, 28, 0.2));
  margin-bottom: 15px;
}

.hero-tagline {
  font-family: var(--font-sans);
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--text-main);
  letter-spacing: 8px;
  margin-bottom: 25px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-subtext {
  font-size: 1rem;
  color: var(--text-sub);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.8;
  letter-spacing: 1px;
}

/* Discord CTAボタン(大) */
.discord-btn-large {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 18px 45px;
  background: rgba(12, 15, 28, 0.8);
  border: 1px solid var(--gold-color);
  color: var(--gold-light);
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 2px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.btn-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(252, 246, 186, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.discord-btn-large:hover .btn-glow {
  opacity: 1;
}

.discord-btn-large:hover {
  background: var(--gold-gradient);
  color: var(--bg-darker);
  box-shadow: 0 0 30px rgba(191, 149, 63, 0.5), 0 0 60px rgba(191, 149, 63, 0.2);
  border-color: transparent;
  transform: translateY(-2px);
}

/* スクロールインジケーター */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 5;
  color: var(--text-sub);
  font-size: 0.75rem;
  letter-spacing: 3px;
  opacity: 0.7;
}

.mouse-icon {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-sub);
  border-radius: 12px;
  position: relative;
}

.mouse-wheel {
  width: 4px;
  height: 8px;
  background-color: var(--gold-color);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
  0% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 12px); }
}

@media (max-width: 768px) {
  .hero-title { font-size: 3rem; letter-spacing: 4px; }
  .hero-tagline { font-size: 1.3rem; letter-spacing: 4px; }
  .discord-btn-large { padding: 15px 30px; font-size: 0.95rem; }
}

/* ==========================================================================
   Story Section
   ========================================================================== */
.story-section {
  background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-color) 100%);
  position: relative;
}

.deco-border-top, .deco-border-bottom {
  height: 1px;
  width: 60%;
  margin: 0 auto;
  background: var(--gold-gradient);
  opacity: 0.3;
  position: relative;
}

.deco-border-top::before, .deco-border-bottom::before {
  content: '✦';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-color);
  color: var(--gold-color);
  padding: 0 10px;
  font-size: 0.8rem;
}

.story-content {
  max-width: 750px;
  margin: 60px auto;
  text-align: center;
}

.story-text-wrapper {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 50px 40px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.story-paragraph {
  font-size: 1.05rem;
  line-height: 2.2;
  margin-bottom: 25px;
  color: var(--text-main);
  opacity: 0.9;
  letter-spacing: 1.5px;
}

.story-paragraph.highlight {
  color: var(--gold-light);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(252, 246, 186, 0.2);
}

.story-paragraph.highlight-crimson {
  color: var(--crimson-color);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 3px;
  margin: 35px 0;
  text-shadow: 0 0 12px var(--crimson-glow);
}

.story-conclusion {
  font-size: 1.1rem;
  color: var(--gold-color);
  font-weight: 600;
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .story-text-wrapper { padding: 30px 20px; }
  .story-paragraph { font-size: 0.95rem; line-height: 2; }
  .story-paragraph.highlight-crimson { font-size: 1.1rem; }
}

/* ==========================================================================
   Decks Section (船内施設)
   ========================================================================== */
.decks-section {
  background: var(--bg-color);
}

.deck-interface {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  margin-top: 20px;
  min-height: 420px;
}

.deck-tabs {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.deck-tab {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 20px 24px;
  border-radius: 4px;
  color: var(--text-sub);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: var(--transition-smooth);
}

.deck-tab:hover {
  background: rgba(207, 160, 84, 0.05);
  border-color: rgba(207, 160, 84, 0.3);
  color: var(--text-main);
}

.deck-tab.active {
  background: linear-gradient(90deg, rgba(191, 149, 63, 0.15) 0%, rgba(191, 149, 63, 0.02) 100%);
  border-left: 4px solid var(--gold-color);
  border-top-color: rgba(207, 160, 84, 0.2);
  border-right-color: rgba(207, 160, 84, 0.1);
  border-bottom-color: rgba(207, 160, 84, 0.2);
  color: var(--gold-light);
  box-shadow: -5px 5px 20px rgba(0, 0, 0, 0.3);
}

.deck-num {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  opacity: 0.6;
}

.deck-tab.active .deck-num {
  color: var(--gold-color);
  opacity: 1;
}

.deck-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 1px;
}

/* デッキ表示部 */
.deck-display {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  position: relative;
}

/* ブループリントSVG用のコンテナ */
.deck-visual-wrapper {
  position: relative;
  width: 100%;
  height: 250px;
  background: radial-gradient(circle, #0c1226 0%, #04060e 100%);
  border: 1px dashed rgba(191, 149, 63, 0.2);
  border-radius: 6px;
  overflow: hidden;
}

.deck-art {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.deck-art.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.blueprint-svg {
  width: 100%;
  height: 100%;
  padding: 10px;
}

.deck-info-card {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 25px;
}

.deck-info-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.deck-info-desc {
  font-size: 0.95rem;
  color: var(--text-sub);
  line-height: 1.8;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.deck-tags {
  display: flex;
  gap: 12px;
}

.tag {
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.tag-safety {
  background: rgba(207, 160, 84, 0.1);
  color: var(--gold-light);
  border: 1px solid rgba(207, 160, 84, 0.2);
}

.tag-danger {
  background: rgba(229, 9, 20, 0.1);
  color: var(--crimson-color);
  border: 1px solid rgba(229, 9, 20, 0.2);
}

@media (max-width: 900px) {
  .deck-interface {
    grid-template-columns: 1fr;
  }
  .deck-tabs {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .deck-tab {
    flex: 1;
    min-width: 150px;
    justify-content: center;
  }
}

/* ==========================================================================
   Roles Section (乗船名簿)
   ========================================================================== */
.roles-section {
  background: linear-gradient(180deg, var(--bg-color) 0%, var(--bg-darker) 100%);
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 30px;
}

/* 3Dカードフリップエフェクト */
.role-card {
  background-color: transparent;
  height: 350px;
  perspective: 1000px; /* 3D空間の奥行き */
  cursor: pointer;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
}

/* ホバー時にフリップ */
.role-card:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 8px;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.card-front {
  background: rgba(15, 20, 35, 0.7);
  border: 1px solid var(--panel-border);
}

.card-back {
  background: rgba(26, 12, 15, 0.95);
  border: 1px solid rgba(229, 9, 20, 0.3);
  transform: rotateY(180deg);
  justify-content: flex-start;
  text-align: left;
}

/* アール・デコ調のカード飾り枠 */
.card-border, .card-border-red {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  pointer-events: none;
  border-radius: 4px;
  transition: var(--transition-smooth);
}

.card-border {
  border: 1px solid rgba(191, 149, 63, 0.15);
}

.card-border-red {
  border: 1px solid rgba(229, 9, 20, 0.15);
}

.role-card:hover .card-border {
  border-color: rgba(191, 149, 63, 0.5);
  box-shadow: 0 0 15px rgba(191, 149, 63, 0.2);
}

/* フロント面のスタイル */
.role-icon {
  width: 60px;
  height: 60px;
  color: var(--gold-color);
  margin-bottom: 25px;
  transition: var(--transition-smooth);
  filter: drop-shadow(0 0 5px rgba(191, 149, 63, 0.3));
}

.role-icon.icon-crimson {
  color: var(--crimson-color);
  filter: drop-shadow(0 0 8px var(--crimson-glow));
}

.role-icon.icon-gold {
  color: #d4af37;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.3));
}

.role-card:hover .role-icon {
  transform: scale(1.1);
}

.role-name {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 15px;
  color: var(--text-main);
}

.role-name.color-crimson {
  color: var(--crimson-color);
  text-shadow: 0 0 10px rgba(229, 9, 20, 0.2);
}

.role-name.color-gold {
  color: #d4af37;
}

.role-alignment {
  font-size: 0.8rem;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 700;
}

.alignment-good {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-sub);
}

.alignment-evil {
  background: rgba(229, 9, 20, 0.15);
  color: var(--crimson-color);
}

/* バック面のスタイル */
.back-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 15px;
  align-self: center;
  color: var(--gold-light);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  width: 100%;
  text-align: center;
}

.back-desc {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-main);
  opacity: 0.85;
  margin-bottom: auto;
}

.back-stat {
  font-size: 0.8rem;
  color: var(--text-sub);
  display: flex;
  justify-content: space-between;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
}

.stat-stars {
  color: var(--gold-color);
  letter-spacing: 1px;
}

/* ==========================================================================
   Join Section (乗船手順)
   ========================================================================== */
.join-section {
  background: var(--bg-darker);
}

.join-timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 60px;
  position: relative;
}

/* タイムラインの横線 */
.join-timeline::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 10%;
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold-color) 20%, var(--gold-color) 80%, transparent 100%);
  opacity: 0.2;
  z-index: 1;
}

.timeline-item {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 10px;
}

.timeline-number {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 1px solid var(--gold-color);
  color: var(--gold-light);
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 25px;
  box-shadow: 0 0 20px rgba(191, 149, 63, 0.15);
  transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-number {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(191, 149, 63, 0.4);
  color: var(--gold-light);
  background: var(--gold-gradient);
  color: var(--bg-darker);
  border-color: transparent;
}

.timeline-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-sub);
  line-height: 1.7;
}

.join-action {
  text-align: center;
}

@media (max-width: 800px) {
  .join-timeline {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  .join-timeline::before {
    display: none;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: #020306;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  padding: 60px 24px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  text-align: center;
}

.footer-logo {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.logo-main {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 3px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-sub {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  color: var(--text-sub);
  letter-spacing: 4px;
}

.footer-links {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--gold-color);
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 10px;
  line-height: 1.6;
}

/* ==========================================================================
   Animations & Scroll Reveal
   ========================================================================== */
@keyframes fadeInDown {
  0% { opacity: 0; transform: translateY(-30px); }
  100% { opacity: 1; transform: translateY(0); }
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   roles.html 専用スタイル
   ========================================================================== */

/* ---- ページヘッダー (roles.html のヒーロー代替) ---- */
.page-header {
  position: relative;
  height: 50vh;
  min-height: 320px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  padding: 80px 20px 0;
}

.page-header-content {
  position: relative;
  z-index: 5;
  animation: fadeInDown 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-header-label {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 6px;
  color: var(--text-sub);
  margin-bottom: 14px;
}

.page-header-title {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 6px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 18px;
}

.page-header-desc {
  font-size: 1rem;
  color: var(--text-sub);
  line-height: 1.9;
  letter-spacing: 1px;
}

/* ---- ページタブ (役職一覧 / アイテム一覧) ---- */
.roles-page-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 40px 24px 0;
  position: relative;
  z-index: 10;
}

.rpage-tab {
  background: transparent;
  border: 1px solid rgba(191, 149, 63, 0.5);
  color: var(--text-sub);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 14px 50px;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}

.rpage-tab:first-child {
  border-radius: 4px 0 0 4px;
}

.rpage-tab:last-child {
  border-radius: 0 4px 4px 0;
  margin-left: -1px;
}

.rpage-tab.active {
  background: linear-gradient(135deg, rgba(191,149,63,0.18) 0%, rgba(191,149,63,0.05) 100%);
  border-color: rgba(191, 149, 63, 0.5);
  color: var(--gold-light);
  box-shadow: 0 0 20px rgba(191, 149, 63, 0.15);
  z-index: 1;
}

.rpage-tab:hover:not(.active) {
  color: var(--text-main);
  background: rgba(191, 149, 63, 0.06);
}

/* ---- セクション表示切り替え ---- */
.rpage-section {
  display: none;
}

.rpage-section.active {
  display: block;
}

/* ---- 現在ページのナビリンクにアクティブ表示 ---- */
.nav-item.active-page {
  color: var(--gold-light);
  opacity: 1;
}

.nav-item.active-page::after {
  transform: scaleX(1);
}

/* ---- 陣営フィルター ---- */
.alignment-filter {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 50px;
}

.filter-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-sub);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 9px 26px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn.active,
.filter-btn:hover {
  background: rgba(191, 149, 63, 0.12);
  border-color: var(--gold-color);
  color: var(--gold-light);
}

/* ---- アイテムグリッド ---- */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.item-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 28px 24px;
  display: flex;
  align-items: flex-start;
  gap: 22px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.item-card:hover {
  border-color: rgba(191, 149, 63, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.item-icon-wrap {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(191, 149, 63, 0.08);
  border: 1px solid rgba(191, 149, 63, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--gold-color);
  transition: var(--transition-smooth);
}

.item-card:hover .item-icon-wrap {
  background: rgba(191, 149, 63, 0.15);
  box-shadow: 0 0 16px rgba(191, 149, 63, 0.2);
}

.item-icon-wrap.item-icon-crimson {
  background: rgba(229, 9, 20, 0.08);
  border-color: rgba(229, 9, 20, 0.2);
  color: var(--crimson-color);
}

.item-card:hover .item-icon-wrap.item-icon-crimson {
  background: rgba(229, 9, 20, 0.15);
  box-shadow: 0 0 16px rgba(229, 9, 20, 0.2);
}

.item-icon-wrap.item-icon-gold {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.3);
  color: #d4af37;
}

.item-icon {
  width: 26px;
  height: 26px;
}

.item-info {
  flex: 1;
}

.item-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.item-rarity {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.rarity-common  { color: #9ca3af; }
.rarity-rare    { color: #60a5fa; }
.rarity-epic    { color: #c084fc; }
.rarity-legend  { color: #fbbf24; }

.item-desc {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text-sub);
}

.items-note {
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.5px;
  margin-top: 10px;
}

@media (max-width: 600px) {
  .page-header-title { font-size: 2.5rem; }
  .rpage-tab { padding: 12px 28px; font-size: 0.9rem; }
  .items-grid { grid-template-columns: 1fr; }
  .item-card { flex-direction: column; align-items: center; text-align: center; }
}
