/* ==========================================================
   Ri Pics and Prompts — Design System
   ========================================================== */

:root {
  --rp-purple: #7c3aed;
  --rp-purple-2: #a78bfa;
  --rp-blue: #2563eb;
  --rp-cyan: #06b6d4;
  --rp-pink: #ec4899;
  --rp-gold: #f59e0b;
  --rp-gradient: linear-gradient(135deg, #7c3aed 0%, #2563eb 55%, #06b6d4 100%);
  --rp-gradient-soft: linear-gradient(135deg, rgba(124,58,237,.14), rgba(37,99,235,.10), rgba(6,182,212,.12));
  --rp-gold-gradient: linear-gradient(135deg, #f59e0b, #f97316, #ec4899);
  --rp-radius: 20px;
  --rp-radius-sm: 12px;
  --rp-font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --rp-font-display: 'Montserrat', 'Poppins', sans-serif;
  --rp-ease: cubic-bezier(.2,.8,.2,1);
}

/* ---------- Light theme tokens ---------- */
:root,
[data-bs-theme="light"] {
  --rp-bg: #f5f6fb;
  --rp-bg-2: #ffffff;
  --rp-surface: rgba(255,255,255,.78);
  --rp-surface-solid: #ffffff;
  --rp-surface-2: rgba(15,23,42,.035);
  --rp-border: rgba(15,23,42,.08);
  --rp-text: #0f172a;
  --rp-heading: #0b1020;
  --rp-muted: #64748b;
  --rp-shadow: 0 10px 30px -12px rgba(15,23,42,.18);
  --rp-shadow-lg: 0 30px 60px -20px rgba(76,29,149,.28);
  --rp-header-bg: rgba(255,255,255,.72);
  --rp-input-bg: #ffffff;
  --rp-skeleton: #e8eaf2;
  --rp-skeleton-shine: #f5f6fb;
}

/* ---------- Dark theme tokens ---------- */
[data-bs-theme="dark"] {
  --rp-bg: #070b18;
  --rp-bg-2: #0b1122;
  --rp-surface: rgba(17,24,43,.62);
  --rp-surface-solid: #111a2e;
  --rp-surface-2: rgba(255,255,255,.04);
  --rp-border: rgba(255,255,255,.08);
  --rp-text: #dfe4ee;
  --rp-heading: #ffffff;
  --rp-muted: #94a3b8;
  --rp-shadow: 0 10px 30px -12px rgba(0,0,0,.6);
  --rp-shadow-lg: 0 30px 60px -20px rgba(124,58,237,.35);
  --rp-header-bg: rgba(7,11,24,.72);
  --rp-input-bg: rgba(255,255,255,.04);
  --rp-skeleton: #151d33;
  --rp-skeleton-shine: #1d2742;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body {
  font-family: var(--rp-font);
  background: var(--rp-bg);
  color: var(--rp-text);
  font-size: .95rem;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color .3s var(--rp-ease), color .3s var(--rp-ease);
}
.site-main { flex: 1 0 auto; position: relative; z-index: 1; }
h1, h2, h3, h4, h5, h6, .display-font { font-family: var(--rp-font-display); color: var(--rp-heading); letter-spacing: -.01em; }
a { color: var(--rp-purple-2); text-decoration: none; transition: color .2s; }
[data-bs-theme="light"] a { color: var(--rp-purple); }
a:hover { color: var(--rp-cyan); }
.text-muted { color: var(--rp-muted) !important; }
::selection { background: rgba(124,58,237,.35); color: #fff; }
img { max-width: 100%; }
.skip-link { position: absolute; top: 8px; left: 8px; z-index: 2000; background: var(--rp-purple); color: #fff; padding: 8px 14px; border-radius: 8px; }
.btn { text-transform: none; font-weight: 500; letter-spacing: 0; box-shadow: none; }
.btn:focus-visible, a:focus-visible, button:focus-visible, .form-control:focus, .form-select:focus { outline: 2px solid var(--rp-cyan); outline-offset: 2px; box-shadow: none; }
.form-control, .form-select {
  background-color: var(--rp-input-bg);
  border: 1px solid var(--rp-border);
  color: var(--rp-text);
  border-radius: var(--rp-radius-sm);
  padding: .65rem .95rem;
}
.form-control::placeholder { color: var(--rp-muted); opacity: .8; }
.form-control:focus, .form-select:focus { background-color: var(--rp-input-bg); color: var(--rp-text); border-color: var(--rp-purple); }
.form-label { font-weight: 500; font-size: .88rem; color: var(--rp-heading); }
.form-check-input:checked { background-color: var(--rp-purple); border-color: var(--rp-purple); }
.form-check-input { border-color: var(--rp-muted); }
.dropdown-item i { width: 20px; margin-right: 8px; opacity: .75; }
.table { --bs-table-bg: transparent; color: var(--rp-text); }
.table > :not(caption) > * > * { border-color: var(--rp-border); color: var(--rp-text); }
.badge { font-weight: 500; }
code { color: var(--rp-pink); }

/* Background orbs */
.bg-orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-orbs span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35; }
.bg-orbs span:nth-child(1) { width: 480px; height: 480px; background: var(--rp-purple); top: -160px; left: -120px; }
.bg-orbs span:nth-child(2) { width: 420px; height: 420px; background: var(--rp-cyan); top: 30%; right: -160px; opacity: .2; }
.bg-orbs span:nth-child(3) { width: 380px; height: 380px; background: var(--rp-blue); bottom: -160px; left: 30%; opacity: .2; }
[data-bs-theme="light"] .bg-orbs span { opacity: .14; }

/* ---------- Buttons ---------- */
.btn-gradient {
  background: var(--rp-gradient);
  background-size: 160% 160%;
  color: #fff !important;
  border: 0;
  box-shadow: 0 8px 24px -10px rgba(124,58,237,.7);
  transition: transform .2s var(--rp-ease), box-shadow .2s var(--rp-ease), background-position .4s;
}
.btn-gradient:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 14px 30px -10px rgba(37,99,235,.75); }
.btn-gradient:active { transform: translateY(0); }
.btn-gradient:disabled { opacity: .6; transform: none; }
.btn-premium { background: var(--rp-gold-gradient); color: #fff !important; border: 0; box-shadow: 0 8px 22px -10px rgba(245,158,11,.8); }
.btn-premium:hover { filter: brightness(1.08); transform: translateY(-2px); }
.btn-soft { background: var(--rp-surface-2); border: 1px solid var(--rp-border); color: var(--rp-text) !important; }
.btn-soft:hover { background: rgba(124,58,237,.12); border-color: rgba(124,58,237,.35); }
.btn-outline-glow { border: 1px solid rgba(167,139,250,.5); color: var(--rp-heading) !important; background: transparent; }
.btn-outline-glow:hover { background: rgba(124,58,237,.12); border-color: var(--rp-purple-2); }
.btn-xs { padding: .15rem .6rem; font-size: .72rem; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center;
  border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--rp-text);
  transition: background .2s, transform .2s, border-color .2s; font-size: 1.02rem;
}
.icon-btn:hover { background: var(--rp-surface-2); border-color: var(--rp-border); color: var(--rp-heading); transform: translateY(-1px); }
.icon-action {
  width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0;
  border: 1px solid var(--rp-border); background: var(--rp-surface-2); color: var(--rp-muted); transition: all .2s var(--rp-ease);
}
.icon-action:hover { color: var(--rp-pink); border-color: rgba(236,72,153,.4); transform: scale(1.08); }
.icon-action.active { color: #fff; background: linear-gradient(135deg, #ec4899, #7c3aed); border-color: transparent; }
.icon-action.glass { background: rgba(10,14,28,.45); color: #fff; border-color: rgba(255,255,255,.2); backdrop-filter: blur(8px); }
.icon-action.pop { animation: pop .45s var(--rp-ease); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ---------- Glass surfaces ---------- */
.glass-card {
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--rp-shadow);
}
.glass-modal { background: var(--rp-surface-solid); border: 1px solid var(--rp-border); border-radius: var(--rp-radius); color: var(--rp-text); }
.glass-dropdown { background: var(--rp-surface-solid); border: 1px solid var(--rp-border); border-radius: 14px; box-shadow: var(--rp-shadow-lg); padding: .4rem; min-width: 220px; }
.glass-dropdown .dropdown-item { border-radius: 10px; color: var(--rp-text); padding: .5rem .8rem; font-size: .9rem; }
.glass-dropdown .dropdown-item:hover { background: rgba(124,58,237,.12); color: var(--rp-heading); }
.glass-alert { border-radius: 14px; backdrop-filter: blur(10px); }
.gradient-text { background: var(--rp-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gradient-border { position: relative; }
.gradient-border::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: var(--rp-gradient); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }

/* ---------- Header ---------- */
.site-header { background: var(--rp-header-bg); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--rp-border); z-index: 1030; transition: box-shadow .3s; }
.site-header.scrolled { box-shadow: 0 10px 30px -18px rgba(0,0,0,.5); }
.site-header .navbar { padding: .6rem 0; box-shadow: none; background: transparent; }
.brand-text { font-family: var(--rp-font-display); font-weight: 800; letter-spacing: .06em; font-size: 1rem; background: var(--rp-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.site-header .btn, .header-icons .btn { white-space: nowrap; }
.site-header .nav-link { white-space: nowrap; color: var(--rp-text); font-weight: 500; font-size: .9rem; padding: .5rem .75rem !important; border-radius: 10px; position: relative; }
.site-header .nav-link:hover { color: var(--rp-heading); background: var(--rp-surface-2); }
.site-header .nav-link.active { color: var(--rp-heading); }
.site-header .nav-link.active::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 18px; height: 3px; border-radius: 3px; background: var(--rp-gradient); transform: translateX(-50%); }
.nav-login { color: var(--rp-text) !important; font-weight: 500; text-decoration: none; }
.avatar-btn { border: 0; background: none; padding: 0; position: relative; border-radius: 50%; }
.avatar-btn img { border-radius: 50%; object-fit: cover; border: 2px solid transparent; background: var(--rp-gradient) border-box; }
.avatar-crown { position: absolute; bottom: -2px; right: -4px; width: 18px; height: 18px; border-radius: 50%; background: var(--rp-gold-gradient); color: #fff; font-size: .55rem; display: grid; place-items: center; border: 2px solid var(--rp-bg); }
.notif-dot { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--rp-pink); color: #fff; font-size: .62rem; font-weight: 600; display: grid; place-items: center; }
[data-bs-theme="dark"] .theme-light-icon, [data-bs-theme="light"] .theme-dark-icon { display: none; }
.navbar-toggler { border: 0; }
.navbar-toggler:focus { box-shadow: none; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; position: relative; }
.section-sm { padding: 48px 0; }
.section-eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--rp-purple-2); }
[data-bs-theme="light"] .section-eyebrow { color: var(--rp-purple); }
.section-title { font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: .5rem; }
.section-sub { color: var(--rp-muted); max-width: 640px; }
.page-hero { padding: 56px 0 32px; }
.page-hero h1 { font-weight: 800; font-size: clamp(1.8rem, 4vw, 3rem); }
.breadcrumb { font-size: .82rem; margin-bottom: .75rem; }
.breadcrumb-item a { color: var(--rp-muted); }
.breadcrumb-item.active { color: var(--rp-text); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--rp-muted); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 90px; position: relative; overflow: hidden; }
.hero-badge { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem .4rem .45rem; border-radius: 999px; background: var(--rp-surface); border: 1px solid var(--rp-border); font-size: .82rem; backdrop-filter: blur(10px); }
.hero-badge .dot { background: var(--rp-gradient); color: #fff; padding: .1rem .55rem; border-radius: 999px; font-size: .7rem; font-weight: 600; }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 4.1rem); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; }
.hero-lead { font-size: 1.08rem; color: var(--rp-muted); max-width: 560px; }
.hero-search { position: relative; max-width: 620px; }
.hero-search .form-control { height: 62px; border-radius: 999px; padding-left: 56px; padding-right: 140px; font-size: 1rem; background: var(--rp-surface); backdrop-filter: blur(14px); box-shadow: var(--rp-shadow); }
.hero-search .search-icon { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); color: var(--rp-muted); }
.hero-search .btn { position: absolute; right: 7px; top: 7px; bottom: 7px; border-radius: 999px; padding: 0 22px; }
.hero-tags a { display: inline-block; padding: .3rem .8rem; margin: .2rem; border-radius: 999px; font-size: .8rem; background: var(--rp-surface-2); border: 1px solid var(--rp-border); color: var(--rp-text); }
.hero-tags a:hover { border-color: var(--rp-purple-2); color: var(--rp-heading); }
.hero-visual { position: relative; height: 540px; }
.hero-art { position: absolute; border-radius: 24px; overflow: hidden; box-shadow: var(--rp-shadow-lg); border: 1px solid rgba(255,255,255,.12); transition: transform .6s var(--rp-ease); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-art.a1 { width: 58%; height: 72%; left: 20%; top: 6%; z-index: 2; animation: float 7s ease-in-out infinite; }
.hero-art.a2 { width: 38%; height: 46%; left: 0; top: 40%; z-index: 3; animation: float 8s ease-in-out infinite reverse; }
.hero-art.a3 { width: 36%; height: 44%; right: 0; top: 0; z-index: 1; animation: float 9s ease-in-out infinite; }
.hero-art.a4 { width: 34%; height: 36%; right: 4%; bottom: 0; z-index: 3; animation: float 6s ease-in-out infinite reverse; }
.hero-float { position: absolute; z-index: 5; padding: .7rem .95rem; border-radius: 16px; font-size: .8rem; background: var(--rp-surface); border: 1px solid var(--rp-border); backdrop-filter: blur(16px); box-shadow: var(--rp-shadow); }
.hero-float.f1 { left: 4%; top: 8%; animation: float 5s ease-in-out infinite; }
.hero-float.f2 { right: 30%; bottom: 4%; animation: float 6.5s ease-in-out infinite reverse; }
.hero-float.f3 { right: -2%; top: 48%; animation: float 7.5s ease-in-out infinite; max-width: 220px; }
.hero-float .mini-prompt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; color: var(--rp-muted); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* Stats counters */
.stat-card { padding: 1.4rem; text-align: center; }
.stat-number { font-family: var(--rp-font-display); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.3rem); }

/* ---------- Prompt cards ---------- */
.prompt-card { display: flex; flex-direction: column; overflow: hidden; transition: transform .35s var(--rp-ease), box-shadow .35s var(--rp-ease), border-color .35s; }
.prompt-card:hover { transform: translateY(-6px); box-shadow: var(--rp-shadow-lg); border-color: rgba(167,139,250,.35); }
.card-media { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--rp-skeleton); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--rp-ease); }
.prompt-card:hover .card-media img { transform: scale(1.06); }
.tier-badge { position: absolute; top: 12px; left: 12px; z-index: 2; padding: .28rem .7rem; font-size: .7rem; font-weight: 600; border-radius: 999px; letter-spacing: .03em; color: #fff; }
.tier-badge.free { background: rgba(16,185,129,.92); }
.tier-badge.premium { background: var(--rp-gold-gradient); box-shadow: 0 6px 18px -6px rgba(245,158,11,.8); }
.platform-chip { position: absolute; bottom: 12px; left: 12px; z-index: 2; padding: .25rem .65rem; border-radius: 999px; font-size: .7rem; color: #fff; background: rgba(10,14,28,.55); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.15); }
.card-content { padding: 1rem 1.05rem 1.1rem; display: flex; flex-direction: column; flex: 1; }
.category-link { color: var(--rp-purple-2); font-weight: 500; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }
[data-bs-theme="light"] .category-link { color: var(--rp-purple); }
.price-tag { font-weight: 700; font-size: .85rem; color: var(--rp-gold); }
.card-heading { font-size: 1rem; font-weight: 700; margin: .1rem 0 .35rem; line-height: 1.35; }
.card-heading a { color: var(--rp-heading); }
.card-heading a:hover { color: var(--rp-purple-2); }
.card-desc { font-size: .82rem; color: var(--rp-muted); margin-bottom: .8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.creator-chip { display: inline-flex; align-items: center; gap: .45rem; font-size: .78rem; color: var(--rp-text); min-width: 0; }
.creator-chip img { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.card-stats { display: flex; gap: .7rem; color: var(--rp-muted); white-space: nowrap; font-size: .75rem; }
.card-actions { display: flex; gap: .45rem; align-items: center; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--rp-border); }

/* List view */
.list-view .prompt-col { width: 100%; flex: 0 0 100%; max-width: 100%; }
.list-view .prompt-card { flex-direction: row; }
.list-view .card-media { width: 220px; flex-shrink: 0; aspect-ratio: auto; min-height: 200px; }
.list-view .card-desc { -webkit-line-clamp: 3; }

/* ---------- Masonry gallery ---------- */
.masonry { column-count: 4; column-gap: 18px; }
.masonry-item { break-inside: avoid; margin-bottom: 18px; }
.pic-card { position: relative; margin: 0; border-radius: 18px; overflow: hidden; background: var(--rp-skeleton); box-shadow: var(--rp-shadow); }
.pic-card img { width: 100%; height: auto; display: block; transition: transform .6s var(--rp-ease), filter .4s; }
.pic-open { border: 0; padding: 0; background: none; display: block; width: 100%; cursor: zoom-in; }
.pic-card:hover img { transform: scale(1.05); }
.pic-actions { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 8px; opacity: 0; transform: translateX(8px); transition: all .3s var(--rp-ease); z-index: 2; }
.pic-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.2rem 1rem 1rem; color: #fff; background: linear-gradient(to top, rgba(5,8,20,.92), rgba(5,8,20,0)); opacity: 0; transform: translateY(10px); transition: all .35s var(--rp-ease); z-index: 2; }
.pic-card:hover .pic-actions, .pic-card:hover .pic-caption, .pic-card:focus-within .pic-actions, .pic-card:focus-within .pic-caption { opacity: 1; transform: none; }

/* Lightbox */
.lightbox { overflow: hidden; }
.lightbox-close { position: absolute; top: 14px; right: 14px; z-index: 10; background-color: rgba(255,255,255,.85); border-radius: 50%; padding: .6rem; opacity: 1; }
.lightbox-media { background: #05070f; display: flex; align-items: center; justify-content: center; min-height: 360px; height: 100%; }
.lightbox-media img { max-height: 86vh; width: auto; max-width: 100%; object-fit: contain; }
.lightbox-info { padding: 1.6rem; max-height: 86vh; overflow-y: auto; }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .6rem; }
.meta-item { background: var(--rp-surface-2); border: 1px solid var(--rp-border); border-radius: 12px; padding: .55rem .75rem; }
.meta-item .label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--rp-muted); }
.meta-item .value { font-weight: 600; font-size: .86rem; color: var(--rp-heading); word-break: break-word; }

/* Prompt box */
.prompt-box { position: relative; background: var(--rp-surface-2); border: 1px solid var(--rp-border); border-radius: 16px; padding: 1.1rem 1.2rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86rem; line-height: 1.7; white-space: pre-wrap; word-break: break-word; color: var(--rp-text); }
.prompt-box.locked { user-select: none; overflow: hidden; min-height: 180px; }
.prompt-box.locked .blur-text { filter: blur(6px); opacity: .7; }
.lock-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1rem; background: linear-gradient(to bottom, rgba(0,0,0,0), var(--rp-surface-solid) 85%); font-family: var(--rp-font); }
.lock-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--rp-gold-gradient); color: #fff; font-size: 1.3rem; box-shadow: 0 10px 30px -10px rgba(245,158,11,.8); margin-bottom: .6rem; }

