@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Noto+Sans+TC:wght@300;400;500;700&display=swap');

:root {
  --bg-color: #050608;
  --bg-dots: rgba(185, 28, 28, 0.04);
  --card-bg: rgba(18, 20, 26, 0.8);
  --card-bg-hover: rgba(26, 28, 38, 0.9);
  --card-border: rgba(185, 28, 28, 0.2);
  --card-border-active: rgba(185, 28, 28, 0.6);
  --bronze-gold: #b5903b;
  --bronze-gold-glow: rgba(181, 144, 59, 0.3);
  --bronze-gold-light: #edd8a4;
  --fellowship-red: #991b1b;
  --fellowship-red-bright: #ef4444;
  --fellowship-red-glow: rgba(239, 68, 68, 0.4);
  --ether-blue: #0ea5e9;
  --ether-blue-glow: rgba(14, 165, 233, 0.4);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --transition-speed: 0.3s;
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(var(--bg-dots) 1px, transparent 0),
    radial-gradient(var(--bg-dots) 1px, transparent 0);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
  color: var(--text-main);
  font-family: 'Noto Sans TC', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #050608;
}
::-webkit-scrollbar-thumb {
  background: var(--fellowship-red);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--fellowship-red-bright);
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'Cinzel', 'Noto Sans TC', serif;
  color: var(--bronze-gold);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  letter-spacing: 1px;
}

h1 {
  font-size: 2.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.8rem;
  border-bottom: 2px solid var(--card-border);
  padding-bottom: 0.5rem;
  margin: 2rem 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

h2::before {
  content: '✦';
  font-size: 1.2rem;
  color: var(--fellowship-red-bright);
}

h3 {
  font-size: 1.3rem;
  margin: 1.5rem 0 0.8rem 0;
}

p {
  color: var(--text-main);
  margin-bottom: 1rem;
  text-align: justify;
}

strong {
  color: var(--bronze-gold-light);
}

a {
  color: var(--bronze-gold);
  text-decoration: none;
  transition: color var(--transition-speed);
}

a:hover {
  color: var(--bronze-gold-light);
  text-decoration: underline;
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(5, 6, 8, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  transition: all var(--transition-speed);
}

header.scrolled {
  padding: 5px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.logo {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--bronze-gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 1.5rem;
  color: var(--fellowship-red-bright);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 20px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all var(--transition-speed);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--bg-color);
  background: var(--bronze-gold);
  text-decoration: none;
  box-shadow: 0 0 10px var(--bronze-gold-glow);
}

/* Hero Section */
.hero-section {
  padding: 140px 20px 60px 20px;
  text-align: center;
  position: relative;
  background: linear-gradient(180deg, rgba(30, 10, 10, 0.4) 0%, rgba(5, 6, 8, 0) 100%);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 10px auto 20px auto;
  font-family: 'Cinzel', serif;
}

.hero-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(185, 28, 28, 0.1);
  border: 1px solid var(--fellowship-red-bright);
  border-radius: 20px;
  color: var(--fellowship-red-bright);
  font-size: 0.85rem;
  margin-bottom: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Main Container */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 80px 20px;
}

.content-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 40px;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: transform var(--transition-speed), border-color var(--transition-speed);
}

.content-card:hover {
  border-color: rgba(185, 28, 28, 0.3);
}

/* Callout Box */
.callout-box {
  background: rgba(185, 28, 28, 0.04);
  border-left: 4px solid var(--fellowship-red-bright);
  padding: 20px;
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
}

.callout-title {
  font-family: 'Cinzel', serif;
  color: var(--fellowship-red-bright);
  font-weight: bold;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Intro Grid */
.intro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.feature-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 20px;
  transition: all var(--transition-speed);
}

.feature-box:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--bronze-gold);
  transform: translateY(-3px);
}

.feature-title {
  color: var(--bronze-gold-light);
  font-size: 1.1rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Truth Interrogator Interactive Component */
.interrogator-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 30px;
  margin-top: 25px;
}

.suspects-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.suspect-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition-speed);
  position: relative;
  overflow: hidden;
}

.suspect-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--bronze-gold);
}

.suspect-card.active {
  background: rgba(153, 27, 27, 0.15);
  border-color: var(--fellowship-red-bright);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.suspect-name {
  font-size: 1.1rem;
  color: var(--text-main);
  font-weight: bold;
}

.suspect-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.interrogation-panel {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 350px;
  position: relative;
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.interrogation-panel.cube-active {
  border-color: var(--fellowship-red-bright);
  box-shadow: 0 0 20px var(--fellowship-red-glow);
}

.interrogation-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--bronze-gold);
  transition: background var(--transition-speed);
}

