/* =========================
   RESET (important)
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

/* =========================
   AUTH PAGE BACKGROUND
========================= */

.auth-page {
  min-height: 100vh;
  width: 100%;
  background: radial-gradient(
      circle at top left,
      #6f3bf5,
      #2a1d55 45%,
      #0e0b1f 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* =========================
   CONTAINER (DESKTOP SPLIT)
========================= */

.auth-container {
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

/* =========================
   LEFT: FORM CARD
========================= */

.auth-main {
  width: 100%;
  max-width: 420px;
  margin-left: auto;
}

.auth-main > * {
  color: #1c1c1c;
}

/* Glass Card */
.auth-main {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* =========================
   HEADER
========================= */

.auth-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #111;
}

.auth-header p {
  font-size: 15px;
  color: #444;
  margin-bottom: 28px;
}

/* =========================
   FORM
========================= */

.auth-form {
  width: 100%;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #222;
}

.form-group input {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 10px;
  border: none;
  outline: none;
  background: rgba(255, 255, 255, 0.95);
  color: #111;
}

.form-group input::placeholder {
  color: #999;
}

.form-group input:focus {
  box-shadow: 0 0 0 2px rgba(111, 59, 245, 0.35);
}

/* =========================
   BUTTON
========================= */

.form-actions {
  margin-top: 24px;
}

.form-actions button {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(
    135deg,
    #8b5cf6,
    #6f3bf5
  );
  box-shadow: 0 10px 25px rgba(111, 59, 245, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.form-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(111, 59, 245, 0.55);
}

/* =========================
   FOOTER
========================= */

.auth-footer {
  margin-top: 22px;
  font-size: 14px;
  color: #333;
}

.auth-footer a {
  color: #6f3bf5;
  font-weight: 500;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* =========================
   ERROR BOX
========================= */

.auth-errors {
  background: rgba(255, 230, 230, 0.9);
  border: 1px solid #f5b7b7;
  color: #9b1c1c;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 18px;
}

/* =========================
   RIGHT SIDE CONTENT
========================= */

.auth-side {
  color: #fff;
}

.auth-side-content h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 14px;
}

.auth-side-content p {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  max-width: 420px;
}

/* =========================
   MOBILE FIXES
========================= */

@media (max-width: 1024px) {
  .auth-container {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .auth-side {
    display: none;
  }

  .auth-main {
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .auth-page {
    padding: 16px;
  }

  .auth-main {
    padding: 28px 22px;
  }

  .auth-header h1 {
    font-size: 24px;
  }
}


/* =========================
   AUTH TEXT COLOR FIX
========================= */

/* Headings */
.auth-header h1 {
  color: #0f0f14; /* deep near-black, premium */
}

/* Subtitle */
.auth-header p {
  color: rgba(15, 15, 20, 0.7);
}

/* Form labels */
.form-group label {
  color: rgba(15, 15, 20, 0.85);
}

/* Footer text */
.auth-footer {
  color: rgba(15, 15, 20, 0.75);
}

/* Footer link */
.auth-footer a {
  color: #6f3bf5; /* violet accent */
}

/* Right side (dark background text stays white) */
.auth-side-content h2 {
  color: #ffffff;
}

.auth-side-content p {
  color: rgba(255, 255, 255, 0.85);
}


/* =========================
   AUTH TEXT COLORS (FINAL)
========================= */

/* Main heading */
.auth-header h1 {
  color: #f5f3ff; /* soft off-white */
}

/* Subtitle */
.auth-header p {
  color: rgba(245, 243, 255, 0.75);
}

/* Form labels */
.auth-form label {
  color: rgba(245, 243, 255, 0.85);
}

/* Input text */
.auth-form input {
  color: #1a1a1a;
}

/* Input placeholder */
.auth-form input::placeholder {
  color: #9ca3af;
}

/* Footer text */
.auth-footer {
  color: rgba(245, 243, 255, 0.75);
}

/* Footer link */
.auth-footer a {
  color: #c4b5fd;
  text-decoration: none;
}

.auth-footer a:hover {
  color: #ddd6fe;
  text-decoration: underline;
}



/* Right-side text */
.auth-side-content h2 {
  color: #f8f7ff;
}

.auth-side-content p {
  color: rgba(248, 247, 255, 0.8);
}




/* =========================
   MIDNIGHT DASHBOARD THEME
========================= */

body {
  background: #0F1115;
  color: #F5F7FA;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* =========================
   HEADER
========================= */

.dashboard-header {
  background: #171A21;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dashboard-logo {
  font-size: 20px;
  font-weight: 600;
  color: #F5F7FA;
}

.dashboard-user {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: #A8B0C2;
}

.dashboard-user button {
  background: #5B8CFF;
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.dashboard-user button:hover {
  background: #4A7BFF;
}

/* =========================
   PAGE LAYOUT
========================= */

.dashboard-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   CARDS
========================= */

.dashboard-card {
  background: #171A21;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 28px;
}

.dashboard-card h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}

.dashboard-card p {
  font-size: 14px;
  color: #A8B0C2;
  margin-bottom: 20px;
}

/* =========================
   PRIMARY ACTION
========================= */

.primary-action {
  display: inline-block;
  background: #5B8CFF;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.primary-action:hover {
  background: #4A7BFF;
}

/* =========================
   SECONDARY / INFO CARD
========================= */

.info-card {
  background: #1E2230;
  border-radius: 18px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.06);
}

.info-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.info-card p {
  font-size: 14px;
  color: #A8B0C2;
}

/* =========================
   UTILITY
========================= */

.muted {
  color: #7B8194;
}
/* =========================
   MIDNIGHT BASE
========================= */

body {
  background: radial-gradient(circle at top, #0f172a, #020617);
  color: #e5e7eb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont;
}

/* =========================
   HEADER (FIXED)
========================= */

.app-header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  z-index: 1000;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.4px;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: #cbd5f5;
  text-decoration: none;
  font-size: 14px;
}

.nav-links a.active,
.nav-links a:hover {
  color: #ffffff;
}

/* =========================
   HAMBURGER
========================= */

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* =========================
   MOBILE MENU
========================= */

.mobile-menu {
  position: fixed;
  top: 64px;
  right: -100%;
  width: 75%;
  height: calc(100vh - 64px);
  background: #020617;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: right 0.35s ease;
  z-index: 999;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu a {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 16px;
}

/* =========================
   DASHBOARD CONTENT
========================= */

.dashboard-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 20px 80px;
}

.welcome h1 {
  font-size: 32px;
  margin-bottom: 8px;
}

.welcome p {
  color: #94a3b8;
}

/* =========================
   TOKENS CARD
========================= */

.tokens-card {
  margin-top: 32px;
  background: linear-gradient(180deg, #020617, #020617cc);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.token-info {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.token-count {
  font-size: 28px;
  font-weight: 600;
}

.token-label {
  color: #94a3b8;
}

.btn-outline {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid #475569;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 14px;
}

/* =========================
   PRIMARY ACTION
========================= */

.primary-actions {
  margin: 32px 0;
}

.btn-primary {
  background: linear-gradient(135deg, #334155, #475569);
  color: #fff;
  padding: 14px 26px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
}

.btn-primary:hover {
  opacity: 0.9;
}

/* =========================
   GIFTS
========================= */

.gifts h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

.muted {
  color: #94a3b8;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: block;
  }
}
/* =========================
   CRAFTSPACE BASE
========================= */

.craftspace-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 120px 20px 100px;
}

/* =========================
   TOP BAR
========================= */

.craftspace-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.gift-info h1 {
  font-size: 24px;
  margin-bottom: 4px;
}

.status {
  font-size: 13px;
  color: #94a3b8;
}

.gift-actions {
  display: flex;
  gap: 12px;
}

.btn-secondary {
  background: transparent;
  border: 1px solid #475569;
  color: #e5e7eb;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #334155, #475569);
  border: none;
  color: #fff;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
}

/* =========================
   WORKSPACE
========================= */

.craftspace-workspace {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
}

/* =========================
   SIDEBAR
========================= */

.craftspace-sidebar {
  background: linear-gradient(180deg, #020617, #020617cc);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 20px;
}

.craftspace-sidebar h3 {
  font-size: 16px;
  margin-bottom: 16px;
}

.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.step-list li {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  color: #cbd5f5;
  cursor: pointer;
}

.step-list li:hover {
  background: rgba(255,255,255,0.05);
}

.step-list li.active {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* =========================
   CANVAS
========================= */

.craftspace-canvas {
  background: radial-gradient(circle at top, #020617, #020617dd);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.canvas-placeholder {
  text-align: center;
  color: #94a3b8;
}

.canvas-placeholder p {
  font-size: 16px;
  margin-bottom: 6px;
}

.canvas-placeholder span {
  font-size: 13px;
}

/* =========================
   MOBILE ACTION BAR
========================= */

.mobile-action-bar {
  display: none;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
  .craftspace-workspace {
    grid-template-columns: 1fr;
  }

  .craftspace-sidebar {
    display: none;
  }

  .mobile-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #020617;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-around;
    padding: 12px 10px;
    z-index: 1000;
  }

  .mobile-action-bar button {
    background: transparent;
    border: none;
    color: #cbd5f5;
    font-size: 14px;
  }

  .mobile-action-bar button.primary {
    background: linear-gradient(135deg, #334155, #475569);
    padding: 10px 18px;
    border-radius: 10px;
    color: #fff;
  }
}
/* ===== Craftspace Layout ===== */

.craftspace {
  padding: 120px 6%;
  min-height: 100vh;
  background: radial-gradient(
    circle at top,
    #0f172a,
    #020617 70%
  );
  color: #e5e7eb;
}

/* Header */
.craftspace-header {
  max-width: 1200px;
  margin-bottom: 48px;
}

.craftspace-header h1 {
  font-size: 2.4rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.craftspace-header p {
  color: #94a3b8;
  font-size: 1rem;
}

/* Grid */
.craftspace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  max-width: 1200px;
}

/* ===== Template Card ===== */

.template-card {
  background: linear-gradient(
    180deg,
    rgba(30, 41, 59, 0.9),
    rgba(15, 23, 42, 0.9)
  );
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  transition: transform .25s ease, box-shadow .25s ease;
}

.template-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

/* Preview */
.template-preview {
  height: 160px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e293b, #020617);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

/* Badge */
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #6366f1;
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
}

/* Content */
.template-content h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.template-content p {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* Actions */
.template-actions {
  margin-top: auto;
  display: flex;
  gap: 12px;
}

/* Buttons */
.btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: center;
  transition: all .2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  border: 1px solid rgba(148,163,184,0.3);
  color: #e5e7eb;
}

.btn-secondary:hover {
  background: rgba(148,163,184,0.1);
}

/* Locked State */
.template-card.locked {
  opacity: 0.6;
}

.blurred {
  filter: blur(6px);
}

.btn-disabled {
  background: #020617;
  border: 1px dashed rgba(148,163,184,0.3);
  color: #64748b;
  cursor: not-allowed;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .craftspace {
    padding: 96px 5%;
  }

  .template-actions {
    flex-direction: column;
  }
}


.home-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #111827, #020617);
  color: #fff;
  text-align: center;
}

.home-inner {
  max-width: 720px;
  padding: 40px;
}

.home-inner h1 {
  font-size: 42px;
  margin-bottom: 16px;
}

.home-inner p {
  opacity: 0.8;
  margin-bottom: 32px;
}

.home-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.btn-primary {
  background: #6366f1;
  padding: 14px 26px;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
}

.btn-secondary {
  border: 1px solid rgba(255,255,255,0.3);
  padding: 14px 26px;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
}
/* Header logo fix */
.site-header .logo,
.site-header .logo a,
.site-header a.logo {
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 600;
}

.site-header .logo a:hover {
  text-decoration: none !important;
  color: #ffffff;
}
/* HEADER BASE */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1200px;
  margin: auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.desktop-nav a {
  margin-left: 24px;
  color: #fff;
  text-decoration: none;
}

/* HAMBURGER */
.hamburger {
  display: none;
  width: 32px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1100;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  margin: 6px 0;
  transition: 0.4s;
}

/* MOBILE MENU */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: radial-gradient(circle at top, #111827, #020617);
  padding: 80px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: right 0.4s ease;
  z-index: 1050;
}

.mobile-menu a {
  color: #fff;
  font-size: 18px;
  text-decoration: none;
}

/* OPEN STATE */
.mobile-menu.open {
  right: 0;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .hamburger {
    display: block;
  }
}
/* =========================
   HEADER BASE
========================= */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
}

.logo {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

/* =========================
   DESKTOP NAV
========================= */
.desktop-nav {
  display: flex;
  gap: 24px;
}

.desktop-nav a {
  color: #c7d2fe;
  text-decoration: none;
}

/* =========================
   HAMBURGER
========================= */
.menu-toggle {
  display: none;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  position: relative;
  z-index: 1201;
}

.menu-toggle span {
  position: absolute;
  width: 100%;
  height: 2px;
  background: white;
  left: 0;
  transition: 0.3s;
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 9px; }
.menu-toggle span:nth-child(3) { top: 18px; }

/* X STATE */
.menu-open .menu-toggle span:nth-child(1) {
  transform: rotate(45deg);
  top: 9px;
}
.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}
.menu-open .menu-toggle span:nth-child(3) {
  transform: rotate(-45deg);
  top: 9px;
}

/* =========================
   MOBILE MENU
========================= */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 75%;
  height: 100vh;
  background: #020617;
  padding: 100px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: right 0.35s ease;
  z-index: 1200;
}

.mobile-menu a {
  color: white;
  font-size: 18px;
  text-decoration: none;
}

/* OPEN */
.menu-open .mobile-menu {
  right: 0;
}

/* =========================
   BACKDROP
========================= */
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  z-index: 1100;
}

.menu-open .menu-backdrop {
  opacity: 1;
  pointer-events: auto;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
}
/* HEADER */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(to bottom, #020617, #020617cc);
  backdrop-filter: blur(10px);
}

.header-inner {
  max-width: 1200px;
  margin: auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* LOGO */
.site-logo {
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}

/* DESKTOP NAV */
.nav-desktop {
  display: flex;
  gap: 28px;
}

.nav-desktop a {
  color: #c7d2fe;
  text-decoration: none;
}

.nav-desktop a:hover {
  color: #fff;
}

/* HAMBURGER */
.menu-toggle {
  display: none;
  width: 26px;
  height: 18px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1101;
}

.menu-toggle span {
  position: absolute;
  height: 2px;
  width: 100%;
  background: #fff;
  left: 0;
  transition: .3s;
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 8px; }
.menu-toggle span:nth-child(3) { bottom: 0; }

/* X STATE */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 8px;
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg);
  bottom: 8px;
}

/* MOBILE MENU */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 75%;
  height: 100vh;
  background: #020617;
  z-index: 1100;
  padding: 100px 32px;
  transition: right .35s ease;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu nav a {
  display: block;
  color: #fff;
  font-size: 18px;
  margin-bottom: 24px;
  text-decoration: none;
}

/* BACKDROP */
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: .3s;
  z-index: 1050;
}

.menu-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

/* MOBILE ONLY */
@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
}
/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #020617, #020617cc);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1200px;
  margin: auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}

/* Desktop nav */
.nav-desktop a {
  margin-left: 24px;
  color: #cbd5f5;
  text-decoration: none;
}

.nav-desktop a:hover {
  color: #fff;
}

/* ===== HAMBURGER ===== */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1101;
}

