/* ============================================================
   video.mikomi.rs - dark, minimal, premium
   ============================================================ */

:root {
  --bg:        #0b0d10;
  --bg-2:      #12161b;
  --surface:   #171c22;
  --surface-2: #1f262e;
  --line:      #2a323c;
  --text:      #e9eef5;
  --text-dim:  #97a3b3;
  --accent:    #d4a85a;        /* topli zlatni naglasak */
  --accent-2:  #b88c3c;
  --danger:    #ff6b6b;
  --radius:    14px;
  --shadow:    0 20px 60px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- LOGIN ---------- */

.login-body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding:
    max(24px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(212,168,90,.10), transparent 60%),
    radial-gradient(800px 500px at 10% 110%, rgba(184,140,60,.08), transparent 60%),
    var(--bg);
}

.card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, var(--bg-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 28px 22px;
  box-shadow: var(--shadow);
  text-align: center;
}

.logo-wrap {
  margin: 4px 0 18px;
}

.logo {
  max-width: 140px;
  height: auto;
  opacity: .95;
}

.card h1 {
  margin: 8px 0 6px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .2px;
}

.subtitle {
  margin: 0 0 22px;
  color: var(--text-dim);
  font-size: 14px;
}

.pin-form {
  display: grid;
  gap: 12px;
  margin-bottom: 4px;
}

.pin-input {
  width: 100%;
  min-height: 52px;
  padding: 16px 14px;
  font-size: 20px;
  letter-spacing: 8px;
  text-align: center;
  font-family: "SF Mono", Consolas, Menlo, monospace;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.pin-input::placeholder { color: #4a5563; }

.pin-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,168,90,.18);
  background: #1b2228;
}

.pin-input:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.btn {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  color: #1a1207;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .05s ease, filter .15s ease, opacity .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn:hover  { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  filter: grayscale(.3);
}

.error {
  margin-top: 14px;
  padding: 10px 12px;
  font-size: 13.5px;
  color: #ffd4d4;
  background: rgba(255,107,107,.10);
  border: 1px solid rgba(255,107,107,.35);
  border-radius: 10px;
}

.foot {
  margin-top: 22px;
  color: var(--text-dim);
  font-size: 12px;
}

/* ---------- WATCH ---------- */

.watch-body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 500px at 50% -200px, rgba(212,168,90,.08), transparent 60%),
    var(--bg);
}

.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(11,13,16,.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding:
    12px
    max(20px, env(safe-area-inset-right))
    12px
    max(20px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-small {
  height: 32px;
  width: auto;
}

.topbar-title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: .2px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.views {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-dim);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.views svg {
  opacity: .75;
}

.logout {
  font-size: 13px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
}

.logout:hover {
  color: var(--text);
  border-color: var(--accent);
}

.player-wrap {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 20px;
}

.player-frame {
  width: 100%;
  background: #000;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.video {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.hint {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  margin: 18px 0 0;
}

.watch-foot {
  padding: 18px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  border-top: 1px solid var(--line);
}

/* ---------- MOBILE ---------- */

@media (max-width: 520px) {
  .card { padding: 28px 20px 18px; border-radius: 12px; }
  .pin-input { font-size: 18px; letter-spacing: 6px; padding: 14px 12px; }
  .topbar-title { font-size: 13px; }
  .player-wrap { padding: 16px 12px; }
  .logout { padding: 10px 14px; }
  .views { padding: 6px 10px; font-size: 12px; }
  .views svg { display: none; }
}

/* ---------- LANDSCAPE TELEFON: imersivni player ---------- */
/* Niska visina (<= 500px) = telefon u horizontalnom polozaju */

@media (max-height: 500px) and (orientation: landscape) {
  .topbar,
  .watch-foot,
  .hint {
    display: none;
  }
  .player-wrap {
    padding: 0;
    max-width: none;
  }
  .player-frame {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .video-embed {
    aspect-ratio: auto;
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
  }
  .watch-body {
    background: #000;
  }
}

/* District 036 / Mikomi Trading */
