/* ===== Theme tokens ===== */
:root,
[data-theme="dark"] {
  --bg: #0b0a14;
  --surface-solid: #15132a;
  --surface-2: #1c1934;
  --border: #2a2640;
  --text: #f5f3ff;
  --muted: #a8a3c7;
  --primary: #ff2d87;
  --primary-2: #7a5cff;
  --accent: #ffd23f;
  /*--gradient: linear-gradient(135deg, #e6196d 0%, #6a48ee 60%, #009dc7 100%);
  --gradient: linear-gradient(135deg, #ffc107 0%, #978011 60%, #5a5321 100%);*/
  --gradient: linear-gradient(135deg, #945102 0%, #978011 60%, #55340a 100%);
  --nav-bg: rgba(11,10,20,.7);
  --card-shadow: 0 25px 60px -25px rgba(122,92,255,.5);
  --hero-glow:
    radial-gradient(900px 500px at 10% -10%, rgba(255,45,135,.25), transparent 60%),
    radial-gradient(700px 500px at 110% 10%, rgba(122,92,255,.25), transparent 60%),
    radial-gradient(600px 400px at 50% 110%, rgba(0,212,255,.15), transparent 60%);
  --tag-bg: rgba(122,92,255,.12);
  --tag-color: #c9bcff;
  --tag-border: rgba(122,92,255,.25);
  --star-empty: #3b3760;
}

[data-theme="light"] {
  --bg: #f7f5ff;
  --surface-solid: #ffffff;
  --surface-2: #f1eef9;
  --border: #e5e0f1;
  --text: #15132a;
  --muted: #6b6588;
  --primary: #e6196d;
  --primary-2: #6a48ee;
  --accent: #d99100;
  /*--gradient: linear-gradient(135deg, #e6196d 0%, #6a48ee 60%, #009dc7 100%);
  --gradient: linear-gradient(135deg, #ffc107 0%, #978011 60%, #5a5321 100%);*/
  --gradient: linear-gradient(135deg, #945102 0%, #978011 60%, #55340a 100%);
  --nav-bg: rgba(255,255,255,.75);
  --card-shadow: 0 25px 60px -25px rgba(106,72,238,.35);
  --hero-glow:
    radial-gradient(900px 500px at 10% -10%, rgba(230,25,109,.15), transparent 60%),
    radial-gradient(700px 500px at 110% 10%, rgba(106,72,238,.15), transparent 60%),
    radial-gradient(600px 400px at 50% 110%, rgba(0,157,199,.1), transparent 60%);
  --tag-bg: rgba(106,72,238,.08);
  --tag-color: #4f31cf;
  --tag-border: rgba(106,72,238,.2);
  --star-empty: #d9d4ea;
}

* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--text); transition: background .25s ease, color .25s ease; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  background: var(--hero-glow), var(--bg);
}
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; letter-spacing: -.02em; }
.text-muted-2 { color: var(--muted) !important; }
a { color: inherit; }

/* Nav */
.navbar-glass {
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.navbar-brand { font-family: 'Playfair Display', serif; font-weight: 900; letter-spacing: -.02em; color: var(--text) !important; }
.brand-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--gradient); box-shadow: 0 0 16px var(--primary); margin-right: .5rem;
}
.navbar .nav-link { color: var(--muted); font-weight: 500; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--text); }
.navbar-toggler { color: var(--text); }

/* Theme toggle */
.btn-theme {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  display: inline-grid; place-items: center;
  transition: transform .2s ease;
}
.btn-theme:hover { transform: rotate(15deg); color: var(--text); }
[data-theme="dark"] .theme-icon-light,
[data-theme="light"] .theme-icon-dark { display: none; }

