/* ==========================================================================
   SCT Management — Video Shop design system
   Dark, premium storefront theme. One file, custom properties throughout.
   ========================================================================== */

:root {
  --bg: #0a0c11;
  --bg-raised: #11141c;
  --bg-elevated: #161a25;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e9ebf3;
  --text-muted: #9aa3b8;
  --text-faint: #6b7488;
  --accent: #7c6cf6;
  --accent-soft: rgba(124, 108, 246, 0.14);
  --accent-2: #4cc9f0;
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.12);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.65);
  --font-display: "Sora", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 68px;
  --container: 1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; width: 100%; }

img, svg, video { max-width: 100%; display: block; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.container {
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
}

.section { padding: 3.5rem 0; }
.section-tight { padding: 2.25rem 0; }

.section-head { margin-bottom: 1.75rem; }
.section-head h2 { font-size: 1.65rem; }
.section-head p { color: var(--text-muted); margin-top: 0.35rem; max-width: 60ch; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.75rem;
}

.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(10, 12, 17, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  flex: none;
}

.brand-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.main-nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
}
.main-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); text-decoration: none; }
.main-nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.07); }

.nav-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.cart-count {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.cart-count.visible { display: inline-flex; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.93rem;
  font-weight: 600;
  padding: 0.68rem 1.35rem;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, opacity 0.12s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #5b8bf7 55%, var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 24px -10px rgba(124, 108, 246, 0.65);
}
.btn-primary:hover { box-shadow: 0 12px 30px -10px rgba(124, 108, 246, 0.8); color: #fff; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); color: var(--text); }

.btn-danger { background: var(--danger-soft); border-color: rgba(248, 113, 113, 0.4); color: var(--danger); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.2); color: var(--danger); }

.btn-sm { padding: 0.42rem 0.9rem; font-size: 0.84rem; border-radius: 8px; }
.btn-lg { padding: 0.85rem 1.8rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* --------------------------------------------------------------------------
   Badges & chips
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.24rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}
.badge-accent { color: var(--accent-2); border-color: rgba(76, 201, 240, 0.35); background: rgba(76, 201, 240, 0.08); }
.badge-success { color: var(--success); border-color: rgba(52, 211, 153, 0.35); background: var(--success-soft); }
.badge-warning { color: var(--warning); border-color: rgba(251, 191, 36, 0.35); background: var(--warning-soft); }
.badge-danger { color: var(--danger); border-color: rgba(248, 113, 113, 0.35); background: var(--danger-soft); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 5.5rem 0 4.5rem;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(52rem 26rem at 82% -18%, rgba(124, 108, 246, 0.22), transparent 60%),
    radial-gradient(40rem 22rem at 8% 118%, rgba(76, 201, 240, 0.13), transparent 60%);
}

.hero h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.3rem);
  max-width: 17ch;
  margin-bottom: 1.1rem;
}

.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lede {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 56ch;
  margin-bottom: 2rem;
}

.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.hero-stats .stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
}
.hero-stats .stat span { color: var(--text-faint); font-size: 0.85rem; }

/* --------------------------------------------------------------------------
   Video cards
   -------------------------------------------------------------------------- */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.4rem;
}

.video-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.video-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.video-card .poster { position: relative; aspect-ratio: 16 / 9; background: var(--bg-elevated); }
.video-card .poster img { width: 100%; height: 100%; object-fit: cover; }

.video-card .poster .duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(6, 8, 12, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 0.14rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 600;
}

.video-card .card-body {
  padding: 1.15rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.video-card .card-meta { display: flex; gap: 0.45rem; flex-wrap: wrap; }

.video-card h3 { font-size: 1.08rem; }
.video-card h3 a { color: var(--text); }
.video-card h3 a:hover { color: var(--accent-2); text-decoration: none; }

.video-card .tagline { color: var(--text-muted); font-size: 0.89rem; flex: 1; }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.55rem;
}

.price { font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; }

/* --------------------------------------------------------------------------
   Product detail
   -------------------------------------------------------------------------- */

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  gap: 2.5rem;
  align-items: start;
}

.product-poster {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
}
.product-poster img { width: 100%; height: 100%; object-fit: cover; }

