/* ============================================================
   GRIT — Create Page (full redesign)
   create.css
   ============================================================ */

.create-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px 120px;
}

/* =============================================
   HERO HEADER
   ============================================= */
.create-hero {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin: 32px 0 36px;
  padding: 44px 52px;
}
.create-hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 55% 100% at 10% 50%, rgba(124,124,255,0.18) 0%, transparent 65%),
    radial-gradient(ellipse 45% 80% at 90% 20%, rgba(93,202,165,0.1) 0%, transparent 60%),
    linear-gradient(135deg, rgba(5,6,15,0.98) 0%, rgba(10,12,24,0.95) 100%);
}
.create-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(124,124,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,124,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
}
.create-hero-content {
  position: relative; z-index: 1;
  display: flex; align-items: center;
  justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.create-hero-text {}
.create-hero-back {
  display: inline-flex; align-items: center; gap: 7px;
  color: rgba(255,255,255,0.4); font-size: 13px; font-weight: 500;
  text-decoration: none; margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.07);
  padding: 5px 13px; border-radius: 99px;
  background: rgba(255,255,255,0.03);
  transition: all 0.18s;
}
.create-hero-back:hover { color: #fff; border-color: rgba(255,255,255,0.14); }

.create-hero-text h1 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 48px; font-weight: 700; letter-spacing: 0.3px;
  background: linear-gradient(135deg, #fff 30%, #a89bff 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 10px; line-height: 1.05;
}
.create-hero-text p { font-size: 15px; color: var(--text-muted); max-width: 420px; line-height: 1.6; }

/* Step bubbles in hero */
.create-steps-strip {
  display: flex; align-items: center; gap: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  backdrop-filter: blur(12px);
}
.create-step-bubble {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 0 18px;
}
.create-step-bubble:first-child { padding-left: 0; }
.create-step-bubble:last-child  { padding-right: 0; }
.csb-num {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px; font-weight: 700;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  transition: all 0.2s;
}
.csb-label { font-size: 11px; color: var(--text-hint); font-weight: 500; white-space: nowrap; }
.create-step-bubble.active .csb-num {
  background: linear-gradient(135deg, var(--purple), #5a5aff);
  border-color: var(--purple); color: #fff;
  box-shadow: 0 0 16px var(--purple-glow);
}
.create-step-bubble.active .csb-label { color: var(--purple); }
.create-step-bubble.done .csb-num {
  background: rgba(93,202,165,0.15); border-color: rgba(93,202,165,0.35); color: var(--teal);
}
.create-step-connector {
  width: 32px; height: 1px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}

/* =============================================
   LAYOUT
   ============================================= */
.create-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

/* =============================================
   EDITOR CARDS
   ============================================= */
.create-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 30px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  transition: border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.create-card:focus-within { border-color: rgba(124,124,255,0.2); }

/* Numbered step label */
.step-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--purple); margin-bottom: 20px;
}
.step-num-badge {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--purple-dim); border: 1px solid var(--border-lit);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--purple);
  flex-shrink: 0;
}

.step-label-row {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 10px;
}
.step-hint {
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 20px; line-height: 1.6;
}
.step-optional {
  font-size: 10px; color: var(--text-hint);
  font-weight: 400; text-transform: none;
  letter-spacing: 0; margin-left: 6px;
  background: rgba(255,255,255,0.05);
  padding: 2px 7px; border-radius: 99px;
  border: 1px solid rgba(255,255,255,0.08);
}

/* =============================================
   TYPE TOGGLE — redesigned
   ============================================= */
.type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.type-btn {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  padding: 26px 20px;
  background: rgba(255,255,255,0.03);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  cursor: pointer; transition: all 0.2s ease;
  font-family: inherit; position: relative; overflow: hidden;
}
.type-btn:hover {
  border-color: var(--border-lit);
  background: rgba(255,255,255,0.055);
  transform: translateY(-2px);
}
.type-btn.active {
  border-color: var(--purple);
  background: linear-gradient(135deg, rgba(124,124,255,0.1), rgba(90,90,255,0.06));
  box-shadow: 0 0 0 1px rgba(124,124,255,0.2), 0 8px 32px rgba(124,124,255,0.15);
}
.type-btn.active::after {
  content: '✓';
  position: absolute; top: 12px; right: 14px;
  font-size: 12px; font-weight: 700;
  color: var(--purple);
  background: var(--purple-dim); border: 1px solid var(--border-lit);
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.type-icon { font-size: 32px; line-height: 1; }
.type-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 20px; font-weight: 700; color: var(--text);
}
.type-desc { font-size: 12px; color: var(--text-muted); text-align: center; line-height: 1.4; }

/* =============================================
   FIELDS
   ============================================= */
.field-group { margin-bottom: 20px; }
.field-group:last-child { margin-bottom: 0; }

.field-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.07em;
}
.field-hint { font-size: 11px; font-weight: 400; color: var(--text-hint); text-transform: none; letter-spacing: 0; }

.field-input, .select-wrap select {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-md);
  color: var(--text); font-size: 14px; font-family: inherit;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.field-input:focus, .select-wrap select:focus {
  background: rgba(10,12,22,0.9);
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-dim);
}
.field-input::placeholder { color: var(--text-hint); }

