/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d0d0d;
  --bg-card: #111111;
  --bg-card-2: #1a1a1a;
  --text: #ffffff;
  --text-muted: #aaaaaa;
  --text-dim: #444444;
  --border: #222222;
  --prz: #ff4466;
  --brend: #44cc77;
  --bunkier: #4488ff;
  --nav-h: 64px;
  --header-h: 48px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 16px;
  overflow: hidden;
}

/* ===== HEADER ===== */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: #111;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
}

.app-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.live-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--prz);
  opacity: 0;
  transition: opacity 0.3s;
}

.live-badge.visible { opacity: 1; }

/* ===== TAB PANELS ===== */
.tab-panel {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  bottom: var(--nav-h);
  overflow-y: auto;
  padding: 12px;
  -webkit-overflow-scrolling: touch;
}

.tab-panel.active { display: block; }

/* ===== DAY TOGGLE ===== */
.day-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.day-btn {
  flex: 1;
  padding: 8px;
  min-height: 44px;
  border: none;
  border-radius: 20px;
  background: var(--bg-card-2);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.day-btn.active {
  background: var(--prz);
  color: #fff;
}

/* ===== NOW CARDS ===== */
.now-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.now-card {
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 12px;
  transition: border-color 0.3s;
}

.now-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.now-card-stage {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.now-badge {
  font-size: 9px;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 6px;
  color: #000;
}

.now-card-artist {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-card-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.now-card-empty {
  font-size: 15px;
  color: var(--text-muted);
  font-style: italic;
}

/* Progress bar */
.progress-track {
  height: 4px;
  background: #2a2a2a;
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s linear;
}

/* ===== STAGE TABS (Plan) ===== */
.stage-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.stage-tab {
  padding: 8px 16px;
  min-height: 44px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}

.stage-tab.active[data-stage="prz"]     { color: var(--prz);     border-color: var(--prz); }
.stage-tab.active[data-stage="brend"]   { color: var(--brend);   border-color: var(--brend); }
.stage-tab.active[data-stage="bunkier"] { color: var(--bunkier); border-color: var(--bunkier); }

/* ===== SCHEDULE LIST ===== */
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.schedule-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}

.schedule-item.past {
  opacity: 0.35;
}

.schedule-item.current {
  border-left: 3px solid;
  padding-left: 5px;
}

.schedule-item.current[data-stage="prz"]     { background: #1a001088; border-color: var(--prz); }
.schedule-item.current[data-stage="brend"]   { background: #0d1a1088; border-color: var(--brend); }
.schedule-item.current[data-stage="bunkier"] { background: #0d0d1a88; border-color: var(--bunkier); }

.schedule-time {
  font-size: 13px;
  color: var(--text-muted);
  width: 42px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

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

.schedule-artist {
  font-size: 15px;
  color: var(--text);
}

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

.schedule-now-icon {
  font-size: 11px;
  margin-left: auto;
}

/* ===== MAPA ===== */
.map-container {
  width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pinch-zoom pan-x pan-y;
  border-radius: 8px;
  background: #1a1a2e;
  margin-bottom: 12px;
}

.map-img {
  display: block;
  width: 100%;
  max-width: none;
}

.map-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
}

.legend-dot.prz     { background: var(--prz); }
.legend-dot.brend   { background: var(--brend); }
.legend-dot.bunkier { background: var(--bunkier); }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: #111;
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-top: 2px solid transparent;
  padding: 0;
  transition: border-color 0.2s;
}

.nav-btn.active { border-top-color: var(--prz); }

.nav-icon { font-size: 20px; }

.nav-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-btn.active .nav-label { color: var(--prz); }
