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

:root {
  --bg-side: linear-gradient(180deg, rgba(8, 8, 14, 0.94) 0%, rgba(8, 8, 14, 0.88) 100%);
  --bg-bot:  linear-gradient(0deg,   rgba(8, 8, 14, 0.95) 0%, rgba(8, 8, 14, 0.82) 100%);
  --bg-ticker: linear-gradient(0deg, rgba(8, 8, 14, 0.92) 0%, rgba(8, 8, 14, 0.82) 100%);
  --bg-card: linear-gradient(135deg, rgba(8, 8, 14, 0.92), rgba(8, 8, 14, 0.78));
  --accent: #A78BFA;
  --accent-deep: #8B5CF6;
  --accent-glow: rgba(167, 139, 250, 0.45);
  --accent-soft: rgba(167, 139, 250, 0.14);
  --accent-line: rgba(167, 139, 250, 0.35);
  --text: #FFFFFF;
  --text-dim: rgba(255, 255, 255, 0.72);
  --text-faded: rgba(255, 255, 255, 0.45);
  --border: rgba(255, 255, 255, 0.08);
  --live: #EF4444;
  --live-glow: rgba(239, 68, 68, 0.45);
}

html, body {
  width: 100vw;
  height: 100vh;
  background: #000;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01', 'cv11';
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay {
  position: relative;
  width: 1920px;
  height: 1080px;
  flex: 0 0 auto;
  transform-origin: center center;
  transform: scale(var(--overlay-scale-x, 1), var(--overlay-scale-y, 1));
}

/* ============ CAMERA FRAME (live stream) ============ */
.camera-frame {
  position: absolute;
  top: 0;
  left: 0;
  right: 440px;     /* clear sidebar */
  bottom: 134px;    /* clear news ticker (42px) + bottom bar (92px) */
  z-index: 5;       /* ispod svih UI elemenata */
  overflow: hidden;
  background: #000;
}

.camera-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ============ LIVE BADGE ============ */
.live-badge {
  position: absolute;
  top: 36px;
  left: 36px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 22px;
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 12px;
  box-shadow: 0 0 36px var(--live-glow), 0 8px 32px rgba(0, 0, 0, 0.45);
  animation: slideInLeft 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.live-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-badge-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 14px var(--live), 0 0 6px var(--live);
  animation: pulse 1.6s ease-in-out infinite;
}

.live-badge-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 3.5px;
  color: var(--live);
  text-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
  line-height: 1;
}

.live-badge-location {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 7px;
  color: var(--text);
  padding-left: 26px;
  line-height: 1;
}

@keyframes slideInLeft {
  from { transform: translateX(-120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ============ AD BANNERS (image slots) ============ */
.ad-slot {
  position: absolute;
  z-index: 18;
  background: rgba(8, 8, 14, 0.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: slideInTop 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.ad-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.4s ease;
}

.ad-slot-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background:
    linear-gradient(135deg, rgba(167, 139, 250, 0.08), rgba(167, 139, 250, 0.02)),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 12px,
      rgba(167, 139, 250, 0.06) 12px,
      rgba(167, 139, 250, 0.06) 24px
    );
  border: 1px dashed rgba(167, 139, 250, 0.4);
  border-radius: 10px;
}

.ad-slot-placeholder .ph-size {
  font-size: 30px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(167, 139, 250, 0.4);
}

.ad-slot-placeholder .ph-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-dim);
}

@keyframes slideInTop {
  from { transform: translateY(-20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ============ RIGHT SIDEBAR ============ */
.sidebar {
  position: absolute;
  top: 0;
  right: 0;
  width: 440px;
  height: calc(1080px - 92px);
  background: var(--bg-side);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-left: 1px solid var(--border);
  padding: 38px 36px 26px 36px;
  display: flex;
  flex-direction: column;
  z-index: 15;
  animation: slideInRight 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -1px;
  transform: translateY(-50%);
  height: 320px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--accent-line), transparent);
  opacity: 0.85;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* --- Logo --- */
.logo-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-icon {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 18px var(--accent-glow));
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-line1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text);
  line-height: 1;
}

