/* assets/app.css */
:root{
  --bg:#f6f7fb;
  --panel:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --border:rgba(15,23,42,.10);
  --shadow:0 10px 30px rgba(15,23,42,.08);
  --shadow2:0 6px 18px rgba(15,23,42,.10);
  --accent:#2b6cb0;
  --accent2:#1d4ed8;
  --good:#16a34a;
  --warn:#b45309;
  --bad:#dc2626;
  --radius:16px;
  --radius2:22px;
}

*{box-sizing:border-box}

html{
  min-height:100%;
  background:var(--bg);
}

body{
  min-height:100%;
  margin:0;
  position:relative;
  color:var(--text);
  font-family:ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background:transparent;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(circle at top left, rgba(59,130,246,.07), transparent 32%),
    radial-gradient(circle at top right, rgba(99,102,241,.05), transparent 28%),
    linear-gradient(180deg, #f8faff 0%, #f6f7fb 38%, #f4f6fb 100%);
  background-repeat:no-repeat, no-repeat, no-repeat;
  background-size:1400px 900px, 1200px 820px, 100% 100%;
  background-position:left top, right top, center top;
}

a{color:inherit}
.container{width:min(1180px, 92vw); margin:0 auto; padding:28px 0 56px}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:18px 0;
}

.brand{
  display:flex;
  gap:12px;
  align-items:center;
  min-width:0;
}

.logo{
  width:40px;
  height:40px;
  border-radius:12px;
  background:#0f172a;
  color:#fff;
  display:grid;
  place-items:center;
  font-weight:800;
  letter-spacing:.5px;
  flex:0 0 auto;
}

.brand h1{
  font-size:16px;
  margin:0;
}

.brand p{
  margin:2px 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}

.actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border:1px solid var(--border);
  background:var(--panel);
  border-radius:12px;
  text-decoration:none;
  font-weight:650;
  font-size:14px;
  box-shadow:0 1px 0 rgba(15,23,42,.03);
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease;
}

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

.btn.ghost{background:transparent}

.btn:hover{
  box-shadow:var(--shadow2);
  transform:translateY(-1px);
}

.badge{
  font-size:12px;
  color:var(--muted);
  border:1px solid var(--border);
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.82);
}

.grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
}

.movie-card{
  position:relative;
  display:grid;
  grid-template-columns:220px 1fr;
  gap:0;
  border:1px solid var(--border);
  background:var(--panel);
  border-radius:var(--radius2);
  overflow:hidden;
  box-shadow:var(--shadow);
  min-height:220px;
}

.movie-card.featured{
  grid-column:1 / -1;
  grid-template-columns:360px 1fr;
  min-height:260px;
}

.movie-card img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  background:#e5e7eb;
}

.movie-card .content{
  padding:18px 18px 16px;
  display:flex;
  flex-direction:column;
}

.movie-card h2{
  margin:0 0 8px;
  font-size:18px;
  letter-spacing:-0.2px;
}

.movie-card.featured h2{font-size:22px}

.infos{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--muted);
  font-size:13px;
  margin-bottom:10px;
}

.dot{opacity:.55}

.synopsis{
  margin:0;
  color:rgba(15,23,42,.78);
  line-height:1.45;
  font-size:14px;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.cardLink{
  position:absolute;
  inset:0;
  z-index:1;
  text-decoration:none;
}

.cardFoot{
  margin-top:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-top:14px;
}

.chips{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.chip{
  font-size:12px;
  color:rgba(15,23,42,.75);
  border:1px solid var(--border);
  background:rgba(15,23,42,.03);
  padding:6px 10px;
  border-radius:999px;
}

.heart{
  z-index:2;
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.9);
  padding:8px 10px;
  border-radius:999px;
  cursor:pointer;
  font-weight:700;
  color:rgba(15,23,42,.75);
}

.heart svg{width:18px; height:18px}
.heart[data-on="1"]{border-color:rgba(220,38,38,.25); color:rgba(220,38,38,.95)}
.heart[data-on="1"] svg path{fill:rgba(220,38,38,.95)}
.heart svg path{fill:rgba(15,23,42,.25)}
.heart:hover{box-shadow:var(--shadow2)}

.heartIcon{
  z-index:3;
  position:relative;
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:grid;
  place-items:center;
  padding:0;
  border:none;
  background:transparent;
  cursor:pointer;
  border-radius:999px;
  transition:transform .18s ease, opacity .18s ease, background .18s ease, box-shadow .18s ease;
  -webkit-tap-highlight-color:transparent;
}

.heartIcon:hover{
  transform:scale(1.06);
  background:rgba(255,255,255,.72);
  box-shadow:0 10px 24px rgba(15,23,42,.08);
}

.heartIcon:disabled{
  opacity:.72;
  cursor:default;
}

.heartVisual{
  width:26px;
  height:26px;
  position:relative;
  display:grid;
  place-items:center;
  pointer-events:none;
}

.heartVisual svg{
  width:24px;
  height:24px;
  display:block;
  overflow:visible;
  transform:scale(1);
}

.heartVisual path{
  fill:transparent;
  stroke:#e5e7eb;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
  transition:fill .18s ease, stroke .18s ease, filter .18s ease;
}

.heartIcon.isOn .heartVisual path{
  fill:#f80808;
  stroke:#f80808;
  filter:drop-shadow(0 0 10px rgba(248,8,8,.38));
}

.heartBurst{
  position:absolute;
  inset:0;
  pointer-events:none;
  transform:translateY(5px);
}

.burstLine{
  position:absolute;
  left:50%;
  top:50%;
  width:2px;
  height:12px;
  margin-left:-1px;
  margin-top:-6px;
  border-radius:999px;
  background:#f80808;
  opacity:0;
  transform:
    translate(-50%, -50%)
    rotate(var(--rot))
    translateY(-10px)
    scaleY(.2);
  transform-origin:center center;
  will-change:transform, opacity;
}

.heartIcon.isBurst .burstLine{
  animation:heartBurstLine .32s ease-out forwards;
}

.heartIcon.isBurst .heartVisual svg,
.heartIcon.isPop .heartVisual svg{
  animation:heartPop .3s ease;
}

@keyframes heartBurstLine{
  0%{
    opacity:1;
    transform:
      translate(-50%, -50%)
      rotate(var(--rot))
      translateY(-10px)
      scaleY(.2);
  }
  55%{
    opacity:1;
    transform:
      translate(-50%, -50%)
      rotate(var(--rot))
      translateY(-18px)
      scaleY(1);
  }
  100%{
    opacity:0;
    transform:
      translate(-50%, -50%)
      rotate(var(--rot))
      translateY(-26px)
      scaleY(.15);
  }
}

@keyframes heartPop{
  0%{transform:scale(1)}
  40%{transform:scale(1.15)}
  75%{transform:scale(.9)}
  100%{transform:scale(1)}
}

.hero{
  border:1px solid var(--border);
  background:linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.6));
  border-radius:var(--radius2);
  padding:18px;
  box-shadow:var(--shadow);
  margin-bottom:16px;
}

