:root {
  --color-bg: #0a0a0a;
  --color-surface: #1a1a1a;
  --color-primary: #d4af37; /* Gold */
  --color-primary-light: #f3e5ab;
  --color-text: #ffffff;
  --color-text-muted: #a0a0a0;
  --font-base: 'Shippori Mincho', 'Noto Serif JP', serif;
  --font-heading: 'Cinzel', 'Shippori Mincho', serif;
}

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

body {
  font-family: var(--font-base);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-primary);
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  transition: all 0.3s ease;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px; /* Adjust height as needed */
  width: auto;
}

.hero-logo img {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.5);
  animation: fadeInUp 1s ease-out;
  margin-bottom: 20px;
}

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

.nav-links li a {
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Hamburger */
.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background-color: var(--color-primary);
  transition: 0.3s;
}

/* Hero Section */
.hero {
  height: 100vh;
  background-image: linear-gradient(to bottom, rgba(10,10,10,0.3), rgba(10,10,10,1)), url('images/top_bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero h1 {
  font-size: 4rem;
  color: var(--color-primary);
  margin-bottom: 20px;
  font-family: var(--font-heading);
  text-shadow: 0 4px 10px rgba(0,0,0,0.5);
  animation: fadeInUp 1s ease-out;
}

.hero p {
  font-size: 1.2rem;
  letter-spacing: 3px;
  animation: fadeInUp 1s ease-out 0.3s backwards;
}

/* Section Common */
section {
  padding: 100px 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 50px;
  font-family: var(--font-heading);
  letter-spacing: 2px;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 2px;
  background: var(--color-primary);
  margin: 20px auto 0;
}

/* About Section */
.about-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 2;
  color: var(--color-text-muted);
}

.about-content p {
  margin-bottom: 20px;
}

/* Cast Section (Top Page) */
.cast-preview {
  text-align: center;
}

.btn-primary {
  display: inline-block;
  padding: 15px 40px;
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  font-size: 1.1rem;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-top: 30px;
}

