
:root {
  --red: #E50914;
  --red-dark: #b20710;
  --bg: #141414;
  --bg2: #1a1a1a;
  --bg3: #222;
  --white: #fff;
  --gray: #808080;
  --lgray: #b3b3b3;
  --dgray: #2a2a2a;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: 'Barlow', sans-serif;
  font-weight: 400;
  overflow-x: hidden;
}

/* NAVBAR */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4%;
  height: 68px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, transparent 100%);
  transition: background 0.4s;
}
.navbar.scrolled { background: var(--bg); }

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem; letter-spacing: 0.05em;
  color: var(--red); cursor: default;
  text-shadow: 0 0 30px rgba(229,9,20,0.4);
}

.nav-links {
  display: flex; gap: 1.5rem; align-items: center;
}
.nav-links a {
  color: var(--lgray); text-decoration: none;
  font-size: 0.82rem; font-weight: 400;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }

.nav-right {
  display: flex; align-items: center; gap: 1.2rem;
}
.nav-search {
  background: none; border: none; color: var(--white);
  font-size: 1.1rem; cursor: pointer; padding: 4px;
}
.nav-bell {
  background: none; border: none; color: var(--white);
  font-size: 1.1rem; cursor: pointer;
}
.nav-avatar {
  width: 32px; height: 32px; border-radius: 4px;
  background: linear-gradient(135deg, var(--red), #ff6b35);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; cursor: pointer;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.05em;
}

/* HERO */
.hero {
  position: relative;
  width: 100%; height: 90vh; min-height: 520px;
  display: flex; align-items: flex-end;
  padding: 0 4% 8%;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(0,0,0,0.85) 40%, transparent 80%),
    linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 50%),
    linear-gradient(135deg, #0d0d0d 0%, #1a0a05 30%, #0a0515 60%, #0d0d0d 100%);
}

.hero-shapes {
  position: absolute; right: 0; top: 0;
  width: 55%; height: 100%;
  overflow: hidden;
}
.shape {
  position: absolute;
  border-radius: 2px;
  opacity: 0.12;
}
.s1 { width: 380px; height: 520px; right: 8%; top: 8%;
  background: linear-gradient(135deg, #E50914, transparent);
  transform: skewX(-8deg); animation: pulse-shape 4s ease-in-out infinite; }
.s2 { width: 260px; height: 360px; right: 22%; top: 15%;
  background: linear-gradient(135deg, #ff6b35, transparent);
  transform: skewX(-8deg); animation: pulse-shape 4s 1s ease-in-out infinite; opacity: 0.07; }
.s3 { width: 180px; height: 240px; right: 12%; top: 25%;
  background: linear-gradient(135deg, #fff, transparent);
  transform: skewX(-8deg); animation: pulse-shape 4s 2s ease-in-out infinite; opacity: 0.04; }

@keyframes pulse-shape {
  0%, 100% { opacity: 0.12; }
  50% { opacity: 0.18; }
}

.hero-book {
  position: absolute; right: 12%; top: 10%;
  width: 220px; transform: perspective(600px) rotateY(-12deg);
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(-20px 20px 60px rgba(229,9,20,0.25));
}
@keyframes float {
  0%,100% { transform: perspective(600px) rotateY(-12deg) translateY(0); }
  50% { transform: perspective(600px) rotateY(-10deg) translateY(-14px); }
}
.hero-book-inner {
  width: 220px; height: 310px;
  background: linear-gradient(145deg, #1a0505, #2d0a0a, #0d0d0d);
  border-radius: 3px 8px 8px 3px;
  border: 1px solid rgba(229,9,20,0.3);
  box-shadow: 4px 0 12px rgba(0,0,0,0.8), inset -1px 0 0 rgba(255,255,255,0.05);
  display: flex; flex-direction: column;
  justify-content: space-between; padding: 1.5rem;
  position: relative; overflow: hidden;
}
.hero-book-inner::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 16px;
  background: linear-gradient(to right, #0a0000, #1a0505);
  border-right: 1px solid rgba(229,9,20,0.2);
}
.hero-book-inner::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(to right, var(--red), #ff6b35, var(--red));
}
.book-tag {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.55rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--red); padding-left: 1rem;
}
.book-main-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem; line-height: 1.0; letter-spacing: 0.03em;
  padding-left: 1rem; color: var(--white);
}
.book-main-author {
  font-size: 0.65rem; color: var(--lgray); padding-left: 1rem;
  letter-spacing: 0.1em;
}

.hero-content { position: relative; z-index: 2; max-width: 560px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--red); padding: 0.3rem 0.8rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3.5rem, 7vw, 6rem);
  line-height: 0.95; letter-spacing: 0.02em;
  margin-bottom: 1rem;
  animation: heroIn 0.8s ease both;
}
.hero-title .line2 { color: var(--red); }

@keyframes heroIn { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }

