/* Arena Wien Archiv — peterscharmueller.com/arena
   Dark theme inspired by original arena.co.at (1996-2024)
   Accent: Arena Red #e02020, Orange #ff9900 */

:root {
  --bg: #0a0a0a;
  --bg-card: #111114;
  --bg-hover: #1a1a1e;
  --text: #d0d0d0;
  --text-dim: #808080;
  --text-bright: #f0f0f0;
  --accent: #e02020;
  --accent-orange: #ff9900;
  --accent-dim: #801010;
  --border: #222228;
  --mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Cascadia Code', monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w: 1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ─── Navigation ─── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 52px;
}
.nav-logo {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.nav-logo span { color: var(--text-dim); font-weight: 400; }
.nav-links { display: flex; gap: 0.25rem; }
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.8rem;
  font-family: var(--mono);
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  transition: all 0.15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-bright);
  background: var(--bg-hover);
}

/* ─── Hero ─── */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
}
.hero h1 {
  font-family: var(--mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.hero h1 .red { color: var(--accent); }
.hero .subtitle {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
  max-width: 600px;
}

/* ─── Stats Bar ─── */
.stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}
.stat {
  text-align: center;
}
.stat-num {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-orange);
  display: block;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ─── Content ─── */
.content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

h2 {
  font-family: var(--mono);
  font-size: 1.3rem;
  color: var(--text-bright);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
h2 .dim { color: var(--text-dim); font-weight: 400; }

h3 {
  font-size: 1rem;
  color: var(--accent-orange);
  margin: 1.5rem 0 0.5rem;
}

p { margin-bottom: 1rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Cards ─── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
  transition: border-color 0.15s;
}
.card:hover { border-color: var(--accent-dim); }
.card-title {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent-orange);
  margin-bottom: 0.3rem;
}
.card-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--mono);
  margin-bottom: 0.5rem;
}
.card-desc {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
}

/* ─── Event List ─── */
.event-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  align-items: center;
}
.search-box {
  flex: 1;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.6rem 1rem;
  color: var(--text-bright);
  font-family: var(--mono);
  font-size: 0.85rem;
}
.search-box:focus {
  outline: none;
  border-color: var(--accent);
}
.search-box::placeholder { color: var(--text-dim); }

.year-filter {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.year-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.3rem 0.5rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
}
.year-btn:hover, .year-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.event-count {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.event-list { list-style: none; }
.event-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.event-item:hover { background: var(--bg-hover); margin: 0 -0.5rem; padding-left: 0.5rem; padding-right: 0.5rem; }
.event-date {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
  min-width: 90px;
}
.event-name {
  font-weight: 600;
  color: var(--text-bright);
  font-size: 0.9rem;
}
.event-country {
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 400;
}
.event-support {
  color: var(--accent-orange);
  font-size: 0.8rem;
  margin-left: 0.5rem;
}
.event-info {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--mono);
}
.event-desc {
  font-size: 0.8rem;
  color: var(--text);
  margin-top: 0.3rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s;
  line-height: 1.5;
}
.event-item.expanded .event-desc {
  max-height: 500px;
}
.event-media {
  display: none;
}
.event-item.expanded .event-media {
  display: block;
}

/* year header in event list */
.year-header {
  font-family: var(--mono);
  font-size: 1.4rem;
  color: var(--accent);
  margin: 2rem 0 0.5rem;
  padding-top: 1rem;
  border-top: 2px solid var(--accent-dim);
}
.year-count {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 400;
}

/* ─── Timeline / Design Stages ─── */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin: 2rem 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.35rem;
  top: 0.3rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}
.timeline-year {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--accent-orange);
  margin-bottom: 0.3rem;
}
.timeline-title {
  font-size: 1rem;
  color: var(--text-bright);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.timeline-desc {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.6;
}
.timeline-tech {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

/* ─── Photo Gallery ─── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
  margin: 1.5rem 0;
}
.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  background: var(--bg-card);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 1.5rem 0.5rem 0.4rem;
  font-size: 0.7rem;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.2s;
}
.gallery-item:hover .caption { opacity: 1; }

/* lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.95);
  justify-content: center;
  align-items: center;
  padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 4px;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--mono);
}
.lightbox-info {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.8rem;
  text-align: center;
}

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--mono);
}
.footer a { color: var(--text-dim); }
.footer a:hover { color: var(--accent); }

/* ─── Bar Chart ─── */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 220px;
  margin: 1.5rem 0;
  padding-bottom: 1.5rem;
  position: relative;
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.bar {
  width: 100%;
  max-width: 40px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  transition: height 0.3s;
}
.bar-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
  transform: rotate(-45deg);
  white-space: nowrap;
}
.bar-value {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--accent-orange);
  margin-bottom: 0.2rem;
}

/* ─── Design page: Wayback + Era Events ─── */
.era-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.wayback-btn {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: rgba(255,153,0,0.1);
  border: 1px solid rgba(255,153,0,0.4);
  border-radius: 4px;
  color: #ff9900;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.wayback-btn:hover {
  background: rgba(255,153,0,0.25);
  color: #ffbb33;
}
.cache-btn {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: rgba(102,153,255,0.1);
  border: 1px solid rgba(102,153,255,0.4);
  border-radius: 4px;
  color: #6699ff;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.cache-btn:hover {
  background: rgba(102,153,255,0.25);
  color: #88bbff;
}
.era-events {
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.era-events-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.era-events-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.era-events-list li {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.15rem 0;
  color: var(--text);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.era-events-list .era-ev-date {
  color: var(--text-dim);
  margin-right: 0.5rem;
}
.era-events-more {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  text-decoration: none;
}
.era-events-more:hover { text-decoration: underline; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.8rem; }
  .nav-inner { gap: 1rem; }
  .nav-links a { font-size: 0.7rem; padding: 0.3rem 0.5rem; }
  .event-item { flex-direction: column; gap: 0.2rem; }
  .event-date { min-width: auto; }
  .stats { gap: 1.5rem; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* ─── Misc ─── */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  background: var(--bg-hover);
  color: var(--text-dim);
  margin-right: 0.3rem;
}
.tag.era-static { border-left: 2px solid #4488ff; }
.tag.era-awu { border-left: 2px solid #44cc44; }
.tag.era-modern { border-left: 2px solid #cc44cc; }
.tag.era-curated { border-left: 2px solid #cccc44; }

.loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-dim);
  font-family: var(--mono);
}

.note {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  border-radius: 0 4px 4px 0;
}