.logo-line2 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--accent);
  margin-top: 7px;
  line-height: 1;
}

/* --- Divider --- */
.divider {
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(167, 139, 250, 0.12) 15%,
    rgba(167, 139, 250, 0.45) 50%,
    rgba(167, 139, 250, 0.12) 85%,
    transparent 100%);
  margin: 18px 0;
}

.divider-spacer {
  margin-top: auto;
}

/* --- Time --- */
.time-section { padding: 2px 0; }

.time {
  font-size: 76px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -3px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
  text-shadow: 0 0 38px rgba(167, 139, 250, 0.32);
}

.time-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 12px;
}

.day {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: var(--accent);
  line-height: 1;
}

.date {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.4px;
  line-height: 1;
}

/* --- Weather --- */
.weather-section { padding: 2px 0; }

.weather-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.weather-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 14px rgba(167, 139, 250, 0.32));
}

.weather-icon svg { width: 100%; height: 100%; }

.weather-temp {
  font-size: 46px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
}

.weather-desc {
  font-size: 13px;
  color: var(--accent);
  margin-top: 10px;
  letter-spacing: 2px;
  font-weight: 700;
}

.weather-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1.2px;
  font-weight: 500;
}

.weather-meta strong {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}

.meta-sep { color: var(--text-faded); }

/* --- AQI + UV --- */
.weather-extras {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.weather-extra {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.5s ease;
}

.weather-extra .extra-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--text-faded);
  font-weight: 700;
  line-height: 1;
}

.weather-extra .extra-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.weather-extra .extra-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.weather-extra .extra-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  line-height: 1;
  text-align: right;
  transition: color 0.5s ease;
}

/* --- 3-day forecast --- */
.forecast-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(167, 139, 250, 0.18);
}

.forecast-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 4px 2px;
  border-radius: 8px;
}

.forecast-label {
  font-size: 9px;
  letter-spacing: 1.2px;
  color: var(--accent);
  font-weight: 700;
  line-height: 1;
}

.forecast-icon { width: 28px; height: 28px; }
.forecast-icon svg { width: 100%; height: 100%; }

.forecast-temps {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--text-dim);
}

.forecast-temps .hi { color: var(--text); font-weight: 700; }
.forecast-temps .lo { color: var(--text-faded); }

/* --- Fuel prices --- */
.fuel-section { padding: 2px 0; }

.fuel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.fuel-label {
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--accent);
  font-weight: 700;
  line-height: 1;
}

.fuel-updated {
  font-size: 9px;
  letter-spacing: 0.8px;
  color: var(--text-faded);
  font-weight: 500;
  line-height: 1;
}

.fuel-updated span {
  color: var(--text-dim);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.fuel-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.fuel-item {
  padding: 8px 12px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.3s ease;
}

.fuel-type {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 5px;
}

.fuel-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1;
}

.fuel-price {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}

.fuel-unit {
  font-size: 9px;
  color: var(--text-faded);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* --- Radio --- */
.radio-section { padding: 2px 0; }

.radio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.radio-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 2.5px;
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 10px var(--live);
  animation: pulse 1.6s ease-in-out infinite;
}

.live-text {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--live);
  font-weight: 800;
}

@keyframes pulse {
  0%, 100% { opacity: 1;    transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(1.25); }
}

.radio-waves {
  display: flex;
  gap: 3px;
  align-items: center;
  height: 28px;
}

.radio-waves span {
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  animation: wave 1.1s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.45);
}

