/* ═══════════════════════════════════════════════════════════
   IdeaBoard.Space — Main Stylesheet
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Variables ──────────────────────────────────────────── */
:root {
  --primary:        #7c3aed;
  --primary-light:  #8b5cf6;
  --primary-dark:   #6d28d9;
  --primary-glow:   rgba(124, 58, 237, 0.18);
  --accent:         #f97316;
  --accent-light:   #fb923c;
  --success:        #10b981;
  --bg:             #f5f3ff;
  --bg-card:        #ffffff;
  --text:           #1e1b4b;
  --text-mid:       #4b5563;
  --text-muted:     #9ca3af;
  --border:         #ede9fe;
  --shadow-sm:      0 2px 8px rgba(124,58,237,0.07);
  --shadow:         0 6px 24px rgba(124,58,237,0.11);
  --shadow-lg:      0 16px 48px rgba(124,58,237,0.18);
  --radius-sm:      8px;
  --radius:         14px;
  --radius-lg:      22px;
  --ease:           cubic-bezier(0.4, 0, 0.2, 1);
  --t:              0.22s;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html   { scroll-behavior: smooth; font-size: 16px; }
body   {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a      { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }
img    { max-width: 100%; display: block; }

/* ── Utility ────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.sr-only   { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.95rem;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t);
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(109,40,217,0.3);
  transform: translateY(-2px);
}

.btn-outline {
  border: 2px solid var(--primary); color: var(--primary); background: transparent;
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-ghost {
  color: var(--text-mid); background: transparent;
}
.btn-ghost:hover { background: var(--border); color: var(--text); }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; border-radius: var(--radius); }

/* ── Navbar ─────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245,243,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.2rem; color: var(--primary);
}
.nav-logo svg { width: 32px; height: 32px; }
.nav-logo .dot { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: 80px 0 100px;
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 60%, #fef3c7 100%);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(139,92,246,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(249,115,22,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative; display: flex; align-items: center;
  gap: 48px; flex-wrap: wrap;
}
.hero-text { flex: 1; min-width: 280px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(124,58,237,0.1); color: var(--primary);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: 999px; padding: 4px 14px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em;
  margin-bottom: 20px; text-transform: uppercase;
}
.hero-badge .dot-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary); animation: pulse 1.8s infinite;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 900; line-height: 1.08;
  color: var(--text); margin-bottom: 20px;
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.15rem; color: var(--text-mid);
  max-width: 500px; line-height: 1.7; margin-bottom: 36px;
}
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-stat {
  display: flex; align-items: center; gap: 6px;
  color: var(--text-mid); font-size: 0.9rem;
}
.hero-stat strong { color: var(--primary); font-weight: 700; }

/* Floating blobs */
.hero-visual {
  flex: 0 0 340px; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.blob-wrap {
  position: relative; width: 280px; height: 280px;
}
.blob {
  position: absolute; border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%;
  animation: morphBlob 8s ease-in-out infinite;
}
.blob-1 {
  width: 200px; height: 200px; top: 20px; left: 20px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  opacity: 0.85; animation-delay: 0s;
}
.blob-2 {
  width: 140px; height: 140px; bottom: 10px; right: 10px;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  opacity: 0.8; animation-delay: -4s;
}
.blob-3 {
  width: 90px; height: 90px; top: 60px; right: 30px;
  background: linear-gradient(135deg, #34d399, #10b981);
  opacity: 0.6; animation-delay: -2s;
}
.blob-icon {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 72px; filter: drop-shadow(0 8px 24px rgba(0,0,0,0.15));
  z-index: 2;
}

/* ── Board Section ──────────────────────────────────────── */
.board-section { padding: 60px 0 100px; }
.board-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 32px; flex-wrap: wrap; gap: 16px;
}
.board-header h2 {
  font-size: 1.8rem; font-weight: 800; color: var(--text);
}
.board-header p { color: var(--text-mid); margin-top: 4px; }

/* ── Filters ────────────────────────────────────────────── */
.filters-bar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 36px; flex-wrap: wrap;
}
.cat-pills { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.cat-pill {
  padding: 7px 16px; border-radius: 999px; font-size: 0.85rem; font-weight: 500;
  border: 1.5px solid var(--border); color: var(--text-mid); background: var(--bg-card);
  transition: all var(--t) var(--ease);
}
.cat-pill:hover  { border-color: var(--primary); color: var(--primary); }
.cat-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.sort-select {
  padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--bg-card);
  color: var(--text-mid); font-size: 0.9rem; cursor: pointer;
  transition: border-color var(--t);
}
.sort-select:hover, .sort-select:focus { border-color: var(--primary); outline: none; color: var(--text); }

/* ── Ideas Grid ─────────────────────────────────────────── */
.ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* ── Idea Card ──────────────────────────────────────────── */
.idea-card {
  background: var(--bg-card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  padding: 24px; cursor: pointer;
  display: flex; flex-direction: column; gap: 14px;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
  animation: fadeInUp 0.4s var(--ease) both;
}
.idea-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(124,58,237,0.2);
}

.idea-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }

.cat-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
/* Category colours */
.cat-technology   { background:#dbeafe; color:#1d4ed8; }
.cat-business     { background:#d1fae5; color:#065f46; }
.cat-social       { background:#fce7f3; color:#9d174d; }
.cat-creative     { background:#ffedd5; color:#c2410c; }
.cat-education    { background:#ede9fe; color:#5b21b6; }
.cat-health       { background:#ccfbf1; color:#0f766e; }
.cat-environment  { background:#dcfce7; color:#166534; }
.cat-other        { background:#f3f4f6; color:#374151; }
.cat-general      { background:#f3f4f6; color:#374151; }

.idea-card h3 {
  font-size: 1.05rem; font-weight: 700; color: var(--text);
  line-height: 1.35;
}
.idea-card p {
  font-size: 0.88rem; color: var(--text-mid);
  line-height: 1.6; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.idea-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid var(--border);
  margin-top: auto;
}
.idea-author {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8rem; color: var(--text-muted);
}
.idea-author .avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.65rem; font-weight: 700; flex-shrink: 0;
}
.idea-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 1px; }

/* Vote button */
.vote-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--bg);
  color: var(--text-mid); font-size: 0.85rem; font-weight: 600;
  transition: all var(--t) var(--ease);
}
.vote-btn:hover  { border-color: var(--primary); color: var(--primary); background: var(--primary-glow); }
.vote-btn.voted  { background: var(--primary); color: #fff; border-color: var(--primary); }
.vote-btn.voted:hover { background: var(--primary-dark); }
.vote-btn svg { width: 14px; height: 14px; }

/* ── Empty State ────────────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1; text-align: center; padding: 80px 24px;
  color: var(--text-muted);
}
.empty-state .emoji { font-size: 56px; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.2rem; font-weight: 700; color: var(--text-mid); margin-bottom: 8px; }

/* Loading */
.ideas-loader {
  grid-column: 1 / -1; display: flex; justify-content: center; padding: 60px;
}
.spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  animation: spin 0.7s linear infinite;
}

/* ── Submit Modal ───────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(30,27,75,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; max-height: 90vh;
  overflow-y: auto; padding: 40px;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s var(--ease);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }

.modal-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px;
}
.modal-header h2 { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.modal-header p  { color: var(--text-mid); font-size: 0.9rem; margin-top: 4px; }
.modal-close {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-mid); flex-shrink: 0; margin-left: 12px;
  transition: all var(--t);
}
.modal-close:hover { background: #fee2e2; color: #ef4444; border-color: #fca5a5; }

/* Form */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: 0.85rem; font-weight: 600; color: var(--text);
  margin-bottom: 6px;
}
.form-group label .req { color: var(--accent); margin-left: 2px; }
.form-control {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); font-size: 0.95rem;
  transition: border-color var(--t), box-shadow var(--t);
}
.form-control:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
  background: #fff;
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.char-count { font-size: 0.75rem; color: var(--text-muted); float: right; margin-top: 4px; }
.char-count.over { color: #ef4444; }

.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

.form-actions {
  display: flex; gap: 12px; margin-top: 28px;
}
.form-actions .btn { flex: 1; justify-content: center; }

/* Success / Error messages */
.form-msg {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 500; margin-top: 16px;
  display: none;
}
.form-msg.success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.form-msg.error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Toast ──────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--text); color: #fff;
  padding: 14px 20px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  transform: translateX(110%); transition: transform 0.3s var(--ease);
  max-width: 320px;
}
.toast.show    { transform: translateX(0); }
.toast.success { background: var(--success); }
.toast.error   { background: #ef4444; }

/* ── Features Strip ─────────────────────────────────────── */
.features { padding: 64px 0; background: var(--bg-card); border-top: 1px solid var(--border); }
.features-inner {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 36px;
}
.feature-item { text-align: center; }
.feature-icon {
  width: 56px; height: 56px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; font-size: 24px;
  box-shadow: 0 4px 12px var(--primary-glow);
}
.feature-item h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.feature-item p  { font-size: 0.88rem; color: var(--text-mid); line-height: 1.6; }

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  background: var(--text); color: rgba(255,255,255,0.7);
  padding: 40px 0;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-logo { color: #fff; font-weight: 800; font-size: 1.1rem; }
.footer-logo .dot { color: var(--accent); }
.footer p { font-size: 0.85rem; }
.footer a { color: var(--primary-light); transition: color var(--t); }
.footer a:hover { color: #fff; }

/* ── Animations ─────────────────────────────────────────── */
@keyframes pulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.5); opacity: 0.5; }
}
@keyframes morphBlob {
  0%,100% { border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%; }
  25%     { border-radius: 30% 70% 40% 60% / 60% 40% 70% 30%; }
  50%     { border-radius: 50% 50% 30% 70% / 40% 70% 30% 60%; }
  75%     { border-radius: 70% 30% 60% 40% / 30% 50% 60% 40%; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 52px 0 64px; }
  .hero-visual { display: none; }
  .hero h1 { font-size: 2.2rem; }
  .board-header { flex-direction: column; align-items: flex-start; }
  .modal { padding: 28px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .navbar-inner { padding: 0 16px; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .ideas-grid { grid-template-columns: 1fr; }
}

/* ── Detail Modal ───────────────────────────────────────── */
.detail-modal {
  max-width: 620px;
  padding: 36px;
}
.detail-modal .modal-header {
  margin-bottom: 16px;
}
.detail-title {
  font-size: 1.55rem; font-weight: 800; color: var(--text);
  line-height: 1.25; margin-bottom: 16px;
}
.detail-desc {
  font-size: 0.97rem; color: var(--text-mid);
  line-height: 1.75; white-space: pre-wrap;
  margin-bottom: 28px;
}
.detail-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 20px; border-top: 1px solid var(--border); gap: 12px;
}
.detail-footer .vote-btn {
  font-size: 0.95rem; padding: 9px 20px;
}

/* ── Detail Image ───────────────────────────────────────── */
.detail-img-wrap {
  display: none;
  margin: -36px -36px 24px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  max-height: 280px;
}
.detail-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}

/* ── Card Image ─────────────────────────────────────────── */
.card-img-wrap {
  margin: -24px -24px 0;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  height: 160px;
}
.card-img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  transition: transform 0.4s var(--ease);
}
.idea-card:hover .card-img { transform: scale(1.04); }

/* ── Upload Zone ────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
  position: relative;
  overflow: hidden;
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--primary);
  background: rgba(124,58,237,0.04);
}
.upload-zone-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 28px 20px;
  color: var(--text-muted); text-align: center;
}
.upload-zone-inner svg { color: var(--text-muted); margin-bottom: 4px; }
.upload-zone-inner p { font-size: 0.88rem; margin: 0; }
.upload-hint { font-size: 0.76rem !important; color: var(--text-muted); }
.upload-browse-btn {
  color: var(--primary); font-weight: 600; font-size: 0.88rem;
  text-decoration: underline; cursor: pointer;
  background: none; border: none; padding: 0; font-family: inherit;
}
.upload-preview {
  display: none; position: relative;
}
.upload-preview img {
  width: 100%; max-height: 200px; object-fit: contain;
  display: block; border-radius: var(--radius-sm);
}
.upload-remove-btn {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,0.55); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; line-height: 1; cursor: pointer;
  border: none; font-family: inherit;
  transition: background var(--t);
}
.upload-remove-btn:hover { background: rgba(239,68,68,0.85); }

/* ── Auth Pages ─────────────────────────────────────────── */
.auth-body { background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 60%, #fef3c7 100%); }

.auth-wrap {
  min-height: calc(100vh - 64px);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 16px;
}

.auth-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  padding: 48px 40px;
  width: 100%; max-width: 460px;
}

.auth-logo {
  font-size: 1.2rem; font-weight: 800; color: var(--primary);
  margin-bottom: 28px;
}
.auth-logo .dot { color: var(--accent); }

.auth-title {
  font-size: 1.7rem; font-weight: 800; color: var(--text);
  margin-bottom: 6px;
}
.auth-subtitle {
  color: var(--text-mid); font-size: 0.92rem; margin-bottom: 28px;
}
.auth-footer {
  text-align: center; margin-top: 24px;
  font-size: 0.88rem; color: var(--text-muted);
}
.auth-footer a { color: var(--primary); font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .auth-card { padding: 32px 20px; }
}

/* ── Navbar User Button ──────────────────────────────────── */
.nav-user-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  transition: all var(--t) var(--ease);
  color: var(--text);
}
.nav-user-btn:hover {
  border-color: var(--primary);
  background: var(--primary-glow);
  color: var(--primary);
}
.nav-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.7rem; font-weight: 700; flex-shrink: 0;
}
.nav-user-name { font-size: 0.88rem; font-weight: 600; }