.select-wrap { position: relative; }
.select-wrap::after {
  content: '';
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 5px solid var(--text-muted);
  pointer-events: none;
}
.select-wrap select {
  appearance: none; cursor: pointer; padding-right: 36px;
}
.select-wrap select option { background: #0d0f1c; color: var(--text); }

.char-counter { text-align: right; font-size: 11px; color: var(--text-hint); margin-top: 5px; }

/* =============================================
   THUMBNAIL UPLOAD
   ============================================= */
.thumb-upload-area {
  border: 2px dashed rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  overflow: hidden; min-height: 140px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.18s, background 0.18s;
  cursor: pointer;
}
.thumb-upload-area:hover,
.thumb-upload-area.drag-over {
  border-color: var(--purple);
  background: var(--purple-dim);
}
.thumb-placeholder {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  padding: 36px 24px; width: 100%; text-align: center;
}
.thumb-upload-icon { font-size: 32px; }
.thumb-upload-text { font-size: 14px; color: var(--text-muted); }
.thumb-browse { color: var(--purple); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.thumb-upload-hint { font-size: 12px; color: var(--text-hint); }
.thumb-preview-wrap { position: relative; width: 100%; }
.thumb-preview-wrap img { width: 100%; height: 200px; object-fit: cover; display: block; }
.thumb-remove-btn {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.75); border: 1px solid rgba(255,255,255,0.2);
  color: #fff; border-radius: var(--radius-sm);
  padding: 6px 12px; font-size: 12px; font-weight: 600;
  font-family: inherit; cursor: pointer; backdrop-filter: blur(4px);
  transition: all 0.18s;
}
.thumb-remove-btn:hover { background: rgba(255,92,92,0.8); border-color: transparent; }
.thumb-uploading {
  display: flex; align-items: center; gap: 12px;
  padding: 36px; color: var(--text-muted); font-size: 14px;
}
.thumb-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border-md); border-top-color: var(--purple);
  border-radius: 50%; animation: spin 0.7s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.thumb-error {
  padding: 10px 16px; background: rgba(255,92,92,0.1);
  border-top: 1px solid rgba(255,92,92,0.25); color: #ff8a8a;
  font-size: 12px; width: 100%; text-align: center;
}
.preview-thumb-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: brightness(0.75);
}
.preview-thumb { overflow: hidden; position: relative; }

/* =============================================
   VIDEO
   ============================================= */
.video-or-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0; font-size: 11px; color: var(--text-hint);
}
.video-or-divider::before, .video-or-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.video-upload-area {
  border: 2px dashed rgba(255,255,255,0.1);
  border-radius: var(--radius-lg); overflow: hidden; min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.18s, background 0.18s; cursor: pointer;
}
.video-upload-area:hover { border-color: var(--purple); background: var(--purple-dim); }
.video-placeholder {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  padding: 24px; text-align: center; width: 100%;
}
.video-upload-icon { font-size: 26px; }
.video-file-chosen {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px; width: 100%;
  font-size: 13px; color: var(--teal); font-weight: 500;
}
.video-file-icon { font-size: 18px; }

/* =============================================
   SECTIONS
   ============================================= */
.sections-list { display: flex; flex-direction: column; gap: 12px; }

.section-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease, border-color 0.18s;
}
.section-item.visible { opacity: 1; transform: translateY(0); }
.section-item.removing { opacity: 0; transform: translateY(-8px); }
.section-item:focus-within { border-color: rgba(124,124,255,0.25); }

.section-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.section-drag-handle {
  color: var(--text-hint); font-size: 14px; cursor: grab;
  flex-shrink: 0; user-select: none; letter-spacing: 1px;
}
.section-title-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 14px; font-weight: 600;
  font-family: 'Rajdhani', sans-serif; letter-spacing: 0.3px;
}
.section-title-input::placeholder { color: var(--text-hint); font-weight: 500; }
.section-remove-btn {
  background: none; border: none; color: var(--text-hint);
  font-size: 13px; cursor: pointer; padding: 4px 8px;
  border-radius: 6px; transition: all 0.15s; flex-shrink: 0;
}
.section-remove-btn:hover { color: var(--red); background: rgba(255,92,92,0.1); }
.section-body-input {
  display: block; width: 100%; padding: 16px 18px;
  background: none; border: none; outline: none;
  color: rgba(230,232,240,0.88); font-size: 14px;
  font-family: inherit; line-height: 1.75; resize: vertical; min-height: 120px;
}
.section-body-input::placeholder { color: var(--text-hint); }
.section-char-hint {
  padding: 8px 16px; font-size: 11px; color: var(--text-hint);
  border-top: 1px solid var(--border); background: rgba(255,255,255,0.01);
}