.hero h1{
  margin:0 0 6px;
  font-size:22px;
}

.hero p{
  margin:0;
  color:var(--muted);
  line-height:1.45;
}

.postHeader{
  border:1px solid var(--border);
  background:var(--panel);
  border-radius:30px;
  overflow:hidden;
  box-shadow:0 14px 34px rgba(15,23,42,.09);
}

.postCover{
  position:relative;
  height:clamp(260px, 42vw, 440px);
  background:#e5e7eb;
}

.postCover img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.postCover::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(15,23,42,.04), rgba(15,23,42,.24));
  pointer-events:none;
}

.postHeadInner{
  padding:26px 26px 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.99), rgba(248,250,255,.96));
}

.postEyebrow{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.postTitle{
  margin:0;
  font-size:clamp(30px, 4.5vw, 46px);
  line-height:1.05;
  letter-spacing:-1px;
  max-width:14ch;
}

.postIntro{
  margin:14px 0 0;
  color:rgba(15,23,42,.72);
  font-size:16px;
  line-height:1.72;
  max-width:760px;
}

.postMetaRow{
  margin-top:20px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
}

.postMeta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:13px;
  align-items:center;
}

.postActions{
  display:flex;
  align-items:center;
  gap:10px;
}

.postHeart{
  background:rgba(15,23,42,.04);
  border:1px solid rgba(15,23,42,.08);
}

.postLayout{
  margin-top:18px;
  display:grid;
  grid-template-columns:minmax(0, 1fr) 300px;
  gap:18px;
  align-items:start;
}

.postBody{
  border:1px solid var(--border);
  background:rgba(255,255,255,.92);
  border-radius:30px;
  box-shadow:var(--shadow);
  padding:26px;
}

.block{
  padding:18px 0;
}

.block:first-child{padding-top:0}
.block:last-child{padding-bottom:0}

.block + .block{
  border-top:1px solid rgba(15,23,42,.06);
}

.blockTitle{
  margin:0 0 14px;
  font-size:24px;
  letter-spacing:-.4px;
}

.rt{
  line-height:1.78;
  color:rgba(15,23,42,.9);
  font-size:16px;
}

.rt p{margin:12px 0}
.rt ul,.rt ol{padding-left:22px; margin:12px 0}
.rt li + li{margin-top:6px}
.rt a{
  color:var(--accent2);
  text-decoration:none;
}
.rt a:hover{text-decoration:underline}
.rt h2,.rt h3,.rt h4{
  margin:26px 0 12px;
  line-height:1.2;
  letter-spacing:-.3px;
}
.rt blockquote{
  margin:18px 0;
  padding:14px 16px;
  border-left:4px solid rgba(37,99,235,.22);
  background:rgba(37,99,235,.04);
  border-radius:0 16px 16px 0;
  color:rgba(15,23,42,.82);
}
.rt img{
  max-width:100%;
  height:auto;
  border-radius:18px;
  border:1px solid rgba(15,23,42,.08);
}

.imgBlock{margin:0}
.imgBlock img{
  width:100%;
  border-radius:20px;
  border:1px solid rgba(15,23,42,.08);
  display:block;
}
.imgBlock figcaption{
  color:var(--muted);
  font-size:13px;
  margin-top:9px;
}

