:root {
  /* Cinematic Color Palette - HSL based for better harmony */
  --bg-dark: hsl(230, 25%, 5%);
  --bg-deep: hsl(230, 25%, 8%);
  --accent-gold: hsl(45, 70%, 55%);
  --accent-gold-glow: hsla(45, 70%, 55%, 0.4);
  --text-primary: hsl(210, 20%, 95%);
  --text-secondary: hsl(215, 15%, 70%);
  --text-muted: hsl(215, 15%, 50%);
  
  /* Glassmorphism Tokens */
  --glass-bg: hsla(0, 0%, 100%, 0.03);
  --glass-border: hsla(0, 0%, 100%, 0.08);
  --glass-highlight: hsla(0, 0%, 100%, 0.12);
  
  /* Shadows & Effects */
  --shadow-lg: 0 20px 40px hsla(0, 0%, 0%, 0.6);
  --glow-gold: 0 0 20px var(--accent-gold-glow);
  
  /* Layout */
  --container-width: 1100px;
  --header-height: 80px;
  --transition-smooth: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  
  /* Fonts */
  --font-serif: "Noto Serif JP", serif;
  --font-sans: "Noto Sans JP", sans-serif;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #fff;
}

p {
  color: var(--text-secondary);
}

.text-gold {
  color: var(--accent-gold);
  text-shadow: 0 0 10px var(--accent-gold-glow);
}

/* Glass Card Utility */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  transition: var(--transition-smooth);
}

/* Navbar */
.navbar {
  height: var(--header-height);
  background: hsla(230, 25%, 5%, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
}

.nav-container {
  max-width: var(--container-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--accent-gold);
  text-decoration: none;
  letter-spacing: 0.1em;
}

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

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  opacity: 0.7;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  transition: var(--transition-smooth);
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
  color: var(--accent-gold);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hero Section */
.hero {
  height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: 
    radial-gradient(circle at center, hsla(230, 25%, 15%, 0.5) 0%, var(--bg-dark) 100%),
    url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="0.03"/></svg>');
  padding: 0 20px;
  position: relative;
  margin-top: 0;
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 5.5rem);
  margin-bottom: 25px;
  background: linear-gradient(to bottom, #fff 30%, var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px var(--accent-gold-glow));
  animation: heroReveal 1.5s ease-out;
}

.hero p {
  font-size: 1.3rem;
  max-width: 700px;
  margin-bottom: 40px;
  color: var(--text-secondary);
  animation: heroReveal 1.8s ease-out;
}

@keyframes heroReveal {
  from { opacity: 0; transform: translateY(30px); filter: blur(10px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.scroll-indicator {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 55px;
  border: 2px solid var(--glass-border);
  border-radius: 20px;
  opacity: 0.5;
}

.scroll-indicator::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 10px;
  background: var(--accent-gold);
  border-radius: 3px;
  animation: scrollAnim 2s infinite;
}

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

/* Container */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 25px;
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.8rem;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent-gold);
}

/* Category Tags */
.category-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 80px;
}

.category-tag {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 10px 25px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
}

.category-tag:hover {
  background: var(--accent-gold);
  color: var(--bg-dark);
  border-color: var(--accent-gold);
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--glow-gold);
}

/* Article Grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.article-card {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  padding: 35px;
  height: 100%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.article-card:hover {
  background: var(--glass-highlight);
  border-color: hsla(45, 70%, 55%, 0.3);
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  opacity: 0;
  transition: var(--transition-smooth);
}

.article-card:hover::before {
  opacity: 1;
}

.era-tag {
  display: inline-block;
  background: hsla(45, 70%, 55%, 0.15);
  color: var(--accent-gold);
  padding: 5px 15px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  border: 1px solid hsla(45, 70%, 55%, 0.2);
}

.article-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  line-height: 1.3;
}

.meta-info {
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.excerpt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: auto;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--glass-border), var(--accent-gold), var(--glass-border), transparent);
  transform: translateX(-50%);
}

.era-section {
  width: 50%;
  padding: 40px;
  position: relative;
  opacity: 0;
  transform: translateY(50px);
  transition: var(--transition-smooth);
}

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

.era-section:nth-child(even) {
  margin-left: auto;
  text-align: left;
}

.era-section:nth-child(odd) {
  text-align: right;
}

.era-section::after {
  content: '';
  position: absolute;
  top: 60px;
  width: 20px;
  height: 20px;
  background: var(--bg-dark);
  border: 4px solid var(--accent-gold);
  border-radius: 50%;
  z-index: 2;
  box-shadow: var(--glow-gold);
}

.era-section:nth-child(even)::after {
  left: -10px;
}

.era-section:nth-child(odd)::after {
  right: -10px;
}

.era-content {
  padding: 40px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  border-radius: 24px;
}

.era-year {
  font-size: 3rem;
  color: var(--accent-gold);
  font-family: var(--font-serif);
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .timeline::before { left: 20px; }
  .era-section { width: 100%; text-align: left !important; padding-left: 50px; }
  .era-section::after { left: 10px !important; }
}

/* Buttons */
.btn-affiliate {
  display: inline-block;
  padding: 15px 35px;
  background: linear-gradient(135deg, var(--accent-gold), #b8912b);
  color: var(--bg-dark);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 800;
  font-family: var(--font-serif);
  transition: var(--transition-smooth);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  text-align: center;
  border: none;
}

.btn-affiliate:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 30px var(--accent-gold-glow);
  filter: brightness(1.1);
}

/* Article Page Specific */
.article-page .page-title {
  font-size: 3.5rem;
  margin-bottom: 30px;
}

.article-header {
  text-align: center;
  margin-bottom: 60px;
}

.article-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  background: var(--glass-bg);
  padding: 30px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  margin-bottom: 40px;
}

.article-meta p {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.article-meta strong {
  color: var(--accent-gold);
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.article-body {
  font-size: 1.15rem;
  line-height: 2;
  color: var(--text-secondary);
}

.article-body p {
  margin-bottom: 30px;
}

/* Search Box */
.search-box {
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: 50px;
  padding: 5px 30px;
  display: flex;
  align-items: center;
  transition: var(--transition-smooth);
  max-width: 600px;
  margin: 0 auto 50px;
}

.search-box:focus-within {
  border-color: var(--accent-gold);
  box-shadow: var(--glow-gold);
  background: var(--glass-highlight);
}

.search-box input {
  background: transparent;
  border: none;
  color: #fff;
  padding: 15px 0;
  width: 100%;
  font-size: 1.1rem;
  outline: none;
}

/* Policy & Static Pages */
.policy-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 50px;
  backdrop-filter: blur(20px);
}

/* Breadcrumb */
.breadcrumb {
  list-style: none;
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  margin-bottom: 30px;
  opacity: 0.6;
}

.breadcrumb a {
  color: var(--text-primary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent-gold);
}

/* Ad Space */
.ad-space {
  background: var(--glass-bg);
  border: 1px dashed var(--glass-border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Footer */
footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--glass-border);
  margin-top: 100px;
  text-align: center;
}

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

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

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

/* --- Ranking Styles --- */
.ranking-item {
  transition: var(--transition-smooth);
}

.ranking-item:hover {
  transform: scale(1.02) !important;
  border-color: var(--accent-gold) !important;
  box-shadow: var(--shadow-lg) !important;
}

.rank-1 { border: 2px solid var(--accent-gold) !important; background: hsla(45, 70%, 55%, 0.05) !important; }
.rank-2 { border: 1.5px solid hsl(0, 0%, 75%) !important; }
.rank-3 { border: 1.5px solid hsl(30, 60%, 50%) !important; }
