/* Google Fonts loaded via <link> in HTML for faster first paint (avoids CSS @import extra round-trip) */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #ffffff;
  --bg-alt: #f7f7f8;
  --surface: #ffffff;
  --border: #e5e5ea;
  --border-light: #f0f0f3;
  --text: #111111;
  --text-secondary: #555555;
  --text-muted: #636363;
  --accent: #c8ff00;
  --accent-dark: #a8d900;
  --accent-soft: rgba(200, 255, 0, 0.12);
  --purple: #7c3aed;
  --purple-soft: rgba(124, 58, 237, 0.08);
  --green: #10b981;
  --blue: #3b82f6;
  --amber: #f59e0b;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============ ACCESSIBILITY: SCREEN READER ONLY ============ */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ============ ACCESSIBILITY: FOCUS STYLES ============ */
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
:focus:not(:focus-visible) {
  outline: none;
}
/* Skip-to-main link */
.skip-to-main {
  position: absolute; top: -100px; left: 16px; z-index: 9999;
  background: var(--text); color: #fff; padding: 12px 24px;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600; font-size: 0.9rem; text-decoration: none;
  transition: top 0.2s;
}
.skip-to-main:focus {
  top: 0;
}

.container { max-width: 1600px; margin: 0 auto; padding: 0 16px; }

/* ============ NAV ============ */
nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
}
.nav-inner {
  display: flex; align-items: center;
  padding: 16px 0; max-width: 1600px; margin: 0 auto; padding-left: 16px; padding-right: 16px;
}
.nav-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 1.4rem; color: var(--text);
  text-decoration: none;
}
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--text);
  display: flex; align-items: center; justify-content: center;
  padding: 5px;
}
.logo-mark svg {
  width: 100%; height: 100%;
  fill: var(--accent);
}
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  color: var(--text-secondary); text-decoration: none; font-size: 0.9rem;
  font-weight: 500; padding: 8px 16px; border-radius: 100px;
  transition: all 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-alt); }
.nav-links a.active { color: var(--text); background: var(--bg-alt); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px; border-radius: 100px; font-size: 0.9rem;
  font-weight: 600; cursor: pointer; border: none; transition: all 0.2s;
  text-decoration: none; font-family: 'Inter', sans-serif;
}
.btn-primary {
  background: var(--accent); color: var(--text);
  box-shadow: 0 2px 8px rgba(200,255,0,0.3);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(200,255,0,0.35); }
.btn-dark {
  background: var(--text); color: #fff;
}
.btn-dark:hover { background: #333; transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--text); border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--text-muted); }
.btn-sm { padding: 8px 18px; font-size: 0.82rem; }

/* ============ AUTH ============ */
/* Auth nav buttons */
.nav-auth { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 72px; margin-left: 8px; }
.nav-auth-logged-out { display: flex; align-items: center; gap: 8px; }
.nav-auth-logged-in { display: none; align-items: center; gap: 8px; }

/* User avatar in nav */
.nav-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: #fff;
  cursor: pointer; position: relative; overflow: hidden;
  background: var(--purple); transition: all 0.2s;
}
.nav-avatar:hover { box-shadow: 0 0 0 3px var(--accent-soft); }
.nav-avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}

/* Dropdown */
.nav-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  min-width: 200px; padding: 8px; z-index: 60;
  display: none;
}
.nav-dropdown.open { display: block; }
.nav-dropdown a, .nav-dropdown button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 14px; border: none; background: none;
  font-size: 0.88rem; color: var(--text-secondary); cursor: pointer;
  border-radius: 10px; transition: all 0.15s; text-decoration: none;
  font-family: 'Inter', sans-serif; text-align: left;
}
.nav-dropdown a:hover, .nav-dropdown button:hover {
  background: var(--bg-alt); color: var(--text);
}
.nav-dropdown .divider {
  height: 1px; background: var(--border-light); margin: 6px 0;
}
.nav-dropdown .logout-btn { color: #ef4444; }
.nav-dropdown .logout-btn:hover { background: rgba(239,68,68,0.06); color: #dc2626; }

/* Auth modal */
.auth-tabs {
  display: flex; gap: 0; margin-bottom: 24px; border-bottom: 2px solid var(--border-light);
}
.auth-tab {
  flex: 1; padding: 12px; text-align: center; font-weight: 600;
  font-size: 0.92rem; cursor: pointer; border: none; background: none;
  color: var(--text-muted); transition: all 0.2s; position: relative;
  font-family: 'Inter', sans-serif;
}
.auth-tab.active {
  color: var(--text);
}
.auth-tab.active::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--text);
}
.google-btn {
  width: 100%; padding: 12px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; display: flex;
  align-items: center; justify-content: center; gap: 10px;
  font-family: 'Inter', sans-serif;
}
.google-btn:hover { border-color: var(--text-secondary); background: var(--bg-alt); }
.google-btn svg { width: 20px; height: 20px; }
.auth-divider {
  display: flex; align-items: center; gap: 16px; margin: 20px 0;
  color: var(--text-muted); font-size: 0.82rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border-light);
}
.auth-error {
  background: rgba(239,68,68,0.08); color: #dc2626; padding: 10px 14px;
  border-radius: 10px; font-size: 0.85rem; margin-bottom: 16px; display: none;
}
.auth-error.show { display: block; }

/* Username input with prefix */
.username-input-wrapper {
  display: flex; align-items: center; border: 1.5px solid var(--border);
  border-radius: 10px; overflow: hidden; background: var(--bg);
}
.username-input-wrapper:focus-within { border-color: var(--text); }
.username-prefix {
  padding: 10px 0 10px 14px; font-size: 0.9rem; color: var(--text-muted);
  white-space: nowrap; user-select: none;
}
.username-input-wrapper input {
  border: none; outline: none; padding: 10px 14px 10px 2px; font-size: 0.95rem;
  flex: 1; min-width: 0; background: transparent;
}
.username-status {
  font-size: 0.8rem; margin-top: 6px; min-height: 18px;
}
.username-status.available { color: #16a34a; }
.username-status.taken { color: #dc2626; }
.username-status.error { color: #dc2626; }
.username-status.checking { color: var(--text-muted); }

.auth-switch {
  text-align: center; margin-top: 20px; font-size: 0.85rem; color: var(--text-muted);
}
.auth-switch a {
  color: var(--text); font-weight: 600; cursor: pointer; text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }

/* Forgot password link */
.forgot-password-link {
  text-align: right; margin: -4px 0 12px;
}
.forgot-password-link a {
  color: var(--text-muted); font-size: 0.82rem; cursor: pointer;
  text-decoration: none; transition: color 0.2s;
}
.forgot-password-link a:hover { color: var(--text); text-decoration: underline; }

/* Forgot password form */
.forgot-password-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.forgot-password-header h2 { margin: 0; }
.forgot-back-btn {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: 1.1rem; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: all 0.2s; color: var(--text);
}
.forgot-back-btn:hover { background: var(--bg-alt); border-color: var(--text-muted); }

.forgot-password-success {
  display: flex; align-items: center; gap: 10px;
  background: rgba(16, 185, 129, 0.08); color: #059669;
  padding: 14px 16px; border-radius: 12px; font-size: 0.88rem;
  margin-bottom: 16px;
}
.forgot-password-success .forgot-success-icon {
  width: 24px; height: 24px; border-radius: 50%;
  background: #059669; color: white; display: flex;
  align-items: center; justify-content: center;
  font-size: 0.75rem; flex-shrink: 0;
}
.forgot-password-success p { margin: 0; }

.forgot-password-error {
  background: rgba(239,68,68,0.08); color: #dc2626;
  padding: 10px 14px; border-radius: 10px; font-size: 0.85rem;
  margin-bottom: 12px;
}

/* Reset password page */
.reset-password-section {
  min-height: calc(100vh - 200px);
  display: flex; align-items: center; justify-content: center;
  padding: 60px 20px;
}
.reset-password-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 48px 40px;
  width: 100%; max-width: 440px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.reset-password-card h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem; font-weight: 700; margin: 0 0 8px;
}
.reset-subtitle {
  color: var(--text-muted); font-size: 0.9rem;
  margin: 0 0 28px; line-height: 1.5;
}
.reset-subtitle strong {
  color: var(--text); font-weight: 600;
}
.reset-icon-wrap {
  margin-bottom: 20px;
  display: flex; align-items: center; justify-content: center;
}
.reset-icon-success svg { filter: drop-shadow(0 2px 8px rgba(5, 150, 105, 0.2)); }
.reset-icon-error svg { filter: drop-shadow(0 2px 8px rgba(220, 38, 38, 0.2)); }
.reset-error {
  background: rgba(239,68,68,0.08); color: #dc2626;
  padding: 10px 14px; border-radius: 10px;
  font-size: 0.85rem; margin-bottom: 16px;
  text-align: left;
}
.reset-password-card .form-group {
  text-align: left;
}
.password-input-wrap {
  position: relative; display: flex; align-items: center;
}
.password-input-wrap input {
  width: 100%; padding-right: 44px;
}
.password-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px; display: flex;
  align-items: center; justify-content: center;
  transition: color 0.2s;
}
.password-toggle:hover { color: var(--text); }
.password-strength {
  display: flex; align-items: center; gap: 10px;
  margin-top: 6px;
}
.strength-bar {
  flex: 1; height: 4px; background: var(--border-light);
  border-radius: 2px; overflow: hidden;
}
.strength-fill {
  height: 100%; border-radius: 2px;
  transition: width 0.3s, background 0.3s;
  width: 0%;
}
.strength-label {
  font-size: 0.78rem; font-weight: 600;
  min-width: 48px; text-align: right;
}
.reset-password-card .submit-btn {
  margin-top: 8px;
}
@media (max-width: 480px) {
  .reset-password-card {
    padding: 32px 24px;
  }
  .reset-password-section {
    padding: 40px 16px;
  }
}

/* Change password section (profile edit) */
.change-password-section {
  border-top: 1px solid var(--border-light);
  padding-top: 24px; margin-top: 24px;
}
.change-password-title {
  font-size: 1rem; font-weight: 600; margin-bottom: 16px;
  color: var(--text);
}
.provider-note {
  color: var(--text-muted); font-size: 0.88rem;
  line-height: 1.5; padding: 12px 16px;
  background: var(--bg-alt); border-radius: 10px;
}

/* Profile modal */
.profile-photo-upload {
  width: 100px; height: 100px; border-radius: 50%;
  margin: 0 auto 24px; position: relative; cursor: pointer;
  background: var(--bg-alt); border: 2px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; transition: all 0.2s;
}
.profile-photo-upload:hover { border-color: var(--text-muted); }
.profile-photo-upload img {
  width: 100%; height: 100%; object-fit: cover;
}
.profile-photo-upload .upload-icon {
  font-size: 28px; color: var(--text-muted);
}
.profile-photo-upload input { display: none; }
.profile-photo-label {
  text-align: center; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 24px;
}

/* ============ HERO ============ */
.hero {
  padding: 48px 0 40px;
  position: relative; overflow: visible;
}
.hero-bg {
  display: none;
  background: radial-gradient(circle, rgba(200,255,0,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-bg-2 {
  display: none;
  background: radial-gradient(circle, rgba(124,58,237,0.06) 0%, transparent 70%);
  pointer-events: none;
}
/* ── Animated pastel blobs ── */
.hero-blobs {
  position: absolute; inset: 0;
  overflow: hidden; pointer-events: none; z-index: 0;
}
.hero-blob {
  position: absolute; border-radius: 50%;
  filter: blur(72px); opacity: 0.55;
}
.blob-1 {
  width: 500px; height: 500px;
  background: #d4b8f5; /* lavender */
  top: -100px; left: -80px;
  animation: blob-drift-1 22s ease-in-out infinite;
}
.blob-2 {
  width: 420px; height: 420px;
  background: #b8f0d8; /* mint */
  top: 40px; right: 10%;
  animation: blob-drift-2 28s ease-in-out infinite;
}
.blob-3 {
  width: 360px; height: 360px;
  background: #ffd4b8; /* peach */
  bottom: -60px; left: 20%;
  animation: blob-drift-3 24s ease-in-out infinite;
}
.blob-4 {
  width: 300px; height: 300px;
  background: #b8d8ff; /* sky blue */
  bottom: 0; right: -60px;
  animation: blob-drift-4 20s ease-in-out infinite;
}
.blob-5 {
  width: 260px; height: 260px;
  background: #e2f5a0; /* lime */
  top: 30%; left: 40%;
  animation: blob-drift-5 32s ease-in-out infinite;
}
@keyframes blob-drift-1 {
  0%,100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(60px, 80px) scale(1.08); }
  66%      { transform: translate(-40px, 50px) scale(0.95); }
}
@keyframes blob-drift-2 {
  0%,100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-80px, 60px) scale(1.06); }
  66%      { transform: translate(50px, -40px) scale(0.97); }
}
@keyframes blob-drift-3 {
  0%,100% { transform: translate(0, 0) scale(1); }
  40%      { transform: translate(70px, -60px) scale(1.1); }
  70%      { transform: translate(-50px, 30px) scale(0.94); }
}
@keyframes blob-drift-4 {
  0%,100% { transform: translate(0, 0) scale(1); }
  30%      { transform: translate(-60px, -50px) scale(1.07); }
  65%      { transform: translate(40px, 60px) scale(0.96); }
}
@keyframes blob-drift-5 {
  0%,100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(-90px, 70px) scale(1.12); }
  60%      { transform: translate(60px, -80px) scale(0.92); }
}

