/* Maker Mindz Video Library */
* { box-sizing: border-box; }
html, body { margin: 0; background: #f4f7f6; color: #1f2d3a; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
a { color: #1e8449; }
[hidden] { display: none !important; }

/* Top bar */
.bar { min-height: 60px; background: #2c3e50; color: #fff; display: flex; align-items: center; gap: 10px; padding: 6px 12px; position: sticky; top: 0; z-index: 20; }
.home { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; font-size: 16px; padding: 6px 10px 6px 6px; border-radius: 999px; white-space: nowrap; }
.home:hover { background: rgba(255,255,255,.1); }
.home img { height: 34px; width: auto; display: block; }
.home .accent { color: #2ecc71; }
.bar .title { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.bar .title a { color: #fff; text-decoration: none; }

/* Series pills */
.nav-wrap { background: #fff; border-bottom: 1px solid #e3e8e6; }
#series-nav { max-width: 1200px; margin: 0 auto; display: flex; gap: 8px; padding: 10px 16px; overflow-x: auto; scrollbar-width: thin; }
.pill { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid #d5dedb; background: #fff; color: #2c3e50; text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.pill:hover { border-color: #27ae60; color: #1e8449; }
.pill.active { background: #27ae60; border-color: #27ae60; color: #fff; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* Hero */
.hero { background: linear-gradient(135deg, #2c3e50 0%, #1f5f46 100%); color: #fff; }
.hero .wrap { display: flex; align-items: center; gap: 20px; padding-top: 28px; padding-bottom: 28px; }
.hero-icon { flex: none; width: 84px; height: 84px; border-radius: 20px; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; font-size: 46px; }
.hero h1 { margin: 0 0 6px; font-size: 32px; line-height: 1.2; }
.hero .kicker { font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #2ecc71; }
.hero p { margin: 0 0 14px; font-size: 17px; line-height: 1.5; color: #dfe9e5; max-width: 720px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: rgba(255,255,255,.1); }
.btn.green { background: #27ae60; border-color: #27ae60; }
.btn.green:hover { background: #2ecc71; border-color: #2ecc71; }
.btn.red { background: #e62117; border-color: #e62117; }
.btn.red:hover { background: #ff3b30; border-color: #ff3b30; }
.btn svg { width: 16px; height: 16px; }

/* Loading */
.loading { padding: 60px 16px; text-align: center; color: #5b6b78; font-size: 16px; }
.spinner { width: 38px; height: 38px; margin: 0 auto 12px; border: 4px solid #d5dedb; border-top-color: #27ae60; border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Player */
.stage { padding-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px rgba(20,40,60,.18); }
@supports not (aspect-ratio: 16 / 9) { .player { height: 0; padding-top: 56.25%; } }
.player iframe, .player .facade { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.facade { display: block; padding: 0; cursor: pointer; background: #000 center / cover no-repeat; }
.facade::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.35), rgba(0,0,0,0) 50%); }
.play-btn { position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; transform: translate(-50%, -50%); z-index: 1; transition: transform .15s; }
.play-btn svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 8px rgba(0,0,0,.4)); }
.facade:hover .play-btn, .facade:focus-visible .play-btn { transform: translate(-50%, -50%) scale(1.1); }

.now { background: #fff; border: 1px solid #e3e8e6; border-radius: 14px; padding: 16px 18px; margin-top: 14px; }
.now h2 { margin: 0 0 4px; font-size: 21px; line-height: 1.3; }
.now-meta { color: #5b6b78; font-size: 14px; }
.now-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.steps { display: flex; gap: 8px; }
.sbtn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid #d5dedb; background: #fff; color: #2c3e50; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.sbtn:hover:not(:disabled) { border-color: #27ae60; color: #1e8449; }
.sbtn:disabled { opacity: .45; cursor: default; }
.sbtn.green { background: #27ae60; border-color: #27ae60; color: #fff; }
.sbtn.green:hover { background: #2ecc71; color: #fff; }
.desc-wrap { margin-top: 12px; background: #f4f7f6; border-radius: 10px; padding: 12px 14px; }
.desc { font-size: 15px; line-height: 1.55; color: #33444f; max-height: 4.65em; overflow: hidden; overflow-wrap: anywhere; }
.desc-wrap.open .desc { max-height: none; }
.more { margin-top: 6px; padding: 0; border: 0; background: none; color: #1e8449; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }

/* Toolbar */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 30px 0 14px; }
.toolbar h3 { margin: 0; font-size: 20px; flex: 1; min-width: 140px; }
.vcount { color: #5b6b78; font-size: 14px; font-weight: 600; margin-left: 6px; }
.search { flex: 1 1 200px; max-width: 280px; padding: 9px 14px; border: 1px solid #d5dedb; border-radius: 999px; font: inherit; font-size: 14px; background: #fff; }
.search:focus, .sort:focus { outline: 2px solid #27ae60; outline-offset: 1px; }
.sort { padding: 9px 12px; border: 1px solid #d5dedb; border-radius: 999px; font: inherit; font-size: 14px; background: #fff; color: #1f2d3a; }

/* Video grid */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; padding-bottom: 20px; }
.vcard { display: flex; flex-direction: column; text-align: left; padding: 0; background: #fff; border: 1px solid #e3e8e6; border-radius: 12px; overflow: hidden; cursor: pointer; font: inherit; color: inherit; box-shadow: 0 4px 14px rgba(20,40,60,.06); transition: transform .15s, box-shadow .15s, border-color .15s; }
.vcard:hover, .vcard:focus-visible { transform: translateY(-2px); border-color: #27ae60; box-shadow: 0 10px 24px rgba(20,40,60,.12); }
.vthumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #dfe6e3; overflow: hidden; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.vcard:hover .vthumb img { transform: scale(1.04); }
.vdur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.8); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.vplay { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(39,174,96,.92); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; padding-left: 3px; opacity: 0; transition: opacity .15s; }
.vcard:hover .vplay, .vcard:focus-visible .vplay { opacity: 1; }
.vnow { position: absolute; left: 8px; top: 8px; background: #27ae60; color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; display: none; }
.vcard.playing { border-color: #27ae60; box-shadow: 0 0 0 2px #27ae60; }
.vcard.playing .vnow { display: block; }
.vbody { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.vtitle { font-size: 15px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vmeta { font-size: 13px; color: #5b6b78; }
.empty { grid-column: 1 / -1; text-align: center; color: #5b6b78; padding: 30px 0; }

.note { background: #eafaf1; border: 1px solid #b7e4c7; border-radius: 12px; padding: 14px 16px; margin: 6px 0 10px; font-size: 15px; line-height: 1.5; }
.note a { font-weight: 700; }
.fallback { padding: 24px 0 10px; }
.fallback p { color: #5b6b78; }

/* Library page */
.lib-hero .wrap { display: block; padding-top: 34px; padding-bottom: 34px; }
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; padding: 28px 0 20px; }
.series-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #e3e8e6; border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 6px 20px rgba(20,40,60,.07); transition: transform .15s, box-shadow .15s, border-color .15s; }
.series-card:hover, .series-card:focus-visible { transform: translateY(-3px); border-color: #27ae60; box-shadow: 0 12px 28px rgba(20,40,60,.13); }
.series-thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #2c3e50, #27ae60) center / cover no-repeat; display: flex; align-items: center; justify-content: center; }
.series-icon { font-size: 54px; }
.series-thumb.has-img .series-icon { position: absolute; left: 12px; bottom: 12px; font-size: 26px; width: 48px; height: 48px; border-radius: 12px; background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.series-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.series-body h2 { margin: 0 0 6px; font-size: 20px; }
.series-body p { margin: 0 0 14px; color: #5b6b78; font-size: 15px; line-height: 1.5; flex: 1; }
.series-meta { font-size: 14px; font-weight: 700; color: #27ae60; }

/* Footer */
.foot { text-align: center; color: #5b6b78; font-size: 14px; padding: 26px 16px 34px; border-top: 1px solid #e3e8e6; margin-top: 24px; }
.foot a { color: #1e8449; font-weight: 600; }

@media (max-width: 600px) {
  .home .txt { display: none; }
  .bar .title { font-size: 15px; }
  .hero .wrap { flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 20px; padding-bottom: 22px; }
  .hero-icon { width: 60px; height: 60px; font-size: 34px; border-radius: 16px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 15px; }
  .btn { padding: 8px 13px; font-size: 13px; }
  .stage { padding-top: 14px; }
  .player { border-radius: 10px; }
  .now { padding: 14px; }
  .now h2 { font-size: 18px; }
  .sbtn { padding: 7px 11px; font-size: 13px; }
  .toolbar { margin-top: 22px; }
  .search { max-width: none; }
  .vgrid { grid-template-columns: 1fr; gap: 14px; }
  .sgrid { grid-template-columns: 1fr; }
}