.radio-waves span:nth-child(1) { height: 8px;  animation-delay: 0.00s; }
.radio-waves span:nth-child(2) { height: 16px; animation-delay: 0.10s; }
.radio-waves span:nth-child(3) { height: 22px; animation-delay: 0.20s; }
.radio-waves span:nth-child(4) { height: 14px; animation-delay: 0.30s; }
.radio-waves span:nth-child(5) { height: 20px; animation-delay: 0.40s; }
.radio-waves span:nth-child(6) { height: 18px; animation-delay: 0.50s; }
.radio-waves span:nth-child(7) { height: 10px; animation-delay: 0.60s; }
.radio-waves span:nth-child(8) { height: 18px; animation-delay: 0.70s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.4); opacity: 0.7; }
  50%      { transform: scaleY(1.0); opacity: 1.0; }
}

/* Radio current + cover */
.radio-current {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.radio-cover {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: opacity 0.4s ease;
}

.radio-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: coverFadeIn 0.4s ease;
}

@keyframes coverFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.radio-cover .cover-placeholder {
  width: 28px;
  height: 28px;
  color: var(--accent);
  opacity: 0.7;
}

.radio-current-text {
  flex: 1;
  min-width: 0;
}

.radio-label {
  font-size: 10px;
  color: var(--text-faded);
  margin-bottom: 4px;
  font-weight: 600;
  letter-spacing: 2.5px;
}

.radio-song {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radio-title {
  font-size: 13px;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 3px;
  font-weight: 500;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Recently played */
.radio-recent {
  border-top: 1px solid rgba(167, 139, 250, 0.18);
  padding-top: 10px;
}

.radio-recent-label {
  font-size: 9px;
  color: var(--text-faded);
  letter-spacing: 2.5px;
  font-weight: 700;
  margin-bottom: 8px;
}

.radio-recent-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.radio-recent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.85;
}

.radio-recent-item .recent-cover {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 5px;
  overflow: hidden;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio-recent-item .recent-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.radio-recent-item .recent-cover svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
  opacity: 0.6;
}

.radio-recent-item .recent-text {
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}

.radio-recent-item .recent-artist {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radio-recent-item .recent-title {
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ NEWS TICKER ============ */
.news-ticker {
  position: absolute;
  bottom: 92px;
  left: 0;
  width: calc(100% - 440px);
  height: 42px;
  background: var(--bg-ticker);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid rgba(167, 139, 250, 0.18);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  z-index: 10;
  animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.news-ticker-label {
  flex-shrink: 0;
  padding: 0 22px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3.5px;
  color: var(--accent);
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.18), rgba(167, 139, 250, 0.08));
  display: flex;
  align-items: center;
  border-right: 1px solid var(--accent-line);
}

.news-ticker-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(90deg, transparent 0%, black 3%, black 97%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 3%, black 97%, transparent 100%);
}

.news-ticker-track {
  display: flex;
  align-items: center;
  gap: 50px;
  white-space: nowrap;
  animation: ticker-scroll 90s linear infinite;
  will-change: transform;
  padding-left: 30px;
}

.news-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.3px;
}

.news-ticker-item::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  flex-shrink: 0;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============ BOTTOM BAR ============ */
.bottombar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 92px;
  background: var(--bg-bot);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 40px;
  z-index: 12;
  animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottombar::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 22%;
  width: 280px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
  opacity: 0.85;
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.schedule-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 24px;
  margin-right: 24px;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}

.label-line {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 3px;
  font-weight: 600;
  line-height: 1;
}

.label-big {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: var(--accent);
  line-height: 1;
}

.schedule-items {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 20px;
  flex: 1;
  margin-right: 440px;
  overflow: hidden;
}

.schedule-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  flex-shrink: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.schedule-item.current {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 10px 18px;
  border-radius: 10px;
  box-shadow: 0 0 28px rgba(167, 139, 250, 0.18);
}

.schedule-item.current::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent), 0 0 4px var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}

.schedule-time {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
  line-height: 1;
}

.schedule-item.current .schedule-time { color: var(--text); }

.schedule-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1.3px;
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
}

.schedule-item.current .schedule-title { font-weight: 700; }
