/* ===========================================================
   WINR v14 — CREATE A COMMUNITY (top-nav button + onboarding-style modal)
   =========================================================== */

/* ── Nav button — flat editorial link, no pill ── */
.create-community-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 4px;
  background: transparent;
  border: none;
  border-radius: 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  letter-spacing: -0.1px;
  cursor: pointer;
  transition: color .15s, transform .15s;
  pointer-events: auto;
}
.create-community-btn:hover {
  color: #fff;
  transform: none;
}
.create-community-btn:active { transform: scale(0.97); }
.create-community-btn svg { opacity: 0.7; }
.create-community-btn:hover svg { opacity: 1; }

@media (max-width: 720px) {
  .create-community-btn span { display: none; }
  .create-community-btn { padding: 6px 4px; }
}

/* ── Modal root / backdrop ── */
.v14-cc-root {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
}
.v14-cc-root.open { display: block; }

.v14-cc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 8, 0.42);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  opacity: 0;
  transition: opacity .25s ease;
}
.v14-cc-root.open .v14-cc-backdrop { opacity: 1; }

.v14-cc-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.98);
  width: min(600px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  /* Editorial: a single dark fill, hairline border, subtle inner top
     highlight. No radial gradient, no inner shadow ring, no plate-like
     "card" silhouette — feels designed, not boxed. */
  background: rgba(10, 10, 13, 0.62);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 24px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.07),
    0 24px 60px rgba(0,0,0,0.45);
  -webkit-backdrop-filter: blur(40px) saturate(140%);
  backdrop-filter: blur(40px) saturate(140%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transition:
    transform .3s cubic-bezier(0.16,1,0.3,1),
    opacity .25s ease,
    background .35s ease,
    border-color .35s ease,
    box-shadow .35s ease,
    backdrop-filter .35s ease,
    -webkit-backdrop-filter .35s ease;
}
/* Soft top hairline accent — replaces the inner radial glow with a
   single intentional line, the kind Discord/Meta sheets use. */
.v14-cc-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.18) 50%,
    transparent 100%);
  z-index: 4;
  pointer-events: none;
}

/* Success mode — strip the card chrome, let the page show through */
.v14-cc-card.is-success {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.v14-cc-card.is-success::before { display: none; }

/* When submitted, drop the full-screen blur scrim too — the only blur
   is the tiny halo right behind the success copy. The explore page
   reads through fluidly. */
.v14-cc-root.is-success-mode .v14-cc-backdrop {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.v14-cc-card.is-success .v14-cc-progress,
.v14-cc-card.is-success .v14-cc-foot {
  display: none;
}
.v14-cc-card.is-success .v14-cc-body {
  padding: 0;
}
.v14-cc-card.is-success .v14-cc-close {
  background: transparent;
  border-color: transparent;
}
.v14-cc-card.is-success .v14-cc-close:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.1);
}
.v14-cc-root.open .v14-cc-card {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.v14-cc-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50%;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  z-index: 5;
  transition: background .2s, color .2s;
}
.v14-cc-close:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ── Progress strip — hidden. The eyebrow inside the body is the
       single source of step info. ── */
.v14-cc-progress { display: none; }
.v14-cc-progress-orig {
  padding: 26px 32px 8px;
}
.v14-cc-progress-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.v14-cc-dots {
  display: flex;
  gap: 6px;
}
.v14-cc-dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.08);
  transition: background .25s ease;
}
.v14-cc-dot.done { background: rgba(255,255,255,0.32); }
.v14-cc-dot.active { background: #fff; }

/* ── Body ── */
.v14-cc-body {
  padding: 32px 32px 8px;
  overflow-y: auto;
  flex: 1;
}
.v14-cc-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.v14-cc-opt {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: rgba(255,255,255,0.35);
  text-transform: none;
  margin-left: 6px;
}
.v14-cc-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
}
.v14-cc-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
  margin: 0 0 22px;
}

/* ── Form fields ── */
.v14-cc-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.3px;
  margin: 14px 0 6px;
  text-transform: uppercase;
}
.v14-cc-input,
.v14-cc-textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color .2s, background .2s;
  outline: none;
}
.v14-cc-input:focus,
.v14-cc-textarea:focus {
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.07);
}
.v14-cc-textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.v14-cc-counter {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  text-align: right;
  margin-top: 4px;
}
.v14-cc-hint {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-top: 6px;
  line-height: 1.4;
}

