/* La DIDI — prezentare premium (TV / digital signage) */
:root {
  --bg-deep: #0f0f0f;
  --bg-elevated: #1a1a1a;
  --accent: #e1251b;
  --text: #ffffff;
  --text-muted: #d6d6d6;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --shadow-deep: rgba(0, 0, 0, 0.45);
  --ticker-bg: rgba(0, 0, 0, 0.78);
  --radius-stage: 16px;
  --radius-ticker: 12px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --header-h: clamp(40px, 5.5vmin, 56px);
  --ticker-h: clamp(52px, 6.5vmin, 72px);
  --sidebar-w: clamp(220px, 24vw, 340px);
  --space-y: clamp(12px, 2vmin, 24px);
  --transition-media: opacity 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body.app {
  margin: 0;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  font-family: var(--font);
  color: var(--text-muted);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg-deep);
}

.app-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(165deg, var(--bg-deep) 0%, #121212 38%, var(--bg-elevated) 100%);
}

.app-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(225, 37, 27, 0.07), transparent 58%),
    radial-gradient(ellipse 70% 45% at 100% 100%, rgba(255, 255, 255, 0.03), transparent 50%);
  opacity: 1;
}

.app-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px),
    linear-gradient(180deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.22;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, #000 20%, transparent 72%);
}

.corner-accent {
  position: fixed;
  width: clamp(56px, 9vmin, 100px);
  height: clamp(56px, 9vmin, 100px);
  z-index: 2;
  pointer-events: none;
  border: 1px solid var(--border-subtle);
  opacity: 0.55;
}

.corner-accent--tl {
  top: var(--space-y);
  left: var(--space-y);
  border-right: none;
  border-bottom: none;
  border-radius: 4px 0 0 0;
}

.corner-accent--tr {
  top: var(--space-y);
  right: var(--space-y);
  border-left: none;
  border-bottom: none;
  border-radius: 0 4px 0 0;
}

.corner-accent--bl {
  bottom: var(--space-y);
  left: var(--space-y);
  border-right: none;
  border-top: none;
  border-radius: 0 0 0 4px;
}

.corner-accent--br {
  bottom: var(--space-y);
  right: var(--space-y);
  border-left: none;
  border-top: none;
  border-radius: 0 0 4px 0;
}

@media (max-width: 720px) {
  .corner-accent {
    display: none;
  }
}

.brand-bar {
  flex: 0 0 var(--header-h);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-y);
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.92) 0%, rgba(15, 15, 15, 0.65) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
}

