:root{
  --bg0:#0b0c0f;
  --bg1:#0b0c0f;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.085);
  --stroke: rgba(255,255,255,.12);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.64);
  --muted2: rgba(255,255,255,.50);
  --shadow: 0 12px 28px rgba(0,0,0,.42);
  --shadow2: 0 1px 0 rgba(255,255,255,.06) inset;
  --blue: #0a84ff;
  --radius: 12px;
  --radius2: 10px;
  --radius3: 8px;
  --gap: 14px;
  --max: 1120px;
}

html[data-theme="light"]{
  --bg0:#f5f5f7;
  --bg1:#f5f5f7;
  --panel: rgba(255,255,255,.72);
  --panel2: rgba(255,255,255,.86);
  --stroke: rgba(0,0,0,.10);
  --text: rgba(0,0,0,.90);
  --muted: rgba(0,0,0,.62);
  --muted2: rgba(0,0,0,.48);
  --shadow: 0 12px 28px rgba(0,0,0,.10);
  --shadow2: 0 1px 0 rgba(255,255,255,.60) inset;
}

*{ box-sizing:border-box }
body{
  margin:0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color:var(--text);
  background: linear-gradient(180deg, var(--bg0), var(--bg1));
  min-height:100dvh;
}

.bg{
  position:fixed; inset:0;
  background:
    radial-gradient(900px 420px at 20% 0%, rgba(10,132,255,.14), transparent 55%),
    radial-gradient(900px 420px at 85% 10%, rgba(255,255,255,.06), transparent 60%);
  filter:saturate(1);
  pointer-events:none;
  z-index:-1;
}

a{ color:inherit; text-decoration:none }
a:hover{ text-decoration:underline }

.wrap{
  width:min(var(--max), calc(100% - 28px));
  margin:0 auto;
}

.top{
  position:sticky; top:0; z-index:10;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg1) 82%, transparent);
  border-bottom:1px solid var(--stroke);
}
.top__inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0;
}
.top__nav{ display:flex; gap:10px; align-items:center }

.brand{
  display:flex; gap:10px; align-items:center;
  text-decoration:none;
}
.brand__mark{
  width:34px; height:34px;
  border-radius:10px;
  display:grid; place-items:center;
  font-weight:800; letter-spacing:.02em;
  background: color-mix(in srgb, var(--panel2) 85%, transparent);
  box-shadow: var(--shadow2);
  color:white;
}
.brand__avatar{
  width: 34px;
  height: 34px;
  border-radius:10px;
  display:block;
  object-fit: cover;
}
.brand__text{
  font-weight:650;
  letter-spacing:.01em;
}

.pill{
  padding:9px 12px;
  border-radius: 999px;
  border:1px solid var(--stroke);
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  box-shadow: var(--shadow2);
  font-size: 13px;
  cursor:pointer;
}
.pill--ghost{
  background: transparent;
}
.pill:hover{ text-decoration:none; border-color: color-mix(in srgb, var(--stroke) 75%, var(--blue)) }

.hero{
  display:grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 22px 0 18px;
}
@media (max-width: 940px){
  .hero{ grid-template-columns: 1fr; }
}
.hero__title{
  margin:0;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.02em;
  line-height:1.06;
}
.hero__subtitle{
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 62ch;
}

.ctaRow{
  margin-top: 16px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items:stretch;
}
@media (max-width: 760px){
  .ctaRow{ grid-template-columns: 1fr; }
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
}

.btn--main{
  padding: 16px 16px;
  border-radius: 12px;
  font-size: 16px;
  min-height: 64px;
  width: 100%;
}

.btn__icon{
  width: 34px;
  height: 34px;
  display:grid;
  place-items:center;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--panel2) 70%, transparent);
}
.btn__iconImg{
  height: 18px;
  width: auto;
  display:block;
}
.btn__iconImg--giphy{
  height: 16px;
}
.btn__iconSvg{
  width: 18px;
  height: 18px;
  display:block;
}
.btn__label{
  font-weight: 700;
  letter-spacing: .01em;
}

.btn--giphy{
  border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--panel2) 85%, transparent);
  color: var(--text);
  box-shadow: var(--shadow2);
}
.btn--instagram{
  border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--panel2) 85%, transparent);
  color: var(--text);
  box-shadow: var(--shadow2);
}
.btn--giphy:hover,
.btn--instagram:hover{
  text-decoration:none;
  border-color: color-mix(in srgb, var(--stroke) 75%, var(--blue));
  transform: translateY(-1px);
}
.btn--giphy:active,
.btn--instagram:active{
  transform: translateY(0px);
}

.footer__sep{ opacity: .7; margin: 0 8px; }

.controls{
  margin-top: 16px;
  display:grid;
  grid-template-columns: 1.2fr .6fr auto;
  gap: 12px;
  align-items:end;
}
@media (max-width: 760px){
  .controls{ grid-template-columns: 1fr; }
}