/* URL slug inline */
.v14-cc-slug-wrap {
  display: flex;
  align-items: stretch;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
}
.v14-cc-slug-wrap:focus-within { border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.07); }
.v14-cc-slug-prefix {
  padding: 12px 12px 12px 14px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  border-right: 1px solid rgba(255,255,255,0.06);
  white-space: nowrap;
}
.v14-cc-slug-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  padding: 12px 14px;
  outline: none;
}

/* ── Tile pickers (category, type, price) — editorial minimal
       No card chrome. Just text + emoji on a soft hover fill, with
       a single white rail on the left for the selected option. ── */
.v14-cc-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 2px;
  padding: 4px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.v14-cc-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 14px 12px 18px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  text-align: left;
}
.v14-cc-tile::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  border-radius: 1px;
  background: transparent;
  transition: background .15s ease;
}
.v14-cc-tile:hover {
  background: rgba(255,255,255,0.04);
}
.v14-cc-tile.selected {
  background: rgba(255,255,255,0.06);
}
.v14-cc-tile.selected::before { background: #fff; }
.v14-cc-tile-emoji {
  font-size: 18px;
  line-height: 1;
  margin-bottom: 4px;
  opacity: 0.9;
  filter: grayscale(0.2);
}
.v14-cc-tile.selected .v14-cc-tile-emoji { opacity: 1; filter: none; }
.v14-cc-tile-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.1px;
  color: rgba(255,255,255,0.75);
}
.v14-cc-tile.selected .v14-cc-tile-label { color: #fff; font-weight: 700; }
.v14-cc-tile-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  line-height: 1.4;
}

/* Toggle row (privacy, paid yes/no) — same editorial treatment */
.v14-cc-toggle-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 4px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.v14-cc-toggle {
  position: relative;
  padding: 12px 14px 12px 18px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease;
  text-align: left;
}
.v14-cc-toggle::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  border-radius: 1px;
  background: transparent;
  transition: background .15s ease;
}
.v14-cc-toggle:hover { background: rgba(255,255,255,0.04); }
.v14-cc-toggle.selected { background: rgba(255,255,255,0.06); }
.v14-cc-toggle.selected::before { background: #fff; }
.v14-cc-toggle-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.1px;
}
.v14-cc-toggle.selected .v14-cc-toggle-title { color: #fff; font-weight: 700; }
.v14-cc-toggle-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  line-height: 1.4;
}

/* Banner uploader */
.v14-cc-uploader {
  position: relative;
  height: 140px;
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  overflow: hidden;
  transition: all .2s;
}
.v14-cc-uploader:hover {
  border-color: rgba(255,255,255,0.32);
  background: rgba(255,255,255,0.05);
}
.v14-cc-uploader.has-image { border-style: solid; }
.v14-cc-uploader-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.v14-cc-uploader-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2), rgba(0,0,0,0.55));
}
.v14-cc-uploader-text {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-align: center;
}
.v14-cc-uploader-sub {
  position: relative;
  z-index: 1;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}

/* Tag input */
.v14-cc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  min-height: 44px;
}
.v14-cc-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.v14-cc-tag-x { cursor: pointer; opacity: 0.6; }
.v14-cc-tag-x:hover { opacity: 1; }
.v14-cc-tag-input {
  flex: 1;
  min-width: 120px;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13px;
  padding: 4px 6px;
}

/* Review summary list */
.v14-cc-review {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 16px;
}
.v14-cc-review-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}
.v14-cc-review-key {
  color: rgba(255,255,255,0.5);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 11px;
}
.v14-cc-review-val {
  color: #fff;
  font-weight: 600;
  text-align: right;
  word-break: break-word;
  max-width: 60%;
}

/* ── Footer ── */
.v14-cc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 32px 22px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.18);
}
.v14-cc-btn-back,
.v14-cc-btn-next {
  height: 40px;
  padding: 0 22px;
  border-radius: 999px;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}
.v14-cc-btn-back {
  background: transparent;
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.1);
}
.v14-cc-btn-back:hover { color: #fff; border-color: rgba(255,255,255,0.25); }
.v14-cc-btn-next {
  background: #fff;
  color: #0a0a0d;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.v14-cc-btn-next:hover:not(.disabled) {
  transform: translateY(-1px);
  background: #f3f3f3;
}
.v14-cc-btn-next.disabled {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.35);
  cursor: not-allowed;
  box-shadow: none;
}
.v14-cc-foot-spacer { flex: 0 0 auto; }

/* ── Success state — standalone emoji + text floating on the page,
   with the softest possible blur halo behind the type for legibility. */