.btn-primary:hover {
  background: var(--color-primary);
  color: var(--color-bg);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

/* Shop Photo Section */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

/* Lightbox Modal */
.lightbox {
  visibility: hidden;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox.show {
  visibility: visible;
  opacity: 1;
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  animation: zoom 0.3s ease;
}

@keyframes zoom {
  from {transform:scale(0.8)}
  to {transform:scale(1)}
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 50px;
  font-weight: bold;
  transition: color 0.3s;
  cursor: pointer;
  z-index: 2001;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: var(--color-primary);
}

/* Cast Modal specific */
.cast-modal-content {
  background: var(--color-surface);
  margin: auto;
  padding: 30px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  max-width: 800px;
  width: 90%;
  display: flex;
  gap: 30px;
  animation: zoom 0.3s ease;
  flex-wrap: wrap; /* Supports mobile stacking */
  color: var(--color-text);
}

.cast-modal-content img {
  width: 300px;
  height: 400px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.cast-modal-text {
  flex: 1;
  min-width: 250px;
  text-align: left;
}

#cast-modal-desc {
  white-space: pre-wrap;
}


/* Calendar / Info Section */
.info-box {
  max-width: 600px;
  margin: 0 auto;
  background: var(--color-surface);
  padding: 40px;
  text-align: center;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 4px;
}

.info-box h3 {
  color: var(--color-primary);
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.info-box p {
  font-size: 1.2rem;
}

/* SNS Section */
.sns-container {
  max-width: 600px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.cast-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

/* Footer */
footer {
  text-align: center;
  padding: 30px;
  background: var(--color-surface);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  margin-top: 50px;
}

footer p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Cast Page Specific */
.cast-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.cast-card {
  background: var(--color-surface);
  border: 1px solid rgba(212, 175, 55, 0.1);
  transition: all 0.3s ease;
  text-align: center;
  padding-bottom: 20px;
}

.cast-card:hover {
  transform: translateY(-5px);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.cast-img-wrapper {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  margin-bottom: 15px;
}

.cast-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.cast-card:hover .cast-img-wrapper img {
  transform: scale(1.05);
}

.cast-name {
  font-size: 1.2rem;
  color: var(--color-primary);
  margin-bottom: 5px;
}

.cast-category {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.category-filter {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  color: var(--color-text);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--color-primary);
  color: var(--color-bg);
  border-color: var(--color-primary);
}

.filter-select {
  background: transparent;
  color: var(--color-text);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 20px;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
  min-width: 120px;
}

.filter-select:focus, .filter-select:hover {
  outline: none;
  border-color: var(--color-primary);
}

.filter-select option {
  background: var(--color-surface);
  color: var(--color-text);
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(10, 10, 10, 0.95);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: right 0.3s ease;
  }

  .nav-links.active {
    right: 0;
  }

  .hamburger {
    display: flex;
  }

  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero-logo img {
    width: 200px;
    height: 200px;
  }

  section {
    padding: 60px 5%;
  }

  .cast-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .cast-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .cast-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* Inactive Cast Styles (Visually identical to active, just used for sorting logic in JS) */

/* News Styles */
.news-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: left;
}

.news-row-item {
  display: flex;
  align-items: center;
  padding: 15px 10px;
  border-bottom: 1px dashed rgba(212, 175, 55, 0.2);
  transition: background-color 0.3s ease, border-color 0.3s ease;
  gap: 20px;
}

.news-row-item:hover {
  background-color: rgba(212, 175, 55, 0.05);
  border-bottom: 1px solid var(--color-primary);
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.news-date {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--color-text-muted);
  letter-spacing: 1px;
}

.news-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 2px;
  text-align: center;
  min-width: 80px;
  letter-spacing: 1px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge-event {
  border-color: #8b0000; /* Deep red (representing Higanbana / Lycoris) */
  color: #ff4d4d;
  background-color: rgba(139, 0, 0, 0.15);
}

.badge-product {
  border-color: var(--color-primary); /* Gold */
  color: var(--color-primary-light);
  background-color: rgba(212, 175, 55, 0.15);
}

.badge-news {
  border-color: #4682b4; /* Steel blue */
  color: #87cefa;
  background-color: rgba(70, 130, 180, 0.15);
}

.news-title-container {
  flex-grow: 1;
}

.news-title-link {
  font-size: 1rem;
  color: var(--color-text);
  cursor: pointer;
  transition: color 0.3s ease, padding-left 0.3s ease;
  display: block;
}

.news-title-link:hover {
  color: var(--color-primary);
  padding-left: 5px;
}

/* News List Page Specific */
.news-table-header {
  display: flex;
  padding: 15px 10px;
  border-bottom: 2px solid var(--color-primary);
  font-weight: bold;
  color: var(--color-primary);
  letter-spacing: 1px;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 45px;
}

.pagination-btn {
  background: transparent;
  color: var(--color-text);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-heading);
}

.pagination-btn:hover:not(:disabled) {
  background: var(--color-primary);
  color: var(--color-bg);
  border-color: var(--color-primary);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-btn.active {
  background: var(--color-primary);
  color: var(--color-bg);
  border-color: var(--color-primary);
  cursor: default;
}

.pagination-info {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-family: var(--font-heading);
}

/* News Modal specific styles */
.news-modal-content {
  background: var(--color-surface);
  margin: auto;
  padding: 40px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 4px;
  max-width: 700px;
  width: 90%;
  animation: zoom 0.3s ease;
  color: var(--color-text);
  text-align: left;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.news-modal-header {
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.news-modal-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

.news-modal-title {
  font-size: 1.6rem;
  color: var(--color-primary);
  line-height: 1.4;
  margin-top: 5px;
}

.news-modal-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text-muted);
}

.news-modal-body p {
  margin-bottom: 15px;
}

.news-modal-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 15px auto; /* Centers the image */
  border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .news-row-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 15px 5px;
  }
  
  .news-meta {
    width: 100%;
  }

  .news-title-link {
    font-size: 0.95rem;
  }
  
  .news-modal-content {
    padding: 25px;
  }
  
  .news-modal-title {
    font-size: 1.3rem;
  }
}

