:root {
    --nexora-primary: #6366f1;
    --nexora-secondary: #ec4899;
    --nexora-gradient: linear-gradient(135deg, #6366f1 0%, #ec4899 50%, #f97316 100%);
    --nexora-radius: 16px;
    --nexora-shadow: 0 4px 24px rgba(0,0,0,.08);
}

.brand-gradient {
    background: var(--nexora-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.brand-gradient-light {
    background: linear-gradient(135deg, #a5b4fc, #f9a8d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Brand logo */
.nexora-brand { line-height: 1; }
.nexora-logo-img { width: auto; height: 32px; display: block; }
.landing-nav .nexora-logo-img { height: 36px; }
.nexora-logo-mark { flex-shrink: 0; display: block; }
.auth-card .nexora-brand { margin-bottom: 1.5rem; }
.admin-sidebar .nexora-logo-img { height: 28px; }

/* Landing profile previews */
.landing-profiles { background: var(--bs-body-bg); }
.landing-profiles-intro { padding-top: .5rem; }
.landing-city-pill { font-weight: 500; padding: .45rem .85rem; }
.landing-profile-col { animation: fadeUp .6s ease forwards; animation-delay: calc(var(--stagger, 0) * 45ms); }
.landing-preview-card {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .12);
    transition: transform .28s ease, box-shadow .28s ease;
    display: flex;
    flex-direction: column;
}
.landing-preview-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 18px 48px rgba(99, 102, 241, .22);
}
.landing-preview-link { display: flex; flex-direction: column; height: 100%; }
.landing-preview-img { position: relative; flex: 0 0 70%; min-height: 0; }
.landing-preview-img img {
    transition: transform .35s ease;
}
.landing-preview-card:hover .landing-preview-img img {
    transform: scale(1.04);
}
.landing-preview-shade {
    position: absolute;
    inset: auto 0 0 0;
    height: 55%;
    background: linear-gradient(to top, rgba(15, 23, 42, .82) 0%, rgba(15, 23, 42, .25) 55%, transparent 100%);
    pointer-events: none;
}
.landing-preview-card .card-body {
    flex: 1 1 auto;
    background: var(--bs-body-bg);
}
.landing-preview-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(to top, rgba(30, 27, 75, .65), rgba(30, 27, 75, .1));
    opacity: 0; transition: opacity .25s ease;
    z-index: 1;
}
.landing-preview-card:hover .landing-preview-overlay,
.landing-preview-card:focus-within .landing-preview-overlay { opacity: 1; }
.landing-preview-teaser {
    filter: blur(3px);
    user-select: none;
    pointer-events: none;
}
.landing-mode-badge { font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.landing-mode-dating { background: rgba(236, 72, 153, .15); color: #be185d; }
.landing-mode-friends { background: rgba(99, 102, 241, .15); color: #4338ca; }
.landing-mode-business { background: rgba(249, 115, 22, .15); color: #c2410c; }
.landing-interest-pill { font-size: .7rem; font-weight: 500; }
.landing-profiles-cta { padding-bottom: .5rem; }

/* Landing */
.hero-section { position: relative; min-height: 90vh; display: flex; align-items: center; overflow: hidden; }
.hero-bg {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #581c87 100%);
    z-index: 0;
}
.hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(99,102,241,.3), transparent 60%),
                radial-gradient(circle at 70% 30%, rgba(236,72,153,.2), transparent 50%);
}
.hero-content { position: relative; z-index: 1; padding-top: 100px; }
.landing-nav { background: rgba(0,0,0,.2); backdrop-filter: blur(12px); }
.feature-card { background: var(--bs-body-bg); border-radius: var(--nexora-radius); box-shadow: var(--nexora-shadow); transition: transform .2s, box-shadow .2s; }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,.12); }
.step-number { width: 48px; height: 48px; border-radius: 50%; background: var(--nexora-gradient); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: .5rem; }

/* App */
.app-nav { background: var(--bs-body-bg); border-bottom: 1px solid var(--bs-border-color); backdrop-filter: blur(12px); }
.app-main { min-height: calc(100vh - 120px); }
.auth-card, .onboarding-card { background: var(--bs-body-bg); border-radius: var(--nexora-radius); box-shadow: var(--nexora-shadow); }

/* Profile cards */
.profile-card { border-radius: var(--nexora-radius); overflow: hidden; transition: transform .2s; }
.profile-card:hover { transform: translateY(-2px); }
.profile-card-img { position: relative; aspect-ratio: 3/4; overflow: hidden; }
.profile-card-img img,
.profile-card-img-photo { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3/4; }
.online-dot { position: absolute; top: 10px; right: 10px; width: 12px; height: 12px; background: #22c55e; border-radius: 50%; border: 2px solid #fff; }
.demo-tag { position: absolute; top: 10px; left: 10px; background: #fbbf24; color: #000; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }

/* Chat */
.chat-container { height: calc(100vh - 60px); }
.chat-messages { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.message-bubble { max-width: 75%; padding: 10px 14px; border-radius: 18px; }
.message-bubble.sent { align-self: flex-end; background: var(--nexora-primary); color: #fff; border-bottom-right-radius: 4px; }
.message-bubble.received { align-self: flex-start; background: var(--bs-secondary-bg); border-bottom-left-radius: 4px; }
.message-time { font-size: 11px; opacity: .7; }
.conversation-item { background: var(--bs-body-bg); border-radius: 12px; border: 1px solid var(--bs-border-color); transition: background .15s; color: inherit; }
.conversation-item:hover { background: var(--bs-secondary-bg); }

/* Admin */
.admin-body { background: #0f172a; color: #e2e8f0; min-height: 100vh; }
.admin-sidebar { width: 240px; min-height: 100vh; background: #1e293b; border-right: 1px solid #334155; }
.admin-sidebar .nav-link { color: #94a3b8; border-radius: 8px; }
.admin-sidebar .nav-link:hover { background: #334155; color: #fff; }
.admin-main { background: #0f172a; }
.stat-card { background: #1e293b; border-radius: 12px; padding: 1.5rem; border: 1px solid #334155; }

/* Animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.animate-fade-up { animation: fadeUp .6s ease forwards; }

/* Accessibility */
:focus-visible { outline: 2px solid var(--nexora-primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* Skeleton loading */
.skeleton { background: linear-gradient(90deg, var(--bs-secondary-bg) 25%, var(--bs-tertiary-bg) 50%, var(--bs-secondary-bg) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Compatibility scores */
.score-bar { height: 8px; border-radius: 4px; background: var(--bs-secondary-bg); overflow: hidden; }
.score-bar-fill { height: 100%; background: var(--nexora-gradient); border-radius: 4px; transition: width .5s ease; }

/* Match intent badges (learner / teacher / trainer) */
.bg-intent-match {
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    color: #fff;
}
.match-intent-filters .form-label { margin-bottom: .25rem; }
.reels-filters-wrap .match-intent-filters {
    background: rgba(0, 0, 0, .45);
    border-radius: .75rem;
    color: #fff;
}
.reels-filters-wrap .match-intent-filters .text-muted { color: rgba(255,255,255,.75) !important; }
.reels-filters-wrap .match-intent-filters .form-select,
.reels-filters-wrap .match-intent-filters .form-control {
    background: rgba(255,255,255,.95);
}

/* Swipe UI */
.swipe-page { max-width: 480px; margin: 0 auto; }
.swipe-stack { position: relative; max-width: 400px; min-height: 520px; }
.swipe-card {
    background: var(--bs-body-bg);
    border-radius: var(--nexora-radius);
    box-shadow: var(--nexora-shadow);
    overflow: hidden;
    touch-action: none;
    transition: transform .3s ease, opacity .3s ease;
    cursor: grab;
}
.swipe-card:active { cursor: grabbing; }
.swipe-card.swipe-left { transform: translateX(-120%) rotate(-15deg); opacity: 0; }
.swipe-card.swipe-right { transform: translateX(120%) rotate(15deg); opacity: 0; }
.swipe-card.swipe-up { transform: translateY(-120%) scale(1.05); opacity: 0; }
.swipe-card-photo {
    position: relative;
    aspect-ratio: 3/4;
    min-height: 320px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #581c87 100%);
}
.swipe-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.swipe-mode-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.swipe-mode-tabs::-webkit-scrollbar { display: none; }
.swipe-mode-tabs .btn { white-space: nowrap; flex-shrink: 0; }
.swipe-card-badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 4px; flex-wrap: wrap; }
.swipe-card-body { padding: 1rem 1.25rem 1.25rem; }
.swipe-btn { width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center; }

/* Pricing */
.pricing-hero { background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #581c87 100%); }
.pricing-card { background: var(--bs-body-bg); border-radius: var(--nexora-radius); box-shadow: var(--nexora-shadow); padding: 2rem; position: relative; border: 2px solid transparent; transition: transform .2s, border-color .2s; }
.pricing-card:hover { transform: translateY(-4px); }
.pricing-card-popular { border-color: var(--nexora-primary); }
.pricing-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--nexora-gradient); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 16px; border-radius: 20px; white-space: nowrap; }
.pricing-features li { padding: 6px 0; font-size: 14px; }
.pricing-table th, .pricing-table td { vertical-align: middle; }
.pricing-card-sm { border-left: 4px solid var(--nexora-primary); }

.bg-mode-talents { background-color: #7c3aed !important; color: #fff !important; }
.bg-mode-sports { background-color: #f59e0b !important; color: #1a1a2e !important; }

/* Events */
.event-card { border-radius: var(--nexora-radius); overflow: hidden; transition: transform .2s; }
.event-card:hover { transform: translateY(-2px); }
.event-card-img { height: 160px; object-fit: cover; }
.event-hero-img { max-height: 320px; object-fit: cover; }
[x-cloak] { display: none !important; }

/* Nexora Reels — TikTok-style vertical feed */
.reels-body { margin: 0; background: linear-gradient(180deg, #12121a 0%, #1a1a2e 50%, #0f0f18 100%); color: #fff; overflow: hidden; }
.reels-app { position: fixed; inset: 0; display: flex; flex-direction: column; background: linear-gradient(180deg, #12121a 0%, #1a1a2e 50%, #0f0f18 100%); }
.reels-header {
    position: absolute; top: 0; left: 0; right: 0; z-index: 20;
    display: flex; align-items: center; gap: 8px; padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
    background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, transparent 100%);
}
.reels-back, .reels-search { color: #fff; font-size: 1.25rem; text-decoration: none; width: 36px; }
.reels-mode-tabs { flex: 1; display: flex; justify-content: flex-start; gap: 4px; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 0 4px; }
.reels-mode-tabs::-webkit-scrollbar { display: none; }
.reels-mode-tab { flex-shrink: 0; }
.reels-mode-tab {
    background: transparent; border: none; color: rgba(255,255,255,.65);
    font-size: .85rem; font-weight: 600; padding: 6px 12px; border-radius: 20px;
}
.reels-mode-tab.active { color: #fff; background: rgba(255,255,255,.15); }
.reels-signup-btn { flex-shrink: 0; }
.reels-viewport { flex: 1; position: relative; overflow: hidden; touch-action: pan-y; }
.reels-stack { position: absolute; inset: 0; transition: transform .28s ease; }
.reels-card {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    transition: transform .28s ease, opacity .28s ease;
}
.reels-card.reels-anim-up { transform: translateY(-100%); opacity: 0; }
.reels-card.reels-anim-down { transform: translateY(100%); opacity: 0; }
.reels-media { position: absolute; inset: 0; background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #581c87 100%); }
.reels-video, .reels-photo { width: 100%; height: 100%; object-fit: cover; }
.reels-photo-base { position: absolute; inset: 0; z-index: 1; transition: opacity .3s ease; }
.reels-photo-base.reels-thumb-hidden { opacity: 0; }
.reels-video { position: absolute; inset: 0; z-index: 2; background: transparent; opacity: 0; transition: opacity .3s ease; }
.reels-video.reels-embed-visible { opacity: 1; }
.reels-embed {
    position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%;
    border: 0; background: transparent; opacity: 0; transition: opacity .35s ease; pointer-events: none;
}
.reels-embed.reels-embed-visible { opacity: 1; }
.reels-embed-fallback {
    position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 16px; background: rgba(0,0,0,.6);
}
.reels-embed-fallback .reels-photo { position: static; width: 100%; height: 100%; object-fit: cover; opacity: .4; }
.reels-watch-external { position: relative; z-index: 4; }
.img-placeholder { object-fit: cover; }
.reels-photo-wrap { width: 100%; height: 100%; overflow: hidden; position: absolute; inset: 0; }
.reels-photo-wrap.ken-burns .reels-photo { animation: kenBurns 12s ease-in-out infinite alternate; }
@keyframes kenBurns { from { transform: scale(1); } to { transform: scale(1.12) translate(-2%, -1%); } }
.reels-gradient {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.35) 70%, rgba(0,0,0,.85) 100%);
    pointer-events: none;
}
.reels-info {
    position: absolute; left: 0; right: 72px; bottom: 0; z-index: 10;
    padding: 20px 16px; padding-bottom: max(20px, env(safe-area-inset-bottom));
}
.reels-name { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.reels-location { font-size: .85rem; opacity: .85; margin-bottom: 8px; }
.reels-bio { font-size: .9rem; line-height: 1.4; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.reels-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.reels-tag { font-size: .75rem; background: rgba(255,255,255,.15); padding: 3px 10px; border-radius: 12px; }
.reels-see-more { color: #fff; font-size: .85rem; text-decoration: none; }
.reels-actions {
    position: absolute; right: 12px; bottom: 100px; z-index: 10;
    display: flex; flex-direction: column; gap: 16px; align-items: center;
}
.reels-action-btn {
    background: rgba(255,255,255,.12); border: none; color: #fff;
    width: 52px; display: flex; flex-direction: column; align-items: center; gap: 4px;
    font-size: .65rem; border-radius: 12px; padding: 10px 6px; backdrop-filter: blur(8px);
}
.reels-action-btn i { font-size: 1.35rem; }
.reels-action-btn.reels-pass i { color: #f87171; }
.reels-action-btn.reels-super i { color: #fbbf24; }
.reels-action-btn.disabled { opacity: .5; }
.reels-media-dots { position: absolute; top: 72px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; z-index: 5; }
.reels-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.35); }
.reels-dot.active { background: #fff; width: 18px; border-radius: 3px; }
.reels-play-hint, .reels-mute-hint {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(0,0,0,.45); border-radius: 50%; width: 64px; height: 64px;
    display: flex; align-items: center; justify-content: center; font-size: 2rem; pointer-events: none;
}
.reels-mute-hint { width: auto; height: auto; border-radius: 20px; padding: 8px 14px; font-size: .8rem; gap: 6px; pointer-events: auto; cursor: pointer; }
.reels-swipe-hint {
    position: absolute; top: 64px; left: 16px; font-size: .75rem;
    background: rgba(0,0,0,.4); padding: 4px 10px; border-radius: 12px;
}
.reels-empty, .reels-guest-gate, .reels-empty-static {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 24px; z-index: 15;
}
.reels-empty-static { background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #581c87 100%); }
.reels-empty-static .reels-empty-inner { max-width: 400px; }
.reels-embed-idle {
    position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.25); cursor: pointer;
}
.reels-embed-idle .reels-play-hint { position: static; transform: none; pointer-events: none; }
.reels-guest-gate-inner { max-width: 360px; }
.reels-nav-hint {
    position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
    font-size: .8rem; opacity: .5; gap: 8px;
}

/* Landing reels teaser */
.landing-reels-scroll {
    display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.landing-reels-card {
    flex: 0 0 200px; scroll-snap-align: start; text-decoration: none; color: inherit;
    border-radius: var(--nexora-radius); overflow: hidden; background: var(--bs-body-bg);
    box-shadow: var(--nexora-shadow); transition: transform .2s;
}
.landing-reels-card:hover { transform: translateY(-4px); color: inherit; }
.landing-reels-card-media { position: relative; aspect-ratio: 9/16; overflow: hidden; }
.landing-reels-card-media img { width: 100%; height: 100%; object-fit: cover; }
.landing-reels-play {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.25); color: #fff; font-size: 2rem;
}
.landing-reels-card-meta { padding: 10px 12px; }

/* RTL support */
[dir="rtl"] .message-bubble.sent { align-self: flex-start; }
[dir="rtl"] .message-bubble.received { align-self: flex-end; }

/* Community feed */
.feed-page { max-width: 100%; }
.feed-composer { border-radius: var(--nexora-radius); }
.feed-composer-input {
    border: none; background: var(--bs-secondary-bg); border-radius: 24px;
    resize: none; padding: 12px 16px;
}
.feed-composer-input:focus { box-shadow: 0 0 0 2px rgba(99, 102, 241, .25); background: var(--bs-body-bg); }
.feed-avatar { object-fit: cover; flex-shrink: 0; }
.feed-post-card { border-radius: var(--nexora-radius); overflow: hidden; }
.feed-post-body { white-space: pre-wrap; word-break: break-word; }
.feed-preview-thumb { width: 72px; height: 72px; object-fit: cover; }
.feed-photo-grid {
    display: grid; gap: 4px; border-radius: 12px; overflow: hidden; margin-top: .5rem;
}
.feed-grid-1 { grid-template-columns: 1fr; }
.feed-grid-2 { grid-template-columns: 1fr 1fr; }
.feed-grid-3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.feed-grid-3 .feed-grid-img:first-child { grid-row: span 2; }
.feed-grid-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.feed-grid-img { width: 100%; height: 100%; min-height: 120px; object-fit: cover; display: block; }
.feed-video-embed { border-radius: 12px; overflow: hidden; background: #000; }
.feed-video-embed iframe { border: 0; }
.feed-link-preview { border-left: 3px solid var(--nexora-primary); background: var(--bs-secondary-bg); }
.feed-action-bar .feed-action-btn {
    color: var(--bs-secondary-color); text-decoration: none; font-weight: 600; font-size: .9rem;
    padding: .35rem .75rem; border-radius: 8px;
}
.feed-action-bar .feed-action-btn:hover { background: var(--bs-secondary-bg); color: var(--nexora-primary); }
.feed-action-bar .feed-action-btn.active { color: var(--nexora-secondary); }
.feed-action-bar .feed-action-btn.active .bi-heart { color: var(--nexora-secondary); }
.feed-comment-bubble {
    background: var(--bs-secondary-bg); border-radius: 12px; padding: 8px 12px;
}
.feed-sort-toggle .btn.active { background: var(--nexora-primary); border-color: var(--nexora-primary); color: #fff; }
.feed-sidebar .card { border-radius: var(--nexora-radius); }
[data-bs-theme="dark"] .feed-composer-input { background: rgba(255,255,255,.06); }
[data-bs-theme="dark"] .feed-link-preview { background: rgba(255,255,255,.04); }
[data-bs-theme="dark"] .feed-comment-bubble { background: rgba(255,255,255,.06); }