/* Hero */
.hero { padding: 2rem 0 3rem; position: relative; overflow: hidden; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 900; line-height: 1.05; }
.hero .gradient-text {
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { color: var(--muted); max-width: 620px; }

/* Search card */
.search-card {
  background: color-mix(in srgb, var(--surface-solid) 80%, transparent);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 1rem;
  backdrop-filter: blur(12px);
  box-shadow: var(--card-shadow);
}
.search-card .form-control, .search-card .form-select,
.form-select-themed {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 12px; padding: .85rem 1rem; height: auto;
}
.search-card .form-control::placeholder { color: var(--muted); opacity: .7; }
.search-card .form-control:focus, .search-card .form-select:focus, .form-select-themed:focus {
  border-color: var(--primary); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--primary) 25%, transparent);
  background: var(--surface-2); color: var(--text);
}
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); z-index: 2; }
.input-icon .form-control, .input-icon .form-select { padding-left: 2.4rem; }

.btn-primary-grad {
  background: var(--gradient); border: 0; color: #fff !important; font-weight: 600;
  border-radius: 12px; padding: .85rem 1.4rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary-grad:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--primary) 60%, transparent); }

.btn-outline-themed {
  background: transparent; border: 1px solid var(--border); color: var(--text);
  border-radius: 12px; padding: .7rem 1.2rem; font-weight: 500;
}
.btn-outline-themed:hover { background: var(--surface-2); color: var(--text); }