/* ── Profile Page ───────────────────────────────────────── */
.profile-wrap { padding: 48px 0 80px; }

.profile-header-card {
  display: flex; align-items: center; gap: 28px;
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  padding: 36px 40px; margin-bottom: 32px; flex-wrap: wrap;
}
.profile-big-avatar {
  width: 80px; height: 80px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; display: block;
  box-shadow: 0 4px 16px var(--primary-glow);
  border: 3px solid var(--bg-card);
  outline: 2px solid var(--border);
}
.profile-info h1 {
  font-size: 1.55rem; font-weight: 800; color: var(--text);
  margin-bottom: 4px;
}
.profile-info > p {
  color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px;
}
.profile-stats {
  display: flex; gap: 24px;
}
.profile-stat {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px;
}
.profile-stat strong {
  font-size: 1.4rem; font-weight: 800; color: var(--primary);
}
.profile-stat span {
  font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-body {
  display: grid; grid-template-columns: 360px 1fr; gap: 28px;
  align-items: start;
}
@media (max-width: 900px) {
  .profile-body { grid-template-columns: 1fr; }
}

.settings-card {
  background: var(--bg-card); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  padding: 28px; margin-bottom: 20px;
}
.settings-card h2 {
  font-size: 1.05rem; font-weight: 700; color: var(--text);
  margin-bottom: 20px;
}

.profile-ideas h2 {
  font-size: 1.3rem; font-weight: 800; color: var(--text);
  margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}
.ideas-count {
  background: var(--primary); color: #fff;
  border-radius: 999px; padding: 2px 10px;
  font-size: 0.78rem; font-weight: 700;
}

.profile-ideas-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 16px;
}

.profile-idea-card {
  background: var(--bg-card); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.profile-idea-body { padding: 18px 20px; }
.profile-idea-body .cat-badge { margin-bottom: 8px; display: inline-block; }
.profile-idea-body h3 {
  font-size: 1rem; font-weight: 700; color: var(--text);
  margin-bottom: 6px;
}
.profile-idea-body p {
  font-size: 0.86rem; color: var(--text-mid); line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.profile-idea-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.vote-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--primary-glow); color: var(--primary);
  border-radius: 999px; padding: 3px 10px;
  font-size: 0.78rem; font-weight: 600;
}

/* ── Avatar image (Gravatar) ────────────────────────────── */
.avatar-img {
  width: 26px; height: 26px; border-radius: 50%;
  object-fit: cover; display: block; flex-shrink: 0;
}

/* ── Linked author on cards ─────────────────────────────── */
.idea-author-link {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8rem; color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--t);
}
.idea-author-link:hover { color: var(--primary); }
.idea-author-link:hover .avatar-img { box-shadow: 0 0 0 2px var(--primary); }