.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-alt); border: 1px solid var(--border);
  padding: 6px 16px 6px 8px; border-radius: 100px; font-size: 0.82rem;
  font-weight: 500; color: var(--text-secondary); margin-bottom: 28px;
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100%{ opacity:1; } 50%{ opacity:0.4; } }

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 700; line-height: 1.08;
  letter-spacing: -0.03em; margin-bottom: 22px; color: var(--text);
}
.hero h1 .highlight {
  background: var(--accent); padding: 0 8px; border-radius: 8px;
  display: inline; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hero p {
  font-size: 1.15rem; color: var(--text-secondary);
  max-width: 520px; line-height: 1.7; margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============ HERO VISUAL ============ */
.hero-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.hero-visual {
  position: relative; z-index: 1; min-width: 0;
}
.hero-deck-wrap {
  width: 100%; padding: 10px 0 24px;
  overflow: visible;
}
.hero-deck {
  display: grid;
  aspect-ratio: 1270/760;
  overflow: visible;
  width: 100%;
}
.hero-demo-card {
  grid-area: 1 / 1;
  position: relative;
  border-radius: 16px; overflow: hidden; cursor: pointer;
  transition: transform 0.9s cubic-bezier(0.23, 1, 0.32, 1),
              filter 0.9s ease,
              box-shadow 0.9s ease;
}
/* ── Carousel positions ── */
.hero-demo-card.hero-pos-front {
  z-index: 3;
  transform: scale(0.72) translateY(0);
  filter: brightness(1);
  box-shadow: 0 20px 48px rgba(0,0,0,0.26);
}
.hero-demo-card.hero-pos-left {
  z-index: 1;
  transform: rotate(-10deg) translate(-22%, 0) scale(0.61);
  filter: brightness(0.58);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.hero-demo-card.hero-pos-right {
  z-index: 2;
  transform: rotate(10deg) translate(22%, 0) scale(0.61);
  filter: brightness(0.63);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.demo-preview {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: opacity 0.4s ease;
}
.demo-preview.img-loading { opacity: 0; }
.demo-preview.img-ready   { opacity: 1; }
.demo-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; padding: 24px 18px 18px;
  background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 100%);
  z-index: 1;
}
.demo-body { flex: 1; min-width: 0; }
.demo-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem; font-weight: 700; line-height: 1.3;
  color: #fff; margin: 0 0 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.demo-desc,
.demo-author { display: none; }


/* ============ TRUSTED BY / LOGOS ============ */
.trusted {
  padding: 50px 0; border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}
.trusted p {
  font-size: 0.85rem; color: var(--text-muted); font-weight: 500;
  margin-bottom: 28px; text-transform: uppercase; letter-spacing: 0.08em;
}
.trusted-logos-marquee {
  overflow: hidden; width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.trusted-logos-track {
  display: flex; align-items: center; gap: 72px;
  width: max-content; flex-wrap: nowrap; white-space: nowrap;
  animation: marquee-scroll 30s linear infinite;
}
.trusted-logo {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 1.05rem; color: var(--text); white-space: nowrap; flex-shrink: 0;
  opacity: 0.8;
}
.trusted-logo svg { flex-shrink: 0; width: 25px; height: 25px; }
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============ HOW IT WORKS ============ */
.how-it-works {
  padding: 100px 0;
}
.section-label {
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 12px;
}
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700; line-height: 1.15; letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.section-desc {
  font-size: 1.05rem; color: var(--text-secondary);
  max-width: 540px; line-height: 1.7; margin-bottom: 48px;
}
.steps-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.step-card {
  background: var(--bg-alt); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 36px 28px;
  transition: all 0.3s; position: relative; overflow: hidden;
}
.step-card:hover {
  border-color: #ddd; box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.step-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem; font-weight: 800; color: var(--accent);
  line-height: 1; margin-bottom: 18px;
  -webkit-text-stroke: 1.5px var(--text);
  color: transparent;
}
.step-card:hover .step-num { color: var(--accent); -webkit-text-stroke: 0; }
.step-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem; font-weight: 700; margin-bottom: 10px;
}
.step-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

/* ============ PROJECTS SHOWCASE ============ */
.projects {
  padding: 80px 0; background: var(--bg-alt);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
.section-header-row {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 40px; flex-wrap: wrap; gap: 16px;
}
.filters {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.filter-btn {
  padding: 8px 18px; border-radius: 100px; font-size: 0.82rem;
  font-weight: 500; background: var(--surface); color: var(--text-secondary);
  border: 1px solid var(--border); cursor: pointer; transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.filter-btn:hover { color: var(--text-secondary); border-color: #ddd; }
.filter-btn.active {
  background: var(--text); color: #fff; border-color: var(--text);
}

/* App filter chips (Built with row) */
.app-filters {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
  flex-wrap: wrap;
}
.app-filters-label {
  font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap;
}
.app-filter-chips {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.app-filter-chip {
  padding: 6px 14px; border-radius: 100px; font-size: 0.78rem;
  font-weight: 500; background: var(--surface); color: var(--text-secondary);
  border: 1px solid var(--border); cursor: pointer; transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.app-filter-chip:hover { color: var(--text); border-color: var(--accent); }
.app-filter-chip.active {
  background: var(--accent); color: var(--text); border-color: var(--accent);
  font-weight: 600;
}

.project-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
@media (max-width: 1400px) {
  .project-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1100px) {
  .project-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .project-grid { grid-template-columns: 1fr; }
}
.project-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
  transition: all 0.2s ease; cursor: pointer;
  text-decoration: none; color: inherit; display: flex;
  flex-direction: column;
}
.project-card:hover {
  border-color: #ddd; transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
/* Compact card thumbnail */
.card-thumb {
  width: 100%; aspect-ratio: 1270 / 760; border-radius: 12px 12px 0 0;
  background-size: cover; background-position: center;
  flex-shrink: 0; position: relative;
}
/* Card info row: text left, stats right */
.card-info {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; gap: 8px; min-height: 0;
}
.card-info-text {
  flex: 1; min-width: 0; overflow: hidden;
}
.card-info-text h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem; font-weight: 700; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0;
}
.card-creator {
  font-size: 0.75rem; color: var(--text-muted); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 5px;
}
.card-creator-pic {
  width: 16px; height: 16px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.card-creator-initial {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.5rem; font-weight: 700; color: #fff;
}
/* Stats with flat icons */
.card-stats {
  display: flex; gap: 10px; flex-shrink: 0;
}
.card-stat {
  display: flex; align-items: center; gap: 3px;
  font-size: 0.75rem; color: var(--text-muted); font-weight: 500;
}
.card-stat svg { opacity: 0.55; }

/* ============ IN-CARD LIVE PREVIEW ============ */
.preview-vibe-btn {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 100px;
  background: rgba(0, 0, 0, 0.75); color: #fff;
  font-size: 0.82rem; font-weight: 600;
  font-family: 'Inter', sans-serif;
  border: none; cursor: pointer;
  opacity: 0; transition: opacity 0.2s, transform 0.2s, background 0.2s;
  z-index: 2; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.preview-vibe-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.project-card:hover .preview-vibe-btn,
.project-card:focus-within .preview-vibe-btn { opacity: 1; }
.preview-vibe-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translate(-50%, -50%) scale(1.05);
}
.preview-vibe-btn:focus-visible { opacity: 1; outline: 2px solid #fff; outline-offset: 2px; }
@media (hover: none) { .preview-vibe-btn { opacity: 1; } }
@media (max-width: 800px) { .preview-vibe-btn { opacity: 1; } }
/* Hide preview button on profile — cards navigate to detail page instead */
.profile-page .preview-vibe-btn { display: none; }

/* Previewing state */
.project-card.previewing {
  grid-column: 1 / -1; transform: none; cursor: default;
}
.project-card.previewing:hover { transform: none; box-shadow: var(--shadow-md); }
.project-card.previewing .card-thumb {
  aspect-ratio: 16 / 9; min-height: 400px;
  background: var(--bg-alt) !important;
}
.project-card.previewing .preview-vibe-btn { display: none; }

/* Iframe container */
.preview-iframe-wrap {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt);
  border-radius: var(--radius) var(--radius) 0 0; overflow: hidden;
}
.preview-iframe-wrap iframe { width: 100%; height: 100%; border: none; background: #fff; }

/* Close button */
.preview-close-btn {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  width: 36px; height: 36px; min-width: 44px; min-height: 44px;
  border-radius: 50%; background: rgba(0, 0, 0, 0.7); color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; transition: background 0.2s;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.preview-close-btn:hover { background: rgba(0, 0, 0, 0.9); }
.preview-close-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Loading spinner */
.preview-loading {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  background: var(--bg-alt); transition: opacity 0.3s;
}
.preview-loading .spinner { width: 32px; height: 32px; }
.preview-loading-text { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; }
.preview-loading.hidden { opacity: 0; pointer-events: none; }

/* Error fallback */
.preview-error {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  background: var(--bg-alt);
}
.preview-error-text { font-size: 0.88rem; color: var(--text-muted); font-weight: 500; }
.preview-error a { color: var(--text); font-weight: 600; font-size: 0.85rem; text-decoration: underline; }
.preview-error a:hover { color: var(--text-secondary); }

/* Responsive preview adjustments */
@media (max-width: 800px) {
  .project-card.previewing .card-thumb { min-height: 320px; }
}
@media (max-width: 500px) {
  .project-card.previewing .card-thumb { min-height: 280px; }
}

/* Legacy classes kept for other pages */
.card-preview {
  height: 180px; position: relative; overflow: hidden;
}
.card-gradient {
  position: absolute; bottom: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(to top, var(--surface), transparent);
}
.card-tag {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 12px; border-radius: 100px; font-size: 0.72rem;
  font-weight: 600; letter-spacing: 0.02em;
}
.tag-web { background: #dbeafe; color: #1d4ed8; }
.tag-art { background: #fce7f3; color: #be185d; }
.tag-game { background: #d1fae5; color: #047857; }
.tag-tool { background: #fef3c7; color: #92400e; }
.tag-ai { background: #ede9fe; color: #6d28d9; }
.tag-mobile { background: #e0e7ff; color: #3730a3; }
.tag-image { background: #fce7f3; color: #be185d; }
.card-built-with {
  position: absolute; top: 12px; right: 12px;
  padding: 4px 10px; border-radius: 100px; font-size: 0.68rem;
  font-weight: 600; background: rgba(0,0,0,0.6); color: #fff;
  backdrop-filter: blur(4px); letter-spacing: 0.02em;
}

.card-body { padding: 20px; }
.card-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem; font-weight: 700; margin-bottom: 6px;
}
.card-body p {
  font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px 18px;
}
.card-author { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; color: #fff;
}
.card-author span { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.card-stats-legacy {
  display: flex; gap: 12px; font-size: 0.8rem; color: var(--text-muted);
}
.card-stats span { display: flex; align-items: center; gap: 4px; }

/* ============ STATS BAR ============ */
.stats-bar {
  padding: 60px 0;
}
.stats-inner {
  background: var(--text); color: #fff; border-radius: var(--radius-lg);
  padding: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
  text-align: center;
}
.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.8rem; font-weight: 800; line-height: 1;
  margin-bottom: 6px;
}
.stat-num .accent-text { color: var(--accent); }
.stat-label { font-size: 0.9rem; color: rgba(255,255,255,0.6); font-weight: 500; }

/* ============ VALUES ============ */
.values { padding: 100px 0; }
.values-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.value-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px;
  transition: all 0.3s;
}
.value-card:hover { border-color: #ddd; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.value-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 20px;
}
.value-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem; font-weight: 700; margin-bottom: 10px;
}
.value-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.65; }

/* ============ FAQ ============ */
.faq { padding: 80px 0; background: var(--bg-alt); border-top: 1px solid var(--border-light); }
.faq-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  max-width: 900px; margin: 0 auto;
}
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.faq-q {
  padding: 20px 24px; font-weight: 600; font-size: 0.92rem;
  cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; transition: background 0.2s;
  user-select: none;
}
.faq-q:hover { background: var(--bg-alt); }
.faq-arrow { font-size: 1.2rem; color: var(--text-muted); transition: transform 0.3s; }
.faq-item.open .faq-arrow { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height 0.35s ease, padding 0.35s ease;
}
.faq-item.open .faq-a { max-height: 200px; }
.faq-a-inner {
  padding: 0 24px 20px; font-size: 0.88rem;
  color: var(--text-secondary); line-height: 1.6;
}

/* ============ CTA ============ */
.cta-section { padding: 80px 0; }
.cta-box {
  background: var(--text); border-radius: var(--radius-lg);
  padding: 72px 48px; text-align: center; position: relative; overflow: hidden;
}
.cta-glow {
  position: absolute; width: 400px; height: 400px; border-radius: 50%;
  background: var(--accent); filter: blur(150px); opacity: 0.15;
  top: -100px; right: -50px; pointer-events: none;
}
.cta-box h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700; color: #fff; margin-bottom: 14px; position: relative; z-index: 1;
}
.cta-box p {
  color: rgba(255,255,255,0.6); font-size: 1.05rem; max-width: 480px;
  margin: 0 auto 32px; line-height: 1.6; position: relative; z-index: 1;
}
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }

/* ============ FOOTER ============ */
footer {
  border-top: 1px solid var(--border-light); padding: 60px 0 40px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; max-width: 280px; }
.footer-col h4 {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text); margin-bottom: 16px;
}
.footer-col a {
  display: block; font-size: 0.88rem; color: var(--text-muted);
  text-decoration: none; margin-bottom: 10px; transition: color 0.2s;
}
.footer-col a:hover { color: var(--text-secondary); }
.footer-col span {
  display: block; font-size: 0.88rem; color: var(--text-muted);
  margin-bottom: 10px;
}
.footer-bottom {
  border-top: 1px solid var(--border-light); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem; color: var(--text-muted);
}
.footer-social { display: flex; gap: 16px; }
.footer-social a {
  color: var(--text-muted); text-decoration: none; font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-social a:hover { color: var(--text-secondary); }
.footer-social span { color: var(--text-muted); font-size: 0.85rem; }

/* ============ MODAL ============ */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px); z-index: 100; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px; width: 90%; max-width: 500px;
  position: relative; box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow-y: auto;
}
.modal h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem; font-weight: 700; margin-bottom: 4px;
}
.modal .subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 28px; }
.modal-close {
  position: absolute; top: 16px; right: 16px; background: var(--bg-alt);
  border: 1px solid var(--border); color: var(--text-muted); width: 32px; height: 32px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer; transition: all 0.2s;
}
.modal-close:hover { background: var(--border); color: var(--text); }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 0.82rem; color: var(--text-secondary);
  margin-bottom: 6px; font-weight: 600;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 11px 14px; background: var(--bg-alt);
  border: 1px solid var(--border); border-radius: 12px;
  color: var(--text); font-size: 0.9rem; font-family: 'Inter', sans-serif;
  outline: none; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--text-muted);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.submit-btn {
  width: 100%; padding: 12px; background: var(--accent); color: var(--text);
  border: none; border-radius: 12px; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: 'Inter', sans-serif;
}
.submit-btn:hover { background: var(--accent-dark); }
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.success-msg {
  display: none; text-align: center;
}
.success-msg.show { display: block; }
.success-msg .check { font-size: 3rem; margin-bottom: 12px; }
.success-msg h3 { font-size: 1.15rem; margin-bottom: 6px; }
.success-msg p { font-size: 0.9rem; color: var(--text-muted); }

/* ============ SHARE MODE PICKER ============ */
.share-mode-picker {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 12px;
}
.share-mode-opt {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 14px 10px;
  background: var(--bg-alt); border: 1.5px solid var(--border-light);
  border-radius: var(--radius); cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit; text-align: center;
}
.share-mode-opt:hover { border-color: var(--text-muted); }
.share-mode-opt.active {
  border-color: var(--text); background: var(--bg);
  box-shadow: 0 0 0 2px var(--text);
}
.share-mode-icon { font-size: 1.3rem; line-height: 1; }
.share-mode-label { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.share-mode-sub { font-size: 0.72rem; color: var(--text-muted); }
.share-mode-badge {
  font-size: 0.6rem; font-weight: 700; background: var(--accent);
  color: var(--text); padding: 2px 6px; border-radius: 100px;
  letter-spacing: 0.05em; margin-top: 1px;
}

.platform-hints {
  font-size: 0.74rem; color: var(--text-muted);
  margin-top: 8px; line-height: 1.5;
}
.platform-hints span { color: var(--text-muted); }

/* ============ HOST ON VIBELAB ============ */
.host-badge-free {
  font-size: 0.65rem; font-weight: 700; background: var(--accent);
  color: var(--text); padding: 2px 7px; border-radius: 100px;
  letter-spacing: 0.04em;
}
#share-mode-host-panel {
  padding-bottom: 4px;
}
.host-slot-info {
  font-size: 0.8rem; color: var(--text-muted);
  padding: 10px 0 12px; text-align: center;
}
.host-slot-info strong { color: var(--text); }
.host-slot-info.limit-reached { color: #ef4444; }
.host-file-label {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px; border: 2px dashed var(--border);
  border-radius: var(--radius); cursor: pointer;
  color: var(--text-muted); font-size: 0.85rem;
  transition: all 0.15s; text-align: center;
}
.host-file-label:hover { border-color: var(--text-muted); color: var(--text); background: var(--bg-alt); }
.host-file-label.has-file { border-color: var(--green); color: var(--green); background: rgba(16,185,129,0.04); }
.host-file-note {
  font-size: 0.74rem; color: var(--text-muted);
  text-align: center; margin-top: 8px;
}

/* Hosted badge on project cards */
.card-hosted-badge {
  position: absolute; top: 8px; right: 8px;
  background: var(--text); color: var(--accent);
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em;
  padding: 3px 8px; border-radius: 100px;
}

/* ============ TOAST NOTIFICATIONS ============ */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--text); color: #fff; padding: 14px 20px;
  border-radius: 12px; display: flex; align-items: center; gap: 12px;
  font-size: 0.88rem; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  animation: toast-in 0.3s ease; min-width: 300px;
}
.toast .toast-action {
  color: var(--accent); font-weight: 600; cursor: pointer;
  white-space: nowrap; text-decoration: none;
}
@keyframes toast-in {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.toast.toast-out { animation: toast-out 0.3s ease forwards; }
@keyframes toast-out {
  to { transform: translateY(20px); opacity: 0; }
}

/* ============ SEARCH BAR ============ */
.search-bar {
  position: relative; min-width: 200px; width: 100%;
}
.search-bar input {
  width: 100%; padding: 9px 16px 9px 38px; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: 100px;
  font-size: 0.85rem; color: var(--text); font-family: 'Inter', sans-serif;
  outline: none; transition: all 0.2s;
}
.search-bar input:focus {
  border-color: var(--text-muted); box-shadow: 0 0 0 3px rgba(0,0,0,0.03);
}
.search-bar .search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}
.search-bar .search-icon svg { width: 16px; height: 16px; }

/* ============ FEED PAGE ============ */
.feed-page { padding: 40px 0; min-height: 100vh; }
.feed-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 32px; flex-wrap: wrap; gap: 16px;
}
.feed-tabs {
  display: flex; gap: 4px; background: #fff; padding: 4px;
  border-radius: 100px; border: 1.5px solid var(--border);
}
.feed-tab {
  padding: 8px 20px; border-radius: 100px; font-size: 0.85rem;
  font-weight: 500; background: none; border: none; color: var(--text-muted);
  cursor: pointer; transition: all 0.2s; font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.feed-tab:hover { color: var(--text-secondary); }
.feed-tab.active { background: var(--text); color: #fff; }
.feed-toolbar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 24px;
  flex-wrap: nowrap;
}
/* Custom Dropdown Component */
.custom-dropdown {
  position: relative;
  flex-shrink: 0;
}
.custom-dropdown-trigger {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 100px; font-size: 0.82rem;
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text); font-family: 'Inter', sans-serif; cursor: pointer;
  outline: none; transition: all 0.2s; white-space: nowrap;
  font-weight: 500; line-height: 1;
}
.custom-dropdown-trigger:hover {
  border-color: #ddd;
}
.custom-dropdown.open .custom-dropdown-trigger {
  border-color: var(--text-muted); box-shadow: 0 0 0 3px rgba(0,0,0,0.03);
}
.custom-dropdown-chevron {
  transition: transform 0.2s;
  opacity: 0.5;
  flex-shrink: 0;
}
.custom-dropdown.open .custom-dropdown-chevron {
  transform: rotate(180deg);
}
.custom-dropdown-menu {
  display: none;
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 100%; width: max-content;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 80;
  padding: 6px;
  animation: dropdownFadeIn 0.15s ease;
}
.custom-dropdown.open .custom-dropdown-menu {
  display: block;
}
@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.custom-dropdown-option {
  padding: 8px 14px; border-radius: 10px; font-size: 0.84rem;
  cursor: pointer; transition: background 0.15s; white-space: nowrap;
  color: var(--text); font-weight: 500;
}
.custom-dropdown-option:hover {
  background: var(--bg-alt);
}
.custom-dropdown-option.selected {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}
.custom-dropdown.disabled {
  pointer-events: none; opacity: 0.5;
}

/* ============ PROJECT DETAIL PAGE ============ */
.project-detail { padding: 40px 0; }
#project-content { max-width: 900px; margin: 0 auto; }
.project-title-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
}
.project-title-row .project-title { margin-bottom: 0; }
.project-title-actions { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.project-preview-full {
  position: relative; width: 100%; border-radius: var(--radius-lg);
  overflow: hidden; background: var(--bg-alt); border: 1px solid var(--border);
  aspect-ratio: auto; min-height: 70vh;
}
.project-preview-full img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.project-preview-iframe { width: 100%; height: 100%; border: none; display: block; position: absolute; inset: 0; }
.preview-inline-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt); z-index: 1; pointer-events: none;
}
/* Live Preview badge on static image */
.live-preview-badge {
  position: absolute; top: 16px; right: 16px; z-index: 4;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 20px; border-radius: 100px; cursor: pointer;
  background: rgba(0, 0, 0, 0.7); color: #fff; border: 1px solid rgba(255,255,255,0.15);
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s, transform 0.15s;
}
.live-preview-badge:hover { background: rgba(0, 0, 0, 0.85); transform: scale(1.04); }
.live-preview-badge svg { flex-shrink: 0; }
/* Live preview active state — iframe showing */
.project-preview-full.live-preview-active .live-preview-badge { display: none; }
.project-preview-full.live-preview-active img { display: none; }
/* Close preview button inside detail page */
.detail-preview-close {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  width: 36px; height: 36px; min-width: 44px; min-height: 44px;
  border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0, 0, 0, 0.7); color: #fff;
  font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s;
}
.detail-preview-close:hover { background: rgba(0, 0, 0, 0.9); }
@media (max-width: 600px) {
  .project-preview-full { min-height: 55vh; }
}