/* Chips */
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--muted); padding: .45rem .9rem; border-radius: 999px;
  font-size: .85rem; font-weight: 500; cursor: pointer; user-select: none;
  transition: all .15s ease;
}
.chip:hover { color: var(--text); border-color: var(--primary-2); }
.chip.active { background: var(--gradient); color: #fff; border-color: transparent; }

/* Filters */
.filters {
  background: color-mix(in srgb, var(--surface-solid) 70%, transparent);
  border: 1px solid var(--border);
  border-radius: 18px; padding: 1.25rem;
  backdrop-filter: blur(10px);
  position: sticky; top: 90px;
}
.filters h6 { font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .75rem; color: var(--muted); }
.form-check-input { background-color: var(--surface-2); border-color: var(--border); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-range::-webkit-slider-thumb { background: var(--primary); }
.form-range::-moz-range-thumb { background: var(--primary); }

/* Cards */
.venue-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 18px; overflow: hidden; height: 100%;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
}
.venue-card:hover { transform: translateY(-4px); border-color: var(--primary-2); box-shadow: var(--card-shadow); color: inherit; }
.venue-img { aspect-ratio: 16/10; width: 100%; position: relative; overflow: hidden; }
.venue-img .img {
  width: 100%; height: 100%; background-size: cover; background-position: center;
  transition: transform .4s ease;
}
.venue-card:hover .venue-img .img { transform: scale(1.06); }
.badge-cat {
  position: absolute; top: 12px; left: 12px;
  background: rgba(11,10,20,.75); color: #fff; border: 1px solid rgba(255,255,255,.15);
  padding: .35rem .7rem; border-radius: 999px; font-size: .75rem; font-weight: 600;
  backdrop-filter: blur(6px);
}
.badge-fav {
  position: absolute; top: 12px; right: 12px;
  background: rgba(11,10,20,.75); color: #fff; border: 1px solid rgba(255,255,255,.15);
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  cursor: pointer; backdrop-filter: blur(6px); z-index: 3;
}
.badge-fav.active { color: var(--primary); }
.venue-body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.venue-title { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.25rem; margin: 0; }
.venue-meta { color: var(--muted); font-size: .88rem; display: flex; align-items: center; gap: .4rem; }
/*.rating { color: var(--accent); font-weight: 600; font-size: .9rem; }*/
.rating { color: #979eff; font-weight: 600; font-size: .9rem; }
.price { color: var(--muted); font-weight: 600; font-size: .9rem; }
.venue-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; }
.tag {
  background: var(--tag-bg); color: var(--tag-color); border: 1px solid var(--tag-border);
  padding: .2rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 500;
}
.venue-footer {
  margin-top: auto; padding-top: .75rem; border-top: 1px dashed var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.open-dot { width: 8px; height: 8px; border-radius: 50%; background: #2ee6a8; box-shadow: 0 0 10px #2ee6a8; display: inline-block; margin-right: .35rem; }
.closed-dot { background: #ff4d6d; box-shadow: 0 0 10px #ff4d6d; }
.stars-empty { color: var(--star-empty); }

/* Toolbar */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.count-pill {
  background: var(--surface-2); border: 1px solid var(--border);
  padding: .4rem .85rem; border-radius: 999px; color: var(--muted); font-size: .85rem;
}
.count-pill b { color: var(--text); }

/* Mobile filter FAB */
.filter-fab {
  position: fixed; bottom: 22px; right: 22px; z-index: 1030;
  background: var(--gradient); border: 0; color: #fff;
  padding: .9rem 1.3rem; border-radius: 999px; font-weight: 600;
  box-shadow: 0 20px 40px -10px color-mix(in srgb, var(--primary) 50%, transparent);
}
@media (min-width: 992px) { .filter-fab { display: none; } }

.offcanvas { background: var(--surface-solid); color: var(--text); border-left: 1px solid var(--border); }
.offcanvas .filters { position: static; }
[data-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

/* Empty */
.empty { text-align: center; padding: 4rem 1rem; color: var(--muted); border: 1px dashed var(--border); border-radius: 18px; background: var(--surface-2); }

/* Footer */
footer { border-top: 1px solid var(--border); margin-top: 4rem; padding: 2rem 0; color: var(--muted); }

.divider-soft { height: 1px; background: var(--border); border: 0; opacity: .8; }

/* ===== Detail page ===== */
.detail-hero {
  position: relative; min-height: 56vh; border-radius: 0 0 28px 28px; overflow: hidden;
  background-size: cover; background-position: center;
}
.detail-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(11,10,20,.85) 100%);
}
.detail-hero .container { position: relative; z-index: 2; padding-top: 4rem; padding-bottom: 2rem; color: #fff; }
.detail-hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 900; }
.detail-hero .meta-row { color: rgba(255,255,255,.85); display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.detail-hero .badge-cat { position: static; display: inline-flex; }

.section-card {
  background: var(--surface-solid); border: 1px solid var(--border); border-radius: 18px;
  padding: 1.5rem;
}
.section-card h3 { font-size: 1.25rem; margin-bottom: 1rem; }
.info-row { display: flex; align-items: flex-start; gap: .75rem; padding: .65rem 0; border-bottom: 1px dashed var(--border); }
.info-row:last-child { border-bottom: 0; }
.info-row i { color: var(--primary); width: 22px; font-size: 1.05rem; margin-top: .1rem; }
.info-row .label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }

.hours-row { display: flex; justify-content: space-between; padding: .4rem 0; }
.hours-row.today { color: var(--text); font-weight: 600; }
.hours-row span:last-child { color: var(--muted); }
.hours-row.today span:last-child { color: var(--text); }

.gallery-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: .5rem; border-radius: 18px; overflow: hidden; }
.gallery-grid .g { background-size: cover; background-position: center; min-height: 140px; }
.gallery-grid .g:first-child { grid-row: 1 / span 2; min-height: 290px; }
@media (max-width: 575px) { .gallery-grid { grid-template-columns: 1fr 1fr; } .gallery-grid .g:first-child { grid-column: 1 / span 2; grid-row: auto; min-height: 200px; } }

.review-card { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.review-card:last-child { border-bottom: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--gradient); color: #fff; display: grid; place-items: center; font-weight: 700; }

.cta-bar {
  position: sticky; top: 90px; background: var(--surface-solid); border: 1px solid var(--border); border-radius: 18px; padding: 1.25rem;
}
.cta-bar .price-lg { font-size: 1.5rem; font-weight: 800; }

/* ===== Hero carousel ===== */
.hero-carousel { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--card-shadow); margin-bottom: 2rem; }
.hero-carousel .carousel-item { height: 360px; }
.hero-carousel .carousel-item img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.hero-carousel .carousel-caption { left: 5%; right: 5%; bottom: 1.5rem; text-align: left; background: linear-gradient(180deg, transparent, rgba(0,0,0,.6)); padding: 1rem 1.25rem; border-radius: 14px; }
.hero-carousel .carousel-caption h3 { font-family: "Playfair Display", serif; margin-bottom: .25rem; color: #fff; }
.hero-carousel .carousel-caption p { color: rgba(255,255,255,.85); margin: 0; }
@media (max-width: 575.98px) { .hero-carousel .carousel-item { height: 240px; } }

/* ===== Lightbox ===== */
.gallery-grid .g { cursor: zoom-in; transition: transform .25s ease; }
.gallery-grid .g:hover { transform: scale(1.02); }
.lightbox .lightbox-content { background: #000; border: 1px solid var(--border); border-radius: 18px; position: relative; padding: 0; overflow: hidden; }
.lightbox .lightbox-img { width: 100%; max-height: 82vh; object-fit: contain; display: block; background: #000; }
.lightbox .lightbox-close { position: absolute; top: 12px; right: 12px; z-index: 5; filter: invert(1) grayscale(1); opacity: .9; }
.lightbox .lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.5); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 1.25rem; display: inline-flex; align-items: center; justify-content: center; z-index: 5; }
.lightbox .lightbox-nav:hover { background: rgba(255,45,135,.85); }
.lightbox .lightbox-prev { left: 12px; }
.lightbox .lightbox-next { right: 12px; }
.lightbox .lightbox-caption { color: #fff; text-align: center; padding: .65rem 1rem; background: rgba(0,0,0,.6); font-size: .9rem; }

/* ===== Auth pages ===== */
.auth-wrap { min-height: calc(100vh - 80px); display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 460px; background: var(--surface-solid); border: 1px solid var(--border); border-radius: 22px; padding: 2rem; box-shadow: var(--card-shadow); }
.auth-card h1 { font-family: "Playfair Display", serif; font-size: 1.75rem; margin-bottom: .25rem; }
.auth-card .muted { color: var(--muted); margin-bottom: 1.25rem; }
.auth-tabs { display: flex; gap: .5rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: .25rem; margin-bottom: 1.25rem; }
.auth-tabs a { flex: 1; text-align: center; padding: .5rem .75rem; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem; }
.auth-tabs a.active { background: var(--gradient); color: #fff; }
.auth-divider { display: flex; align-items: center; gap: .75rem; color: var(--muted); margin: 1.25rem 0; font-size: .85rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.otp-input { letter-spacing: .5rem; text-align: center; font-size: 1.25rem; font-weight: 700; }

.link-themed { color: var(--primary); text-decoration: none; font-weight: 600; }
.link-themed:hover { text-decoration: underline; }
.auth-card .form-control, .auth-card .form-select, .auth-card .input-group-text { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.auth-card .form-control::placeholder { color: var(--muted); }
.auth-card .form-control:focus, .auth-card .form-select:focus { background: var(--surface-2); color: var(--text); border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(255,45,135,.15); }
.auth-card .form-check-input { background-color: var(--surface-2); border-color: var(--border); }
.auth-card .form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }

/* ===== Venue map ===== */
.venue-map { height: 240px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.leaflet-container { background: var(--surface-2); font-family: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface-solid); color: var(--text); border: 1px solid var(--border); }
.leaflet-popup-content { margin: .65rem .85rem; font-size: .9rem; }
[data-theme="dark"] .leaflet-tile { filter: brightness(.75) contrast(1.05) saturate(.85) hue-rotate(180deg) invert(.92); }
.venue-pin { position: relative; }
.venue-pin .venue-pin-dot { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px #fff, 0 4px 10px rgba(255,45,135,.6); }
.venue-pin .venue-pin-ring { position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; background: rgba(255,45,135,.35); animation: pin-pulse 1.8s ease-out infinite; }
@keyframes pin-pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }

/* ===== Event detail: artists + agenda ===== */
.artist-card { text-align:center; }
.artist-avatar { width: 96px; height: 96px; margin: 0 auto; border-radius: 50%; overflow: hidden; border: 2px solid var(--border); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.artist-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.agenda-list { list-style: none; padding: 0; margin: 0; position: relative; }
.agenda-list:before { content:""; position:absolute; left: 64px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.agenda-item { display:flex; align-items:center; gap: 1rem; padding: .55rem 0; position: relative; }
.agenda-time { width: 56px; flex: 0 0 56px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.agenda-item:after { content:""; position:absolute; left: 60px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--surface-solid); }
.agenda-title { color: var(--text); padding-left: 1.25rem; }
