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

:root {
    --grad: linear-gradient(135deg, #22D3EE 0%, #A855F7 40%, #EC4899 70%, #F97316 100%);
    --cyan: #22D3EE;
    --purple: #A855F7;
    --pink: #EC4899;
    --orange: #F97316;
    --bg: #F8FAFE;
    --bg2: #F1F5F9;
    --card: #FFFFFF;
    --border: #E2E8F0;
    --text: #0F172A;
    --text2: #475569;
    --muted: #94A3B8;
    --r: 12px;
    --r-sm: 8px;
    --r-pill: 100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { text-decoration: none; }
img { max-width: 100%; display: block; }

.grad-text {
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── NAVBAR ── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    justify-content: space-between;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: all 0.25s;
}
.navbar.scrolled {
    background: rgba(255,255,255,0.98);
    border-bottom-color: var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 12px rgba(0,0,0,0.05);
}
.nav-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo - circled 50% */
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--grad);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}
.logo-icon-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-icon svg { width: 22px; height: 22px; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.3px;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logo-tag {
    font-size: 8px;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Nav actions */
.nav-actions { display: flex; align-items: center; gap: 8px; }
.btn-login {
    padding: 8px 20px;
    background: transparent;
    border: none;
    color: var(--text2);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-login:hover {
    background: var(--cyan);
    color: white;
}

.btn-register {
    padding: 8px 22px;
    background: var(--grad);
    color: white;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--r-pill);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-register:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(34,211,238,0.3);
}

/* Hide hamburger - removed completely */
.hamburger {
    display: none;
}

/* ── HERO SECTION ── */
.hero {
    padding: 80px 24px 48px;
    background: linear-gradient(135deg, #F8FAFE 0%, #F1F5F9 100%);
    border-bottom: none;
}
.hero-inner {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

.hero-eyebrow {
    font-size: 11px;
    font-weight: 600;
    color: var(--text2);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: transparent;
    padding: 4px 12px;
    border-radius: var(--r-pill);
    display: inline-block;
}

.hero h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    color: var(--text);
}

.hero-sub {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.5;
}
.hero-sub a {
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    transition: opacity 0.15s;
}
.hero-sub a:hover { opacity: 0.75; }

/* ── SEARCH ── */
.search-wrap {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}
.search-wrap .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 16px;
    pointer-events: none;
    z-index: 1;
}
.search-input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-pill);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text);
    background: white;
    outline: none;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.search-input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(34,211,238,0.1);
}
.search-input::placeholder { color: var(--muted); }

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 100;
    overflow: hidden;
    max-height: 280px;
    overflow-y: auto;
    text-align: left;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid var(--border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg); }
.sri-img { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.sri-info { flex: 1; min-width: 0; }
.sri-name { font-size: 12px; font-weight: 600; color: var(--text); }
.sri-cat { font-size: 10px; color: var(--muted); margin-top: 1px; }
.sri-price { font-size: 10px; font-weight: 600; flex-shrink: 0; color: var(--text2); }
.search-empty { padding: 20px; text-align: center; color: var(--muted); font-size: 12px; }

/* ── COMMUNITIES SECTION ── */
.communities-section { padding: 40px 0 60px; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Section header - no title separator */
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
}
.section-header h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text);
}
.section-header h2 span {
    display: none;
}
.see-all {
    font-size: 12px;
    font-weight: 500;
    color: var(--text2);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: color 0.15s;
}
.see-all:hover { color: var(--cyan); }

/* Tabs with arrows */
.tabs-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
}
.tab-arrow {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: white;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text2);
    font-size: 12px;
    flex-shrink: 0;
    transition: all 0.15s;
}
.tab-arrow:hover { background: var(--bg2); color: var(--cyan); border-color: var(--cyan); }

.tabs-wrapper {
    flex: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.tabs-wrapper::-webkit-scrollbar { display: none; }

.tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: max-content;
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: var(--r-pill);
    border: 1px solid var(--border);
    background: white;
    font-size: 12px;
    font-weight: 500;
    color: var(--text2);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}
.tab i { font-size: 12px; }
.tab:hover { background: var(--bg2); border-color: var(--cyan); color: var(--cyan); }
.tab.active {
    background: var(--grad);
    color: white;
    border-color: transparent;
    font-weight: 600;
}
.tab .count {
    font-size: 9px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: var(--r-pill);
    background: rgba(0,0,0,0.08);
}
.tab.active .count { background: rgba(255,255,255,0.2); }

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

.c-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
    border: 1px solid var(--border);
    cursor: pointer;
}
.c-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: var(--cyan);
}

/* Banner image */
.c-banner {
    height: 140px;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--bg2);
}
.c-banner img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.c-card:hover .c-banner img { transform: scale(1.05); }