.menu-toggle span {
  width: 26px;
  height: 2px;
  background: #fff;
}

/* ===== MOBILE MENU ===== */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1090;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: #020617;
  padding: 80px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: right 0.35s ease;
  z-index: 1100;
}

.mobile-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
}

/* CLOSE BUTTON (THE FIX 🔥) */
.menu-close {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 26px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  z-index: 1200;
}

/* ACTIVE STATES */
.menu-open .mobile-menu {
  right: 0;
}

.menu-open .menu-overlay {
  opacity: 1;
  pointer-events: all;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }
}
/* ===============================
   Craftspace Layout Fix
================================ */

.craftspace {
  min-height: calc(100vh - 80px); /* header height safe */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Center header section */
.craftspace-header {
  text-align: center;
  margin: 80px 0 60px;
}

.craftspace-header h1 {
  font-size: 48px;
  margin-bottom: 12px;
}

.craftspace-header p {
  opacity: 0.8;
  font-size: 16px;
}

/* Mobile adjustments */
@media (max-width: 768px) {

  .craftspace-header {
    margin: 40px 20px 40px;
  }

  .craftspace-header h1 {
    font-size: 36px;
  }

  .craftspace-header p {
    font-size: 15px;
  }

  .craftspace-grid {
    width: 100%;
    padding: 0 16px;
  }
}
/* Tighten spacing between header and craftspace */

.craftspace {
  min-height: unset;          /* remove forced full height */
  padding-top: 40px;          /* controlled spacing */
}

.craftspace-header {
  margin: 0 0 48px;           /* remove huge top gap */
  text-align: center;
}

/* Mobile */
@media (max-width: 768px) {
  .craftspace {
    padding-top: 24px;
  }

  .craftspace-header {
    margin-bottom: 32px;
  }
}
.template-preview {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}

.template-preview img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

/* Mobile */
@media (max-width: 768px) {
  .template-preview img {
    height: 160px;
  }
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #6366f1;
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
}






/* Preview image base */
.template-preview {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.template-preview img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: filter 0.3s ease, transform 0.3s ease;
}

/* LOCKED STATE */
.template-card.locked {
  opacity: 0.6;
  pointer-events: none;
}

.template-card.locked .template-preview img {
  filter: blur(6px) brightness(0.7);
  transform: scale(1.05);
}

/* Optional soft overlay for locked card */
.template-card.locked .template-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 30, 0.4);
}