/* ---------- Category cards ---------- */
.category-card { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 170px; padding: 1.2rem; border-radius: var(--rp-radius); overflow: hidden; color: #fff !important; isolation: isolate; transition: transform .35s var(--rp-ease), box-shadow .35s; box-shadow: var(--rp-shadow); }
.category-card img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s var(--rp-ease); }
.category-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(5,8,20,.9), rgba(5,8,20,.15)); }
.category-card:hover { transform: translateY(-5px); box-shadow: var(--rp-shadow-lg); }
.category-card:hover img.bg { transform: scale(1.08); }
.category-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.14); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.2); margin-bottom: auto; font-size: 1.1rem; }
.category-card h3 { color: #fff; font-size: 1.05rem; margin: .8rem 0 .15rem; font-weight: 700; }
.category-pill { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .95rem; border-radius: 999px; background: var(--rp-surface); border: 1px solid var(--rp-border); color: var(--rp-text); font-size: .85rem; transition: all .2s; white-space: nowrap; }
.category-pill:hover, .category-pill.active { background: var(--rp-gradient); color: #fff !important; border-color: transparent; }
.scroll-x { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.scroll-x::-webkit-scrollbar { display: none; }

/* ---------- Filters ---------- */
.filter-panel { padding: 1.25rem; position: sticky; top: 88px; }
.filter-panel .form-select, .filter-panel .form-control { font-size: .88rem; padding: .5rem .8rem; }
.filter-title { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--rp-muted); margin-bottom: .4rem; }
.view-toggle .btn { padding: .4rem .7rem; }
.view-toggle .btn.active { background: var(--rp-gradient); color: #fff; border-color: transparent; }
.results-loading { position: relative; min-height: 200px; }
.results-loading::after { content: ""; position: absolute; inset: 0; background: var(--rp-bg); opacity: .5; border-radius: var(--rp-radius); }

/* Skeleton */
.skeleton { background: linear-gradient(90deg, var(--rp-skeleton) 25%, var(--rp-skeleton-shine) 37%, var(--rp-skeleton) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 12px; }
.skeleton-card { height: 420px; border-radius: var(--rp-radius); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- Pricing ---------- */
.pricing-card { padding: 2rem 1.6rem; height: 100%; display: flex; flex-direction: column; position: relative; transition: transform .35s var(--rp-ease), box-shadow .35s; }
.pricing-card:hover { transform: translateY(-6px); }
.pricing-card.popular { border: 1px solid transparent; background: linear-gradient(var(--rp-surface-solid), var(--rp-surface-solid)) padding-box, var(--rp-gradient) border-box; box-shadow: var(--rp-shadow-lg); }
.pricing-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); padding: .3rem .95rem; border-radius: 999px; background: var(--rp-gradient); color: #fff; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.pricing-badge.gold { background: var(--rp-gold-gradient); }
.price { font-family: var(--rp-font-display); font-size: 2.6rem; font-weight: 800; color: var(--rp-heading); }
.price small { font-size: .9rem; font-weight: 500; color: var(--rp-muted); }
.feature-list { list-style: none; padding: 0; margin: 1.4rem 0; }
.feature-list li { padding: .35rem 0; display: flex; gap: .6rem; font-size: .9rem; }
.feature-list li i { color: #10b981; margin-top: .3rem; }

/* ---------- Detail page ---------- */
.detail-media { border-radius: var(--rp-radius); overflow: hidden; position: relative; box-shadow: var(--rp-shadow-lg); background: var(--rp-skeleton); }
.detail-media img { width: 100%; display: block; }
.detail-stats { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; color: var(--rp-muted); font-size: .86rem; }
.rating-stars { color: #fbbf24; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.star-input input { display: none; }
.star-input label { cursor: pointer; font-size: 1.3rem; color: var(--rp-muted); }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: #fbbf24; }
.tag-chip { display: inline-block; padding: .25rem .7rem; border-radius: 999px; font-size: .75rem; background: var(--rp-surface-2); border: 1px solid var(--rp-border); color: var(--rp-text); margin: 0 .25rem .35rem 0; }
.tag-chip:hover { border-color: var(--rp-purple-2); color: var(--rp-heading); }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - 80px); display: flex; align-items: center; padding: 48px 0; }
.auth-card { padding: 2.4rem; max-width: 480px; margin: 0 auto; width: 100%; }
.auth-side { border-radius: var(--rp-radius); overflow: hidden; position: relative; min-height: 560px; }
.auth-side img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-side .auth-quote { position: absolute; left: 24px; right: 24px; bottom: 24px; color: #fff; }
.password-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--rp-muted); }
.strength-bar { height: 4px; border-radius: 4px; background: var(--rp-border); overflow: hidden; }
.strength-bar span { display: block; height: 100%; width: 0; transition: width .3s, background .3s; }

/* ---------- Dashboard ---------- */
.account-nav { padding: .8rem; position: sticky; top: 88px; }
.account-nav .nav-link { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border-radius: 12px; color: var(--rp-text); font-size: .9rem; }
.account-nav .nav-link i { width: 18px; text-align: center; color: var(--rp-muted); }
.account-nav .nav-link:hover { background: var(--rp-surface-2); }
.account-nav .nav-link.active { background: var(--rp-gradient-soft); color: var(--rp-heading); font-weight: 600; }
.account-nav .nav-link.active i { color: var(--rp-purple-2); }
.overview-card { padding: 1.2rem; display: flex; gap: 1rem; align-items: center; height: 100%; }
.overview-icon { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 1.2rem; color: #fff; flex-shrink: 0; }
.overview-value { font-family: var(--rp-font-display); font-weight: 800; font-size: 1.5rem; line-height: 1.1; color: var(--rp-heading); }
.bg-grad-1 { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.bg-grad-2 { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.bg-grad-3 { background: linear-gradient(135deg, #ec4899, #f97316); }
.bg-grad-4 { background: linear-gradient(135deg, #10b981, #06b6d4); }
.bg-grad-5 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.bg-grad-6 { background: linear-gradient(135deg, #6366f1, #0ea5e9); }
.mini-item { display: flex; gap: .8rem; align-items: center; padding: .6rem; border-radius: 14px; transition: background .2s; }
.mini-item:hover { background: var(--rp-surface-2); }
.mini-item img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }

/* Chat / tickets */
.chat-bubble { max-width: 82%; padding: .9rem 1.1rem; border-radius: 18px; margin-bottom: 1rem; }
.chat-bubble.me { margin-left: auto; background: var(--rp-gradient-soft); border: 1px solid rgba(124,58,237,.25); border-bottom-right-radius: 6px; }
.chat-bubble.staff { background: var(--rp-surface-2); border: 1px solid var(--rp-border); border-bottom-left-radius: 6px; }

/* ---------- Blog ---------- */
.blog-card { overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: transform .35s var(--rp-ease); }
.blog-card:hover { transform: translateY(-5px); }
.blog-card .card-media { aspect-ratio: 16 / 9; }
.article-content { font-size: 1.02rem; line-height: 1.85; }
.article-content h2, .article-content h3 { margin: 2rem 0 .8rem; font-weight: 700; }
.article-content blockquote { border-left: 4px solid var(--rp-purple); padding: .6rem 1.2rem; background: var(--rp-surface-2); border-radius: 0 12px 12px 0; margin: 1.5rem 0; }
.article-content img { border-radius: 16px; margin: 1rem 0; }
.legal-content h3 { font-size: 1.15rem; margin-top: 1.8rem; font-weight: 700; }

/* ---------- Empty / error states ---------- */
.empty-icon { width: 84px; height: 84px; margin: 0 auto; border-radius: 26px; display: grid; place-items: center; font-size: 2rem; color: #fff; background: var(--rp-gradient); box-shadow: var(--rp-shadow-lg); }
.error-code { font-family: var(--rp-font-display); font-weight: 800; font-size: clamp(5rem, 16vw, 9rem); line-height: 1; }
.confirm-icon { width: 60px; height: 60px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: rgba(239,68,68,.15); color: #ef4444; font-size: 1.5rem; }

/* ---------- Search ---------- */
.search-box .form-control { padding-left: 48px; padding-right: 48px; border-radius: 16px; height: 58px; }
.search-box .search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--rp-muted); }
.search-results .result-group { margin-bottom: 1rem; }
.search-results .result-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--rp-muted); margin: .4rem .5rem; }
.search-results a.result { display: flex; gap: .8rem; align-items: center; padding: .55rem .6rem; border-radius: 12px; color: var(--rp-text); }
.search-results a.result:hover, .search-results a.result.focused { background: rgba(124,58,237,.12); }
.search-results a.result img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.search-results mark { background: rgba(124,58,237,.3); color: inherit; padding: 0 2px; border-radius: 3px; }

/* ---------- Footer ---------- */
.site-footer { position: relative; z-index: 1; margin-top: 60px; padding-top: 64px; border-top: 1px solid var(--rp-border); background: var(--rp-bg-2); }
.footer-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .55rem; }
.footer-links a { color: var(--rp-muted); font-size: .9rem; }
.footer-links a:hover { color: var(--rp-heading); }
.footer-hr { border-color: var(--rp-border); opacity: 1; margin: 2.5rem 0 1.2rem; }
.social-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--rp-surface-2); border: 1px solid var(--rp-border); color: var(--rp-text); transition: all .2s; }
.social-btn:hover { background: var(--rp-gradient); color: #fff; transform: translateY(-3px); border-color: transparent; }

/* ---------- Cookie banner, toast, back to top ---------- */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1080; padding: 1rem 1.2rem; max-width: 1100px; margin: 0 auto; background: var(--rp-surface-solid); animation: slideUp .5s var(--rp-ease); }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast { background: var(--rp-surface-solid); color: var(--rp-text); border: 1px solid var(--rp-border); border-radius: 14px; box-shadow: var(--rp-shadow-lg); }
.toast .toast-icon { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.back-to-top { position: fixed; right: 20px; bottom: 20px; z-index: 1040; width: 46px; height: 46px; border-radius: 14px; border: 0; background: var(--rp-gradient); color: #fff; box-shadow: var(--rp-shadow-lg); opacity: 0; visibility: hidden; transform: translateY(12px); transition: all .3s var(--rp-ease); }
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.cookie-open ~ .back-to-top { bottom: 120px; }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--rp-ease), transform .7s var(--rp-ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Page fade-in */
.site-main { animation: pageIn .45s var(--rp-ease); }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

/* Pagination */
.pagination { gap: .35rem; }
.page-link { border-radius: 10px !important; border: 1px solid var(--rp-border); background: var(--rp-surface); color: var(--rp-text); min-width: 40px; text-align: center; }
.page-link:hover { background: rgba(124,58,237,.12); color: var(--rp-heading); border-color: rgba(124,58,237,.3); }
.page-item.active .page-link { background: var(--rp-gradient); border-color: transparent; color: #fff; }
.page-item.disabled .page-link { background: transparent; color: var(--rp-muted); opacity: .6; }

/* Nav tabs */
.nav-pills-glass .nav-link { border-radius: 999px; color: var(--rp-text); padding: .45rem 1rem; font-size: .88rem; }
.nav-pills-glass .nav-link.active { background: var(--rp-gradient); color: #fff; }

/* Accordion */
.accordion-glass .accordion-item { background: var(--rp-surface); border: 1px solid var(--rp-border); border-radius: 16px !important; margin-bottom: .75rem; overflow: hidden; }
.accordion-glass .accordion-button { background: transparent; color: var(--rp-heading); font-weight: 600; box-shadow: none; }
.accordion-glass .accordion-button:not(.collapsed) { color: var(--rp-purple-2); }
.accordion-glass .accordion-body { color: var(--rp-muted); }

/* Feature tiles */
.feature-tile { padding: 1.6rem; height: 100%; }
.feature-tile .ficon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-size: 1.2rem; margin-bottom: 1rem; }

/* CTA band */
.cta-band { border-radius: 28px; padding: 3.2rem 2rem; background: var(--rp-gradient); color: #fff; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: rgba(255,255,255,.12); top: -160px; right: -80px; }
.cta-band h2 { color: #fff; }