/* Colored avatar badge - circled */
.c-avatar-badge {
    position: absolute;
    bottom: -16px;
    left: 14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: white;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Body */
.c-body {
    padding: 22px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.c-name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.c-desc {
    font-size: 12px;
    color: var(--text2);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer */
.c-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}
.c-members {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}
.c-members i { font-size: 12px; }
.c-members strong { color: var(--text2); font-weight: 600; }

.c-price-tag {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--r-pill);
}
.c-price-tag.free {
    color: var(--cyan);
    background: rgba(34,211,238,0.1);
}
.c-price-tag.paid {
    color: var(--text);
    background: var(--bg2);
}

/* View all button */
.view-all-wrap { text-align: center; margin-top: 28px; }
.btn-view-all {
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    border: 1px solid var(--border);
    padding: 8px 22px;
    border-radius: var(--r-pill);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
    background: white;
}
.btn-view-all:hover {
    background: var(--bg2);
    color: var(--cyan);
    border-color: var(--cyan);
}

/* How it works section */
.how-section {
    padding: 48px 0;
    background: white;
    border-top: none;
    border-bottom: none;
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 28px;
}
.step-card {
    background: var(--bg);
    border-radius: var(--r);
    padding: 20px;
    transition: all 0.15s;
}
.step-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.step-num {
    width: 32px; height: 32px;
    border-radius: var(--r-sm);
    background: var(--grad);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: white;
    margin-bottom: 14px;
}
.step-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
}
.step-desc {
    font-size: 12px;
    color: var(--text2);
    line-height: 1.6;
}

/* Features section */
.features-section { padding: 48px 0; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 28px;
}
.feat-card {
    background: white;
    border-radius: var(--r);
    padding: 18px;
    transition: all 0.15s;
    border: 1px solid var(--border);
}
.feat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); border-color: var(--cyan); }
.feat-icon {
    width: 36px; height: 36px;
    border-radius: var(--r-sm);
    background: var(--grad);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    margin-bottom: 12px;
    color: white;
}

/* ── USER DROPDOWN ── */
.user-dropdown { position: relative; }

.user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    border-radius: var(--r-pill);
    border: 1.5px solid var(--border);
    background: white;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    transition: all 0.2s;
}
.user-trigger:hover { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,211,238,0.08); }

.user-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--grad);
    color: white;
    font-size: 12px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    flex-shrink: 0;
}

.user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user-trigger .ri-arrow-down-s-line {
    font-size: 16px;
    color: var(--muted);
    transition: transform 0.2s;
}
.user-trigger .ri-arrow-down-s-line.rotated { transform: rotate(180deg); }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    overflow: hidden;
    z-index: 300;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s;
}
.dropdown-item i { font-size: 15px; color: var(--muted); }
.dropdown-item:hover { background: var(--bg); }
.dropdown-item:hover i { color: var(--cyan); }

.dropdown-item--danger { color: #EF4444; }
.dropdown-item--danger i { color: #EF4444; }
.dropdown-item--danger:hover { background: #FEF2F2; }

.dropdown-divider { height: 1px; background: var(--border); margin: 2px 0; }

/* Hide user name on small screens */
@media (max-width: 768px) {
    .user-name { display: none; }
    .user-trigger { padding: 6px; }
}
.feat-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
}
.feat-desc {
    font-size: 11.5px;
    color: var(--text2);
    line-height: 1.6;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 20px 24px;
    background: white;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
footer p { font-size: 11.5px; color: var(--muted); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 11.5px; color: var(--muted); transition: color 0.15s; }
.footer-links a:hover { color: var(--cyan); }

/* Responsive */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .btn-login .label, .btn-register .label { display: none; }
    .btn-login .icon-only, .btn-register .icon-only { display: inline; }
    .btn-login, .btn-register { padding: 8px 12px; }
    .hero { padding: 60px 20px 40px; }
    .container { padding: 0 20px; }
    .cards-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .section-header { flex-direction: column; align-items: flex-start; }
    footer { padding: 20px; }
    .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (max-width: 480px) {
    .features-grid { grid-template-columns: 1fr; }
    .hero h1 { letter-spacing: -0.5px; }
}

/* ── Search enhancements ── */
[x-cloak] { display: none !important; }

/* Spinner */
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }
.search-icon.spin { animation: spin 0.7s linear infinite; }

/* Result item — initials fallback */
.sri-initials {
    width: 32px; height: 32px;
    border-radius: 6px;
    background: var(--grad);
    color: white;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* Meta line under name */
.sri-meta {
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.sri-dot { color: var(--border); }

/* Verified badge */
.sri-verified {
    font-size: 11px;
    color: var(--cyan);
    margin-left: 3px;
    vertical-align: middle;
}

/* Price pill colours */
.sri-price.free  { color: var(--cyan); background: rgba(34,211,238,0.1); }
.sri-price.paid  { color: var(--text); background: var(--bg2); }
.sri-price {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: var(--r-pill);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Footer hint inside dropdown */
.search-footer {
    padding: 7px 14px;
    font-size: 10px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: var(--bg);
    display: flex;
    gap: 6px;
    align-items: center;
}
.search-footer kbd {
    background: var(--border);
    border-radius: 3px;
    padding: 1px 4px;
    font-size: 9px;
    font-family: monospace;
}

/* Empty state */
.search-empty {
    padding: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.search-empty i { font-size: 22px; color: var(--border); }

/* Loading skeleton */
.skel-block { background: var(--bg2); animation: shimmer 1.2s infinite; }
.skel-line {
    height: 10px;
    border-radius: var(--r-pill);
    background: var(--bg2);
    animation: shimmer 1.2s infinite;
    margin-bottom: 4px;
}
.skel-line--name  { width: 120px; }
.skel-line--meta  { width: 80px;  }
.skel-line--price { width: 40px; height: 10px; border-radius: var(--r-pill); background: var(--bg2); animation: shimmer 1.2s infinite; }

@keyframes shimmer {
    0%   { opacity: 1; }
    50%  { opacity: 0.4; }
    100% { opacity: 1; }
}