.admin-entry {
  position: absolute;
  right: clamp(14px, 2.8vmin, 28px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 15, 15, 0.88);
  color: var(--text-muted);
  text-decoration: none;
  font-size: clamp(0.72rem, 1.3vmin, 0.82rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 6px 20px var(--shadow-deep), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

.admin-entry:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(26, 26, 26, 0.95);
  transform: translateY(-50%) scale(1.03);
}

.admin-entry:active {
  transform: translateY(-50%) scale(0.98);
}

.admin-entry:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.admin-entry__svg {
  display: block;
  flex: 0 0 auto;
}

.admin-entry__text {
  line-height: 1;
}

@media (max-width: 520px) {
  .admin-entry__text {
    display: none;
  }

  .admin-entry {
    width: clamp(40px, 7vmin, 48px);
    height: clamp(40px, 7vmin, 48px);
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
}

.brand-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35em 0.75em;
  letter-spacing: 0.04em;
  text-align: center;
}

.brand-bar__logo {
  height: clamp(28px, 4.2vmin, 44px);
  width: auto;
  max-width: min(42vw, 280px);
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.brand-bar__mark {
  font-size: clamp(1.05rem, 2.4vmin, 1.5rem);
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
}

.brand-bar__mark span {
  color: var(--accent);
  font-weight: 700;
}

.brand-bar__tag {
  font-size: clamp(0.62rem, 1.35vmin, 0.78rem);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.92;
}

.app-body {
  flex: 1 1 0;
  min-height: 0;
  z-index: 1;
  display: flex;
  gap: clamp(10px, 1.5vmin, 18px);
  padding: var(--space-y) clamp(10px, 2vmin, 24px) 0;
  overflow: hidden;
  align-items: stretch;
}

.sidebar {
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  border-radius: calc(var(--radius-stage) + 2px);
  border: 1px solid var(--border-subtle);
  background: linear-gradient(165deg, rgba(30, 30, 30, 0.88) 0%, rgba(16, 16, 16, 0.92) 100%);
  box-shadow: 0 18px 50px var(--shadow-deep), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}

.sidebar__head {
  flex: 0 0 auto;
  padding: clamp(12px, 1.8vmin, 18px) clamp(14px, 2vmin, 20px);
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar__label {
  display: block;
  font-size: clamp(0.68rem, 1.2vmin, 0.78rem);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.sidebar__nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: clamp(10px, 1.4vmin, 14px);
  padding-bottom: clamp(14px, 2vmin, 20px);
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.2vmin, 12px);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) rgba(255, 255, 255, 0.04);
}

.sidebar__nav::-webkit-scrollbar {
  width: 8px;
}

.sidebar__nav::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.sidebar__nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.sidebar__nav::-webkit-scrollbar-thumb:hover {
  background: rgba(225, 37, 27, 0.55);
  background-clip: padding-box;
}

.sidebar__item {
  flex: 0 0 auto;
  width: 100%;
  min-height: clamp(56px, 8vmin, 72px);
  margin: 0;
  padding: clamp(12px, 1.6vmin, 16px) clamp(14px, 2vmin, 18px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.25rem;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.sidebar__item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.sidebar__item.is-active {
  background: linear-gradient(135deg, rgba(225, 37, 27, 0.22) 0%, rgba(225, 37, 27, 0.08) 100%);
  border-color: rgba(225, 37, 27, 0.45);
  box-shadow: 0 8px 24px rgba(225, 37, 27, 0.12);
}

.sidebar__item:active {
  transform: scale(0.98);
}

.sidebar__item:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sidebar__item-title {
  font-size: clamp(0.95rem, 2vmin, 1.15rem);
  font-weight: 600;
  line-height: 1.25;
}

.sidebar__item-meta {
  font-size: clamp(0.72rem, 1.3vmin, 0.82rem);
  color: var(--text-muted);
}

.sidebar__empty {
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.sidebar__empty a {
  color: var(--accent);
}

.main-stage {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(6px, 1.2vmin, 16px);
}

.stage-outer {
  width: 100%;
  max-width: min(96vw, 1680px);
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.stage-outerGlow {
  position: absolute;
  inset: -3%;
  border-radius: calc(var(--radius-stage) + 8px);
  background: radial-gradient(ellipse at 50% 35%, rgba(225, 37, 27, 0.09), transparent 62%);
  pointer-events: none;
  z-index: -1;
}

.stage-chrome {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(10px, 1.4vmin, 16px);
  border-radius: calc(var(--radius-stage) + 4px);
  background: linear-gradient(145deg, rgba(40, 40, 40, 0.5) 0%, rgba(18, 18, 18, 0.85) 100%);
  border: 1px solid var(--border-subtle);
  box-shadow:
    0 28px 90px var(--shadow-deep),
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.stage-inner {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  border-radius: var(--radius-stage);
  overflow: hidden;
  background: #050505;
  border: 1px solid var(--border-subtle);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 -20px 50px rgba(0, 0, 0, 0.35);
}

.media-layer {
  position: absolute;
  inset: 0;
  transition: var(--transition-media);
}

.media-layer.is-dim {
  opacity: 0;
}

#player,
#still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.stage-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2vmin, 20px);
  padding: 2rem;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, #141414 100%);
  color: var(--text-muted);
}

.stage-placeholder[hidden],
.stage-placeholder.is-hidden {
  display: none;
}

.stage-placeholder__icon {
  width: clamp(52px, 8vmin, 76px);
  height: clamp(52px, 8vmin, 76px);
  color: var(--accent);
  opacity: 0.9;
}

.stage-placeholder__title {
  margin: 0;
  font-size: clamp(1.1rem, 2.8vmin, 1.65rem);
  font-weight: 600;
  color: var(--text);
}

.stage-placeholder__sub {
  margin: 0;
  max-width: 28rem;
  font-size: clamp(0.88rem, 1.9vmin, 1.05rem);
  line-height: 1.45;
  opacity: 0.88;
}

.main-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.main-empty__box {
  max-width: 34rem;
  padding: clamp(1.5rem, 3vmin, 2.25rem);
  border-radius: var(--radius-stage);
  border: 1px solid var(--border-subtle);
  background: rgba(26, 26, 26, 0.75);
  box-shadow: 0 20px 60px var(--shadow-deep);
  text-align: center;
}

.main-empty__box h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.2rem, 2.8vmin, 1.5rem);
  color: var(--text);
}

.main-empty__box p {
  margin: 0;
  font-size: clamp(0.9rem, 2vmin, 1.05rem);
  line-height: 1.5;
  color: var(--text-muted);
}

.sound-toggle {
  position: fixed;
  z-index: 50;
  right: clamp(14px, 2.8vmin, 28px);
  bottom: clamp(68px, 12vmin, 120px);
  width: clamp(48px, 8vmin, 58px);
  height: clamp(48px, 8vmin, 58px);
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  background: rgba(15, 15, 15, 0.88);
  box-shadow: 0 10px 32px var(--shadow-deep), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.sound-toggle.is-on {
  color: var(--accent);
  border-color: rgba(225, 37, 27, 0.45);
  background: rgba(30, 18, 17, 0.92);
}

.sound-toggle:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.18);
}

.sound-toggle:active {
  transform: scale(0.98);
}

.sound-toggle:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sound-toggle__svg {
  display: block;
  pointer-events: none;
}

.ticker-bar {
  flex: 0 0 auto;
  z-index: 3;
  padding: 0 clamp(14px, 2.8vmin, 32px) var(--space-y);
}

.ticker-bar[hidden] {
  display: none;
}

.ticker {
  height: var(--ticker-h);
  display: flex;
  align-items: center;
  border-radius: var(--radius-ticker);
  overflow: hidden;
  background: var(--ticker-bg);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ticker__inner {
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, #000 2%, #000 98%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 2%, #000 98%, transparent 100%);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-marquee var(--ticker-dur, 50s) linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-seg {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-height: var(--ticker-h);
  padding: 0 clamp(1.25rem, 3vmin, 2.5rem);
  font-size: clamp(0.95rem, 2.15vmin, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.35;
  white-space: nowrap;
  color: var(--text);
}

@keyframes ticker-marquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@media (max-width: 900px) {
  .app-body {
    flex-direction: column;
    padding-top: clamp(8px, 1.5vmin, 14px);
  }

  .sidebar {
    flex: 0 0 auto;
    width: 100%;
    max-height: min(38vh, 320px);
  }

  .sidebar__nav {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .sidebar__item {
    flex: 0 0 auto;
    min-width: 0;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
    justify-content: center;
    width: 100%;
  }

  .ticker-seg:first-of-type {
    display: none;
  }

  .ticker-seg {
    white-space: normal;
    text-align: center;
  }

  .media-layer {
    transition: none;
  }
}