.videoWrap{
  position:relative;
  padding-top:56.25%;
  border-radius:20px;
  overflow:hidden;
  border:1px solid rgba(15,23,42,.08);
  background:#000;
}

.videoWrap iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}

.code{
  background:rgba(15,23,42,.04);
  border:1px solid rgba(15,23,42,.08);
  border-radius:18px;
  padding:16px;
  overflow:auto;
}

.code code{
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:13px;
}

.note{
  color:var(--muted);
  background:rgba(15,23,42,.03);
  border:1px dashed rgba(15,23,42,.15);
  padding:12px;
  border-radius:14px;
}

.aside{
  border:1px solid var(--border);
  background:rgba(255,255,255,.82);
  backdrop-filter:blur(10px);
  border-radius:26px;
  box-shadow:var(--shadow);
  padding:16px;
  position:sticky;
  top:14px;
}

.aside h3{
  margin:0 0 12px;
  font-size:14px;
  color:rgba(15,23,42,.82);
  letter-spacing:.2px;
}

.toc{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.toc a{
  font-size:13px;
  color:rgba(15,23,42,.78);
  text-decoration:none;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid transparent;
  transition:background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.toc a:hover{
  background:rgba(15,23,42,.03);
  border-color:rgba(15,23,42,.08);
  transform:translateX(1px);
}

.toc a.isActive{
  background:rgba(37,99,235,.08);
  border-color:rgba(37,99,235,.14);
  color:#1d4ed8;
}

.asideDivider{
  height:1px;
  background:rgba(15,23,42,.08);
  margin:16px 0;
}

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

.shareBtns{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.shareBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:9px 12px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.08);
  background:#fff;
  color:rgba(15,23,42,.82);
  text-decoration:none;
  font-size:13px;
  font-weight:650;
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.shareBtn:hover{
  transform:translateY(-1px);
  box-shadow:var(--shadow2);
}

.shareBtn.isCopied{
  background:rgba(22,163,74,.08);
  border-color:rgba(22,163,74,.2);
  color:#15803d;
}

.shareUrl{
  font-size:12px;
  color:var(--muted);
  padding:10px 12px;
  border-radius:14px;
  background:rgba(15,23,42,.03);
  border:1px solid rgba(15,23,42,.06);
  word-break:break-all;
  line-height:1.5;
}

.relatedSection{
  margin-top:22px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.92);
  border-radius:30px;
  box-shadow:var(--shadow);
  padding:22px;
}

.sectionIntro{
  margin-bottom:16px;
}

.sectionIntro h2{
  margin:0 0 6px;
  font-size:24px;
  letter-spacing:-.4px;
}

.sectionIntro p{
  margin:0;
  color:var(--muted);
  line-height:1.5;
}

.relatedGrid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:16px;
}

.relatedCard{
  position:relative;
  border:1px solid rgba(15,23,42,.08);
  background:#fff;
  border-radius:24px;
  overflow:hidden;
  box-shadow:0 8px 22px rgba(15,23,42,.06);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.relatedCard:hover{
  transform:translateY(-3px);
  box-shadow:0 14px 28px rgba(15,23,42,.10);
  border-color:rgba(37,99,235,.14);
}

.relatedLink{
  position:absolute;
  inset:0;
  z-index:1;
}

.relatedThumb{
  aspect-ratio:16 / 9;
  background:#e5e7eb;
}

.relatedThumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.relatedBody{
  position:relative;
  z-index:2;
  padding:16px;
}

.relatedMeta{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:12px;
  margin-bottom:8px;
}

.relatedCard h3{
  margin:0 0 8px;
  font-size:18px;
  line-height:1.25;
  letter-spacing:-.2px;
}

.relatedCard p{
  margin:0;
  color:rgba(15,23,42,.74);
  line-height:1.55;
  font-size:14px;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

@media (max-width: 1100px){
  .postLayout{grid-template-columns:1fr}
  .aside{position:relative; top:auto}
  .relatedGrid{grid-template-columns:1fr 1fr}
}

@media (max-width: 980px){
  .movie-card{grid-template-columns:160px 1fr}
  .movie-card.featured{grid-template-columns:200px 1fr}
}

@media (max-width: 720px){
  .container{width:min(100%, 94vw)}
  .topbar{align-items:flex-start; flex-direction:column}
  .actions{width:100%}
  .grid{grid-template-columns:1fr}
  .movie-card,
  .movie-card.featured{
    grid-column:auto;
    grid-template-columns:1fr;
  }
  .movie-card img{height:220px}
  .postHeadInner{padding:20px}
  .postTitle{max-width:none}
  .postMetaRow{align-items:flex-start; flex-direction:column}
  .postBody{padding:20px}
  .relatedGrid{grid-template-columns:1fr}
}

.stars{
  display:inline-flex;
  align-items:center;
  gap:4px;
  flex:0 0 auto;
  white-space:nowrap;
}

.stars svg{
  width:14px;
  height:14px;
  display:block;
  flex:0 0 14px;
}