.hero-meta {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.82rem; letter-spacing: 0.05em;
}
.hero-score { color: #46d369; font-weight: 700; }
.hero-year, .hero-pages { color: var(--lgray); }
.hero-tag {
  border: 1px solid var(--lgray);
  padding: 0.1rem 0.5rem;
  font-size: 0.7rem; color: var(--lgray);
}

.hero-desc {
  font-size: 1rem; line-height: 1.65;
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.8rem; max-width: 480px;
  animation: heroIn 0.8s 0.1s ease both;
}

.hero-btns {
  display: flex; gap: 0.75rem;
  animation: heroIn 0.8s 0.2s ease both;
}
.btn-play {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--white); color: var(--bg);
  padding: 0.75rem 2rem; border: none;
  font-family: 'Barlow', sans-serif;
  font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: background 0.2s;
  letter-spacing: 0.02em;
}
.btn-play:hover { background: rgba(255,255,255,0.75); }

.btn-info {
  display: flex; align-items: center; gap: 0.6rem;
  background: rgba(109,109,110,0.7);
  color: var(--white);
  padding: 0.75rem 2rem; border: none;
  font-family: 'Barlow', sans-serif;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: background 0.2s;
  backdrop-filter: blur(4px);
}
.btn-info:hover { background: rgba(109,109,110,0.5); }

.hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 160px;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}

/* ROWS */
.rows-section { padding: 0 0 4rem; position: relative; z-index: 1; }

.row { margin-bottom: 3rem; padding: 0 4%; }