/* ============ PROJECT GALLERY CAROUSEL ============ */
.gallery-outer { margin-bottom: 20px; }

/* Gradient placeholder when no images */
.gallery-placeholder {
  width: 100%; border-radius: var(--radius-lg);
  aspect-ratio: 1270/760;
}

/* Carousel wrapper — clips overflow so 3 items + peek visible */
.gallery-carousel-wrap {
  position: relative;
  overflow: hidden;
}

/* Sliding track */
.gallery-carousel-track {
  display: flex;
  gap: 16px;
  transition: transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Each card — 31% wide so 3 cards fit with gaps + small peek of next */
.gallery-carousel-item {
  flex: 0 0 calc(32% - 11px);
  aspect-ratio: 1270/760;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--bg-alt);
}
.gallery-carousel-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.25s ease;
}
.gallery-carousel-item:hover img { transform: scale(1.03); }

/* Play icon overlay for YouTube items */
.gallery-grid-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.3); color: #fff; font-size: 2.2rem; pointer-events: none;
  transition: background 0.2s;
}
.gallery-carousel-item:hover .gallery-grid-play { background: rgba(0,0,0,0.48); }

/* "›" next arrow — floats on right edge, overlaying the peeking card */
.gallery-carousel-next {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer;
  background: #fff; color: #111; font-size: 1.6rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18); z-index: 10;
  font-family: sans-serif; transition: box-shadow 0.2s, transform 0.15s;
}
.gallery-carousel-next:hover { box-shadow: 0 6px 28px rgba(0,0,0,0.26); transform: translateY(-50%) scale(1.06); }

