/*
Theme Name: MARKK Television
Theme URI: https://example.com/markk-tv
Author: MARKK TV
Description: MARKK Television. Live broadcast theme with the player on the homepage, About, Contact and Privacy pages. Full-width live player with channel controls, side panel and stream details. Black, gold and chrome.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: markk-tv-live
*/

/* Layout: sticky top bar with the logo, a gold-framed player with custom controls, and a side rail for channel info and stream stats (stacks under the player on phones and in theater mode). */
  :root {
    --black: #070706;
    --panel: #11100e;
    --panel-2: #181612;
    --line: #2a2518;
    --gold: #f6b800;
    --gold-deep: #c98a00;
    --silver: #e6e8ec;
    --muted: #9a9484;
    --live: #ff3b30;
    --ok: #3ddc84;
    --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
    --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
    color-scheme: dark;
  }
  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  html, body { margin: 0; min-height: 100%; }
  body {
    background:
      radial-gradient(ellipse 80% 36% at 50% -4%, rgba(246,184,0,.18), transparent 70%),
      var(--black);
    color: var(--silver);
    font-family: var(--body);
    font-size: 15px;
    line-height: 1.5;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  button, select, input { font: inherit; color: inherit; }
  :focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

  /* top bar */
  .top {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 14px;
    padding: 10px max(16px, env(safe-area-inset-left, 0px)) 10px max(16px, env(safe-area-inset-right, 0px));
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    background: rgba(7,7,6,.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .top img { height: 42px; width: auto; display: block; }
  .top .spacer { flex: 1; }
  .chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 12px; border-radius: 999px;
    background: var(--panel); border: 1px solid var(--line);
    font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .12em; text-transform: uppercase;
  }
  .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
  .chip.live .dot { background: var(--live); animation: pulse 1.6s infinite; }
  .chip.warn .dot { background: var(--gold); }
  @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,59,48,.65); } 70%,100% { box-shadow: 0 0 0 8px rgba(255,59,48,0); } }

  .btn {
    appearance: none; cursor: pointer; border-radius: 8px;
    padding: 8px 14px; background: var(--panel); border: 1px solid var(--line);
    font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .08em; text-transform: uppercase;
  }
  .btn:hover { border-color: var(--gold); color: var(--gold); }
  .btn.gold { color: #14110a; border: 0; background: linear-gradient(180deg, #ffd24a, var(--gold) 55%, var(--gold-deep)); }
  .btn.gold:hover { color: #14110a; filter: brightness(1.08); }

  /* layout */
  .layout {
    max-width: 1440px; margin: 0 auto;
    padding: 20px max(16px, env(safe-area-inset-left, 0px)) 28px max(16px, env(safe-area-inset-right, 0px));
    display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start;
  }
  .layout.theater { grid-template-columns: minmax(0, 1fr); }
  @media (max-width: 980px) { .layout { grid-template-columns: minmax(0, 1fr); } }

  /* player */
  .frame {
    padding: 4px; border-radius: 16px;
    background: linear-gradient(135deg, var(--gold), var(--gold-deep) 45%, var(--gold));
    box-shadow: 0 0 0 1px #000, 0 24px 70px rgba(246,184,0,.14);
  }
  .screen { position: relative; aspect-ratio: 16 / 9; max-width: 100%; background: #000; border-radius: 12px; overflow: hidden; user-select: none; -webkit-user-select: none; }
  .screen:fullscreen { border-radius: 0; aspect-ratio: auto; width: 100%; height: 100%; }
  .screen:-webkit-full-screen { border-radius: 0; aspect-ratio: auto; width: 100%; height: 100%; }
  video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: #000; object-fit: contain; }

  .overlay {
    position: absolute; inset: 0; z-index: 4;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
    padding: 20px; text-align: center;
    background: radial-gradient(ellipse at center, rgba(246,184,0,.12), rgba(0,0,0,.88) 70%), #000;
  }
  .overlay.clear { background: rgba(0,0,0,.55); }
  .overlay img { width: min(340px, 60%); height: auto; filter: drop-shadow(0 8px 28px rgba(246,184,0,.3)); }
  .overlay h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(22px, 3.4vw, 32px); letter-spacing: .06em; text-transform: uppercase; }
  .overlay p { margin: 0; color: var(--muted); max-width: 38ch; text-wrap: balance; }
  .spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(246,184,0,.25); border-top-color: var(--gold); animation: spin .9s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .buffering { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; pointer-events: none; }

  .unmute {
    position: absolute; top: 12px; right: 12px; z-index: 5;
    background: rgba(0,0,0,.78); border: 1px solid var(--gold); color: var(--gold);
    border-radius: 8px; padding: 7px 12px; cursor: pointer;
    font-family: var(--display); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 15px;
  }
  .badge { position: absolute; top: 12px; left: 12px; z-index: 5; pointer-events: none; }

  /* custom controls */
  .controls {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
    display: flex; align-items: center; gap: 4px;
    padding: 28px 10px 8px;
    background: linear-gradient(to top, rgba(0,0,0,.88), rgba(0,0,0,0));
    transition: opacity .25s;
  }
  .screen.idle .controls { opacity: 0; pointer-events: none; }
  .screen.idle { cursor: none; }
  .cb {
    appearance: none; background: transparent; border: 0; cursor: pointer; color: var(--silver);
    width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; flex: none;
  }
  .cb:hover { color: var(--gold); background: rgba(255,255,255,.08); }
  .cb svg { width: 24px; height: 24px; fill: currentColor; }
  .vol { width: 84px; accent-color: var(--gold); cursor: pointer; }
  .golive {
    appearance: none; cursor: pointer; border-radius: 6px; padding: 4px 10px;
    background: transparent; border: 1px solid var(--muted); color: var(--muted);
    font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; margin-left: 6px;
  }
  .golive.atlive { border-color: var(--live); color: #fff; background: var(--live); cursor: default; }
  .grow { flex: 1; }
  .qwrap { position: relative; }
  .qbtn { width: auto; padding: 0 10px; font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
  .qmenu {
    position: absolute; right: 0; bottom: 48px; min-width: 130px;
    background: rgba(12,11,9,.96); border: 1px solid var(--line); border-radius: 10px; padding: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,.6);
  }
  .qmenu button {
    display: block; width: 100%; text-align: left; background: transparent; border: 0; cursor: pointer;
    padding: 8px 12px; border-radius: 6px; font-size: 14px;
  }
  .qmenu button:hover { background: rgba(255,255,255,.08); }
  .qmenu button[aria-checked="true"] { color: var(--gold); font-weight: 600; }
  .qmenu button[aria-checked="true"]::before { content: "\2713\00a0"; }

  /* side rail */
  .rail { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
  .card h3 { margin: 0 0 10px; font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
  .channel-name { margin: 0; font-family: var(--display); font-weight: 800; font-size: 30px; letter-spacing: .04em; line-height: 1.1; }
  .tag { margin: 2px 0 12px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; font-family: var(--display); font-weight: 600; font-size: 15px; }
  .tag em { font-style: normal; color: var(--gold); }
  .state { margin: 0 0 14px; }
  .actions { display: flex; flex-wrap: wrap; gap: 8px; }
  dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
  dt { color: var(--muted); }
  dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
  .keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; padding: 0; list-style: none; }
  .keys li { display: contents; color: var(--muted); }
  kbd { font-family: var(--body); font-size: 12px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 7px; color: var(--silver); justify-self: start; }
  .toast {
    position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
    background: var(--panel-2); border: 1px solid var(--gold); color: var(--silver);
    padding: 10px 18px; border-radius: 10px; z-index: 40; max-width: calc(100% - 32px);
  }
  footer { text-align: center; padding: 8px 16px 28px; color: var(--muted); font-family: var(--display); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; font-size: 14px; }
  footer span { color: var(--gold); }

  @media (max-width: 560px) {
    .top img { height: 34px; }
    .vol { display: none; }
    .cb { width: 38px; height: 38px; }
    #pipBtn, #theaterBtn { display: none; }
  }
  @media (prefers-reduced-motion: reduce) { .chip.live .dot, .spinner { animation-duration: 3s; } .controls { transition: none; } }

  /* MARKK TV brand styling, matched to the logo: chrome silver, gold, glossy black and a gold bevel frame. */
  .top { background: linear-gradient(180deg, #161410 0%, #070706 100%); box-shadow: inset 0 -1px 0 rgba(246,184,0,.55), 0 6px 24px rgba(0,0,0,.6); }
  .frame {
    background: linear-gradient(180deg, #fff1a8 0%, #f6b800 22%, #8a5a00 48%, #f6b800 72%, #ffe27a 100%);
    box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(255,255,255,.25), 0 26px 80px rgba(246,184,0,.18);
  }
  .screen::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
    background: linear-gradient(180deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,0) 35%);
  }
  .channel-name, .overlay h2 {
    background: linear-gradient(180deg, #ffffff 0%, #d9dee6 42%, #8e95a0 52%, #eef1f5 78%, #aab1bb 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .card {
    background: linear-gradient(180deg, #17150f 0%, #0c0b09 100%);
    border-color: #3a3018; box-shadow: inset 0 1px 0 rgba(246,184,0,.18), 0 10px 30px rgba(0,0,0,.45);
  }
  .card h3 { color: #f6b800; text-shadow: 0 1px 0 #000; }
  footer { border-top: 1px solid #2a2518; background: linear-gradient(180deg, #070706 0%, #0d0c09 100%); }
  .tag em, footer span { background: linear-gradient(180deg, #fff1a8, #f6b800 55%, #b87a00); -webkit-background-clip: text; background-clip: text; color: transparent; }

  body.admin-bar .top { top: 32px; }
  @media (max-width: 782px) { body.admin-bar .top { top: 46px; } }


/* ---------- Navigation and pages ---------- */
.top-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; align-items: center; }
.top-nav a { color: var(--silver); text-decoration: none; font-family: var(--display); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 15px; }
.top-nav a:hover, .top-nav .current-menu-item > a { color: var(--gold); }
@media (max-width: 700px) { .top-nav ul { gap: 10px; } .top-nav a { font-size: 13px; letter-spacing: .06em; } }
.page-wrap { max-width: 900px; margin: 0 auto; padding: 28px max(20px, env(safe-area-inset-left, 0px)) 40px; }
.page-wrap p, .page-wrap li { line-height: 1.7; color: var(--silver); }
.section-title { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); margin: 32px 0 10px; }
.steps-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: step; }
.steps-list li { counter-increment: step; position: relative; padding-left: 50px; min-height: 34px; display: flex; align-items: center; }
.steps-list li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #ffd24a, var(--gold) 55%, var(--gold-deep)); color: #14110a; font-family: var(--display); font-weight: 800; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.page-actions a { text-decoration: none; }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; }
.contact-list dt { color: var(--muted); }
.contact-list dd { margin: 0; font-weight: 600; }
.muted { color: var(--muted); }
.form label { display: block; margin-bottom: 12px; color: var(--muted); }
.form input, .form textarea { display: block; width: 100%; margin-top: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--silver); font: inherit; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.form .hp { position: absolute; left: -9999px; height: 0; width: 0; overflow: hidden; }
.notice { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; }
.notice.ok { background: #10291c; color: #3ddc84; border: 1px solid #1f5a3a; }
.notice.err { background: #2a1210; color: #ff8a80; border: 1px solid #5a2a24; }

/* ---------- Images ---------- */
.about-banner { margin: 0 0 24px; }
.about-banner img { width: 100%; height: auto; border-radius: 14px; border: 1px solid #3a3018; box-shadow: 0 16px 40px rgba(0,0,0,.5); display: block; }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid #2a2518; background: linear-gradient(180deg, #070706 0%, #0d0c09 100%); margin-top: 40px; }
.foot-inner { max-width: 1280px; margin: 0 auto; padding: 44px max(20px, env(safe-area-inset-left, 0px)) 24px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
@media (max-width: 760px) { .foot-inner { grid-template-columns: 1fr; } }
.foot-brand img { width: 220px; height: auto; margin-bottom: 12px; }
.foot-brand p, .foot-col li { color: #b8b09a; margin: 0; }
.foot-col h4 { font-family: var(--display); font-size: 16px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-foot a { color: #e7e1cf; text-decoration: none; }
.site-foot a:hover { color: var(--gold); }
.foot-bottom { border-top: 1px solid #2a2518; max-width: 1280px; margin: 0 auto; padding: 16px max(20px, env(safe-area-inset-left, 0px)); color: #8f8775; font-size: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1a170f; border: 1px solid var(--gold); color: var(--silver); padding: 10px 16px; border-radius: 10px; }
.toast[hidden] { display: none; }

/* ---------- Contact layout ---------- */
.phone-link { display: block; color: var(--silver); text-decoration: none; font-weight: 600; }
.phone-link:hover { color: var(--gold); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
.form-row label { margin-bottom: 0; }
.about-banner { margin: 0 0 24px; }


/* =========================================================
   Streaming-service style (homepage)
   ========================================================= */
body { background: #070706; }
body.home .top { position: fixed; top: 0; left: 0; right: 0; z-index: 60; background: transparent; box-shadow: none; transition: background .3s, box-shadow .3s; }
body.home.admin-bar .top { top: 32px; }
@media (max-width: 782px) { body.home.admin-bar .top { top: 46px; } }
body.home .top.scrolled { background: rgba(7,7,6,.94); box-shadow: 0 6px 24px rgba(0,0,0,.6); }

.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; background-size: cover; background-position: center; background-repeat: no-repeat; }
.hero-content { max-width: 720px; padding: 120px 6vw 80px; }
.hero-logo { width: min(420px, 70vw); height: auto; margin-bottom: 18px; }
.hero-kicker { font-family: "Barlow Condensed", sans-serif; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #f5b800; margin: 0 0 8px; font-size: 16px; }
.hero-title { font-family: "Barlow Condensed", sans-serif; font-weight: 800; font-size: clamp(40px, 6vw, 72px); line-height: 1.02; color: #f4f4f4; margin: 0 0 14px; text-transform: uppercase; }
.hero-text { color: #cfc9b6; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; max-width: 58ch; margin: 0 0 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-gold, .btn-ghost { display: inline-block; padding: 14px 28px; border-radius: 8px; font-family: "Barlow Condensed", sans-serif; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; font-size: 18px; }
.btn-gold { background: linear-gradient(180deg, #ffd24a, #f5b800 60%, #b87a00); color: #14110a; }
.btn-gold:hover { filter: brightness(1.08); color: #14110a; }
.btn-ghost { background: rgba(255,255,255,.08); color: #f4f4f4; border: 1px solid rgba(255,255,255,.25); }
.btn-ghost:hover { border-color: #f5b800; color: #f5b800; }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(245,184,0,.6); color: #f5b800; display: grid; place-items: center; text-decoration: none; font-size: 20px; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

.watch-section { padding: 56px 4vw 24px; max-width: 1500px; margin: 0 auto; }
.section-label { font-family: "Barlow Condensed", sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: #f5b800; font-size: 20px; margin-bottom: 14px; }
.watch-section .layout { max-width: none; width: 100%; margin: 0; }
.watch-section .frame { width: 100%; max-width: none; }

.rows { padding: 20px 0 70px; }
.row { margin: 0 0 36px; }
.row-title { font-family: "Barlow Condensed", sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #f4f4f4; font-size: 26px; margin: 0 4vw 14px; }
.row-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 210px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4vw 14px; scrollbar-width: thin; scrollbar-color: #f5b800 #1a1a18; }
.card-poster { scroll-snap-align: start; text-decoration: none; color: #f4f4f4; display: block; }
.poster { aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: #151513; border: 1px solid #2a2518; transition: transform .25s ease, box-shadow .25s ease; }
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-ph { width: 100%; height: 100%; display: grid; place-items: center; text-align: center; padding: 12px; background: linear-gradient(160deg, #2a2212, #0c0b09); color: #f5b800; font-family: "Barlow Condensed", sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: 16px; }
.card-poster:hover .poster, .card-poster:focus-visible .poster { transform: scale(1.05); box-shadow: 0 0 0 2px #f5b800, 0 16px 34px rgba(0,0,0,.7); }
.card-title { display: block; margin-top: 10px; font-size: 15px; color: #cfc9b6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 700px) {
  .hero-content { padding: 110px 6vw 90px; }
  .row-track { grid-auto-columns: minmax(130px, 160px); }
}
