*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.hidden {
  display: none !important;
}

/* ——— Ecran inactiv ——— */
.inactive-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #c41e1e;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inactive-screen span {
  font-size: clamp(3rem, 12vw, 8rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.12em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

/* ——— Layout principal ——— */
.main-screen {
  display: flex;
  width: 100vw;
  height: 100vh;
  background: #bde0f5;
}

.panel-left {
  flex: 0 0 58%;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.panel-right {
  flex: 1;
  position: relative;
  min-width: 0;
}

#map {
  width: 100%;
  height: 100%;
}

.map-attribution {
  position: absolute;
  right: 8px;
  bottom: 4px;
  z-index: 500;
  font-size: 10px;
  color: #555;
  background: rgba(255, 255, 255, 0.75);
  padding: 2px 6px;
  border-radius: 2px;
  pointer-events: none;
}

/* ——— Bare portocalii ——— */
.bar {
  background: #e88320;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}

.bar-top {
  padding: 0.55rem 1.2rem;
  font-size: clamp(1.1rem, 2.2vw, 1.75rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 1.2rem;
  margin-top: auto;
}

.bar-stop {
  font-size: clamp(1rem, 2vw, 1.55rem);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 1rem;
}

.bar-datetime {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: clamp(0.85rem, 1.6vw, 1.2rem);
  line-height: 1.15;
  flex-shrink: 0;
}

/* ——— Lista opriri ——— */
.stops-area {
  flex: 1;
  position: relative;
  background: #bde0f5;
  overflow: hidden;
  padding: 1rem 0.5rem 1rem 2.8rem;
}

.route-line {
  position: absolute;
  left: 1.35rem;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 0;
  border-left: 3px dashed #4a90c4;
}

.stops-list {
  list-style: none;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(0.8rem, 3vh, 2.2rem);
}

.stops-list li {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  padding-left: 0.5rem;
}

.stops-list li::before {
  content: "";
  position: absolute;
  left: -1.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2d7ab8;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #4a90c4;
}

.stops-list li.current::before {
  width: 18px;
  height: 18px;
  left: -1.65rem;
  background: #e88320;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px #e88320;
}

.stop-name {
  font-size: clamp(1.15rem, 2.8vw, 2.1rem);
  font-weight: 700;
  color: #1a2a3a;
  line-height: 1.15;
}

.stops-list li.current .stop-name {
  color: #0d3d6b;
}

.stops-list li.past {
  opacity: 0.45;
}

.stops-list li.past .stop-name {
  text-decoration: line-through;
  text-decoration-color: rgba(0, 0, 0, 0.25);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: clamp(0.7rem, 1.2vw, 0.95rem);
  font-weight: 700;
  color: #fff;
}

.badge-icon {
  font-size: 0.85em;
}

.badge-blue { background: #3b7dd8; }
.badge-purple { background: #6b4c9a; }
.badge-pink { background: #d4569a; }
.badge-green { background: #3d9e4f; }
.badge-orange { background: #e88320; }

/* ——— Animație anunț oprire ——— */
.announcement-layer {
  position: fixed;
  inset: 0;
  z-index: 8000;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.announcement-layer.empty {
  display: none;
}

.announcement-card {
  position: absolute;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(232, 131, 32, 0.97) 0%, rgba(210, 110, 20, 0.97) 100%);
  padding: 1.2rem 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  will-change: transform;
}

.announcement-card.fly-up {
  animation: flyUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes flyUp {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-120vh);
    opacity: 0.3;
  }
}

.marquee-wrap {
  overflow: hidden;
  width: 100%;
}

.marquee-track {
  display: inline-flex;
  white-space: nowrap;
  will-change: transform;
}

.marquee-track.run {
  animation: marqueeScroll var(--marquee-duration, 8s) linear forwards;
}

@keyframes marqueeScroll {
  from { transform: translateX(100vw); }
  to { transform: translateX(calc(-100% - 2rem)); }
}

.marquee-text {
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 800;
  color: #fff;
  padding: 0 2rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