.buy-box {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  position: sticky;
  top: calc(var(--header-h) + 1.25rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.buy-box .price { font-size: 1.9rem; }

.feature-list { list-style: none; display: grid; gap: 0.5rem; }
.feature-list li {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.feature-list li::before { content: "✓"; color: var(--success); font-weight: 700; }

/* --------------------------------------------------------------------------
   Panels, forms, tables
   -------------------------------------------------------------------------- */

.panel {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.panel + .panel { margin-top: 1.4rem; }

.panel-title { font-size: 1.15rem; margin-bottom: 1.1rem; }

.narrow { max-width: 460px; margin-inline: auto; }
.mid { max-width: 760px; margin-inline: auto; }

.form-grid { display: grid; gap: 1rem; }

label.field { display: grid; gap: 0.4rem; font-size: 0.88rem; font-weight: 600; }

input[type="text"], input[type="email"], input[type="password"], select, textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  padding: 0.65rem 0.85rem;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder { color: var(--text-faint); }

.form-note { font-size: 0.83rem; color: var(--text-faint); }

.form-error {
  display: none;
  background: var(--danger-soft);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  font-size: 0.88rem;
}
.form-error.visible { display: block; }

.form-success {
  display: none;
  background: var(--success-soft);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--success);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  font-size: 0.88rem;
}
.form-success.visible { display: block; }

.table-wrap { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
table.data th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  font-weight: 600;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
table.data td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.data tr:last-child td { border-bottom: none; }

/* --------------------------------------------------------------------------
   Cart & checkout
   -------------------------------------------------------------------------- */

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
  gap: 2rem;
  align-items: start;
}

.cart-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  gap: 1.1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }

.cart-item .thumb {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
}
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }

.cart-item h3 { font-size: 1rem; }
.cart-item h3 a { color: var(--text); }
.cart-item .meta { color: var(--text-faint); font-size: 0.82rem; margin-top: 0.2rem; }

.cart-item .item-end { display: grid; justify-items: end; gap: 0.4rem; }

.link-danger {
  background: none;
  border: none;
  color: var(--danger);
  font: inherit;
  font-size: 0.83rem;
  cursor: pointer;
  padding: 0;
}
.link-danger:hover { text-decoration: underline; }

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  color: var(--text-muted);
  font-size: 0.93rem;
}
.summary-row.total {
  border-top: 1px solid var(--border-strong);
  margin-top: 0.6rem;
  padding-top: 0.9rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
}
.summary-row.total .price { font-size: 1.35rem; }

.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
}
.empty-state h2 { color: var(--text); margin-bottom: 0.5rem; font-size: 1.3rem; }
.empty-state .btn { margin-top: 1.25rem; }

.notice {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  background: var(--warning-soft);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: var(--warning);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
}
.notice.info {
  background: rgba(76, 201, 240, 0.08);
  border-color: rgba(76, 201, 240, 0.3);
  color: var(--accent-2);
}

/* --------------------------------------------------------------------------
   Player
   -------------------------------------------------------------------------- */

.player-shell {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  aspect-ratio: 16 / 9;
  position: relative;
}
.player-shell video { width: 100%; height: 100%; }

.player-overlay {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(160deg, rgba(124, 108, 246, 0.25), rgba(10, 12, 17, 0.92)), var(--bg-elevated);
}
.player-overlay.visible { display: flex; }
.player-overlay h2 { font-size: 1.25rem; }
.player-overlay p { color: var(--text-muted); max-width: 46ch; font-size: 0.92rem; }

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */

.toast-region {
  position: fixed;
  bottom: 1.4rem;
  right: 1.4rem;
  z-index: 100;
  display: grid;
  gap: 0.6rem;
  max-width: min(92vw, 360px);
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1.05rem;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  animation: toast-in 0.22s ease;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 4rem;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); font-size: 0.88rem; }
.footer-links a:hover { color: var(--text); }

.site-footer .copyright { color: var(--text-faint); font-size: 0.85rem; }

/* --------------------------------------------------------------------------
   Utility & responsive
   -------------------------------------------------------------------------- */

.page-title { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 0.4rem; }
.page-sub { color: var(--text-muted); margin-bottom: 2rem; max-width: 62ch; }

.stack { display: grid; gap: 1rem; }
.row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }

.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--bg-raised) 40%, var(--bg-elevated) 50%, var(--bg-raised) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  min-height: 240px;
}
@keyframes shimmer { to { background-position-x: -200%; } }

.noscript-banner {
  background: var(--warning-soft);
  color: var(--warning);
  text-align: center;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .product-layout, .cart-layout { grid-template-columns: 1fr; }
  .buy-box { position: static; }
}

@media (max-width: 720px) {
  .main-nav a:not(.nav-cart):not(.nav-account) { display: none; }
  .brand-sub { display: none; }
  .hero { padding: 3.5rem 0 3rem; }
  .hero-stats { gap: 1.5rem; }
  .cart-item { grid-template-columns: 96px minmax(0, 1fr); }
  .cart-item .item-end { grid-column: 2; justify-items: start; grid-auto-flow: column; align-items: center; gap: 1rem; }
  .section { padding: 2.5rem 0; }
}