.panel{
  border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow), var(--shadow2);
  margin: 0 0 18px;
}
.panel--twoCol{
  display:grid;
  grid-template-columns: 1fr .95fr;
  gap: 14px;
}
@media (max-width: 980px){
  .panel--twoCol{ grid-template-columns: 1fr; }
}
.panel__head{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.panel__title{
  font-size: 16px;
  letter-spacing:.01em;
  margin:0;
}
.panel__meta{
  color: var(--muted2);
  font-size: 13px;
}

.hero__card{
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--card2) 82%, transparent),
    color-mix(in srgb, var(--card) 82%, transparent)
  );
  padding: 14px;
}
.stat{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 10px;
  padding: 8px 2px;
}
.stat__label{ color: var(--muted2); font-size: 13px }
.stat__value{ font-weight:800; letter-spacing:.01em }
.divider{ height:1px; background: var(--stroke); margin: 10px 0 }

.field{ display:flex; flex-direction:column; gap:6px; min-width:0 }
.field--full{ grid-column: 1 / -1 }
.field__label{ font-size: 12px; color: var(--muted2) }
.input{
  width: 100%;
  border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--panel2) 72%, transparent);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 14px;
  color: var(--text);
  outline: none;
}
.input:focus{
  border-color: color-mix(in srgb, var(--stroke) 70%, var(--blue));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent);
}
.input--area{
  resize: vertical;
  min-height: 108px;
}

/* default buttons (non-CTA) */
.btn{
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--panel2) 82%, transparent);
  color: var(--text);
  font-weight: 650;
  letter-spacing: .01em;
  cursor:pointer;
  box-shadow: var(--shadow2);
  white-space:nowrap;
}
.btn:hover{ text-decoration:none; border-color: color-mix(in srgb, var(--stroke) 75%, var(--blue)) }
.btn--ghost{
  background: transparent;
  color: var(--text);
  border-color: var(--stroke);
  box-shadow:none;
}
.btn--ghost:hover{ border-color: color-mix(in srgb, var(--stroke) 75%, var(--blue)) }

.gallery{
  column-gap: var(--gap);
}
.gallery--masonry{
  columns: 4 260px;
}
.gallery--grid{
  columns: 1;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap);
}

.card{
  break-inside: avoid;
  border: 1px solid var(--stroke);
  border-radius: var(--radius2);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  overflow:hidden;
  margin: 0 0 var(--gap);
  cursor: pointer;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.gallery--grid .card{ margin: 0; }
.card:hover{
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--stroke) 75%, var(--blue));
  background: color-mix(in srgb, var(--panel2) 70%, transparent);
}
.card__media{
  width:100%;
  display:block;
  background: color-mix(in srgb, var(--bg1) 75%, transparent);
}
.card__body{
  padding: 10px 10px 11px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}
.card__title{
  font-size: 13px;
  color: var(--muted);
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge{
  font-size: 11px;
  color: var(--muted2);
  border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--panel2) 74%, transparent);
  padding: 4px 8px;
  border-radius: 999px;
}

.error{
  border: 1px solid color-mix(in srgb, #ef4444 45%, var(--stroke));
  background: color-mix(in srgb, #ef4444 12%, transparent);
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0;
  color: color-mix(in srgb, #ef4444 78%, var(--text));
}

.suggestModal__form{
  margin-top: 12px;
  display:flex;
  flex-direction:column;
  gap: 12px;
}

.footer{
  padding: 22px 0 38px;
  color: var(--muted2);
}
.footer__inner{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  flex-wrap:wrap;
}

.muted{ color: var(--muted) }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace }

.modal{
  position: fixed;
  inset: 0;
  z-index: 50;
}
.modal__backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(18px);
}
.modal__card{
  position: relative;
  width: min(920px, calc(100% - 22px));
  margin: 28px auto;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--panel2) 85%, transparent);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal__card--small{
  width: min(640px, calc(100% - 22px));
}
.modal__close{
  position:absolute; top:10px; right:10px;
}
.iconBtn{
  width: 40px; height:40px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--panel2) 82%, transparent);
  color: var(--text);
  cursor:pointer;
}
.iconBtn:hover{ border-color: color-mix(in srgb, var(--stroke) 75%, var(--blue)) }
.modal__media{
  background: color-mix(in srgb, var(--bg1) 78%, transparent);
  display:grid;
  place-items:center;
}
.modal__media img{
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display:block;
}
.modal__body{
  padding: 12px 14px 14px;
}
.modal__title{
  font-weight: 850;
  letter-spacing: .01em;
}
.modal__actions{
  margin-top: 10px;
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  align-items:center;
}

.toast{
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 60;
  border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--panel2) 88%, transparent);
  box-shadow: var(--shadow);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  max-width: min(360px, calc(100% - 28px));
}