.row-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.8rem;
}
.row-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.2rem; font-weight: 700; letter-spacing: 0.03em;
  text-transform: uppercase;
}
.row-see-all {
  color: var(--red); text-decoration: none;
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  display: flex; align-items: center; gap: 0.3rem;
  opacity: 0; transition: opacity 0.3s;
}
.row:hover .row-see-all { opacity: 1; }
.row-see-all:hover { color: #ff6b6b; }

.slider-wrap { position: relative; overflow: hidden; }
.slider {
  display: flex; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
}
.slider::-webkit-scrollbar { display: none; }

/* Cards */
.card {
  flex: 0 0 calc(20% - 5px);
  min-width: 180px;
  position: relative;
  border-radius: 4px; overflow: visible;
  scroll-snap-align: start;
  transition: transform 0.3s ease, z-index 0s 0.3s;
  cursor: pointer;
}
.card:hover {
  transform: scale(1.25) translateY(-8px);
  z-index: 10;
  transition: transform 0.3s ease, z-index 0s;
}
.card:first-child:hover { transform: scale(1.25) translateX(10%) translateY(-8px); }

.card-img {
  width: 100%; aspect-ratio: 2/3;
  border-radius: 4px;
  display: flex; flex-direction: column;
  justify-content: space-between; padding: 1rem;
  position: relative; overflow: hidden;
}
.card:hover .card-img { border-radius: 4px 4px 0 0; }

.c1  { background: linear-gradient(145deg, #1a0505, #3d0d0d, #1a0505); }
.c2  { background: linear-gradient(145deg, #05101a, #0d2a3d, #051a0a); }
.c3  { background: linear-gradient(145deg, #0f0a00, #2d2000, #0f0a00); }
.c4  { background: linear-gradient(145deg, #0a001a, #1a003d, #0a001a); }
.c5  { background: linear-gradient(145deg, #001a0a, #003d1a, #001a0a); }
.c6  { background: linear-gradient(145deg, #1a0a00, #3d1a00, #1a0a00); }
.c7  { background: linear-gradient(145deg, #001520, #002a3d, #001520); }
.c8  { background: linear-gradient(145deg, #100020, #200040, #100020); }
.c9  { background: linear-gradient(145deg, #1a1000, #3d2a00, #1a1000); }
.c10 { background: linear-gradient(145deg, #001a10, #003d20, #001a10); }
.c11 { background: linear-gradient(145deg, #200010, #3d0020, #200010); }
.c12 { background: linear-gradient(145deg, #001020, #002040, #001020); }

.card-glyph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; opacity: 0.07;
}

.card-genre {
  position: relative; z-index: 1;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.55rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--red);
}
.card-title-txt {
  position: relative; z-index: 1;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem; font-weight: 700; line-height: 1.1;
  margin-top: 0.25rem;
}
.card-author-txt {
  position: relative; z-index: 1;
  font-size: 0.62rem; color: var(--lgray);
}
.card-top-num {
  position: absolute; right: 0.5rem; top: 0.5rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.2);
}

.card-panel {
  background: #181818;
  border-radius: 0 0 4px 4px;
  padding: 0.8rem;
  display: none;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}
.card:hover .card-panel { display: block; }

.card-panel-btns {
  display: flex; gap: 0.4rem; margin-bottom: 0.6rem;
}
.cp-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.5);
  background: none; color: var(--white);
  font-size: 0.8rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.cp-btn.play {
  background: var(--white); color: var(--bg);
  border-color: var(--white);
}
.cp-btn:hover { border-color: var(--white); }

.card-panel-tags {
  display: flex; gap: 0.3rem; flex-wrap: wrap;
  margin-bottom: 0.4rem;
}
.panel-tag {
  font-size: 0.58rem; color: var(--lgray);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.1rem 0.4rem; border-radius: 2px;
}
.card-panel-match {
  font-size: 0.7rem; color: #46d369; font-weight: 600;
  margin-bottom: 0.2rem;
}
.card-panel-info {
  font-size: 0.65rem; color: var(--lgray);
}

/* PROMO BANNER */
.promo-banner {
  margin: 0 4% 3rem;
  background: linear-gradient(135deg, #1a0000, #2d0505);
  border: 1px solid rgba(229,9,20,0.3);
  border-radius: 6px;
  padding: 3rem;
  display: flex; justify-content: space-between; align-items: center;
  position: relative; overflow: hidden;
}
.promo-banner::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse 60% 100% at 80% 50%, rgba(229,9,20,0.12) 0%, transparent 70%);
}
.promo-content { position: relative; z-index: 1; }
.promo-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--red); margin-bottom: 0.8rem;
}
.promo-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.8rem; line-height: 1; letter-spacing: 0.02em;
  margin-bottom: 0.8rem;
}
.promo-desc {
  font-size: 0.92rem; color: var(--lgray); max-width: 420px; line-height: 1.6;
}
.promo-right { position: relative; z-index: 1; text-align: right; }
.promo-price-old {
  font-size: 0.85rem; color: var(--gray);
  text-decoration: line-through; margin-bottom: 0.2rem;
}
.promo-price {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem; color: var(--red); line-height: 1;
  margin-bottom: 1rem;
}
.promo-price span { font-size: 1.5rem; vertical-align: top; margin-top: 0.5rem; display: inline-block; }
.btn-promo {
  background: var(--red); color: var(--white);
  padding: 0.8rem 2rem; border: none;
  font-family: 'Barlow', sans-serif;
  font-size: 0.9rem; font-weight: 700; cursor: pointer;
  transition: background 0.2s; display: block;
  letter-spacing: 0.05em;
}
.btn-promo:hover { background: var(--red-dark); }

/* CATEGORIES */
.cat-section { padding: 0 4% 4rem; }
.cat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.cat-card {
  border-radius: 4px; overflow: hidden;
  height: 90px; position: relative; cursor: pointer;
  transition: transform 0.2s;
}
.cat-card:hover { transform: scale(1.04); }
.cat-card-bg {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.cat-card-bg.cc1 { background: linear-gradient(135deg, #831010, #500a0a); }
.cat-card-bg.cc2 { background: linear-gradient(135deg, #0a3d6b, #062444); }
.cat-card-bg.cc3 { background: linear-gradient(135deg, #6b4a0a, #3d2a06); }
.cat-card-bg.cc4 { background: linear-gradient(135deg, #0a6b3d, #063d22); }
.cat-card-bg.cc5 { background: linear-gradient(135deg, #4a0a6b, #2a063d); }
.cat-card-bg.cc6 { background: linear-gradient(135deg, #6b1a0a, #3d0e06); }
.cat-card-bg.cc7 { background: linear-gradient(135deg, #0a4a6b, #06283d); }
.cat-card-bg.cc8 { background: linear-gradient(135deg, #3d6b0a, #223d06); }
.cat-icon-big { font-size: 2.5rem; opacity: 0.3; position: absolute; right: 1rem; bottom: 0.5rem; }
.cat-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: 1.1rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  position: relative; z-index: 1; padding: 1rem 1.2rem;
  width: 100%;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* FOOTER */
footer {
  border-top: 1px solid #333;
  padding: 3rem 4%;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}
.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem; color: var(--red);
  margin-bottom: 1rem; display: block;
}
.footer-desc {
  font-size: 0.82rem; color: var(--gray); line-height: 1.65; max-width: 260px;
}
.footer-social { display: flex; gap: 0.7rem; margin-top: 1.2rem; }
.social-btn {
  width: 34px; height: 34px; border: 1px solid #444;
  background: none; color: var(--lgray); border-radius: 4px;
  font-size: 0.8rem; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.social-btn:hover { border-color: var(--red); color: var(--red); }
.footer-col h4 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--gray); margin-bottom: 1.2rem;
}
.footer-col a {
  display: block; color: var(--lgray); text-decoration: none;
  font-size: 0.85rem; margin-bottom: 0.7rem; transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid #333;
  padding: 1.2rem 4%;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom p { font-size: 0.72rem; color: var(--gray); }
.footer-lang {
  border: 1px solid #444; background: none;
  color: var(--lgray); padding: 0.4rem 0.8rem;
  font-size: 0.72rem; cursor: pointer; border-radius: 3px;
}

@media(max-width: 900px) {
  .nav-links { display: none; }
  .hero { padding: 0 5% 12%; }
  .hero-book { display: none; }
  .card { flex: 0 0 calc(33% - 5px); }
  .cat-grid { grid-template-columns: repeat(2,1fr); }
  .promo-banner { flex-direction: column; gap: 2rem; }
  .promo-right { text-align: left; }
  footer { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; }
  .row { padding: 0 5%; }
  .cat-section { padding: 0 5% 3rem; }
}
