/* ===================================================================== */
/* Create page — "What would you like to share?" and everything reached  */
/* from it (Upload a Project, Quick Upload, Sell, Community Post, Poll,  */
/* Upload Music). This is a plain refinement layer on top of the base    */
/* rules in styles.css (loaded first), so it only needs to state what's  */
/* different here — colors, spacing, and the pieces that are new.        */
/*                                                                       */
/* Edit this file to change how the Create page looks. The markup lives  */
/* in index.html (search for data-page="new-project" etc.) and the       */
/* behavior lives in create.js.                                          */
/* ===================================================================== */

/* ---------------------------------------------------------------------- */
/* Type-selection grid — the "What would you like to share?" cards        */
/* ---------------------------------------------------------------------- */
.np-type-choice {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
  margin: 22px 0 8px;
  max-width: 660px;
}
.np-type-card {
  background: #fff;
  border: 1.5px solid #e6e9f0;
  border-radius: 18px;
  overflow: hidden;
  padding: 24px 22px;
  position: relative;
  text-align: left;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.np-type-card::before {
  background: linear-gradient(135deg, rgba(106,92,240,.08), rgba(139,123,255,0) 60%);
  content: "";
  inset: 0;
  opacity: 0;
  position: absolute;
  transition: opacity .18s ease;
}
.np-type-card:hover {
  border-color: #b9aeff;
  box-shadow: 0 18px 38px rgba(28,35,61,.10);
  transform: translateY(-3px);
}
.np-type-card:hover::before { opacity: 1; }
.np-type-card:active { transform: translateY(-1px); }
.np-type-card > * { position: relative; }
.np-type-icon {
  align-items: center;
  background: #eae5ff;
  border-radius: 13px;
  color: #6d5bd7;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  width: 46px;
  box-shadow: 0 6px 14px rgba(109,91,215,.18);
}
.np-type-icon svg { fill: none; height: 22px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 22px; }
.np-type-card.np-type-sell .np-type-icon { background: #fff0e7; color: #de7946; box-shadow: 0 6px 14px rgba(222,121,70,.18); }
.np-type-card.np-type-community .np-type-icon { background: #ddf7ef; color: #1f9e78; box-shadow: 0 6px 14px rgba(31,158,120,.18); }
.np-type-card.np-type-poll .np-type-icon { background: #e4edff; color: #3468d6; box-shadow: 0 6px 14px rgba(52,104,214,.18); }
.np-type-card.np-type-track .np-type-icon { background: #ffe9f0; color: #d1547e; box-shadow: 0 6px 14px rgba(209,84,126,.18); }
.np-type-card.np-type-quick-upload .np-type-icon { background: #fff4d6; color: #c98a0a; box-shadow: 0 6px 14px rgba(201,138,10,.18); }
.np-type-card.np-type-quick-upload .np-type-icon svg { fill: currentColor; stroke: none; }
.np-type-card.np-type-track h3 { align-items: center; display: flex; gap: 6px; }
.np-type-card.np-type-track h3 .verified-badge { height: 14px; width: 14px; }
/* Full post-type name, never clipped — styles.css's older single-row
   layout truncated these with an ellipsis; explicitly undo that here
   since this (later-loaded) stylesheet is the one actually in effect. */
.np-type-card h3, .np-type-card p { overflow: visible; text-overflow: clip; white-space: normal; }
.np-type-card h3 { font-size: 15px; letter-spacing: -.02em; margin: 16px 0 6px; }
.np-type-card p { color: #7d859a; font-size: 10.5px; line-height: 1.6; margin: 0; }
/* A small "chevron" that slides in on hover — the same kind of subtle
   affordance big consumer apps use to make a static card read as
   tappable/clickable without adding a separate visible button. */
/* Wrapper for each type card + its (i) info button. The button itself
   stays a plain <button> (so tapping anywhere on the card still fires
   the card's own click handler); the info button is a sibling laid on
   top, so tapping it never also triggers navigation underneath it. */
.np-type-slot { position: relative; }
.np-type-slot .np-type-card { height: 100%; width: 100%; }
/* The hover chevron (::after, top-right) would sit right under the new
   info button — drop it here rather than have them collide. */
.np-type-slot .np-type-card::after { display: none; }
.np-type-info-btn.np-type-info-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 22px;
  height: 22px;
  font-size: 10px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 2px 6px rgba(28,35,61,.12);
}
.np-type-info-btn.np-type-info-btn:hover { background: #fff; }
body[data-theme="dark"] .np-type-info-btn.np-type-info-btn { background: rgba(0,0,0,.35); }
body[data-theme="dark"] .np-type-info-btn.np-type-info-btn:hover { background: rgba(0,0,0,.55); }
.np-type-card::after {
  color: #b9aeff;
  content: "→";
  font-size: 15px;
  font-weight: 800;
  opacity: 0;
  position: absolute;
  right: 20px;
  top: 22px;
  transform: translateX(-6px);
  transition: opacity .18s ease, transform .18s ease;
}
.np-type-card:hover::after { opacity: 1; transform: translateX(0); }
body[data-theme="dark"] .np-type-card { background: #161b22; border-color: rgba(255,255,255,.08); }
body[data-theme="dark"] .np-type-card:hover { border-color: rgba(139,123,255,.45); }
body[data-theme="dark"] .np-type-card p { color: #9099ac; }
body[data-theme="dark"] .np-type-card.np-type-quick-upload .np-type-icon { background: rgba(201,138,10,.18); }
/* Single-column, full-width rows on phones — same idea as YouTube's own
   "create" sheet, and gives titles/descriptions room instead of being
   squeezed into a half-width card. */
@media (max-width: 720px) { .np-type-choice { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------- */
/* Quick Upload — step progress dots                                      */
/* ---------------------------------------------------------------------- */
.qu-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 18px;
  max-width: 320px;
}
.qu-progress-dot {
  background: #e6e9f0;
  border-radius: 50px;
  flex: 1;
  height: 4px;
  transition: background .2s ease;
}
.qu-progress-dot.is-done { background: #8b7bff; }
.qu-progress-dot.is-active { background: linear-gradient(90deg, #6a5cf0, #8b5cf6); }
body[data-theme="dark"] .qu-progress-dot { background: rgba(255,255,255,.1); }

/* Quick Upload wizard cards */
.quick-upload-form .qu-step { margin-top: 14px; }
.quick-upload-form .qu-step:first-of-type { margin-top: 14px; }
#quStepIntro, #quStepUrl, #quStepPreviewLink { border-radius: 18px; }
#quStepIntro h3, #quStepUrl h3, #quStepPreviewLink h3 { font-size: 16px; margin: 0 0 8px; }
.qu-step label input {
  background: #f6f7fb;
  border: 1px solid #e6e9f0;
  border-radius: 12px;
  font-size: 12px;
  height: 46px;
  padding: 0 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}
.qu-step label input:focus { border-color: #7868e9; box-shadow: 0 0 0 3px rgba(120,104,233,.12); outline: 0; }
.qu-step .primary-button { margin-top: 14px; }
.qu-error { background: #fdedf0; border-radius: 10px; color: #b12f49; font-size: 10.5px; margin: 10px 0 0; padding: 10px 12px; }

/* Quick Upload — final preview card, styled like a real link-preview/
   social card so it's obvious this is exactly what people will see. */
.qu-final-preview { border-radius: 18px; overflow: hidden; padding: 0; }
.qu-preview-image { aspect-ratio: 1200 / 630; background: #f2f3f7; overflow: hidden; width: 100%; }
.qu-preview-image img { display: block; height: 100%; object-fit: cover; width: 100%; }
.qu-final-preview h3 { font-size: 16px; margin: 18px 20px 6px; }
.qu-final-preview .section-note { margin: 0 20px 10px; }
.qu-preview-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 20px 12px; }
.qu-preview-meta { border-top: 1px solid #f0f1f5; display: flex; flex-wrap: wrap; gap: 12px 16px; margin: 0 20px; padding: 12px 0 18px; }
.qu-preview-meta span { color: #565e70; font: 700 9.5px "DM Mono", monospace; }
.qu-final-actions { display: flex; gap: 10px; margin-top: 14px; }
body[data-theme="dark"] .qu-step label input { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.09); color: #e6edf3; }
body[data-theme="dark"] .qu-preview-image { background: rgba(255,255,255,.04); }
body[data-theme="dark"] .qu-preview-meta { border-color: rgba(255,255,255,.08); }

.np-back-to-type { background: none; color: #6656d9; font-size: 10.5px; font-weight: 800; margin-bottom: 14px; padding: 0; }

/* ---------------------------------------------------------------------- */
/* Upload a Project — 3-step wizard (+ a final "ready to post" screen)    */
/* ---------------------------------------------------------------------- */
.np-progress { display: flex; align-items: center; gap: 6px; margin: 2px 0 10px; max-width: 420px; }
.np-progress-dot { background: #e6e9f0; border-radius: 50px; flex: 1; height: 4px; transition: background .2s ease; }
.np-progress-dot.is-done { background: #8b7bff; }
.np-progress-dot.is-active { background: linear-gradient(90deg, #6a5cf0, #8b5cf6); }
body[data-theme="dark"] .np-progress-dot { background: rgba(255,255,255,.1); }
.np-step-label { color: #7d859a; font: 700 9.5px "DM Mono", monospace; letter-spacing: .02em; margin: 0 0 16px; text-transform: uppercase; }
body[data-theme="dark"] .np-step-label { color: #9099ac; }
.np-step { animation: npStepIn .16s ease; max-width: 640px; }
@keyframes npStepIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.np-step .np-card { margin-bottom: 14px; }
.np-step-actions { display: flex; gap: 10px; margin-top: 4px; }
.np-step-actions .primary-button, .np-step-actions .secondary-action { flex: 1; justify-content: center; }
.np-ready-card h3 { margin: 0 0 4px; }
.np-ready-card .section-note { margin: 0; }

/* ---------------------------------------------------------------------- */
/* Project / post form — nicer field focus states, tidier submit row      */
/* ---------------------------------------------------------------------- */
.np-card { border-radius: 16px; transition: box-shadow .15s ease; }
.np-card input, .np-card textarea { border-radius: 10px; transition: border-color .15s ease, box-shadow .15s ease; }
.np-submit { border-radius: 12px; font-weight: 800; letter-spacing: -.01em; }
.np-preview-thumb { border-radius: 14px; box-shadow: 0 10px 22px rgba(75,63,201,.28); }


/* ===================================================================== */
/* Create hub redesign — "What would you like to share?"                  */
/* Name-only tiles, one accent colour per post type, soft glow + motion.  */
/* The longer explanations live behind each tile's (i) button.            */
/* ===================================================================== */
.np-create-hub { position: relative; }
.np-create-hub::before {
  background: radial-gradient(closest-side, rgba(139,123,255,.22), rgba(139,123,255,0));
  content: ""; height: 340px; left: 50%; pointer-events: none; position: absolute; top: -90px;
  transform: translateX(-50%); width: min(560px, 120%); z-index: 0;
}
body[data-theme="dark"] .np-create-hub::before { background: radial-gradient(closest-side, rgba(139,123,255,.20), rgba(139,123,255,0)); }
.np-create-hub > * { position: relative; z-index: 1; }
.np-create-hub .feed-heading { align-items: flex-start; }
.np-create-hub .np-eyebrow {
  align-items: center; background: rgba(120,104,233,.12); border-radius: 999px; color: #6d5bd7; display: inline-flex;
  font-size: 10px; font-weight: 800; letter-spacing: .16em; margin-bottom: 10px; padding: 5px 11px;
}
body[data-theme="dark"] .np-create-hub .np-eyebrow { background: rgba(139,123,255,.18); color: #c3b9ff; }
.np-create-hub .feed-heading h1 { font-size: 24px; letter-spacing: -.035em; line-height: 1.15; margin: 0; }
.np-hero-sub { color: #7d859a; font-size: 12.5px; margin: 6px 0 0; }
body[data-theme="dark"] .np-hero-sub { color: #9aa4b8; }

.np-type-choice { gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 24px 0 8px; max-width: 680px; }
@media (max-width: 720px) { .np-type-choice { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
@media (max-width: 570px) { .np-type-choice { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.np-type-slot { animation: npCardIn .5s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
.np-type-slot:nth-child(1) { --i: 0; } .np-type-slot:nth-child(2) { --i: 1; } .np-type-slot:nth-child(3) { --i: 2; }
.np-type-slot:nth-child(4) { --i: 3; } .np-type-slot:nth-child(5) { --i: 4; } .np-type-slot:nth-child(6) { --i: 5; } .np-type-slot:nth-child(7) { --i: 6; }
@keyframes npCardIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

.np-type-card {
  --acc: 109, 91, 215;
  align-items: flex-start; background: linear-gradient(160deg, #ffffff 0%, rgba(var(--acc), .075) 100%);
  border: 1px solid rgba(var(--acc), .20); border-radius: 22px; box-shadow: 0 1px 2px rgba(28,35,61,.04), 0 10px 24px rgba(var(--acc), .07);
  display: flex; flex-direction: column; gap: 0; justify-content: space-between; min-height: 132px; overflow: hidden; padding: 16px 16px 15px;
  position: relative; text-align: left; transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease, border-color .22s ease;
}
.np-type-card::before {
  background: radial-gradient(circle at 100% 0%, rgba(var(--acc), .22), rgba(var(--acc), 0) 62%); content: ""; inset: 0;
  opacity: .55; pointer-events: none; position: absolute; transition: opacity .25s ease;
}
.np-type-card:hover { border-color: rgba(var(--acc), .5); box-shadow: 0 2px 4px rgba(28,35,61,.05), 0 18px 36px rgba(var(--acc), .18); transform: translateY(-3px); }
.np-type-card:hover::before { opacity: 1; }
.np-type-card:active { transform: translateY(-1px) scale(.985); }
.np-type-card:focus-visible { outline: 2px solid rgb(var(--acc)); outline-offset: 2px; }
.np-type-card > * { position: relative; }

.np-type-card .np-type-icon,
.np-type-card.np-type-quick-upload .np-type-icon, .np-type-card.np-type-sell .np-type-icon, .np-type-card.np-type-community .np-type-icon,
.np-type-card.np-type-poll .np-type-icon, .np-type-card.np-type-track .np-type-icon, .np-type-card.np-type-cut .np-type-icon {
  background: linear-gradient(135deg, rgb(var(--acc)), rgba(var(--acc), .72)); border-radius: 15px; box-shadow: 0 10px 20px rgba(var(--acc), .34), inset 0 1px 0 rgba(255,255,255,.35);
  color: #fff; height: 46px; width: 46px;
}
.np-type-card .np-type-icon svg { height: 22px; stroke-width: 1.9; width: 22px; }
.np-type-card:hover .np-type-icon { transform: scale(1.07) rotate(-3deg); }
.np-type-card.np-type-quick-upload .np-type-icon svg { fill: #fff; stroke: none; }

.np-type-card h3, .np-type-card.np-type-track h3 {
  align-items: center; color: #1c233d; display: flex; font-size: 14.5px; font-weight: 800; gap: 6px; letter-spacing: -.02em; line-height: 1.25; margin: 18px 0 0; padding-right: 22px;
}
body[data-theme="dark"] .np-type-card h3 { color: #eef0f6; }
.np-type-card .np-type-desc { display: none !important; }

/* arrow chip, bottom-right */
.np-type-slot .np-type-card::after {
  background: rgba(var(--acc), .12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d5bd7' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 13px no-repeat;
  border: 0; border-radius: 50%; bottom: 13px; color: transparent; content: ""; display: block; height: 26px; opacity: .85; position: absolute;
  right: 13px; top: auto; transform: none; transition: transform .22s ease, background-color .22s ease; width: 26px;
}
.np-type-card:hover::after { background-color: rgba(var(--acc), .22); transform: translateX(3px); }

/* one accent per type (R, G, B) */
.np-type-card.np-type-quick-upload { --acc: 217, 139, 10; }
.np-type-card.np-type-cut { --acc: 214, 76, 126; }
.np-type-card.np-type-sell { --acc: 224, 112, 58; }
.np-type-card.np-type-community { --acc: 24, 160, 120; }
.np-type-card.np-type-poll { --acc: 52, 104, 214; }
.np-type-card.np-type-track { --acc: 148, 72, 214; }

body[data-theme="dark"] .np-type-card {
  background: linear-gradient(160deg, #161b22 0%, rgba(var(--acc), .13) 100%); border-color: rgba(var(--acc), .28);
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 28px rgba(0,0,0,.28);
}
body[data-theme="dark"] .np-type-card:hover { border-color: rgba(var(--acc), .65); box-shadow: 0 18px 38px rgba(var(--acc), .22); }
body[data-theme="dark"] .np-type-card.np-type-quick-upload .np-type-icon { background: linear-gradient(135deg, rgb(var(--acc)), rgba(var(--acc), .72)); }

/* (i) button — quiet ghost chip in the corner */
.np-type-info-btn.np-type-info-btn {
  background: rgba(255,255,255,.7); border: 1px solid rgba(28,35,61,.1); box-shadow: none; color: #6b7390; height: 22px; right: 12px; top: 12px; width: 22px; z-index: 3;
}
.np-type-info-btn.np-type-info-btn:hover { background: #fff; color: #5b49cf; }
body[data-theme="dark"] .np-type-info-btn.np-type-info-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #aeb6ca; }
body[data-theme="dark"] .np-type-info-btn.np-type-info-btn:hover { background: rgba(255,255,255,.16); color: #fff; }

/* locked (e.g. Sell until enough connections) — dimmed with a small lock */
.np-type-card.is-locked { filter: saturate(.45); opacity: .78; }
.np-type-card.is-locked h3::after {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d859a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2.5'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
  content: ""; display: inline-block; flex: 0 0 auto; height: 13px; width: 13px;
}

@media (prefers-reduced-motion: reduce) { .np-type-slot { animation: none; } .np-type-card, .np-type-card:hover { transition: none; transform: none; } }

/* Specificity guard: cuts.css (loaded later) and the dark-mode rules in styles.css
   tint these icons per type — the hub's own gradient icons must win in both themes. */
.np-create-hub .np-type-choice .np-type-card .np-type-icon,
body[data-theme="dark"] .np-create-hub .np-type-choice .np-type-card .np-type-icon {
  background: linear-gradient(135deg, rgb(var(--acc)), rgba(var(--acc), .72));
  box-shadow: 0 10px 20px rgba(var(--acc), .34), inset 0 1px 0 rgba(255,255,255,.35);
  color: #fff;
}