/* Dot indicators */
.gallery-carousel-dots {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; margin-top: 14px;
}
.gallery-carousel-dot {
  width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  background: var(--border); transition: background 0.2s, transform 0.2s;
}
.gallery-carousel-dot.active { background: var(--pink, #ff2d7b); transform: scale(1.35); }
.gallery-carousel-dot:hover:not(.active) { background: var(--text-muted); }

@media (max-width: 600px) {
  /* On mobile: show 2 cards + peek */
  .gallery-carousel-item { flex: 0 0 calc(48% - 8px); }
  .gallery-carousel-track { gap: 10px; }
  .gallery-carousel-next { right: 10px; width: 38px; height: 38px; font-size: 1.2rem; }
}

/* ============ LIGHTBOX ============ */
.gallery-lightbox {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.92); align-items: center; justify-content: center;
}
.gallery-lightbox.open { display: flex; }
.lightbox-content {
  max-width: 88vw; max-height: 88vh;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-content img {
  max-width: 88vw; max-height: 88vh; object-fit: contain;
  border-radius: 8px; display: block;
}
.lightbox-content iframe {
  width: 80vw; height: 45vw; max-height: 80vh; border: none; border-radius: 8px;
}
.lightbox-close {
  position: fixed; top: 20px; right: 24px;
  background: rgba(255,255,255,0.12); border: none; color: #fff;
  font-size: 1.6rem; cursor: pointer; z-index: 2001; line-height: 1;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }
.lightbox-prev, .lightbox-next {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.12); border: none; color: #fff;
  font-size: 2rem; cursor: pointer; z-index: 2001;
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; line-height: 1; font-family: sans-serif;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.24); }
.lightbox-prev:disabled, .lightbox-next:disabled { opacity: 0.2; cursor: default; }
@media (max-width: 600px) {
  .project-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 4px; }
  .project-gallery-grid.single-item { grid-template-columns: 1fr; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-content img { max-width: 96vw; max-height: 80vh; }
  .lightbox-content iframe { width: 96vw; height: 54vw; }
}

/* ============ MULTI-IMAGE UPLOAD ============ */
.img-upload-grid {
  display: flex; flex-wrap: wrap; gap: 8px; min-height: 0;
}
.img-upload-item {
  position: relative; width: 88px; height: 66px; flex-shrink: 0; cursor: grab;
  user-select: none; border-radius: 8px;
}
.img-upload-item img {
  width: 88px; height: 66px; border-radius: 8px; object-fit: cover; display: block;
  border: 1.5px solid var(--border); transition: border-color 0.15s;
}
.img-upload-item.dragging { opacity: 0.35; }
.img-upload-item.drag-over img { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.img-upload-del {
  position: absolute; top: -7px; right: -7px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #ef4444; color: #fff; border: 2px solid var(--surface);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; z-index: 2; line-height: 1;
  transition: background 0.15s;
}
.img-upload-del:hover { background: #dc2626; }
.img-upload-existing-badge {
  position: absolute; bottom: 4px; left: 4px;
  background: rgba(0,0,0,0.55); color: #fff; font-size: 0.58rem;
  padding: 1px 5px; border-radius: 4px; pointer-events: none; line-height: 1.4;
}
.img-upload-add-btn {
  display: flex; align-items: center; justify-content: center;
  width: 88px; height: 66px; border-radius: 8px; flex-shrink: 0;
  border: 1.5px dashed var(--border); background: var(--bg-alt);
  cursor: pointer; color: var(--text-muted); font-size: 1.6rem;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.img-upload-add-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--bg); }
.img-upload-hint {
  font-size: 0.72rem; color: var(--text-muted); margin-top: 5px; line-height: 1.4;
}
@media (max-width: 600px) {
  .img-upload-item, .img-upload-item img { width: 76px; height: 58px; }
  .img-upload-add-btn { width: 76px; height: 58px; }
}

.project-action-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; margin-top: 12px; border-bottom: 1px solid var(--border-light);
}
.project-author-bar { display: flex; align-items: center; gap: 12px; }
.project-author-bar .author-avatar {
  width: 36px; height: 36px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 0.85rem;
  font-weight: 700; color: #fff; overflow: hidden; flex-shrink: 0;
}
.project-author-bar .author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.project-author-bar .author-name {
  font-weight: 600; font-size: 0.92rem; color: var(--text); text-decoration: none;
}
.project-author-bar .author-name:hover { text-decoration: underline; }
.action-bar-time {
  font-size: 0.78rem; color: var(--text-muted); white-space: nowrap;
}
.follow-btn-sm {
  padding: 6px 16px; border-radius: 100px; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; border: none; font-family: 'Inter', sans-serif;
}
.follow-btn-sm.not-following { background: var(--text); color: #fff; }
.follow-btn-sm.not-following:hover { background: #333; }
.follow-btn-sm.following { background: var(--bg-alt); color: var(--text); border: 1.5px solid var(--border); }
.follow-btn-sm.following:hover { border-color: #ef4444; color: #ef4444; }
.project-icon-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.demo-btn-inline {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px;
  border-radius: 100px; font-size: 0.84rem; font-weight: 700; cursor: pointer;
  transition: all 0.2s; border: none; background: var(--text); color: #fff;
  font-family: 'Space Grotesk', sans-serif;
}
.demo-btn-inline:hover { background: #333; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.demo-btn-inline svg { width: 15px; height: 15px; }
.project-icon-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 8px 14px;
  border-radius: 100px; font-size: 0.82rem; font-weight: 500; cursor: pointer;
  transition: all 0.2s; border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text-muted); font-family: 'Inter', sans-serif;
}
.project-icon-btn:hover { border-color: #ddd; color: var(--text-secondary); }
.project-icon-btn.active { background: var(--accent); border-color: var(--accent); color: var(--text); }
.project-icon-btn svg { width: 16px; height: 16px; }
.project-icon-btn .count { font-size: 0.78rem; color: var(--text-muted); }
.more-menu-wrap { position: relative; }
.more-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  min-width: 140px; z-index: 50; overflow: hidden;
}
.more-menu.open { display: block; }
.more-menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 16px; font-size: 0.85rem; font-weight: 500;
  cursor: pointer; border: none; background: none; color: var(--text);
  font-family: 'Inter', sans-serif; transition: background 0.15s;
}
.more-menu-item:hover { background: var(--bg-alt); }
.more-menu-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.project-meta {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
}
.project-title {
  font-family: 'Space Grotesk', sans-serif; font-size: 2rem;
  font-weight: 700; margin-bottom: 12px; line-height: 1.2;
}
.project-description {
  font-size: 1rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 24px;
}
.project-cta-area {
  margin-bottom: 32px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.demo-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px;
  border-radius: 100px; font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: all 0.2s; border: none; background: var(--text); color: #fff;
  font-family: 'Space Grotesk', sans-serif;
}
.demo-btn:hover { background: #333; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.demo-btn svg { width: 18px; height: 18px; }
.project-secondary-link {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px;
  border-radius: 100px; font-size: 0.76rem; font-weight: 500;
  text-decoration: none; color: var(--text); background: var(--bg-alt);
  border: 1px solid var(--border); transition: all 0.2s;
}
.project-secondary-link:hover { border-color: #ddd; }
.project-secondary-link svg { width: 12px; height: 12px; }
.project-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.project-tag-pill {
  padding: 4px 14px; border-radius: 100px; font-size: 0.78rem;
  font-weight: 500; background: var(--bg-alt); border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

/* ============ LIVE DEMO MODAL ============ */
.demo-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.8); z-index: 150;
  align-items: center; justify-content: center; padding: 24px;
}
.demo-modal-overlay.open { display: flex; }
.demo-modal {
  width: 100%; max-width: 1200px; height: 90vh;
  background: var(--surface); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.demo-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.demo-modal-url {
  font-size: 0.82rem; color: var(--text-muted); font-family: 'Inter', monospace;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
  padding: 6px 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; margin-right: 12px;
}
.demo-modal-close {
  width: 36px; height: 36px; border-radius: 50%; background: var(--surface);
  border: 1px solid var(--border); color: var(--text-muted); font-size: 1.2rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0;
}
.demo-modal-close:hover { background: var(--border); color: var(--text); }
.demo-modal-iframe { flex: 1; width: 100%; border: none; }

/* ============ CREATOR FOOTER ============ */
.creator-footer {
  margin-top: 48px; padding: 32px 0; border-top: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 14px;
}
.creator-footer .footer-avatar {
  width: 44px; height: 44px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 1rem;
  font-weight: 700; color: #fff; overflow: hidden; flex-shrink: 0;
}
.creator-footer .footer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.creator-footer .footer-info a {
  font-weight: 700; font-size: 0.95rem; color: var(--text); text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
}
.creator-footer .footer-info a:hover { text-decoration: underline; }
.creator-footer .footer-info p { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }

/* ============ CREATOR SIDEBAR ============ */
.creator-sidebar { position: sticky; top: 100px; }
.creator-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; margin-bottom: 20px;
}
.creator-card-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
}
.creator-avatar {
  width: 52px; height: 52px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 1.2rem;
  font-weight: 700; color: #fff; overflow: hidden;
}
.creator-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}
.creator-info h3 {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.05rem; font-weight: 700;
}
.creator-info p { font-size: 0.82rem; color: var(--text-muted); }
.creator-bio {
  font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px;
}
.creator-stats-row { display: flex; gap: 20px; margin-bottom: 16px; }
.creator-stat { text-align: center; }
.creator-stat .num { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.1rem; }
.creator-stat .label { font-size: 0.75rem; color: var(--text-muted); }
.follow-btn {
  width: 100%; padding: 10px; border-radius: 100px; font-size: 0.88rem;
  font-weight: 600; cursor: pointer; transition: all 0.2s; border: none;
  font-family: 'Inter', sans-serif;
}
.follow-btn.not-following { background: var(--text); color: #fff; }
.follow-btn.not-following:hover { background: #333; }
.follow-btn.following { background: var(--bg-alt); color: var(--text); border: 1.5px solid var(--border); }
.follow-btn.following:hover { border-color: #ef4444; color: #ef4444; }

/* ============ COMMENTS SECTION ============ */
.comments-section { margin-top: 40px; }
.comments-section h3 {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.2rem;
  font-weight: 700; margin-bottom: 24px;
}
.comment-input-area {
  display: flex; gap: 12px; align-items: flex-start; margin-bottom: 32px;
}
.comment-input-area .comment-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: #fff; overflow: hidden;
}
.comment-input-wrapper { flex: 1; }
.comment-input-wrapper textarea {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--border);
  border-radius: 12px; font-size: 0.9rem; font-family: 'Inter', sans-serif;
  resize: none; outline: none; background: var(--surface);
  color: var(--text); min-height: 44px; transition: all 0.2s;
}
.comment-input-wrapper textarea:focus {
  border-color: var(--text-muted); min-height: 80px;
}
.comment-input-actions {
  justify-content: flex-end; margin-top: 8px; display: none;
}
.comment-input-actions.show { display: flex; }
.comment-post-btn {
  padding: 8px 20px; border-radius: 100px; font-size: 0.82rem;
  font-weight: 600; background: var(--text); color: #fff; border: none;
  cursor: pointer; font-family: 'Inter', sans-serif;
}
.comment-post-btn:hover { background: #333; }
.comment-post-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.comment-thread { margin-bottom: 24px; }
.comment { display: flex; gap: 12px; }
.comment .comment-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: #fff; overflow: hidden;
}
.comment-content { flex: 1; }
.comment-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.comment-author { font-weight: 600; font-size: 0.88rem; }
.comment-time { font-size: 0.78rem; color: var(--text-muted); }
.comment-body {
  font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 8px;
}
.comment-actions { display: flex; gap: 16px; }
.comment-action {
  font-size: 0.78rem; color: var(--text-muted); cursor: pointer; font-weight: 500;
  background: none; border: none; padding: 0; font-family: 'Inter', sans-serif;
}
.comment-action:hover { color: var(--text-secondary); }
.comment-replies {
  margin-left: 44px; margin-top: 16px; border-left: 2px solid var(--border-light);
  padding-left: 16px;
}
.comment-replies .comment { margin-bottom: 16px; }
.reply-input-area {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 12px;
  margin-left: 44px; padding-left: 16px;
}

/* ============ PROFILE PAGE ============ */
.profile-page { padding: 24px 0; min-height: 100vh; }
.profile-header {
  display: flex; gap: 32px; align-items: flex-start; margin-bottom: 20px;
  padding-bottom: 20px; border-bottom: 1px solid var(--border-light);
}
.profile-avatar-lg {
  width: 120px; height: 120px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 2.5rem;
  font-weight: 800; color: #fff; flex-shrink: 0; overflow: hidden;
}
.profile-avatar-lg img {
  width: 100%; height: 100%; object-fit: cover;
}
.profile-details { flex: 1; }
.profile-name-row {
  display: flex; align-items: center; gap: 16px; margin-bottom: 8px;
}
.profile-name {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem; font-weight: 700;
}
.profile-handle { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 6px; }
.profile-bio-text {
  font-size: 0.95rem; color: var(--text-secondary); line-height: 1.6;
  margin-bottom: 10px; max-width: 600px;
}
.profile-stats { display: flex; gap: 24px; margin-bottom: 10px; }
.profile-stat { font-size: 0.9rem; color: var(--text-secondary); }
.profile-stat strong { color: var(--text); font-weight: 700; }
.hosted-slot-indicator {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.hosted-slot-indicator strong { color: var(--text-secondary); }
.profile-social-links { display: flex; gap: 12px; }
.profile-social-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
  border-radius: 100px; font-size: 0.82rem; color: var(--text-secondary);
  text-decoration: none; background: var(--bg-alt); border: 1px solid var(--border-light);
  transition: all 0.2s;
}
.profile-social-link:hover { border-color: #ddd; color: var(--text-secondary); }

.profile-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border-light); margin-bottom: 20px; }
.profile-tab {
  padding: 12px 24px; font-size: 0.9rem; font-weight: 600; color: var(--text-muted);
  cursor: pointer; border: none; background: none; position: relative;
  font-family: 'Inter', sans-serif; transition: all 0.2s;
}
.profile-tab:hover { color: var(--text-secondary); }
.profile-tab.active { color: var(--text); }
.profile-tab.active::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--text);
}

