@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
  --bg: #0b0f1a;
  --text: #f0f4f8;
  --muted: #7a8599;
  --card: #151b2b;
  --green: #22c55e;
  --red: #ef4444;
  --orange: #f59e0b;
  --green-soft: rgba(34,197,94,0.10);
  --red-soft: rgba(239,68,68,0.08);
  --orange-soft: rgba(245,158,11,0.08);
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* === HEADER === */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
  flex-shrink: 0;
}
.header h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
}
.header h1 span {
  color: var(--muted);
  font-weight: 400;
}
.header-right {
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.clock {
  font-size: 42px;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}
.date {
  font-size: 15px;
  color: var(--muted);
}

/* === BUILDING TABS === */
.tabs {
  display: flex;
  gap: 6px;
  padding: 0 40px 20px;
  flex-shrink: 0;
}
.tab {
  padding: 7px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  background: rgba(255,255,255,0.04);
  border: 1px solid transparent;
  transition: all 0.2s;
}
.tab:hover {
  color: var(--text);
  background: rgba(255,255,255,0.07);
}
.tab.active {
  color: #93b4ff;
  background: rgba(59,130,246,0.12);
  border-color: rgba(59,130,246,0.3);
}

/* === ROOM GRID === */
.rooms {
  flex: 1;
  padding: 0 40px 32px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  align-content: start;
  overflow-y: auto;
}

/* === ROOM CARD === */
.room {
  background: var(--card);
  border-radius: 16px;
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 5px solid transparent;
  transition: border-color 0.4s;
}
.room.free    { border-left-color: var(--green); }
.room.occupied { border-left-color: var(--red); }
.room.upcoming { border-left-color: var(--orange); }

.room-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.room-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.room-badge {
  font-size: 13px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.room.free .room-badge    { background: var(--green-soft); color: var(--green); }
.room.occupied .room-badge { background: var(--red-soft); color: var(--red); }
.room.upcoming .room-badge { background: var(--orange-soft); color: var(--orange); }

.room-event {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  min-height: 24px;
}
.room.free .room-event {
  color: var(--muted);
  font-weight: 400;
  font-size: 15px;
}

.room-next {
  font-size: 13px;
  color: var(--muted);
}
.room-next strong {
  color: #b0bdd0;
  font-weight: 500;
}

/* === LOADING === */
.loading {
  text-align: center;
  padding: 60px;
  color: var(--muted);
  font-size: 16px;
  grid-column: 1 / -1;
}

/* === HIGHLIGHT: Room Glow === */
.room.hl-glow {
  background: rgba(245,158,11,0.04);
  box-shadow: inset 0 0 0 1px rgba(245,158,11,0.1);
}
.rooms.compressed { padding-bottom: 8px; gap: 10px; }

/* === HIGHLIGHT: Banner === */
.hl-banner {
  flex-shrink: 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(20,16,40,0.85);
  border-top: 1px solid rgba(245,158,11,0.15);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.3s ease;
  display: flex;
  align-items: stretch;
  padding: 0 40px;
}
.hl-banner.visible {
  max-height: 140px;
  opacity: 1;
  padding-top: 16px;
  padding-bottom: 16px;
}
.hl-banner.fading { border-top-color: rgba(255,255,255,0.05); }
.hl-banner.fading .be-min { color: rgba(255,255,255,0.2); }
.hl-banner.fading .be-dot { background: rgba(255,255,255,0.15); animation: none; }
.hl-banner.fading .be-room { color: rgba(255,255,255,0.3); }
.hl-banner.fading .be-time { color: rgba(255,255,255,0.2); }

.be-countdown {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding-right: 28px; margin-right: 24px;
  border-right: 1px solid rgba(255,255,255,0.06);
  min-width: 100px;
}
.be-min {
  font-size: 40px; font-weight: 200;
  font-variant-numeric: tabular-nums;
  color: #fbbf24; line-height: 1; letter-spacing: -1px;
}
.be-unit {
  font-size: 10px; color: rgba(255,255,255,0.3);
  text-transform: uppercase; letter-spacing: 2px; margin-top: 3px;
}
.be-events { flex: 1; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.be-row { display: flex; align-items: center; gap: 12px; }
.be-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #f59e0b; flex-shrink: 0;
  animation: hlPulse 2s ease-in-out infinite;
}
@keyframes hlPulse { 0%,100%{opacity:1} 50%{opacity:0.3} }
.be-room { font-size: 15px; font-weight: 700; color: #fff; min-width: 130px; }
.be-title { font-size: 13px; color: rgba(255,255,255,0.45); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.be-time { font-size: 13px; color: #fbbf24; font-weight: 600; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.be-more { font-size: 11px; color: rgba(255,255,255,0.2); padding-left: 19px; }

/* === HIGHLIGHT: Wegweiser Overlay === */
.hl-wegweiser {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transition: opacity 0.6s ease;
  overflow: hidden;
}
.hl-wegweiser.visible { opacity: 1; pointer-events: auto; }
.hl-ww-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 40%, #1a1040 0%, #0c0820 60%, #050310 100%);
}
.hl-ww-glow {
  position: absolute; width: 600px; height: 600px; border-radius: 50%;
  top: 50%; left: 50%; transform: translate(-50%,-55%);
  background: radial-gradient(circle, rgba(245,158,11,0.06) 0%, transparent 70%);
  animation: wwGlow 4s ease-in-out infinite;
}
@keyframes wwGlow {
  0%,100% { transform: translate(-50%,-55%) scale(1); opacity: 0.8; }
  50% { transform: translate(-50%,-55%) scale(1.15); opacity: 1; }
}
.hl-ww-content {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center; padding: 40px;
  position: relative; z-index: 2;
}
.hl-ww-footer {
  padding: 10px 24px;
  background: rgba(0,0,0,0.3);
  display: flex; justify-content: center; align-items: center; gap: 6px;
  font-size: 10px; color: rgba(255,255,255,0.15);
  flex-shrink: 0; position: relative; z-index: 2; letter-spacing: 1px;
}
.hl-ww-pips { display: flex; gap: 4px; margin-right: 8px; }
.pip { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.1); transition: all 0.3s; }
.pip.on { background: #fbbf24; width: 16px; border-radius: 3px; }

/* Wegweiser content elements */
.ww-tag {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 4px; color: #fbbf24;
  margin-bottom: 28px;
  display: flex; align-items: center; gap: 10px;
}
.ww-line { width: 24px; height: 1px; background: rgba(245,158,11,0.4); }
.ww-time {
  font-size: 100px; font-weight: 100;
  font-variant-numeric: tabular-nums; letter-spacing: 5px;
  color: #fff; line-height: 1;
}
.ww-sub { font-size: 18px; color: #fbbf24; font-weight: 500; margin-top: 6px; letter-spacing: 1px; }
.ww-sep { width: 40px; height: 1px; background: rgba(255,255,255,0.1); margin: 32px 0; }
.ww-title { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.25; max-width: 70%; color: #f0f4f8; }
.ww-org { font-size: 15px; color: rgba(255,255,255,0.35); margin-top: 10px; }
.ww-pill {
  margin-top: 40px; display: flex; align-items: center; gap: 16px;
  padding: 16px 36px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 60px;
}
.ww-pill-arrow {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(245,158,11,0.12);
  display: flex; align-items: center; justify-content: center;
  color: #fbbf24; font-size: 18px; flex-shrink: 0;
}
.ww-pill-name { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; color: #f0f4f8; }
.ww-pill-sub { font-size: 12px; color: rgba(255,255,255,0.3); margin-top: 1px; }

/* === BULLETIN OVERLAY === */
.bulletin-overlay {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 90; padding: 24px 40px;
  transform: translateY(100%);
  transition: transform 0.6s ease;
  pointer-events: none;
}
.bulletin-overlay.visible { transform: translateY(0); }

.bull-slide {
  background: rgba(21,27,43,0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 16px;
  padding: 24px 32px;
  max-width: 900px;
  margin: 0 auto;
  animation: bull-in 0.5s ease;
}
.bull-slide.bull-important { border-color: rgba(245,158,11,0.4); }
.bull-slide.bull-emergency { border-color: rgba(239,68,68,0.5); background: rgba(239,68,68,0.08); }

.bull-cat {
  font-size: 13px; color: rgba(255,255,255,0.5);
  margin-bottom: 6px; letter-spacing: 0.5px;
}
.bull-title {
  font-size: 26px; font-weight: 700;
  letter-spacing: -0.5px; margin-bottom: 8px;
}
.bull-body {
  font-size: 16px; color: rgba(255,255,255,0.65);
  line-height: 1.5; max-height: 80px; overflow: hidden;
}

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