.interrogation-panel.cube-active::before {
  background: var(--fellowship-red-bright);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.panel-title {
  font-size: 1.3rem;
  color: var(--bronze-gold-light);
  font-weight: bold;
}

.cube-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bronze-gold);
  color: var(--bronze-gold-light);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-speed);
}

.cube-toggle-btn:hover {
  background: rgba(181, 144, 59, 0.1);
  color: var(--text-main);
}

.cube-toggle-btn.active {
  background: var(--fellowship-red-bright);
  border-color: var(--fellowship-red-bright);
  color: #fff;
  box-shadow: 0 0 12px var(--fellowship-red-glow);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 4px var(--fellowship-red-glow); }
  50% { box-shadow: 0 0 15px var(--fellowship-red-bright); }
  100% { box-shadow: 0 0 4px var(--fellowship-red-glow); }
}

.testimony-box {
  flex-grow: 1;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 15px;
  font-style: italic;
  font-size: 1rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

.testimony-text {
  transition: opacity 0.2s ease-in-out;
  width: 100%;
}

.truth-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.status-lie {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--fellowship-red-bright);
  color: var(--fellowship-red-bright);
}

.status-truth {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #34d399;
}

.suspect-verdict {
  font-size: 0.9rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 10px;
}

/* Forge of Virtue Talismans Grid */
.talismans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.talisman-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 24px;
  transition: all var(--transition-speed);
  position: relative;
  overflow: hidden;
}

.talisman-card:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--bronze-gold);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.talisman-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, var(--bronze-gold-glow) 0%, transparent 70%);
  opacity: 0.5;
}

.talisman-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.talisman-name {
  font-size: 1.2rem;
  color: var(--bronze-gold-light);
  font-weight: bold;
}

.talisman-reward {
  font-size: 0.85rem;
  font-weight: bold;
  background: rgba(181, 144, 59, 0.1);
  padding: 2px 8px;
  border: 1px solid var(--bronze-gold);
  border-radius: 4px;
  color: var(--bronze-gold-light);
}

.talisman-desc {
  font-size: 0.9rem;
  color: var(--text-main);
  text-align: justify;
}

/* Timeline Layout */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 30px auto;
  padding: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  width: 2px;
  background: var(--card-border);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  right: -8px;
  background-color: var(--bg-color);
  border: 3px solid var(--fellowship-red-bright);
  border-radius: 50%;
  top: 15px;
  z-index: 1;
  transition: all var(--transition-speed);
}

.timeline-item:nth-child(even)::after {
  left: -8px;
}

.timeline-item:hover::after {
  background-color: var(--fellowship-red-bright);
  box-shadow: 0 0 10px var(--fellowship-red-glow);
  transform: scale(1.2);
}

.timeline-content {
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  position: relative;
}

.timeline-item:hover .timeline-content {
  border-color: var(--fellowship-red-bright);
  background: rgba(255, 255, 255, 0.03);
}

.timeline-title {
  color: var(--bronze-gold-light);
  font-size: 1.15rem;
  margin-bottom: 8px;
  font-weight: bold;
}

.timeline-text {
  font-size: 0.9rem;
  color: var(--text-main);
  text-align: justify;
}

/* Footer */
footer {
  border-top: 1px solid var(--card-border);
  padding: 40px 20px;
  text-align: center;
  background: #030406;
}

.footer-logo {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: var(--bronze-gold);
  margin-bottom: 10px;
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Side Quests Sections */
.side-quest-box {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 15px 0;
  margin-bottom: 15px;
}

.side-quest-box:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.side-quest-title {
  color: var(--bronze-gold-light);
  font-weight: bold;
  font-size: 1.05rem;
  margin-bottom: 5px;
}

/* Responsive Styles */
@media (max-width: 900px) {
  .interrogator-container {
    grid-template-columns: 1fr;
  }
  
  .timeline::before {
    left: 30px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 20px;
    text-align: left !important;
  }
  
  .timeline-item:nth-child(even) {
    left: 0;
  }
  
  .timeline-item::after {
    left: 22px !important;
    right: auto !important;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .nav-links {
    display: none;
  }
  
  .hero-section {
    padding-top: 100px;
  }
  
  .content-card {
    padding: 20px;
  }
}

/* Split Box for Sailing Guide */
.split-box {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 25px;
  align-items: center;
}

@media (max-width: 900px) {
  .split-box {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }
}