/* ============ COLLECTIONS SECTION ============ */
.collections-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.collection-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; cursor: pointer;
  transition: all 0.2s;
}
.collection-card:hover {
  border-color: #ddd; transform: translateY(-2px); box-shadow: var(--shadow-md);
}
.collection-preview-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 10px;
  overflow: hidden; margin-bottom: 12px; height: 120px;
}
.collection-preview-item { background: var(--bg-alt); }
.collection-card h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.collection-card p { font-size: 0.82rem; color: var(--text-muted); }

/* ============ LOADING & EMPTY STATES ============ */
.loading-spinner { display: flex; justify-content: center; padding: 40px; }
.spinner {
  width: 32px; height: 32px; border: 3px solid var(--border);
  border-top-color: var(--text); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }
.empty-state p {
  font-size: 0.9rem; color: var(--text-muted); max-width: 400px; margin: 0 auto;
}
.load-more-trigger { height: 1px; }

/* ============ SAVE MODAL ============ */
.save-modal-list { max-height: 300px; overflow-y: auto; margin-bottom: 16px; }
.save-modal-item {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border-radius: 10px; cursor: pointer; transition: background 0.15s;
}
.save-modal-item:hover { background: var(--bg-alt); }
.save-modal-item input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--text);
}
.save-modal-item .collection-name { font-size: 0.9rem; font-weight: 500; }
.save-modal-item .collection-count { font-size: 0.78rem; color: var(--text-muted); }
.new-collection-input {
  display: flex; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border-light);
}
.new-collection-input input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 0.88rem; font-family: 'Inter', sans-serif;
  outline: none;
}
.new-collection-input button {
  padding: 10px 16px; border-radius: 10px; font-size: 0.85rem; font-weight: 600;
  background: var(--text); color: #fff; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif;
}

/* ============ VISIBILITY TOGGLE ============ */
.visibility-toggle { display: flex; gap: 8px; }
.visibility-option {
  flex: 1; padding: 10px; border-radius: 10px; border: 1.5px solid var(--border);
  background: var(--surface); text-align: center; cursor: pointer; font-size: 0.85rem;
  font-weight: 500; transition: all 0.2s; font-family: 'Inter', sans-serif;
}
.visibility-option.active { border-color: var(--text); background: var(--bg-alt); }
.status-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.status-tag {
  padding: 6px 16px; border-radius: 100px; font-size: 0.82rem; font-weight: 500;
  border: 1.5px solid var(--border); background: var(--surface); cursor: pointer;
  transition: all 0.2s; font-family: 'Inter', sans-serif;
}
.status-tag.active { border-color: var(--text); background: var(--text); color: #fff; }

/* ============ STATUS FILTERS ============ */
.feed-status-filters {
  display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap;
}
.status-filter-btn {
  padding: 6px 16px; border-radius: 100px; font-size: 0.78rem;
  font-weight: 500; background: var(--surface); color: var(--text-muted);
  border: 1px solid var(--border-light); cursor: pointer; transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.status-filter-btn:hover { color: var(--text-secondary); border-color: #ddd; }
.status-filter-btn.active {
  background: var(--accent-soft); color: var(--text); border-color: var(--accent-dark);
}

/* ============ TAG FOLLOW BAR ============ */
.tag-follow-bar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
  padding: 12px 16px; background: var(--bg-alt); border-radius: var(--radius);
  border: 1px solid var(--border-light); flex-wrap: wrap;
}
.tag-follow-label {
  font-size: 0.82rem; font-weight: 600; color: var(--text-secondary);
  white-space: nowrap;
}
.tag-follow-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tag-follow-chip {
  padding: 5px 14px; border-radius: 100px; font-size: 0.78rem;
  font-weight: 500; cursor: pointer; transition: all 0.2s;
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text-secondary); font-family: 'Inter', sans-serif;
}
.tag-follow-chip:hover { border-color: var(--tag-color, var(--text)); color: var(--tag-color, var(--text)); }
.tag-follow-chip.followed {
  background: var(--tag-color, var(--text)); color: #fff;
  border-color: var(--tag-color, var(--text));
}

/* Tag search inline input + dropdown */
.tag-search-wrap {
  position: relative; display: inline-flex; align-items: center; flex-shrink: 0;
}
.tag-search-input {
  padding: 5px 14px; border-radius: 100px; font-size: 0.78rem;
  font-weight: 500; border: 1.5px dashed var(--border);
  background: var(--surface); color: var(--text);
  font-family: 'Inter', sans-serif; outline: none;
  width: 140px; transition: all 0.2s;
}
.tag-search-input::placeholder { color: var(--text-muted); }
.tag-search-input:focus {
  border-color: var(--text-muted); border-style: solid;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.03);
}
.tag-search-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 200px; max-height: 220px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg);
  z-index: 60; padding: 4px;
}
.tag-search-dropdown.open { display: block; }
.tag-search-result {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 12px; border: none; background: none; cursor: pointer;
  font-size: 0.82rem; font-family: 'Inter', sans-serif;
  color: var(--text); border-radius: 8px; transition: background 0.15s;
}
.tag-search-result:hover { background: var(--bg-alt); }
.tag-search-result.followed { color: var(--text-muted); }
.tag-search-result.followed .tag-search-status { color: var(--green); }
.tag-search-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.tag-search-name { flex: 1; text-align: left; font-weight: 500; }
.tag-search-status { font-size: 0.75rem; color: var(--text-muted); flex-shrink: 0; }
.tag-search-empty {
  padding: 12px 16px; font-size: 0.82rem; color: var(--text-muted); text-align: center;
}

/* ============ DISCOVER CREATORS ============ */
.discover-creators { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--border-light); }
.creators-scroll {
  display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.creators-scroll::-webkit-scrollbar { height: 4px; }
.creators-scroll::-webkit-scrollbar-track { background: var(--border-light); border-radius: 2px; }
.creators-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.creator-discover-card {
  min-width: 180px; max-width: 200px; padding: 20px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); text-align: center;
  scroll-snap-align: start; flex-shrink: 0; transition: all 0.2s;
}
.creator-discover-card:hover {
  border-color: #ddd; transform: translateY(-2px); box-shadow: var(--shadow-md);
}
.creator-discover-card h4 {
  font-family: 'Space Grotesk', sans-serif; font-size: 0.9rem;
  font-weight: 600; margin-bottom: 4px;
}
.creator-discover-card p {
  font-size: 0.78rem; color: var(--text-muted); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ============ TOOLS & STACK ============ */
.project-stack { margin-bottom: 24px; }
.stack-title {
  font-family: 'Space Grotesk', sans-serif; font-size: 0.95rem;
  font-weight: 700; margin-bottom: 10px; color: var(--text);
}
.stack-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.stack-chip {
  padding: 6px 16px; border-radius: 100px; font-size: 0.8rem;
  font-weight: 500; background: var(--bg-alt); border: 1px solid var(--border);
  color: var(--text); transition: all 0.2s;
}
.stack-chip:hover { border-color: #ddd; }
.stack-chip-status {
  background: var(--accent-soft); border-color: var(--accent);
  color: var(--accent-dark, var(--text)); font-weight: 600;
}

/* ============ GUEST CTA BOX ============ */
.guest-cta-box {
  margin: 32px 0; padding: 32px; text-align: center;
  background: linear-gradient(135deg, var(--bg-alt), rgba(200,255,0,0.06));
  border: 1.5px solid var(--border); border-radius: var(--radius-lg);
}
.guest-cta-content h3 {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.2rem;
  font-weight: 700; margin-bottom: 8px;
}
.guest-cta-content p {
  font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6;
  margin-bottom: 20px; max-width: 400px; margin-left: auto; margin-right: auto;
}

/* ============ COMMENT REACTIONS ============ */
.comment-reactions {
  display: flex; gap: 4px; margin-right: 8px;
}
.reaction-btn {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 100px; font-size: 0.75rem;
  background: var(--bg-alt); border: 1px solid var(--border-light);
  cursor: pointer; transition: all 0.15s; color: var(--text-muted);
  font-family: 'Inter', sans-serif; line-height: 1.4;
}
.reaction-btn:hover { border-color: var(--border); background: var(--surface); transform: scale(1.1); }
.reaction-btn.active {
  background: var(--accent-soft); border-color: var(--accent-dark);
}
.reaction-count { font-size: 0.7rem; font-weight: 600; color: var(--text-secondary); }

/* ============ PROFILE SKILLS ============ */
.profile-skills {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
}
.profile-skills-label {
  font-size: 0.82rem; font-weight: 600; color: var(--text-muted);
}
.profile-skill-tag {
  padding: 4px 14px; border-radius: 100px; font-size: 0.78rem;
  font-weight: 500; background: var(--purple-soft); color: var(--purple);
  border: 1px solid rgba(124, 58, 237, 0.15);
}

/* ============ PROFILE INLINE EDIT MODE ============ */
.profile-view-mode {
  display: flex; gap: 32px; align-items: flex-start; width: 100%;
}
.profile-edit-mode {
  display: flex; gap: 32px; align-items: flex-start; width: 100%;
}
.profile-edit-avatar {
  position: relative; flex-shrink: 0; cursor: pointer;
}
.profile-edit-avatar:hover .edit-avatar-overlay { opacity: 1; }
.edit-avatar-overlay {
  position: absolute; inset: 0; border-radius: 50%;
  background: rgba(0,0,0,0.5); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 600; opacity: 0;
  transition: opacity 0.2s; pointer-events: none;
}
.profile-edit-fields {
  flex: 1; display: flex; flex-direction: column; gap: 4px;
}
.profile-edit-actions {
  display: flex; gap: 10px; margin-top: 12px;
}
.profile-danger-zone {
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border-light);
}
.btn-danger {
  padding: 8px 20px; border-radius: 10px; font-size: 0.84rem;
  font-weight: 600; background: none; border: 1.5px solid #ef4444;
  color: #ef4444; cursor: pointer; font-family: 'Inter', sans-serif;
  transition: all 0.2s;
}
.btn-danger:hover {
  background: rgba(239,68,68,0.08); border-color: #dc2626; color: #dc2626;
}

/* ============ MY VIBES PAGE ============ */
.my-vibes-page {
  padding: 40px 0; min-height: 100vh;
}

/* Vibe Card (project card with actions) */
.vibe-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all 0.2s; position: relative;
}
.vibe-card:hover {
  border-color: #ddd;
  box-shadow: var(--shadow-md);
}
.vibe-card-link {
  display: block; text-decoration: none; color: inherit;
}
.vibe-card-link .card-preview {
  height: 160px; position: relative; overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.vibe-card-link .card-body {
  padding: 16px;
}
.vibe-card-link .card-body h3 {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.05rem;
  font-weight: 700; margin-bottom: 6px; color: var(--text);
}
.vibe-card-link .card-body p {
  font-size: 0.85rem; color: var(--text-secondary);
  line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.vibe-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px 12px; gap: 8px;
}
.vibe-card-badges {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.vibe-status-badge {
  padding: 2px 10px; border-radius: 100px; font-size: 0.72rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em;
}
.vibe-status-badge.status-wip {
  background: rgba(245, 158, 11, 0.12); color: #b45309;
}
.vibe-status-badge.status-experiment {
  background: rgba(124, 58, 237, 0.1); color: #7c3aed;
}
.vibe-status-badge.status-shipped {
  background: rgba(16, 185, 129, 0.1); color: #059669;
}
.vibe-visibility-badge {
  padding: 2px 10px; border-radius: 100px; font-size: 0.72rem;
  font-weight: 600; background: var(--bg-alt); color: var(--text-muted);
}
.vibe-card-actions {
  display: flex; gap: 0; border-top: 1px solid var(--border-light);
}
.vibe-action-btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 10px; border: none; background: none;
  font-size: 0.82rem; font-weight: 500; font-family: 'Inter', sans-serif;
  cursor: pointer; transition: all 0.15s; color: var(--text-secondary);
}
.vibe-action-btn:hover {
  background: var(--bg-alt); color: var(--text);
}
.vibe-edit-btn:hover {
  color: #3b82f6;
}
.vibe-delete-btn {
  border-left: 1px solid var(--border-light);
}
.vibe-delete-btn:hover {
  color: #ef4444; background: rgba(239,68,68,0.04);
}

/* ============ GUEST / LOGGED-IN VISIBILITY ============ */
.guest-only { display: none; }
.logged-in-only { display: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .project-title-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .project-action-bar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .project-icon-actions { width: 100%; justify-content: flex-start; }
  .project-cta-area { flex-direction: column; }
  .demo-btn { width: 100%; justify-content: center; }
  .demo-modal { height: 95vh; }
  .demo-modal-overlay { padding: 8px; }
  .creator-footer { flex-direction: column; text-align: center; }
  .profile-header { flex-direction: column; align-items: center; text-align: center; }
  .profile-view-mode { flex-direction: column; align-items: center; text-align: center; }
  .profile-edit-mode { flex-direction: column; align-items: center; }
  .profile-stats { justify-content: center; }
  .profile-social-links { justify-content: center; }
  .profile-skills { justify-content: center; }
  .feed-header { flex-direction: column; }
  .feed-tabs { overflow-x: auto; }
  .feed-toolbar { flex-wrap: wrap; }
  .feed-toolbar .search-bar { min-width: 100%; }
  .app-filters { flex-direction: column; align-items: flex-start; }
  .tag-follow-bar { flex-direction: column; align-items: flex-start; }
  .comment-replies { margin-left: 20px; }
  .comment-reactions { flex-wrap: wrap; }
  .hero-layout { grid-template-columns: 1fr; gap: 30px; }
  .steps-grid { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: 1fr; gap: 20px; }
  .values-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .hide-mobile { display: none; }
  .nav-dropdown { right: -10px; }
  .creators-scroll { gap: 12px; }
  .creator-discover-card { min-width: 160px; }
  .admin-stats-grid { grid-template-columns: 1fr; }
  .admin-user-row { flex-wrap: wrap; gap: 6px; }
  .admin-user-actions { width: 100%; justify-content: flex-end; }
  .admin-header-row { display: none; }
  .admin-toolbar { flex-direction: column; }
  .admin-generate-section { flex-direction: column; width: 100%; }
  .admin-batch-generate { width: 100%; }
  .admin-search-input { width: 100%; }
  .admin-invite-row { flex-wrap: wrap; gap: 8px; }
  /* invite drawer removed — now uses modal */
}

/* ═══ ADMIN DASHBOARD STYLES ═══ */

.admin-header {
  margin-bottom: 8px;
}

.admin-top-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
}