.v14-cc-success {
  text-align: center;
  padding: 60px 12px 32px;
  position: relative;
  overflow: visible;
}
/* Soft blur halo — only blurs the page directly behind the success
   content; outside the radius the modal is fully transparent. */
.v14-cc-success::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  height: 360px;
  border-radius: 50%;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  -webkit-mask-image: radial-gradient(circle, #000 35%, transparent 75%);
          mask-image: radial-gradient(circle, #000 35%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}
.v14-cc-success-emoji {
  display: inline-block;
  font-size: 84px;
  line-height: 1;
  margin-bottom: 22px;
  transform-origin: 50% 70%;
  animation: v14-popIn 600ms cubic-bezier(0.34, 1.56, 0.64, 1) both,
             v14-emojiWiggle 2.4s ease-in-out 600ms infinite;
  filter: drop-shadow(0 12px 32px rgba(0,0,0,0.5))
          drop-shadow(0 0 18px rgba(255,255,255,0.12));
}
@keyframes v14-popIn {
  0%   { opacity: 0; transform: scale(0.2) rotate(-30deg); }
  60%  { opacity: 1; transform: scale(1.15) rotate(8deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes v14-emojiWiggle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  20%      { transform: scale(1.06) rotate(-6deg); }
  40%      { transform: scale(1.04) rotate(8deg); }
  60%      { transform: scale(1.08) rotate(-4deg); }
  80%      { transform: scale(1.03) rotate(4deg); }
}

/* Confetti — six colored shards launched from the emoji center */
.v14-cc-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.v14-cc-confetti span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: v14-confetti 1600ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.v14-cc-confetti span:nth-child(1) { background: #FFFFFF; --tx: -120px; --ty: -90px;  --rot: -480deg; animation-delay: 100ms; }
.v14-cc-confetti span:nth-child(2) { background: #39FF14; --tx:  130px; --ty: -100px; --rot:  520deg; animation-delay: 60ms;  }
.v14-cc-confetti span:nth-child(3) { background: #00D4FF; --tx: -160px; --ty:  20px;  --rot: -380deg; animation-delay: 180ms; }
.v14-cc-confetti span:nth-child(4) { background: #BF5AF2; --tx:  150px; --ty:  40px;  --rot:  420deg; animation-delay: 140ms; }
.v14-cc-confetti span:nth-child(5) { background: #FFD60A; --tx:  -50px; --ty: -130px; --rot: -300deg; animation-delay: 220ms; }
.v14-cc-confetti span:nth-child(6) { background: #FF375F; --tx:   60px; --ty: -120px; --rot:  340deg; animation-delay: 300ms; }
.v14-cc-confetti span:nth-child(7) { background: #ffffff; --tx:  -90px; --ty: -50px;  --rot: -260deg; animation-delay: 80ms;  }
.v14-cc-confetti span:nth-child(8) { background: #FF9500; --tx:   90px; --ty:  -30px; --rot:  300deg; animation-delay: 260ms; }
@keyframes v14-confetti {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.6) rotate(0deg); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1) rotate(var(--rot)); }
}

.v14-cc-success-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at 50% 30%, rgba(255,255,255,0.08), transparent 60%);
  animation: v14-glowPulse 2.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes v14-glowPulse {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

.v14-cc-success > h3,
.v14-cc-success > p,
.v14-cc-success > .v14-cc-success-emoji {
  position: relative;
  z-index: 1;
}

.v14-cc-success h3 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: #fff;
  margin: 0 0 8px;
  text-shadow: 0 2px 14px rgba(0,0,0,0.6);
  animation: v14-fadeUp 500ms cubic-bezier(0.16, 1, 0.3, 1) 200ms both;
}
.v14-cc-success p {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin: 0 auto 24px;
  max-width: 360px;
  line-height: 1.5;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  animation: v14-fadeUp 500ms cubic-bezier(0.16, 1, 0.3, 1) 320ms both;
}
.v14-cc-success-done {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 11px 26px;
  border-radius: 999px;
  cursor: pointer;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  transition: background .2s, border-color .2s, transform .2s;
  animation: v14-fadeUp 500ms cubic-bezier(0.16, 1, 0.3, 1) 480ms both;
}
.v14-cc-success-done:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}
@keyframes v14-fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 560px) {
  .v14-cc-card { width: calc(100vw - 12px); border-radius: 16px; }
  .v14-cc-body, .v14-cc-progress, .v14-cc-foot { padding-left: 18px; padding-right: 18px; }
  .v14-cc-toggle-row { grid-template-columns: 1fr; }
}