.theme-picker {
  position: relative;
}

.theme-picker-btn {
  width: 100%;
  background: #fff;
  color: #000;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.theme-dropdown {
  position: absolute;
  width: 100%;
  top: calc(100% + 8px);
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  display: none;
  z-index: 50;
}

.theme-picker.open .theme-dropdown {
  display: block;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}

.theme-option:hover {
  background: #f3f4f6;
}

.theme-option .check {
  margin-left: auto;
  opacity: 0;
}

.theme-option.active .check {
  opacity: 1;
}

/* dots */
.theme-dots {
  display: flex;
  gap: 3px;
}

.theme-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* palettes */
.theme-dots.love i:nth-child(1){background:#ffd1dc}
.theme-dots.love i:nth-child(2){background:#ff7aa2}
.theme-dots.love i:nth-child(3){background:#ff3d7f}

.theme-dots.midnight i:nth-child(1){background:#020617}
.theme-dots.midnight i:nth-child(2){background:#111827}
.theme-dots.midnight i:nth-child(3){background:#1f2937}

.theme-dots.earth i:nth-child(1){background:#7c6f57}
.theme-dots.earth i:nth-child(2){background:#a99a7d}
.theme-dots.earth i:nth-child(3){background:#d6c7a1}

.theme-dots.lavender i:nth-child(1){background:#e6ddff}
.theme-dots.lavender i:nth-child(2){background:#c7b7e2}
.theme-dots.lavender i:nth-child(3){background:#a78bfa}

.theme-dots.emerald i:nth-child(1){background:#065f46}
.theme-dots.emerald i:nth-child(2){background:#10b981}
.theme-dots.emerald i:nth-child(3){background:#34d399}

/* Theme dropdown – force readable text */
.theme-option,
.theme-select option {
  color: #111827; /* dark slate */
  background: #ffffff;
}


/* ----------------------------------
   MOBILE BAR — HIDDEN BY DEFAULT
-----------------------------------*/
.mobile-bar {
  display: none; /* 🔥 hides it on desktop */
}

/* ----------------------------------
   MOBILE ONLY
-----------------------------------*/
@media (max-width: 768px) {
  .mobile-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(2, 6, 23, 0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 9999;
  }

  .mobile-tab {
    flex: 1;
    text-align: center;
    padding: 10px 4px;
    color: #e5e7eb;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
  }

  .mobile-tab.active {
    color: #818cf8;
  }
}

/* ----------------------------------
   HARD DESKTOP KILL SWITCH (SAFETY)
-----------------------------------*/
@media (min-width: 769px) {
  .mobile-bar {
    display: none !important;
  }
}
.preview-link {
  display: inline-block;
  margin: 14px 0;
  color: #a5b4fc;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s ease;
}

.preview-link:hover {
  color: #c7d2fe;
}






/* ----------------------------------
   PREVIEW WATERMARK
---------------------------------- */

.preview-watermark {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;

  background-image:
    repeating-linear-gradient(
      -30deg,
      rgba(255,255,255,0.06) 0px,
      rgba(255,255,255,0.06) 1px,
      transparent 1px,
      transparent 120px
    );

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 48px;
  font-weight: 600;
  color: rgba(255,255,255,0.08);
  text-transform: uppercase;
  letter-spacing: 4px;
}