.admin-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  white-space: nowrap;
}

.admin-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--border-light);
}

.admin-tab {
  padding: 8px 18px;
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.admin-tab:hover {
  color: var(--text);
}

.admin-tab.active {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--text);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.admin-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
  transition: all 0.2s;
}

.admin-stat-card:hover {
  box-shadow: var(--shadow-sm);
}

.stat-blue { background: #eef4ff; border-color: #dbe8fe; }
.stat-yellow { background: #fefce8; border-color: #fef08a; }
.stat-green { background: #ecfdf5; border-color: #d1fae5; }
.stat-purple { background: #f5f3ff; border-color: #ede9fe; }

.admin-stat-icon {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.admin-stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.admin-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.admin-toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-search-input {
  flex: 1;
  min-width: 200px;
  padding: 7px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.2s;
}

.admin-search-input:focus {
  border-color: var(--text-muted);
}

.admin-select {
  padding: 7px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
}

.admin-user-list, .admin-invite-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-light);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
}

.admin-user-row, .admin-invite-row {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 8px 12px;
  background: var(--surface);
  transition: all 0.15s;
}

.admin-user-row:hover, .admin-invite-row:hover {
  background: var(--bg-alt);
}

.admin-user-row.selected {
  background: rgba(200, 240, 80, 0.08);
}

.admin-header-row {
  background: var(--bg-alt) !important;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
}

.admin-header-row:hover {
  background: var(--bg-alt) !important;
}

.admin-col-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.admin-row-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
  margin-right: 8px;
}

.admin-rank {
  font-weight: 700;
  color: var(--text-muted);
  min-width: 28px;
  font-size: 0.85rem;
}

.admin-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.admin-user-avatar-sm {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.72rem;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  margin-right: 10px;
}

.admin-user-info {
  flex: 1;
  min-width: 0;
}

.admin-user-info strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-detail {
  text-align: center;
  width: 72px;
  flex-shrink: 0;
  font-size: 0.8rem;
}

.admin-detail-label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

/* Overview table columns */
.admin-overview-col {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-overview-name {
  flex: 1.2;
}

.admin-overview-email {
  flex: 1.5;
}

.admin-overview-url {
  flex: 1.2;
}

.admin-overview-phone {
  flex: 0.8;
}

.admin-user-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  width: 130px;
  justify-content: flex-end;
}

/* Bulk action bar */
.admin-bulk-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 14px;
  background: var(--bg-alt);
  border: 1.5px solid var(--primary);
  border-radius: 10px;
  margin-bottom: 8px;
}

.admin-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.admin-bulk-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
  flex-wrap: wrap;
}

.admin-btn-danger {
  color: #dc2626 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

.admin-btn-danger:hover {
  background: rgba(239, 68, 68, 0.08) !important;
}

/* Extra small button for compact rows */
.btn-xs {
  padding: 4px 10px;
  font-size: 0.72rem;
  border-radius: 6px;
}

.admin-badge-admin {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
  font-size: 0.65rem;
  padding: 2px 6px;
}

.admin-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.admin-badge-active {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.admin-badge-suspended {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.admin-badge-used {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.admin-badge-expired {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.admin-badge-upcoming {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.admin-badge-ended {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

/* Challenge type badges */
.admin-badge-type-evergreen {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}
.admin-badge-type-weekly {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}
.admin-badge-type-seasonal {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}
.admin-badge-type-special {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

.admin-generate-section {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1;
}

.admin-batch-generate {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-batch-input {
  width: 64px;
  padding: 9px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  text-align: center;
  outline: none;
}

.admin-invite-code {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
}

.admin-invite-code code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 1px;
}

.admin-invite-detail {
  text-align: center;
  min-width: 100px;
  font-size: 0.85rem;
}

.admin-copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.15s;
}

.admin-copy-btn:hover {
  background: var(--bg-alt);
}

.admin-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ═══ COMMUNITY CHALLENGES ═══ */

.challenges-section {
  padding: 48px 0;
}

/* ── Active Challenge Hero Card ── */
.challenge-hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.challenge-hero-banner {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
}

.challenge-hero-body {
  padding: 28px 32px;
}

.challenge-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.challenge-hero-round {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 4px 10px;
  border-radius: 100px;
}

.challenge-hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.challenge-hero-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.challenge-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.challenge-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.challenge-hero-progress {
  margin-bottom: 16px;
}

.challenge-progress-bar {
  height: 8px;
  background: var(--bg-alt);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 6px;
}

.challenge-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  border-radius: 100px;
  transition: width 0.5s ease;
}

.challenge-progress-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.challenge-hero-meta {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.challenge-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.challenge-doc-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: all 0.2s;
}
.challenge-doc-link:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.challenge-countdown {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.08);
  padding: 4px 12px;
  border-radius: 100px;
}

/* ── Challenge Type Pills ── */
.challenge-type-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}
.challenge-type-evergreen {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}
.challenge-type-weekly {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}
.challenge-type-seasonal {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}
.challenge-type-special {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

/* ── Leaderboard ── */
.challenge-leaderboard {
  border-top: 1px solid var(--border-light);
  padding: 20px 32px 24px;
}
.challenge-leaderboard h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
  border-radius: 8px;
  padding: 6px 8px;
  margin: 0 -8px;
}
.leaderboard-row:hover {
  background: var(--bg-alt);
}
.leaderboard-rank {
  width: 28px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}
.leaderboard-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.leaderboard-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--purple);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}
.leaderboard-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leaderboard-score {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Upcoming Challenge Cards ── */
.challenges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.challenge-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.challenge-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.challenge-card-banner {
  width: 100%;
  height: 120px;
  background-size: cover;
  background-position: center;
}
.challenge-card-banner-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
}

.challenge-card-body {
  padding: 16px 20px 20px;
}

.challenge-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}

.challenge-card-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.challenge-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.challenge-starts-in {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue);
}

.challenge-start-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── Past Challenge Archive Cards ── */
.challenge-archive-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}

.challenge-archive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  transition: background 0.15s;
}
.challenge-archive-header:hover {
  background: var(--bg-alt);
}

