:root {
  --bg: #0b0e13;
  --panel: #11161d;
  --card: #141a22;
  --muted: #9fb0c3;
  --text: #eaf2ff;
  --brand: #7dd3fc;
  --brand-dark: #0ea5e9;
  --accent: #1f7aec;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .25);
  --shadow-lg: 0 12px 34px rgba(0, 0, 0, .35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(125,211,252,.12), transparent 60%),
              radial-gradient(900px 500px at 110% -20%, rgba(99,102,241,.12), transparent 60%),
              #0b1021;
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  padding: 20px 0 16px;
  position: sticky;
  top: 0;
  background: rgba(11, 14, 19, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.header-left {
  flex: 1;
  min-width: 0;
}

.site-title {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 800;
  margin: 0;
  line-height: 1.2;
}

.brand-dot {
  width: 0.7em;
  height: 0.7em;
  background: var(--brand);
  display: inline-block;
  border-radius: 50%;
  margin-left: 0.2rem;
  box-shadow: 0 0 12px rgba(125, 211, 252, 0.5);
}

.site-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0 0;
}

.header-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #1f2937;
  background: linear-gradient(180deg, #0f172a, #0b1220);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 18px;
}

.btn-icon:hover {
  border-color: #334155;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-icon:active {
  transform: translateY(0);
}

/* Search bar */
.search-bar {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, margin-top 0.3s ease;
}

.search-bar.active {
  max-height: 70px;
  margin-top: 12px;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  font-size: 18px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 44px;
  border-radius: 12px;
  border: 1px solid #1f2937;
  background: #0b1021;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.1);
}

.search-clear {
  position: absolute;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-clear:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.search-input:not(:placeholder-shown) ~ .search-clear {
  display: flex;
}

/* Filters */
.filters-section {
  padding: 16px 0;
  background: rgba(17, 22, 29, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.filter-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #1f2937;
  background: linear-gradient(180deg, #0f172a, #0b1220);
  color: #d1d5db;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.filter-chip:hover {
  border-color: #334155;
  transform: translateY(-1px);
}

.filter-chip.active {
  background: linear-gradient(180deg, var(--brand), #60a5fa);
  color: #0b1220;
  border-color: transparent;
  box-shadow: 0 0 0 2px rgba(125, 211, 252, 0.25);
}

.filter-chip.excluded {
  background: linear-gradient(180deg, #4a1f1f, #3a1212);
  color: #ffb3b3;
  border-color: #5a2020;
  opacity: 0.7;
}

.filter-chip .chip-icon {
  font-size: 16px;
}

.filter-chip .chip-count {
  opacity: 0.85;
  font-weight: 700;
}

.filter-chip.hidden-mobile {
  display: none;
}

@media (min-width: 768px) {
  .filter-chip.hidden-mobile {
    display: inline-flex;
  }
}

.filter-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #1f2937;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-more:hover {
  border-color: #334155;
  color: var(--text);
}

.filter-more.active .more-icon {
  transform: rotate(180deg);
}

.more-icon {
  transition: transform 0.3s ease;
}

@media (min-width: 768px) {
  .filter-more {
    display: none;
  }
}

/* Events section */
.events-section {
  padding: 24px 0 48px;
  flex: 1;
}

.events-status {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
}

.events-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .events-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .events-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Event card */
.event-card {
  background: linear-gradient(180deg, #0e152b, #0a0f1f);
  border: 1px solid #101827;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: #1f2937;
}

.event-card:active {
  transform: translateY(0);
}

.event-media {
  aspect-ratio: 16/9;
  background: #0b1220 center/cover no-repeat;
  position: relative;
  overflow: hidden;
}

.event-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.event-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(135deg, #0e1520, #0e1520 14px, #111b2b 14px, #111b2b 28px);
  color: #7c90a8;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-size: 13px;
}

.event-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e9f1ff;
  font-weight: 700;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.event-body {
  padding: 14px 16px 16px;
}

.event-title {
  font-size: clamp(17px, 2.2vw, 20px);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 8px;
  color: #fff;
}

.event-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.event-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-meta-item i {
  opacity: 0.75;
  width: 16px;
  flex-shrink: 0;
}

.event-desc {
  color: #c9d6e6;
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Detail modal */
.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 12px;
  overflow: auto;
}

.detail-overlay.active {
  display: flex;
}

.detail-modal {
  width: min(960px, 96vw);
  max-height: 92vh;
  background: var(--card);
  border: 1px solid #1b2430;
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--panel);
  border-bottom: 1px solid #1b2430;
}

.detail-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #2a3a4f;
  background: #162033;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.detail-close:hover {
  border-color: #3a4a5f;
  background: #1a2638;
}

.detail-title {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-nav-btns {
  display: flex;
  gap: 8px;
}

.detail-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #2a3a4f;
  background: #162033;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.detail-nav-btn:hover {
  border-color: #3a4a5f;
  background: #1a2638;
}

.detail-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.detail-body {
  padding: 16px;
  overflow: auto;
}

.detail-content {
  display: grid;
  gap: 20px;
}

@media (min-width: 768px) {
  .detail-content {
    grid-template-columns: 1.2fr 1fr;
  }
}

.detail-info h3 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 16px;
  color: #fff;
}

.detail-meta-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.detail-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.detail-meta-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #1a2735, #12202e);
  border: 1px solid #2a3a4f;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d3e2f4;
}

.detail-meta-content {
  flex: 1;
  padding-top: 2px;
}

.detail-meta-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.detail-meta-value {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.detail-description {
  color: #c9d6e6;
  font-size: 15px;
  line-height: 1.6;
}

.detail-description p {
  margin: 0 0 12px;
}

/* Detail media - obrázek v celé oblasti */
.detail-media {
  min-height: 300px;
  max-height: 60vh;
  border-radius: 12px;
  overflow: hidden;
  background: #0b1220;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-main-image {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-color: #0b1220;
}

.detail-main-image:hover {
  transform: scale(1.02);
  transition: transform 0.3s ease;
}

.detail-gallery {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.detail-gallery-item {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: #0b1220;
}

.detail-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.detail-gallery-item:hover img {
  transform: scale(1.05);
}

.detail-gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  transition: border-color 0.2s ease;
}

.detail-gallery-item:hover::after {
  border-color: rgba(125, 211, 252, 0.5);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox.active {
  display: flex;
}

.lightbox-event-info {
  position: fixed;
  top: 20px;
  left: 20px;
  right: 80px;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
  z-index: 2100;
  pointer-events: none;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  z-index: 10;
  transition: all 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.5);
}

.lightbox-content {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.lightbox-nav-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.2s ease;
  pointer-events: all;
}

.lightbox-nav-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.5);
}

.lightbox-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.lightbox-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  z-index: 2100;
}

/* Footer */
.site-footer {
  background: var(--panel);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px 0;
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}

.footer-left p {
  margin: 0;
}

.footer-right {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--brand);
}

/* Utilities */
.hidden {
  display: none !important;
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
  .event-card:hover {
    transform: none;
  }
  
  .event-card:active {
    transform: scale(0.98);
  }
}
