:root {
  --bg: #0f0f0f;
  --bg-elev: #1a1a1a;
  --bg-card: #161616;
  --bg-hover: #272727;
  --border: #2a2a2a;
  --text: #f1f1f1;
  --text-dim: #aaa;
  --red: #ff0000;
  --red-hover: #cc0000;
  --chip: #272727;
  --radius: 14px;
  --wrap: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: absolute; left: -999px; top: 8px;
  background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; z-index: 50;
}
.skip:focus { left: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* Topbar — YouTube-like */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(15,15,15,.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; align-items: center; gap: 18px;
  min-height: 64px; padding-top: 10px; padding-bottom: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; }
.brand-avatar { border-radius: 50%; background: #222; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.brand-name { font-weight: 800; letter-spacing: .04em; font-size: 15px; white-space: nowrap; }
.brand-sub { color: var(--text-dim); font-size: 13px; white-space: nowrap; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav-link {
  color: var(--text-dim); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px;
}
.nav-link:hover { background: var(--bg-hover); color: var(--text); }
.nav-link.is-active { background: var(--text); color: #000; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; border-radius: 999px; cursor: pointer;
  padding: 10px 18px; font-weight: 700; font-size: 14px; text-decoration: none;
  transition: transform .12s ease, background .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-sub { background: var(--text); color: #0f0f0f; white-space: nowrap; }
.btn-sub:hover { background: #fff; }
.btn-watch { background: var(--red); color: #fff; border-radius: 14px; }
.btn-watch:hover { background: var(--red-hover); }
.btn-ghost { background: var(--chip); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-hover); }
.more-wrap { display: flex; justify-content: center; margin-top: 26px; }
.btn-more {
  background: var(--chip); border: 1px solid var(--border); color: var(--text);
  font-size: 16px; padding: 15px 36px; min-width: min(320px, 100%);
  justify-content: center;
}
.btn-more:hover { background: var(--text); color: #0f0f0f; border-color: var(--text); }
.more-arrow {
  display: inline-block; max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap;
  margin-left: 0; transform: translateX(-10px);
  transition: max-width .28s ease, opacity .2s ease, margin-left .28s ease, transform .28s ease;
}
.btn-more:hover .more-arrow, .btn-more:focus-visible .more-arrow {
  max-width: 1.5em; opacity: 1; margin-left: 10px; transform: none;
}

/* Hero */
.hero { padding: 26px 0 8px; }

.hero-grid { display: grid; grid-template-columns: 1.55fr .95fr; gap: 22px; align-items: start; }
.player-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.player-top {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.player-top .kicker {
  margin: 0; font-size: 13px; font-weight: 800;
  font-family: Montserrat, system-ui, -apple-system, sans-serif; letter-spacing: .06em;
  background: linear-gradient(to top, #fff 35%, rgba(255,255,255,.65));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.skeleton-player { position: absolute; inset: 0; }

.hero-info {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.kicker { margin: 0 0 8px; color: var(--text-dim); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.video-title { margin: 0 0 8px; font-size: clamp(22px, 3vw, 30px); line-height: 1.2; letter-spacing: -.01em; }
.video-meta { margin: 0 0 12px; color: var(--text-dim); font-size: 14px; }
.video-desc {
  margin: 0 0 16px; color: #d7d7d7; font-size: 14.5px;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 0; }
/* Buton circular de sticlă (același stil ca cercul play de pe carduri) */
.hero-actions .btn-watch, .hero-actions .btn-share-icon { height: 44px; }
.btn-share-icon {
  display: inline-grid; place-items: center; flex: none;
  width: 50px; height: 44px; border-radius: 14px;
  color: #fff; cursor: pointer;
  background: rgba(15,15,15,.55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.28);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn-share-icon:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.45); }
.btn-share-icon:active { transform: scale(.95); }

/* Sections / grid */
.section { padding: 30px 0 6px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 18px 16px; }
.card {
  display: block; color: inherit; text-decoration: none;
  background: transparent; border-radius: 12px; overflow: hidden;
  transition: transform .25s ease;
}
.card:hover { transform: translateY(-4px); }
.thumb { display: block; position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #222; border: 1px solid var(--border); transition: border-color .25s ease, box-shadow .25s ease; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.card:hover .thumb { border-color: rgba(255,255,255,.25); box-shadow: 0 18px 45px rgba(0,0,0,.55); }
.card:hover .thumb img, .card:focus-visible .thumb img { transform: scale(1.06); }
/* Reflex lucios care traversează miniatura la hover */
.thumb::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.28) 50%, transparent 58%);
  transform: translateX(-120%);
  transition: transform .8s ease;
}
.card:hover .thumb::after { transform: translateX(120%); }
/* Buton play din sticlă mată */
.play {
  position: absolute; inset: 0; margin: auto; width: 62px; height: 62px;
  display: grid; place-items: center; border-radius: 50%; color: #fff;
  background: rgba(15,15,15,.55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.28);
  opacity: 0; transform: scale(.7);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.card:hover .play, .card:focus-visible .play { opacity: 1; transform: scale(1); }
/* Pastilă de sticlă cu acțiunea, jos pe miniatură */
.watch-pill {
  position: absolute; left: 50%; bottom: 10px; transform: translate(-50%, 8px);
  background: rgba(15,15,15,.55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.28); color: #fff;
  font-size: 12.5px; font-weight: 700; padding: 7px 14px; border-radius: 999px;
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.card:hover .watch-pill, .card:focus-visible .watch-pill { opacity: 1; transform: translate(-50%, 0); }
.badge-new {
  position: absolute; top: 8px; left: 8px; white-space: nowrap;
  font-family: Montserrat, Roboto, Arial, Helvetica, sans-serif;
  font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: rgba(255,0,0,.75);
  padding: 3px 7px; border-radius: 6px;
}
.duration { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.85); font-size: 12px; padding: 2px 6px; border-radius: 6px; }
.card-body { display: flex; gap: 10px; padding: 10px 2px 0; }
.card-avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; }
.card h3 { margin: 0 0 4px; font-size: 15px; line-height: 1.35; }
.card p { margin: 0; color: var(--text-dim); font-size: 13px; }

/* Footer */
.footer-about { display: flex; gap: 16px; align-items: flex-start; padding: 6px 0 20px; }
.about-avatar { border-radius: 50%; flex: none; }
.footer-brand { margin: 0 0 4px; font-size: 15px; font-weight: 800; letter-spacing: .04em; }
.footer-desc { margin: 0 0 4px; color: var(--text-dim); font-size: 14px; max-width: 75ch; }
.footer-desc:last-of-type { margin-bottom: 10px; }
.about-links { display: flex; gap: 14px; flex-wrap: wrap; }
.about-links a, .article-body a, .video-meta { overflow-wrap: anywhere; }
.about-links a { color: #3ea6ff; text-decoration: none; font-weight: 600; font-size: 14px; }
.about-links a:hover { text-decoration: underline; }

/* Footer */
.footer { border-top: 1px solid var(--border); margin-top: 34px; padding: 26px 0 28px; color: var(--text-dim); font-size: 13px; }
.footer-inner { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--border); padding-top: 16px; }
.footer-umbrella { font-size: 12.5px; }
.footer-umbrella a { color: var(--text-dim); text-decoration: none; }
.footer-umbrella a:hover { color: var(--text); }

/* Skeletons */
.skeleton {
  background: linear-gradient(90deg, #1d1d1d 25%, #2b2b2b 37%, #1d1d1d 63%);
  background-size: 400% 100%; animation: shimmer 1.2s infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.skeleton-card .thumb { border-radius: 12px; min-height: 150px; }
.skeleton-card .line { height: 14px; border-radius: 6px; margin: 10px 2px 0; }
.skeleton-card .line.short { width: 55%; }

/* Share dialog (stil YouTube) */
.share-overlay {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(0,0,0,.6);
}
.share-overlay[hidden] { display: none; }
.share-dialog {
  width: min(420px, 100%); max-height: 90vh; overflow: auto;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 18px; padding: 20px;
  box-shadow: 0 24px 70px rgba(0,0,0,.6);
}
.share-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.share-head h2 { margin: 0; font-size: 18px; }
.icon-btn {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 0; border-radius: 50%; background: transparent; color: var(--text);
  cursor: pointer;
}
.icon-btn:hover { background: var(--bg-hover); }
.share-video-title { margin: 0 0 14px; color: var(--text-dim); font-size: 13.5px; }
.share-options { display: grid; gap: 4px; }
.share-option {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 10px 12px; border: 0; border-radius: 12px;
  background: transparent; color: var(--text); font-size: 15px; font-weight: 600;
  font-family: inherit; text-decoration: none; cursor: pointer; text-align: left;
}
.share-option:hover { background: var(--bg-hover); }
.share-icon {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14);
}
#copyLabel.copied { color: #7ee2a8; }
@media (max-width: 640px) {
  .share-overlay { align-items: flex-end; padding: 0; }
  .share-dialog { width: 100%; border-radius: 20px 20px 0 0; border-bottom: 0; }
}

/* Blog: carduri articole 4:1 + pagină articol */
.thumb-wide { aspect-ratio: 4 / 3; }
.article-cover {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 170% at 85% 15%, rgba(255,0,0,.30), transparent 55%),
    radial-gradient(110% 150% at 8% 95%, rgba(62,166,255,.25), transparent 55%),
    linear-gradient(115deg, #232326, #0e0e10 70%);
}
.article-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.narrow { max-width: 800px; }
.back-link { display: inline-block; color: var(--text-dim); text-decoration: none; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.back-link:hover { color: var(--text); }
.article-body { color: #d7d7d7; font-size: 15.5px; }
.article-body h2 { color: var(--text); font-size: 21px; margin: 30px 0 12px; }
.article-body h4 { color: var(--text); font-size: 16px; margin: 18px 0 8px; }
.article-body p { margin: 0 0 12px; text-align: justify; hyphens: auto; }
.article-body li { text-align: justify; hyphens: auto; }
.article-body ul, .article-body ol { margin: 0 0 14px; padding-left: 22px; }
.article-body li { margin-bottom: 6px; }
.article-body li ul { margin-top: 6px; }
.article-body a { color: #3ea6ff; }
.formula {
  font-family: ui-monospace, Consolas, monospace; font-size: 14.5px; color: var(--text);
  background: #000; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; margin: 0 0 14px; overflow-x: auto; white-space: nowrap;
}
details.faq { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; margin: 0 0 10px; overflow: hidden; }
details.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 18px; font-weight: 700; font-size: 16px; color: var(--text);
  cursor: pointer; list-style: none;
  background: rgba(255,255,255,.03);
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary:hover { background: var(--bg-hover); }
details.faq[open] summary { background: rgba(255,255,255,.05); border-bottom: 1px solid var(--border); }
.faq-plus {
  flex: none; display: grid; place-items: center; color: var(--text);
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16);
  transition: transform .2s ease;
}
details.faq[open] .faq-plus { transform: rotate(45deg); }
.faq-body { padding: 18px; }
.faq-body > :first-child { margin-top: 0; }
.faq-body > :last-child { margin-bottom: 0; }
.tip {
  border-left: 3px solid var(--red);
  background: var(--bg-card); border-radius: 0 12px 12px 0;
  padding: 14px 16px; margin: 0 0 14px;
}
.tip strong { color: var(--text); }
.authors-box { margin-top: 28px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; font-size: 14.5px; color: var(--text-dim); }
.authors-box strong { color: var(--text); }
.authors-box ul { margin: 6px 0 12px; padding-left: 22px; }
.authors-box p { margin: 0 0 8px; }
.updated { display: flex; gap: 8px; align-items: center; margin: 10px 0 0; font-size: 13.5px; }

.error-code {
  margin: 0 0 6px; font-size: clamp(72px, 14vw, 140px); font-weight: 800;
  letter-spacing: -.03em; line-height: 1;
  background: linear-gradient(180deg, #fff, #555);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Responsive */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 0; }
  /* Navigarea trece pe rândul doi, scrollabilă orizontal — rămâne accesibilă */
  .topbar-inner { flex-wrap: wrap; row-gap: 2px; }
  .nav { display: flex; order: 3; flex-basis: 100%; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-link { white-space: nowrap; padding: 10px 16px; }
  /* Unificăm playerul + info într-un singur card pe mobil */
  .player-card { border-radius: var(--radius) var(--radius) 0 0; border-bottom: 0; }
  .hero-info { border-radius: 0 0 var(--radius) var(--radius); }
}
@media (max-width: 480px) {
  .footer-about { gap: 12px; }
  .footer-about .about-avatar { width: 56px; height: 56px; }
  .hero-info { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
:focus-visible { outline: 2px solid #3ea6ff; outline-offset: 2px; }