.challenge-archive-info h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.challenge-archive-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.challenge-archive-toggle {
  color: var(--text-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.challenge-archive-gallery {
  border-top: 1px solid var(--border-light);
  padding: 20px;
}

/* ── Responsive ── */
@media (max-width: 800px) {
  .challenges-grid { grid-template-columns: 1fr; }
  .challenge-hero-banner { height: 140px; }
  .challenge-hero-body { padding: 20px; }
  .challenge-hero-title { font-size: 1.3rem; }
  .challenge-leaderboard { padding: 16px 20px 20px; }
  .challenge-hero-meta { flex-direction: column; gap: 4px; }
}

@media (max-width: 600px) {
  .challenges-grid { grid-template-columns: 1fr; }
}

/* ═══ STREAK CALENDAR (Profile Page) ═══ */

.streak-calendar-section {
  margin-bottom: 20px;
}

.streak-calendar-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.streak-calendar {
  overflow-x: auto;
  padding-bottom: 4px;
}

.streak-grid {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.streak-month-row {
  display: flex;
  gap: 2px;
  margin-bottom: 2px;
}

.streak-month-label {
  width: 12px;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  flex-shrink: 0;
}

.streak-row {
  display: flex;
  gap: 2px;
  align-items: center;
}

.streak-day-label {
  width: 28px;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: right;
  padding-right: 4px;
  flex-shrink: 0;
}

.streak-day {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

.streak-level-empty {
  background: transparent;
}

.streak-level-0 {
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
}

.streak-level-1 {
  background: rgba(200, 255, 0, 0.35);
}

.streak-level-2 {
  background: rgba(200, 255, 0, 0.6);
}

.streak-level-3 {
  background: var(--accent);
}

.streak-today {
  outline: 2px solid var(--text);
  outline-offset: -1px;
}

.streak-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  justify-content: flex-end;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ═══ BADGES (Profile Page) ═══ */

.badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.badge-icon {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  cursor: default;
  transition: transform 0.15s;
}

.badge-icon:hover {
  transform: scale(1.05);
}

.badge-emoji {
  font-size: 1rem;
}

.badge-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ═══ INVITE MODAL + CARDS ═══ */

.invite-remaining {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.invite-codes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
}

.invite-code-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  gap: 12px;
}

.invite-code-card.used {
  opacity: 0.6;
}

.invite-code-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.invite-link-text {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}
.invite-link-text:hover {
  text-decoration: underline;
  color: var(--accent-dark, #111);
}

.invite-code-sub {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.invite-claimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.invite-used-badge {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--border-light);
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 600;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

.invite-code-card .copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--text-muted);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.invite-code-card .copy-btn:hover {
  background: var(--border);
  color: var(--text);
}
.invite-code-card .copy-btn svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* ═══ INVITE VERIFICATION (Auth Modal) ═══ */

.invite-verified-banner {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.invite-verified-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #059669;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}
.invite-verify-error {
  color: #dc2626;
  font-size: 0.82rem;
  margin-top: 6px;
}
#signup-invite-step .form-group {
  text-align: left;
}

/* ═══ INVITE LANDING PAGE ═══ */

.invite-landing {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.invite-landing-card {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 32px;
}

.invite-landing-card h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
}

.invite-landing-card > p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 32px;
}

.invite-brand {
  margin-bottom: 32px;
}
.invite-brand svg {
  width: 48px;
  height: 48px;
  fill: var(--text);
}

.inviter-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-weight: 700;
  font-size: 1.2rem;
  color: white;
  overflow: hidden;
}
.inviter-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.invite-inviter p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.invite-code-display {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 12px 24px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: inline-block;
  margin-bottom: 32px;
}

.invite-error-card {
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 24px;
}
.invite-error-card h2 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.btn-lg {
  padding: 14px 40px;
  font-size: 1rem;
}

@media (max-width: 480px) {
  .invite-landing-card {
    padding: 32px 16px;
  }
  .invite-landing-card h1 {
    font-size: 1.5rem;
  }
}

/* Admin responsive for tablet */
@media (max-width: 1100px) {
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-user-detail.hide-mobile { display: none; }
  .admin-invite-detail.hide-mobile { display: none; }
  .admin-overview-phone.hide-mobile { display: none; }
  .admin-overview-email { display: none; }
  .admin-overview-url { display: none; }
  .admin-bulk-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .admin-bulk-actions { margin-left: 0; justify-content: flex-end; }
  .admin-top-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ============ ACCESSIBILITY: REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
}

/* ============ ACCESSIBILITY: TOUCH TARGETS ============ */
.modal-close { min-width: 44px; min-height: 44px; }
.password-toggle { min-width: 44px; min-height: 44px; }
.comment-action { min-height: 44px; display: inline-flex; align-items: center; }
.reaction-btn { min-height: 44px; padding: 8px 12px; }
.tag-follow-chip { min-height: 44px; display: inline-flex; align-items: center; }
.follow-btn-sm { min-height: 44px; padding: 10px 16px; }
.admin-row-checkbox { min-width: 44px; min-height: 44px; }
.btn-xs { min-height: 44px; padding: 10px 14px; }

/* ============ NAV CHALLENGE BADGE ============ */
.nav-challenge-badge {
  font-size: 0.85em;
  vertical-align: middle;
  margin-left: 2px;
}

/* ============ CHALLENGE BANNER (homepage) ============ */
.challenge-banner-section {
  padding: 0;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(135deg, #0d0d0d 0%, #111 40%, rgba(124,58,237,0.08) 100%);
  position: relative;
  overflow: hidden;
}
.challenge-banner-section::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(200,255,0,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.challenge-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 0;
}
.challenge-banner-left { flex: 1; min-width: 0; }
.challenge-banner-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(200,255,0,0.1);
  border: 1px solid rgba(200,255,0,0.2);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.challenge-banner-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.challenge-banner-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 480px;
}
.challenge-banner-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  flex-shrink: 0;
}
.challenge-banner-prizes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}
.challenge-banner-prize {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
}
@media (max-width: 700px) {
  .challenge-banner-inner { flex-direction: column; align-items: flex-start; }
  .challenge-banner-right { align-items: flex-start; width: 100%; }
  .challenge-banner-prizes { align-items: flex-start; }
}

/* ============ CHALLENGES PAGE ============ */

/* Hero */
.challenge-hero-section {
  position: relative;
  padding: 80px 0 60px;
  background: linear-gradient(160deg, #0d0d0d 0%, #111 50%, rgba(124,58,237,0.06) 100%);
  border-bottom: 1px solid var(--border-light);
  overflow: hidden;
  text-align: center;
}
.challenge-hero-section::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, rgba(200,255,0,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.challenge-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: rgba(200,255,0,0.08);
  border: 1px solid rgba(200,255,0,0.2);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.challenge-status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.challenge-hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin-bottom: 16px;
}
.challenge-hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.6;
}
.challenge-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.btn-outline-white {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}
.btn-outline-white:hover { border-color: rgba(255,255,255,0.5); color: #fff; }
.challenge-prize-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}
.prize-ribbon-divider { opacity: 0.3; }

/* Countdown */
.challenge-countdown {
  margin-bottom: 28px;
}
.countdown-grid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 8px 8px;
}
.countdown-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.countdown-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 4px;
}
.countdown-sep {
  font-size: 1.6rem;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
  margin-bottom: 16px;
}
.countdown-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}
.countdown-ended {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Brief cards */
.challenge-brief-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border-light);
}
.challenge-brief-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .challenge-brief-grid { grid-template-columns: 1fr; } }
.brief-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 28px;
}
.brief-card-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
}
.brief-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}
.brief-card ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.brief-card ul li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
}
.brief-card ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
}
.brief-note {
  margin-top: 14px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  font-style: italic;
}

/* Timeline */
.challenge-timeline-section {
  padding: 48px 0;
  border-bottom: 1px solid var(--border-light);
}
.timeline-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
}
.timeline-date {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.timeline-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}
.timeline-line {
  flex: 1;
  min-width: 40px;
  max-width: 100px;
  height: 1px;
  background: linear-gradient(to right, var(--accent), rgba(200,255,0,0.2));
  margin-bottom: 16px;
}
@media (max-width: 600px) {
  .timeline-row { flex-direction: column; gap: 16px; }
  .timeline-line { width: 1px; height: 24px; min-width: unset; max-width: unset; background: linear-gradient(to bottom, var(--accent), rgba(200,255,0,0.2)); }
}

/* Prizes */
.challenge-prizes-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border-light);
}
.prizes-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}
@media (max-width: 800px) { .prizes-grid { grid-template-columns: 1fr; } }
.prize-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.prize-card.winner {
  border-color: rgba(200,255,0,0.3);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(200,255,0,0.04) 100%);
}
.prize-card.winner::before {
  content: 'WINNER';
  position: absolute;
  top: 12px; right: -24px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #000;
  background: var(--accent);
  padding: 3px 30px;
  transform: rotate(45deg);
}
.prize-rank { font-size: 2.5rem; margin-bottom: 10px; }
.prize-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.prize-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.prize-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Submissions */
.challenge-submissions-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border-light);
}
.submissions-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}
.submissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.submission-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.submission-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.submission-preview {
  position: relative;
  height: 200px;
  background: #111;
  overflow: hidden;
}
.submission-preview iframe {
  width: 200%;
  height: 200%;
  transform: scale(0.5);
  transform-origin: top left;
  pointer-events: none;
  border: none;
}
.submission-preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.submission-card:hover .submission-preview-overlay { opacity: 1; }
.submission-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a1a, #111);
}
.submission-placeholder-icon { font-size: 2.5rem; opacity: 0.4; }
.submission-meta {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.submission-author {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.submission-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.submission-avatar-initial {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.submission-entry-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.submission-author-name {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.submission-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.submissions-loading, .submissions-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.submissions-empty h3 { color: #fff; margin-bottom: 8px; }
.submissions-empty .empty-icon { font-size: 3rem; margin-bottom: 16px; }
.submissions-empty p { margin-bottom: 20px; }

/* Past challenges */
.past-challenges-section { padding: 64px 0; }
.past-challenges-grid { margin-top: 24px; }

/* Challenge submit modal */
.challenge-file-area {
  border: 2px dashed var(--border-light);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}
.challenge-file-area.drag-over {
  border-color: var(--accent);
  background: rgba(200,255,0,0.04);
}
.challenge-file-area:hover { border-color: rgba(255,255,255,0.3); }
.file-upload-icon { font-size: 2rem; margin-bottom: 8px; }
.file-upload-label {
  cursor: pointer;
  display: block;
}
.file-upload-label div { color: var(--text-muted); font-size: 0.88rem; }
.file-link { color: var(--accent); }
.file-hint { font-size: 0.75rem; margin-top: 4px; opacity: 0.6; }
.file-selected-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.file-clear-btn {
  background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  font-size: 1rem; padding: 4px 8px;
}
.file-clear-btn:hover { color: #fff; }
.form-error {
  color: #ff4444;
  font-size: 0.85rem;
  margin-top: 8px;
}
.challenge-submit-success, .challenge-already-submitted {
  text-align: center;
  padding: 24px 0;
}
.challenge-submit-success .success-icon { font-size: 3rem; margin-bottom: 12px; }
.challenge-submit-success h3 { color: #fff; margin-bottom: 8px; }
.challenge-submit-success p { color: var(--text-muted); }

/* Full-screen preview modal */
.challenge-preview-overlay {
  z-index: 1100;
}
.challenge-preview-overlay.open { display: flex !important; }
.challenge-preview-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #000;
}
.challenge-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 44px;
  background: rgba(0,0,0,0.9);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
  gap: 12px;
}
.challenge-preview-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.preview-entry-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-entry-author {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.preview-close-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.preview-close-btn:hover { background: rgba(255,255,255,0.2); }
#challenge-preview-iframe {
  flex: 1;
  width: 100%;
  border: none;
}

/* ============================================================ */
/* CHALLENGES PAGE — LIGHT THEME (Printables-inspired layout)  */
/* ============================================================ */

/* Narrow container for centered detail content */
.container-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ───── LISTING VIEW ───── */

.challenges-page-header {
  padding: 72px 0 40px;
  text-align: center;
  background: var(--bg);
}
.challenges-page-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin: 0 0 16px;
}
.challenges-page-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
}

.challenges-list-section {
  padding: 32px 0 48px;
}

/* Horizontal challenge card — main listing card */
.challenge-list-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.challenge-list-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-color: rgba(124, 58, 237, 0.25);
}
.challenge-list-card-link {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 0;
  text-decoration: none;
  color: inherit;
  min-height: 320px;
}
.challenge-list-card-image {
  position: relative;
  overflow: hidden;
  background: #0a0a0a;
  min-height: 280px;
}
.challenge-list-card-image svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
}
.challenge-list-card-info {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.challenge-list-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.8px;
  margin: 0 0 2px;
  line-height: 1.15;
}
.challenge-list-card-dates {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.challenge-list-card-dates svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--purple);
}
.challenge-list-card-dates strong {
  color: var(--text);
  font-weight: 600;
}
.challenge-list-card-desc {
  color: #4a4a4a;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 6px 0 4px;
}
.challenge-list-card-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 6px 0 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.challenge-list-card-stats .stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text);
}
.challenge-list-card-stats .stat-row svg {
  color: var(--purple);
  flex-shrink: 0;
}
.challenge-list-card-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}
.challenge-list-card-actions .btn {
  padding: 12px 24px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* OPEN ribbon overlay */
.challenge-ribbon {
  position: absolute;
  top: 22px;
  left: -52px;
  width: 170px;
  padding: 7px 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #fff;
  transform: rotate(-45deg);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
  z-index: 2;
}
.challenge-ribbon-open {
  background: linear-gradient(135deg, #00c864 0%, #00a74a 100%);
}
.challenge-ribbon-closed {
  background: linear-gradient(135deg, #999 0%, #666 100%);
}

/* Past challenges listing footer */
.past-challenges-list {
  padding: 48px 0 72px;
  text-align: center;
  border-top: 1px solid var(--border-light);
  background: #fafafa;
}
.past-challenges-list .section-label {
  margin-bottom: 8px;
}
.past-challenges-list .section-title {
  color: var(--text);
}
.past-challenges-note {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 14px;
}

/* Responsive — stack card vertically */
@media (max-width: 840px) {
  .challenge-list-card-link {
    grid-template-columns: 1fr;
  }
  .challenge-list-card-image {
    min-height: 220px;
  }
  .challenge-list-card-image svg {
    min-height: 220px;
  }
  .challenge-list-card-info {
    padding: 24px 22px;
  }
  .challenge-list-card-title {
    font-size: 1.5rem;
  }
}

/* ───── DETAIL VIEW ───── */

.detail-top {
  padding: 40px 0 32px;
  background: var(--bg);
}

.detail-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.2s;
}
.detail-back-link:hover {
  color: var(--purple);
}

.detail-header {
  text-align: center;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-light);
}
.detail-eyebrow {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.detail-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1.8px;
  line-height: 1.05;
  margin: 0 0 28px;
}
.detail-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.detail-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}
.detail-stat svg {
  color: var(--purple);
  flex-shrink: 0;
}
.detail-prize {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: 50px;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.detail-prize svg {
  color: var(--purple);
  flex-shrink: 0;
}
.detail-prize-highlight {
  color: var(--purple);
  font-weight: 700;
}
.detail-dates {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.detail-date-row {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
}
.detail-date-row svg {
  color: var(--purple);
  margin-top: 2px;
  flex-shrink: 0;
}
.detail-date-row strong {
  color: var(--text);
  font-weight: 600;
}

/* Detail body copy */
.detail-body {
  padding: 40px 0 8px;
  color: #333;
  font-size: 1rem;
  line-height: 1.7;
}
.detail-body h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 20px;
  letter-spacing: -0.5px;
}
.detail-body h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 12px;
}
.detail-body p {
  margin: 0 0 16px;
  color: #444;
}
.detail-body ul {
  padding-left: 22px;
  margin: 0 0 20px;
}
.detail-body li {
  margin-bottom: 10px;
  color: #444;
}
.detail-body li::marker {
  color: var(--purple);
}
.detail-body strong {
  color: var(--text);
  font-weight: 600;
}

