:root{
  --bg:#f9f5f5;
  --edge:rgba(0,0,0,0.06);
  --accent:#c62828;
  --muted:#6b6b6b;
  --card:#ffffff;
  --radius:12px;
  --maxw:1100px;
  --gap:14px;
  --ring-size:18px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* RESET */

*{box-sizing:border-box}

html,body{height:100%}

body{
  margin:0;
  background:
    radial-gradient(900px 400px at 6% 10%, rgba(0,0,0,0.02), transparent 6%),
    radial-gradient(700px 350px at 94% 90%, rgba(0,0,0,0.02), transparent 6%),
    var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  color:#111;
  padding-bottom:40px;
}


/* HEADER */

.site-header{
  position:fixed;
  top:0;
  left:0;
  right:0;
  height:72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 18px;
  background:linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.85));
  border-bottom:1px solid var(--edge);
  z-index:60;
  backdrop-filter:blur(6px);
}

.brand{
  font-weight:900;
  font-size:18px;
}

.menu-btn{
  background:transparent;
  border:0;
  font-size:22px;
  padding:8px;
  cursor:pointer;
}


/* SIDE MENU */

.side-menu{
  position:fixed;
  top:0;
  right:-360px;
  width:320px;
  height:100vh;
  background:linear-gradient(180deg,#fff,#fafafa);
  box-shadow:-18px 30px 60px rgba(0,0,0,0.08);
  transition:right .28s;
  z-index:70;
  padding:28px;
  display:flex;
  flex-direction:column;
}

.side-menu[aria-hidden="false"]{
  right:0;
}

.menu-close-top{
  position:absolute;
  right:12px;
  top:12px;
  border:0;
  background:transparent;
  font-size:20px;
  cursor:pointer;
}

.menu-list{
  list-style:none;
  padding:40px 0 0 0;
  margin:0;
}

.menu-list li{
  margin:18px 0;
}

.menu-list a{
  color:#111;
  text-decoration:none;
  font-weight:800;
  font-size:16px;
}

.menu-footer{
  margin-top:auto;
}


/* CONTAINER */

.container{
  max-width:var(--maxw);
  margin:120px auto 40px;
  padding:0 18px;
}


/* HERO */

.hero{
  padding:36px;
  border-radius:var(--radius);
  background:linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.9));
  border:1px solid var(--edge);
  text-align:center;
}

.hero-title{
  margin:0 0 18px;
  font-size:64px;
  line-height:1;
  letter-spacing:-1px;
}

@media (max-width:900px){
  .hero-title{font-size:40px}
}


/* BUTTONS */

.hero-actions{
  display:flex;
  gap:16px;
  justify-content:center;
  flex-wrap:wrap;
}

.btn{
  padding:12px 18px;
  border-radius:12px;
  border:1px solid var(--edge);
  background:transparent;
  cursor:pointer;
  font-weight:800;
}

.btn.primary{
  background:var(--accent);
  color:#fff;
  border-color:transparent;
}


/* RAINBOW RING */

.ring{
  position:relative;
  z-index:1;
}

.ring::before{
  content:"";
  position:absolute;
  inset:calc(-1 * var(--ring-size));
  border-radius:999px;
  padding:var(--ring-size);
  background:conic-gradient(from 0deg,#ff4d4d,#ffb84d,#ffd54d,#8cff4d,#4dd6ff,#7a4dff,#ff4db8,#ff4d4d);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--ring-size)), black calc(100% - var(--ring-size)));
  mask: radial-gradient(farthest-side, transparent calc(100% - var(--ring-size)), black calc(100% - var(--ring-size)));
  opacity:0;
  transition:opacity .18s ease;
  animation:spin 3.6s linear infinite;
  pointer-events:none;
}

.ring:hover::before{
  opacity:0.9;
}

@keyframes spin{
  to{ transform:rotate(360deg); }
}


/* VIDEO */

.video-wrap{
  padding:12px;
}

.video-wrap video{
  width:100%;
  max-height:420px;
  border-radius:12px;
  background:#000;
  object-fit:cover;
}


/* CHARACTER GRID */

.characters-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
  margin-top:14px;
}

.char-card{
  background:#fff;
  border:1px solid var(--edge);
  border-radius:12px;
  padding:12px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}

.char-name{
  font-weight:900;
  margin-bottom:8px;
}

.char-img{
  width:160px;
  height:160px;
  background:#e9e6e6;
  border-radius:10px;
  object-fit:cover;
  margin-bottom:10px;
}

.char-desc{
  color:var(--muted);
  font-size:14px;
}

@media (max-width:900px){
  .characters-grid{grid-template-columns:repeat(2,1fr)}
  .char-img{width:120px;height:120px}
}


/* ARCHIVE SERIES */
.series-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 40px;
}

.series-card {
  display: flex;
  flex-direction: row;        /* desktop: image left, text right */
  align-items: flex-start;
  gap: 20px;
  background: var(--card);
  border-radius: 14px;
  padding: 18px;
  text-decoration: none;
  color: #111;
  border: 1px solid var(--edge);
  transition: .3s;
  opacity: 0;
  transform: translateY(40px);
}

.series-card.show {
  opacity: 1;
  transform: translateY(0);
}

.series-card img {
  width: 200px;              /* larger image on desktop */
  height: auto;              /* keep natural ratio */
  object-fit: contain;       /* no cropping */
  border-radius: 10px;
}

.series-info h2 {
  margin: 0 0 6px 0;
  color: #111;
}

.series-info p {
  margin: 0;
  color: var(--muted);
}

.series-card:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

/* Mobile: stack image above text, full width */
@media (max-width:900px){
  .series-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .series-card img {
    width: 100%;             /* full width on mobile */
    max-width: 100%;
    height: auto;
  }
}

/* CHAPTER BOXES */

.chapter-box{
  background:var(--card);
  padding:20px;
  border-radius:12px;
  margin-bottom:30px;
  border:1px solid var(--edge);
}


/* CHARACTER LIST (updated from grid) */
.characters-grid {
  display: block;            /* stack items vertically */
  max-width: 90%;            /* leave margin from screen edges */
  margin: 24px auto;         /* center the list */
}

.char-card {
  display: flex;             /* image + text side by side on desktop */
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 32px;       /* spacing between cards */
  padding: 16px;
  background:#fff;
  border:1px solid var(--edge);
  border-radius:12px;
}

.char-name {
  font-weight:900;
  margin-bottom:8px;
}

.char-img {
  width: auto;               /* keep natural ratio */
  max-width: 320px;          /* enlarge but not too huge on desktop */
  height: auto;              /* no cropping */
  border-radius:10px;
  background:#e9e6e6;
}

.char-desc {
  color:var(--muted);
  font-size:15px;
}

/* Mobile: stack image above text, full width */
@media (max-width:900px){
  .char-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .char-img {
    width: 100%;             /* full width on mobile */
    max-width: 100%;         /* no limit */
    height: auto;            /* keep natural ratio */
  }
}

  .side-menu[aria-hidden="false"]{
    right:0;
  }

}