/* Add section button */
.add-section-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  background: var(--purple-dim); border: 1px solid var(--border-lit);
  border-radius: var(--radius-md); color: var(--purple);
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all 0.18s;
}
.add-section-btn:hover { background: rgba(124,124,255,0.22); border-color: var(--purple); color: #fff; }

/* =============================================
   SUBMIT ROW
   ============================================= */
.create-actions {
  display: flex; align-items: center;
  gap: 12px; justify-content: flex-end; flex-wrap: wrap;
  margin-top: 8px;
}
.create-error {
  flex: 1; background: rgba(255,92,92,0.1);
  border: 1px solid rgba(255,92,92,0.28);
  border-radius: var(--radius-md); color: #ff8a8a;
  font-size: 13px; padding: 10px 16px;
  animation: shake 0.3s ease;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-5px); }
  75%      { transform: translateX(5px); }
}
.create-cancel-btn {
  padding: 12px 22px; background: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md); color: var(--text-muted);
  font-size: 14px; font-family: inherit; cursor: pointer; transition: all 0.18s;
}
.create-cancel-btn:hover { border-color: rgba(255,255,255,0.2); color: var(--text); }
.create-submit-btn {
  padding: 13px 36px;
  background: linear-gradient(135deg, var(--purple), #5a5aff);
  border: none; border-radius: var(--radius-md);
  color: #fff; font-size: 15px; font-weight: 700;
  font-family: 'Rajdhani', sans-serif; letter-spacing: 0.05em;
  cursor: pointer; transition: all 0.2s;
  box-shadow: 0 4px 20px var(--purple-glow);
  display: flex; align-items: center; gap: 8px;
}
.create-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 32px var(--purple-glow); }
.create-submit-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* =============================================
   RIGHT: LIVE PREVIEW
   ============================================= */
.create-preview {
  position: sticky;
  top: calc(var(--navbar-h) + 24px);
  display: flex; flex-direction: column; gap: 16px;
}

.preview-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}
.preview-label::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal); box-shadow: 0 0 6px var(--teal);
  animation: livePulse 2s infinite;
}
@keyframes livePulse {
  0%,100% { box-shadow: 0 0 4px rgba(93,202,165,0.5); }
  50%      { box-shadow: 0 0 10px rgba(93,202,165,0.9); }
}

/* Preview card — matches explore card quality */
.preview-card {
  position: relative;
  height: 280px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.preview-card:hover { border-color: rgba(124,124,255,0.3); }

.preview-thumb {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 64px; transition: background 0.3s ease;
}
.thumb-guide { background: linear-gradient(135deg, rgba(93,202,165,0.12), rgba(5,6,15,0.9)); }
.thumb-build { background: linear-gradient(135deg, rgba(124,124,255,0.15), rgba(5,6,15,0.9)); }

.preview-overlay {
  position: absolute; inset: 0;
  padding: 18px 20px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(to top, rgba(5,6,15,0.97) 0%, rgba(5,6,15,0.4) 55%, transparent 100%);
}
.preview-type-badge {
  position: absolute; top: 14px; right: 14px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; padding: 4px 11px;
  border-radius: 99px; border: 1px solid;
}
.badge-guide { background: rgba(93,202,165,0.16); color: var(--teal);  border-color: rgba(93,202,165,0.28); }
.badge-build { background: rgba(124,124,255,0.16); color: #a89bff;     border-color: rgba(124,124,255,0.28); }

.preview-game {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--violet); margin-bottom: 7px;
}
.preview-title {
  font-family: 'Rajdhani', sans-serif; font-size: 20px; font-weight: 700;
  color: #fff; margin-bottom: 4px; line-height: 1.2; min-height: 24px;
}
.preview-desc {
  font-size: 12px; color: rgba(255,255,255,0.5);
  margin-bottom: 10px; line-height: 1.5; min-height: 16px;
}
.preview-meta {
  display: flex; gap: 12px; font-size: 12px; color: rgba(255,255,255,0.45);
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 10px;
}

/* ── Tips box ─────────────────────────────────────────────── */
.tips-box {
  background: var(--bg-card); border: 1px solid var(--border-lit);
  border-radius: var(--radius-xl); padding: 20px 22px;
  backdrop-filter: blur(10px);
}
.tips-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--purple); margin-bottom: 14px;
  display: flex; align-items: center; gap: 7px;
}
.tips-list { padding-left: 0; display: flex; flex-direction: column; gap: 10px; list-style: none; }
.tips-list li {
  font-size: 13px; color: var(--text-muted); line-height: 1.55;
  padding-left: 18px; position: relative;
}
.tips-list li::before {
  content: '→'; position: absolute; left: 0;
  color: var(--purple); font-size: 11px;
}

/* ── Toast ────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: rgba(10,12,22,0.98); border: 1px solid var(--border-lit);
  color: var(--text); padding: 12px 28px; border-radius: 99px;
  font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease; backdrop-filter: blur(16px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.6); white-space: nowrap; z-index: 999;
}
.toast.show { opacity: 1; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 960px) {
  .create-layout { grid-template-columns: 1fr; }
  .create-preview { position: static; }
  .create-hero { padding: 32px 28px; }
  .create-steps-strip { display: none; }
}
@media (max-width: 600px) {
  .type-toggle { grid-template-columns: 1fr; }
  .create-hero-text h1 { font-size: 34px; }
  .create-page { padding: 0 16px 80px; }
}