/* Detail CTAs */
.detail-actions {
  display: flex;
  justify-content: center;
  padding: 16px 0 20px;
}
.detail-submit-cta {
  font-size: 1rem;
  padding: 16px 44px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.detail-quick-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 0 32px;
  flex-wrap: wrap;
}
.detail-quick-links a {
  color: var(--purple);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
}
.detail-quick-links a:hover {
  text-decoration: underline;
}
.detail-quick-links .link-divider {
  color: var(--border);
}

/* ───── ENTRIES GRID ───── */

.detail-entries-section {
  padding: 64px 0;
  border-top: 1px solid var(--border-light);
  background: #fafafa;
}
.entries-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}
.entries-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.4px;
}
.entries-sort-select {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 32px 8px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.entries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.entry-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}
.entry-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  border-color: rgba(124, 58, 237, 0.25);
}
.entry-card-author {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
}
.entry-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.entry-avatar-initial {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.entry-author-info {
  min-width: 0;
  flex: 1;
}
.entry-author-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.entry-author-handle {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.entry-card-preview {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #f5f5f7;
  overflow: hidden;
}
.entry-card-preview iframe {
  width: 200%;
  height: 200%;
  transform: scale(0.5);
  transform-origin: top left;
  pointer-events: none;
  border: none;
}
.entry-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f5f7, #eaeaf0);
  font-size: 2.5rem;
  opacity: 0.5;
}
.entry-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.7) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.2s;
}
.entry-card:hover .entry-card-overlay {
  opacity: 1;
}
.entry-view-btn {
  background: var(--accent);
  color: var(--text);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
}
.entry-card-meta {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.entry-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.entry-card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.entries-loading,
.entries-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.entries-empty h3 {
  color: var(--text);
  margin-bottom: 8px;
  font-size: 1.2rem;
}
.entries-empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

/* ───── INFO SECTIONS (How to Enter / Judging / Terms) ───── */

.info-section {
  padding: 64px 0;
  border-top: 1px solid var(--border-light);
  background: var(--bg);
}
.info-section-alt {
  background: #fafafa;
}
.info-section .section-label {
  text-align: center;
  margin-bottom: 8px;
  color: var(--text-muted);
}
.info-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  letter-spacing: -0.8px;
  margin: 0 0 32px;
}
.info-intro {
  color: var(--text-muted);
  font-size: 1rem;
  text-align: center;
  margin-bottom: 32px;
}
.info-ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.info-ol li {
  counter-increment: step;
  position: relative;
  padding-left: 56px;
  color: #444;
  font-size: 0.95rem;
  line-height: 1.6;
}
.info-ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -4px;
  width: 38px;
  height: 38px;
  background: var(--accent);
  color: var(--text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(200, 255, 0, 0.3);
}
.info-ol li strong {
  display: block;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 1rem;
}
.judging-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 32px 0 24px;
}
@media (max-width: 760px) {
  .judging-grid {
    grid-template-columns: 1fr;
  }
}
.judging-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.judging-weight {
  display: inline-block;
  background: #f5f0ff;
  color: var(--purple);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.judging-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}
.judging-card p {
  color: #555;
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0;
}
.info-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  margin-top: 24px;
  font-style: italic;
}

/* Terms section — compact typography */
#terms-conditions h3 {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--purple);
  margin: 28px 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
#terms-conditions ul {
  padding-left: 22px;
  margin: 0 0 16px;
  list-style: disc;
}
#terms-conditions li {
  color: #555;
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 6px;
}
#terms-conditions li::marker {
  color: var(--purple);
}
#terms-conditions a {
  color: var(--purple);
  text-decoration: none;
}
#terms-conditions a:hover {
  text-decoration: underline;
}

/* ============================================================ */
/* CHALLENGES — ADDITIONAL STYLES (ribbon variants, modal, etc) */
/* ============================================================ */

/* Prize callout on listing cards */
.challenge-prize-callout {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 10px;
  animation: prize-glow 3s ease-in-out infinite;
}
@keyframes prize-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(253, 230, 138, 0); }
  50% { box-shadow: 0 0 12px 2px rgba(253, 230, 138, 0.4); }
}
.prize-callout-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  animation: prize-bounce 2s ease-in-out infinite;
}
@keyframes prize-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.prize-callout-text {
  font-size: 0.85rem;
  color: #92400e;
  line-height: 1.4;
  font-weight: 500;
}
.prize-callout-text strong {
  color: #78350f;
  font-weight: 700;
}

/* Ribbon variants */
.challenge-ribbon-upcoming {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
}
.challenge-ribbon-closed {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
  color: #fff;
}

/* Entry type badge on entry card */
.entry-card-author {
  position: relative;
}
.entry-type-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}
.entry-type-badge.entry-type-html {
  background: rgba(124, 58, 237, 0.12);
  color: var(--purple);
}
.entry-type-badge.entry-type-link {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

/* Entry thumbnail image (for entries with cover images) */
.entry-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── SUBMIT MODAL ENHANCEMENTS ── */

.modal-large {
  max-width: 560px;
}

/* Required asterisk + hint */
.req {
  color: #ef4444;
  margin-left: 2px;
}
.hint {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 400;
}
.hint-below {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin: 6px 0 0;
  line-height: 1.4;
}

/* Entry type toggle */
.entry-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.radio-card {
  display: block;
  cursor: pointer;
}
.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.radio-card-inner {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  transition: all 0.18s;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.radio-card:hover .radio-card-inner {
  border-color: rgba(124, 58, 237, 0.35);
}
.radio-card input:checked + .radio-card-inner {
  border-color: var(--purple);
  background: #faf5ff;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
}
.radio-card-icon {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 2px;
}
.radio-card-inner strong {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 700;
  display: block;
}
.radio-card-inner small {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* File name text in selected file row */
.file-name-text {
  font-size: 0.85rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
}

/* Cover images upload grid */
.image-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}
.image-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f5f7;
  border: 1px solid var(--border);
}
.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s;
}
.thumb-remove:hover {
  background: rgba(239, 68, 68, 0.95);
}
.add-image-btn {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 2px dashed var(--border);
  background: #fafafa;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.add-image-btn:hover {
  border-color: var(--purple);
  background: #faf5ff;
}
.add-image-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.add-image-icon {
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-muted);
  font-weight: 300;
}
.add-image-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Progress wrap */
.progress-wrap {
  margin: 12px 0;
}
.progress-track {
  height: 4px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.3s;
}
.progress-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Form error text */
.form-error-text {
  color: #ef4444;
  font-size: 0.85rem;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
}

/* Success state */
.success-emoji {
  font-size: 3rem;
  margin-bottom: 16px;
}
.success-heading {
  margin-bottom: 8px;
  color: var(--text);
}

/* Textarea in challenge modal */
#challenge-entry-desc {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 50px;
  background: #fff;
  color: var(--text);
}
#challenge-entry-desc:focus {
  outline: none;
  border-color: var(--purple);
}

/* Link URL input */
#challenge-entry-link {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  background: #fff;
  color: var(--text);
}
#challenge-entry-link:focus {
  outline: none;
  border-color: var(--purple);
}

/* Preview modal: Open in new tab button */
.challenge-preview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.preview-open-btn {
  background: var(--accent);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.preview-open-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 255, 0, 0.3);
}

/* ============================================================ */
/* DAILY VIBE CODING — STYLES                                   */
/* ============================================================ */

/* Daily ribbon */
.challenge-ribbon-daily {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  color: #fff;
}

/* Daily card subtitle */
.daily-card-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin: -4px 0 8px;
}
.daily-detail-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
  margin: -16px 0 24px;
}

/* Daily prompts grid */
.daily-prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.daily-prompt-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.daily-prompt-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}
.daily-prompt-day {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--purple);
  margin-bottom: 6px;
}
.daily-prompt-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.25;
}
.daily-prompt-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0 0 10px;
}
.daily-prompt-diff {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 20px;
}

/* Daily subscribe consent checkbox */
.daily-sub-consent {
  cursor: pointer;
}
.daily-sub-consent input[type="checkbox"] {
  accent-color: var(--purple);
}

@media (max-width: 600px) {
  .daily-prompts-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .daily-prompt-card {
    padding: 14px;
  }
}

/* Password input with eye toggle */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-input-wrap input {
  padding-right: 42px;
  width: 100%;
}
.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}
.password-toggle:hover {
  color: var(--text);
}

/* Admin — manual invite box */
.admin-manual-invite {
  background: #f8f7ff;
  border: 1px solid #e9d5ff;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.admin-manual-invite-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.admin-manual-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-family: 'Inter', sans-serif;
  background: #fff;
  color: var(--text);
  min-width: 0;
}
.admin-manual-input:focus {
  outline: none;
  border-color: var(--purple);
}

/* ============================================================ */
/* ADMIN — CHALLENGES DASHBOARD                                 */
/* ============================================================ */

/* Metric cards row */
.admin-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 700px) {
  .admin-metrics-row { grid-template-columns: repeat(2, 1fr); }
}
.admin-metric-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.admin-metric-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.admin-metric-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.admin-metric-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Section cards (collapsible) */
.admin-section-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
}
.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  gap: 12px;
  transition: background 0.15s;
}
.admin-section-header:hover {
  background: #fafafa;
}
.admin-section-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.admin-section-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.admin-section-title-row strong {
  font-size: 0.95rem;
  color: var(--text);
  display: block;
}
.admin-section-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}
.admin-section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.admin-expand-arrow {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.admin-section-body {
  padding: 0 20px 20px;
  border-top: 1px solid var(--border-light);
}
.admin-inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Admin table */
.admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table th {
  background: #fafafa;
  padding: 8px 12px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.admin-table tr:hover td {
  background: #fafafa;
}

/* Admin badges */
.admin-badge-active {
  background: #ecfdf5;
  color: #059669;
}
.admin-badge-upcoming {
  background: #fefce8;
  color: #b45309;
}
.admin-badge-ended {
  background: #f3f4f6;
  color: #6b7280;
}

/* Leaderboard */
.admin-leaderboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #fafafa;
  border-radius: 8px;
  font-size: 0.85rem;
}
.admin-lb-rank {
  font-size: 1rem;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.admin-lb-name {
  flex: 1;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-lb-streak {
  font-weight: 700;
  color: #ea580c;
  white-space: nowrap;
}
.admin-lb-submissions {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Activity feed */
.admin-activity-feed {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fafafa;
  border-radius: 8px;
  font-size: 0.85rem;
}
.admin-activity-badge {
  font-size: 1rem;
  flex-shrink: 0;
}
.admin-activity-content {
  flex: 1;
  min-width: 0;
  color: var(--text);
}
.admin-activity-content em {
  color: var(--purple);
  font-style: normal;
  font-weight: 500;
}
.admin-activity-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
