:root{
  --bg:#090b11;
  --surface:#121620;
  --surface2:#1b212f;
  --border:rgba(255,255,255,.085);
  --border-hover:rgba(255,255,255,.17);
  --text:#f5f7fb;
  --muted:#9ba4b5;
  --accent:#ef1748;
  --accent2:#ff4168;
  --green:#38d996;
  --gold:#ffc95c;
  --radius:18px;
  --shadow:0 18px 45px rgba(0,0,0,.22);
}

*{box-sizing:border-box}
html{color-scheme:dark;scroll-behavior:smooth}

body{
  margin:0;
  background:
    radial-gradient(circle at 80px -100px,rgba(239,23,72,.13),transparent 350px),
    var(--bg);
  color:var(--text);
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

button,input,select,textarea{font:inherit}
button,a{ -webkit-tap-highlight-color:transparent }

button{cursor:pointer}
a{color:inherit;text-decoration:none}

.explore-header{
  height:72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 max(20px,calc((100vw - 1280px)/2));
  border-bottom:1px solid var(--border);
  background:rgba(9,11,17,.88);
  backdrop-filter:blur(18px);
  position:sticky;
  top:0;
  z-index:30;
}

.brand{display:flex;align-items:center;gap:11px}
.brand img{width:40px;height:40px;border-radius:11px}
.brand div{display:flex;align-items:baseline;gap:8px}
.brand strong{font-size:1.12rem}
.brand span{font-size:.8rem;color:var(--accent);font-weight:800;text-transform:uppercase;letter-spacing:.08em}

.explore-header nav{display:flex;align-items:center;gap:18px}
.explore-header nav>a{color:var(--muted);font-size:.9rem}
.explore-header nav>a:hover{color:white}

.btn{
  border:0;
  min-height:44px;
  border-radius:999px;
  padding:0 19px;
  color:white;
  font-weight:750;
}

.btn-primary{
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  box-shadow:0 10px 28px rgba(239,23,72,.22);
}

.btn-primary:hover{filter:brightness(1.08)}

.btn-outline{
  border:1px solid var(--border-hover);
  background:rgba(255,255,255,.04);
}

.btn-dark{
  background:var(--surface);
  border:1px solid var(--border);
}

.hero{
  min-height:390px;
  position:relative;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  border-bottom:1px solid var(--border);
}

.hero-glow{
  position:absolute;
  width:680px;
  height:340px;
  border-radius:50%;
  background:rgba(239,23,72,.13);
  filter:blur(110px);
  top:-130px;
  left:50%;
  transform:translateX(-50%);
}

.hero-content{
  position:relative;
  width:min(980px,calc(100% - 32px));
  padding:58px 0 50px;
  text-align:center;
}

.eyebrow{
  color:var(--accent2);
  font-size:.73rem;
  font-weight:900;
  letter-spacing:.15em;
}

.hero h1{
  margin:12px auto;
  font-size:clamp(2.2rem,5vw,4.5rem);
  letter-spacing:-.055em;
  line-height:1.02;
}

.hero h1 span{color:var(--accent)}

.hero>div p,
.hero-content>p{
  color:var(--muted);
  max-width:680px;
  margin:0 auto 27px;
  line-height:1.65;
}

.search-box{
  display:grid;
  grid-template-columns:1fr 220px auto;
  gap:8px;
  background:rgba(23,27,39,.96);
  border:1px solid rgba(255,255,255,.12);
  padding:8px;
  border-radius:20px;
  box-shadow:var(--shadow);
  text-align:left;
}

.search-field,.location-field{
  min-height:52px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:0 14px;
}

.location-field{border-left:1px solid var(--border)}

.search-field span,.location-field span{
  color:var(--muted);
  font-size:1.25rem;
}

.search-box input{
  width:100%;
  border:0;
  outline:0;
  background:transparent;
  color:white;
  font-size:.96rem;
}

.search-box input::placeholder{color:#737b8b}

.quick-actions{
  margin-top:16px;
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:8px;
}

.quick-actions button,.category{
  border:1px solid var(--border);
  background:rgba(255,255,255,.035);
  color:#c9cfda;
  border-radius:999px;
  padding:9px 14px;
}

.quick-actions button:hover,.category:hover,.category.active{
  background:rgba(239,23,72,.11);
  border-color:rgba(239,23,72,.4);
  color:white;
}

.explore-shell{
  width:min(1280px,calc(100% - 32px));
  margin:0 auto;
  padding:28px 0 70px;
}

.category-strip{
  display:flex;
  gap:9px;
  overflow-x:auto;
  padding:2px 0 20px;
  scrollbar-width:none;
}

.category-strip::-webkit-scrollbar{display:none}

.category{
  white-space:nowrap;
  display:flex;
  gap:7px;
  align-items:center;
}

.toolbar{
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:flex-end;
  margin:13px 0 20px;
}

.toolbar h2{margin:0 0 5px;font-size:1.5rem;letter-spacing:-.03em}
.toolbar p{margin:0;color:var(--muted);font-size:.9rem}

.toolbar-actions{display:flex;gap:9px}

.view-switch{
  display:flex;
  padding:4px;
  border:1px solid var(--border);
  background:var(--surface);
  border-radius:14px;
}

.view-switch button{
  width:40px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:var(--muted);
}

.view-switch button.active{
  background:var(--surface2);
  color:white;
}

.filter-panel{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:12px;
  background:var(--surface);
  border:1px solid var(--border);
  padding:16px;
  border-radius:var(--radius);
  margin-bottom:20px;
}

.filter-panel label{
  color:var(--muted);
  font-size:.78rem;
  display:flex;
  flex-direction:column;
  gap:7px;
}

.filter-panel select{
  min-height:40px;
  background:#0d1018;
  color:white;
  border:1px solid var(--border);
  border-radius:11px;
  padding:0 10px;
}

.filter-panel .check{
  flex-direction:row;
  align-items:center;
  color:#dce1ea;
  padding-top:23px;
}

.results-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

.place-card{
  overflow:hidden;
  border:1px solid var(--border);
  background:linear-gradient(180deg,rgba(31,37,51,.90),rgba(17,21,30,.96));
  border-radius:var(--radius);
  box-shadow:0 8px 24px rgba(0,0,0,.14);
  transition:.22s ease;
}

.place-card:hover{
  transform:translateY(-4px);
  border-color:var(--border-hover);
  box-shadow:0 16px 34px rgba(0,0,0,.24);
}

.card-cover{
  height:185px;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:4rem;
  background:
    radial-gradient(circle at 25% 20%,rgba(239,23,72,.28),transparent 35%),
    linear-gradient(135deg,#242b3b,#11151f);
}

.card-cover.restaurant{background:linear-gradient(135deg,#442b22,#151820)}
.card-cover.music{background:linear-gradient(135deg,#37214c,#141722)}
.card-cover.culture{background:linear-gradient(135deg,#203b43,#131820)}
.card-cover.photo{background:linear-gradient(135deg,#203548,#161922)}
.card-cover.family{background:linear-gradient(135deg,#394122,#151820)}
.card-cover.nightlife{background:linear-gradient(135deg,#431d3b,#141620)}

.badge{
  position:absolute;
  top:12px;
  left:12px;
  border-radius:999px;
  padding:6px 9px;
  font-size:.69rem;
  font-weight:900;
  backdrop-filter:blur(10px);
}

.badge.pro{background:rgba(35,183,129,.9)}
.badge.community{background:rgba(21,25,36,.88);border:1px solid rgba(255,255,255,.15)}
.badge.event{background:rgba(239,23,72,.92)}

.favorite{
  position:absolute;
  right:12px;
  top:12px;
  width:36px;
  height:36px;
  border:0;
  border-radius:50%;
  color:white;
  background:rgba(9,11,17,.7);
}

.favorite.active{color:#ff5070}

.card-content{padding:17px}

.card-meta{
  color:var(--accent2);
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:.68rem;
  font-weight:850;
}

.card-content h3{
  margin:7px 0 7px;
  font-size:1.12rem;
}

.card-content p{
  margin:0;
  min-height:42px;
  color:var(--muted);
  line-height:1.5;
  font-size:.86rem;
}

.card-footer{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:15px;
  padding-top:13px;
  border-top:1px solid var(--border);
  color:#c8ced8;
  font-size:.78rem;
}

.card-footer strong{color:white}

.map-view{
  min-height:500px;
  border:1px solid var(--border);
  border-radius:24px;
  overflow:hidden;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px),
    #10141d;
  background-size:34px 34px;
}

.map-placeholder{
  min-height:500px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:30px;
}

.map-placeholder>span{font-size:3rem;color:var(--accent)}
.map-placeholder h3{margin:10px 0 5px}
.map-placeholder p{color:var(--muted);max-width:460px}

.empty-state{
  padding:70px 20px;
  text-align:center;
  border:1px dashed var(--border-hover);
  border-radius:24px;
}

.empty-state>span{font-size:3rem;color:var(--muted)}
.empty-state h3{margin-bottom:4px}
.empty-state p{color:var(--muted);margin:0 0 20px}

.community-cta{
  width:min(1280px,calc(100% - 32px));
  margin:0 auto 70px;
  padding:35px;
  border:1px solid rgba(239,23,72,.22);
  border-radius:26px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:30px;
  background:
    radial-gradient(circle at 90% 10%,rgba(239,23,72,.17),transparent 35%),
    linear-gradient(135deg,#171b27,#10131c);
}

.community-cta h2{font-size:2rem;margin:7px 0}
.community-cta p{color:var(--muted);max-width:700px;line-height:1.6;margin:0}

.modal-backdrop{
  position:fixed;
  inset:0;
  z-index:100;
  background:rgba(0,0,0,.72);
  backdrop-filter:blur(9px);
  padding:20px;
  overflow:auto;
}

.modal-backdrop:not([hidden]){display:flex;align-items:flex-start;justify-content:center}

.modal{
  width:min(680px,100%);
  position:relative;
  margin:auto;
  padding:28px;
  background:#131722;
  border:1px solid var(--border-hover);
  border-radius:24px;
  box-shadow:0 30px 90px rgba(0,0,0,.55);
}

.modal-close{
  position:absolute;
  top:16px;
  right:16px;
  width:38px;
  height:38px;
  border-radius:50%;
  border:1px solid var(--border);
  background:#0c0f16;
  color:white;
  font-size:1.3rem;
}

.modal h2{margin:7px 0 5px}
.modal-intro{color:var(--muted);line-height:1.5}

.type-selector{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin:20px 0;
}

.type-selector button{
  min-height:48px;
  border:1px solid var(--border);
  border-radius:13px;
  background:#0d1119;
  color:#c8ced8;
}

.type-selector button.active{
  border-color:rgba(239,23,72,.55);
  background:rgba(239,23,72,.11);
  color:white;
}

#contribution-form label{
  display:flex;
  flex-direction:column;
  gap:7px;
  margin-bottom:14px;
  font-size:.83rem;
  color:#cbd1dc;
  font-weight:650;
}

#contribution-form input,
#contribution-form select,
#contribution-form textarea{
  width:100%;
  border:1px solid var(--border);
  border-radius:12px;
  background:#0c1017;
  color:white;
  padding:12px;
  outline:none;
}

#contribution-form input:focus,
#contribution-form select:focus,
#contribution-form textarea:focus{
  border-color:rgba(239,23,72,.65);
}

#contribution-form textarea{min-height:115px;resize:vertical}

.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.form-note{color:var(--gold);font-size:.78rem;line-height:1.45}
.btn-full{width:100%;margin-top:5px}
.form-message{text-align:center;color:var(--green);font-size:.85rem}

@media(max-width:900px){
  .results-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .filter-panel{grid-template-columns:repeat(2,1fr)}
}

@media(max-width:680px){
  .explore-header{height:62px;padding:0 14px}
  .brand img{width:35px;height:35px}
  .brand strong{font-size:1rem}
  .brand span{font-size:.65rem}
  .explore-header nav>a{display:none}
  .explore-header .btn{min-height:38px;padding:0 13px;font-size:.8rem}

  .hero{min-height:auto}
  .hero-content{padding:42px 0 35px}
  .hero h1{font-size:2.45rem}

  .search-box{
    grid-template-columns:1fr;
    padding:7px;
  }

  .search-field,.location-field{
    min-height:48px;
    border-left:0;
  }

  .location-field{border-top:1px solid var(--border)}
  .search-box .btn{width:100%;min-height:49px}

  .quick-actions{
    justify-content:flex-start;
    overflow-x:auto;
    flex-wrap:nowrap;
    scrollbar-width:none;
  }

  .quick-actions button{white-space:nowrap}

  .explore-shell{width:min(100% - 22px,1280px);padding-top:20px}

  .toolbar{align-items:flex-start}
  .toolbar h2{font-size:1.25rem}
  .toolbar p{font-size:.8rem}
  #btn-filters{font-size:0;width:43px;padding:0}
  #btn-filters::after{content:"☷";font-size:1rem}

  .results-grid{grid-template-columns:1fr}
  .card-cover{height:175px}

  .filter-panel{grid-template-columns:1fr}
  .filter-panel .check{padding-top:3px}

  .community-cta{
    width:min(100% - 22px,1280px);
    padding:25px 20px;
    flex-direction:column;
    align-items:flex-start;
  }

  .community-cta h2{font-size:1.6rem}
  .community-cta .btn{width:100%}

  .modal-backdrop{padding:10px}
  .modal{padding:23px 17px}
  .form-row{grid-template-columns:1fr}
}

/* =========================================================
   AFROTUNE EXPLORE — PHOTO CARDS
   ========================================================= */

.card-cover{
  height:210px;
  position:relative;
  display:block;
  overflow:hidden;
  background:#11151f;
  font-size:initial;
}

.card-photo{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  transition:transform .45s ease;
}

.place-card:hover .card-photo{
  transform:scale(1.035);
}

.card-photo-shade{
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(
      180deg,
      rgba(9,11,17,.10) 0%,
      rgba(9,11,17,.04) 42%,
      rgba(9,11,17,.68) 100%
    );
}

.card-photo-fallback{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  background:
    radial-gradient(
      circle at 25% 20%,
      rgba(239,23,72,.24),
      transparent 36%
    ),
    linear-gradient(135deg,#242b3b,#11151f);
}

.card-photo-fallback strong{
  color:#f5f7fb;
  font-size:1rem;
  font-weight:950;
  letter-spacing:.18em;
}

.card-photo-fallback span{
  margin-top:5px;
  color:#ef1748;
  font-size:.68rem;
  font-weight:900;
  letter-spacing:.25em;
}

.card-category{
  position:absolute;
  left:12px;
  bottom:12px;
  z-index:3;
  max-width:calc(100% - 24px);
  padding:7px 10px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:999px;
  background:rgba(9,11,17,.68);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  color:#fff;
  font-size:.68rem;
  line-height:1;
  font-weight:850;
}

.card-cover .badge,
.card-cover .favorite{
  z-index:4;
}

@media (max-width:700px){
  .card-cover{
    height:190px;
  }
}

/* =========================================================
   AFROTUNE EXPLORE — CONTRIBUTION FORM V2
   ========================================================= */

.field-help{
  display:block;
  color:var(--muted);
  font-size:.72rem;
  line-height:1.45;
  font-weight:500;
}

#contribution-photo{
  cursor:pointer;
}

#contribution-photo::file-selector-button{
  margin-right:12px;
  padding:8px 12px;
  border:0;
  border-radius:9px;
  background:rgba(239,23,72,.13);
  color:#fff;
  font-weight:750;
  cursor:pointer;
}

.photo-preview{
  position:relative;
  width:100%;
  margin-top:4px;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:14px;
  background:#090b11;
  aspect-ratio:16 / 9;
}

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

.remove-photo{
  position:absolute;
  top:10px;
  right:10px;
  padding:7px 11px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:999px;
  background:rgba(9,11,17,.82);
  color:#fff;
  font-size:.72rem;
  font-weight:800;
  cursor:pointer;
}

/* =========================================================
   AFROTUNE EXPLORE — CAMERA + GPS
   ========================================================= */

.photo-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:3px;
}

.photo-action{
  min-height:48px;
  margin:0 !important;
  display:flex !important;
  align-items:center;
  justify-content:center;
  padding:11px 14px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#0c1017;
  color:#fff !important;
  text-align:center;
  cursor:pointer;
  transition:.2s ease;
}

.photo-action:hover{
  border-color:rgba(239,23,72,.55);
  background:rgba(239,23,72,.07);
}

.photo-action span{
  font-size:.8rem;
  font-weight:800;
}

.photo-action input{
  position:absolute;
  width:1px !important;
  height:1px;
  opacity:0;
  pointer-events:none;
}

.location-capture{
  margin:4px 0 18px;
  padding:15px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#0c1017;
}

.location-capture > div:first-child{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.location-capture > div:first-child strong{
  color:#f5f7fb;
  font-size:.84rem;
}

.location-capture > div:first-child span{
  color:var(--muted);
  font-size:.73rem;
  line-height:1.45;
}

.location-button{
  width:100%;
  min-height:44px;
  margin-top:13px;
  padding:10px 14px;
  border:1px solid rgba(239,23,72,.42);
  border-radius:11px;
  background:rgba(239,23,72,.10);
  color:#fff;
  font-size:.8rem;
  font-weight:800;
  cursor:pointer;
}

.location-button:hover{
  background:rgba(239,23,72,.17);
}

.location-button:disabled{
  opacity:.6;
  cursor:wait;
}

.location-result{
  position:relative;
  margin-top:12px;
  padding:12px;
  border:1px solid rgba(35,183,129,.28);
  border-radius:11px;
  background:rgba(35,183,129,.07);
}

.location-result strong{
  display:block;
  color:#fff;
  font-size:.78rem;
}

.location-result span{
  display:block;
  margin-top:4px;
  color:#aeb8c8;
  font-size:.72rem;
}

.remove-location{
  margin-top:9px;
  padding:0;
  border:0;
  background:transparent;
  color:#ff718c;
  font-size:.72rem;
  font-weight:750;
  cursor:pointer;
}

@media(max-width:520px){
  .photo-actions{
    grid-template-columns:1fr;
  }
}
