:root {
    --enc-primary: #5865F2;
    --enc-primary-dark: #4752c4;
    --enc-accent: #FFCB05;
    --enc-bg: #fafbff;
    --enc-text: #1a1d29;
    --enc-muted: #6b7280;
    --enc-border: rgba(0, 0, 0, 0.05);
    --enc-card-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    --enc-card-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Raleway', sans-serif;
    background-color: var(--enc-bg);
    color: var(--enc-text);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--enc-primary);
}

a:hover {
    color: var(--enc-primary-dark);
}

code {
    background: rgba(88, 101, 242, 0.08);
    color: var(--enc-primary);
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    font-size: 0.9em;
}

/* === Navbar === */
.navbar {
    backdrop-filter: blur(12px);
    background-color: rgba(255, 255, 255, 0.85) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.navbar-brand span {
    font-weight: 800;
    font-size: 1.4rem;
    background: linear-gradient(135deg, var(--enc-primary) 0%, #7b8aff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 500;
    color: var(--enc-text) !important;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--enc-primary) !important;
}

.nav-link-cta {
    background: linear-gradient(135deg, var(--enc-primary) 0%, #7b8aff 100%);
    color: #fff !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: 999px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-link-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(88, 101, 242, 0.35);
    color: #fff !important;
}

/* === Hero === */
.hero {
    position: relative;
    padding-top: 8rem;
    padding-bottom: 5rem;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(88, 101, 242, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero::after {
    content: "";
    position: absolute;
    bottom: -300px;
    left: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 203, 5, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero > .container {
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(88, 101, 242, 0.1);
    color: var(--enc-primary);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-eyebrow .dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
    animation: enc-pulse 2s infinite;
}

@keyframes enc-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.05); }
}

.hero h1 {
    font-weight: 800;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
}

.hero h1 .accent {
    background: linear-gradient(135deg, var(--enc-primary) 0%, #7b8aff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p.lead {
    font-size: 1.15rem;
    color: var(--enc-muted);
    margin-bottom: 2rem;
    max-width: 480px;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--enc-primary) 0%, #7b8aff 100%);
    color: #fff;
    padding: 0.85rem 1.75rem;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 20px rgba(88, 101, 242, 0.25);
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(88, 101, 242, 0.4);
    color: #fff;
}

.hero-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--enc-text);
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    margin-left: 0.5rem;
    transition: background 0.2s ease;
}

.hero-cta-secondary:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--enc-text);
}

.hero-img {
    max-width: 100%;
    filter: drop-shadow(0 20px 40px rgba(88, 101, 242, 0.15));
}

/* === Stats bar === */
.stats-bar {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--enc-border);
    margin-top: 4rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--enc-primary) 0%, #7b8aff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--enc-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

/* === Section heading === */
.section-heading {
    font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    letter-spacing: -1px;
    margin-bottom: 1rem;
}

.section-sub {
    color: var(--enc-muted);
    font-size: 1.05rem;
    max-width: 580px;
    margin: 0 auto 3rem;
}

/* === Bot cards === */
.bot-card {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--enc-border);
    box-shadow: var(--enc-card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.bot-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-accent, var(--enc-primary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.bot-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--enc-card-shadow-hover);
    border-color: rgba(0, 0, 0, 0.08);
}

.bot-card:hover::before {
    transform: scaleX(1);
}

.bot-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: #fff;
    background: var(--icon-bg, var(--enc-primary));
}

.bot-icon svg {
    width: 28px;
    height: 28px;
}

.bot-card h4 {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.3px;
}

.bot-card p {
    color: var(--enc-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.bot-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.bot-tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--enc-muted);
    background: rgba(0, 0, 0, 0.04);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.bot-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--card-accent, var(--enc-primary));
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    transition: gap 0.2s ease;
}

.bot-link:hover {
    gap: 0.7rem;
    color: var(--card-accent, var(--enc-primary));
}

.bot-link svg {
    width: 18px;
    height: 18px;
}

/* === Why section === */
.why-section {
    padding: 5rem 0;
}

.why-card {
    text-align: center;
    padding: 2rem 1rem;
}

.why-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(88, 101, 242, 0.1);
    color: var(--enc-primary);
    margin-bottom: 1.25rem;
}

.why-icon svg {
    width: 32px;
    height: 32px;
}

.why-card h5 {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.why-card p {
    color: var(--enc-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* === CTA card === */
.cta-section {
    padding: 4rem 0;
}

.cta-card {
    background: linear-gradient(135deg, var(--enc-primary) 0%, #7b8aff 100%);
    border-radius: 24px;
    padding: 3.5rem 2rem;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-card h3 {
    font-weight: 800;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    letter-spacing: -0.8px;
    margin-bottom: 1rem;
    position: relative;
}

.cta-card p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    color: var(--enc-primary);
    padding: 0.85rem 1.75rem;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease;
    position: relative;
}

.cta-button:hover {
    transform: translateY(-2px);
    color: var(--enc-primary);
}

/* === Page header (subpages) === */
.page-header {
    position: relative;
    padding: 8rem 0 3rem;
    text-align: center;
    overflow: hidden;
}

.page-header::before {
    content: "";
    position: absolute;
    top: -250px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(88, 101, 242, 0.15) 0%, transparent 60%);
    z-index: 0;
}

.page-header > .container {
    position: relative;
    z-index: 1;
}

.page-header .breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--enc-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    transition: color 0.2s ease, gap 0.2s ease;
}

.page-header .breadcrumb-link:hover {
    color: var(--enc-primary);
    gap: 0.6rem;
}

.page-header h1 {
    font-weight: 800;
    font-size: clamp(2rem, 4.5vw, 3rem);
    line-height: 1.15;
    letter-spacing: -1.2px;
    margin-bottom: 1rem;
}

.page-header h1 .accent {
    background: linear-gradient(135deg, var(--enc-primary) 0%, #7b8aff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p.lead {
    color: var(--enc-muted);
    font-size: 1.1rem;
    max-width: 620px;
    margin: 0 auto;
}

/* === Content card (legal, articles) === */
.content-card {
    background: #fff;
    border-radius: 24px;
    padding: clamp(1.5rem, 4vw, 3rem);
    border: 1px solid var(--enc-border);
    box-shadow: var(--enc-card-shadow);
    margin-bottom: 2rem;
}

.prose {
    color: var(--enc-text);
    line-height: 1.7;
    font-size: 1rem;
}

.prose p {
    margin-bottom: 1.1rem;
    color: #374151;
}

.prose h4 {
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.3px;
    color: var(--enc-text);
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}

.prose h4:first-child {
    margin-top: 0;
}

.prose h4 .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 0.5rem;
    background: rgba(88, 101, 242, 0.1);
    color: var(--enc-primary);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.prose ul {
    padding-left: 1.4rem;
    margin-bottom: 1.1rem;
}

.prose ul li {
    color: #374151;
    margin-bottom: 0.4rem;
    line-height: 1.65;
}

.prose strong {
    color: var(--enc-text);
    font-weight: 700;
}

/* === FAQ accordion === */
.faq-accordion .accordion-item {
    border: 1px solid var(--enc-border);
    background: #fff;
    border-radius: 16px !important;
    margin-bottom: 0.75rem;
    overflow: hidden;
    box-shadow: var(--enc-card-shadow);
    transition: box-shadow 0.2s ease;
}

.faq-accordion .accordion-item:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
}

.faq-accordion .accordion-button {
    background: #fff !important;
    color: var(--enc-text) !important;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 1.25rem 1.5rem;
    box-shadow: none !important;
    border: 0 !important;
}

.faq-accordion .accordion-button:not(.collapsed) {
    color: var(--enc-primary) !important;
    background: rgba(88, 101, 242, 0.04) !important;
}

.faq-accordion .accordion-button::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 20px 20px;
    width: 20px;
    height: 20px;
}

.faq-accordion .accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235865F2' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.faq-accordion .accordion-body {
    padding: 0 1.5rem 1.5rem;
    color: #4b5563;
    line-height: 1.7;
}

.faq-accordion .accordion-body ul {
    padding-left: 1.2rem;
}

.faq-accordion .accordion-body ul li {
    margin-bottom: 0.4rem;
}

/* === Leaderboard table === */
.leaderboard-card {
    background: #fff;
    border-radius: 24px;
    padding: 0;
    border: 1px solid var(--enc-border);
    box-shadow: var(--enc-card-shadow);
    overflow: hidden;
}

.leaderboard-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.leaderboard-table thead th {
    background: rgba(88, 101, 242, 0.04);
    color: var(--enc-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.6px;
    padding: 1rem 1.5rem;
    border: 0;
}

.leaderboard-table tbody td {
    padding: 1rem 1.5rem;
    border: 0;
    border-top: 1px solid var(--enc-border);
    font-size: 0.95rem;
    vertical-align: middle;
    color: var(--enc-text);
}

.leaderboard-table tbody tr:hover td {
    background: rgba(88, 101, 242, 0.02);
}

.leaderboard-rank {
    font-weight: 700;
    width: 70px;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.04);
    color: var(--enc-muted);
    font-weight: 700;
    font-size: 0.95rem;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.rank-badge.silver {
    background: linear-gradient(135deg, #9ca3af 0%, #d1d5db 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(156, 163, 175, 0.3);
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.3);
}

.leaderboard-username {
    font-weight: 600;
}

.leaderboard-xp {
    font-weight: 700;
    color: var(--enc-primary);
}

.leaderboard-level {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.8rem;
    background: rgba(88, 101, 242, 0.1);
    color: var(--enc-primary);
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
}

/* === 404 === */
.error-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 1rem 4rem;
    position: relative;
    overflow: hidden;
}

.error-page::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(88, 101, 242, 0.1) 0%, transparent 60%);
    z-index: 0;
}

.error-page > .container {
    position: relative;
    z-index: 1;
}

.error-code {
    font-weight: 900;
    font-size: clamp(6rem, 18vw, 12rem);
    line-height: 1;
    background: linear-gradient(135deg, var(--enc-primary) 0%, #7b8aff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -6px;
    margin-bottom: 1rem;
}

.error-page h2 {
    font-weight: 800;
    font-size: clamp(1.5rem, 3.5vw, 2.4rem);
    letter-spacing: -1px;
    margin-bottom: 1rem;
}

.error-page p {
    color: var(--enc-muted);
    font-size: 1.05rem;
    max-width: 540px;
    margin: 0 auto 2rem;
}

/* === Footer === */
footer {
    background: #fff;
    border-top: 1px solid var(--enc-border);
    padding-top: 3rem;
    margin-top: 2rem;
}

footer h3 {
    color: var(--enc-text);
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 1rem;
}

footer ul li a {
    color: var(--enc-muted);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 2;
    transition: color 0.2s ease;
}

footer ul li a:hover {
    color: var(--enc-primary);
}

.footer-brand {
    font-weight: 800;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--enc-primary) 0%, #7b8aff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    display: block;
    text-decoration: none;
}

.footer-tagline {
    color: var(--enc-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 280px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(88, 101, 242, 0.1);
    color: var(--enc-primary);
    transition: all 0.2s ease;
}

.footer-social a:hover {
    background: var(--enc-primary);
    color: #fff;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .hero {
        padding-top: 6rem;
        padding-bottom: 3rem;
        text-align: center;
    }

    .hero p.lead {
        margin-left: auto;
        margin-right: auto;
    }

    .stats-bar {
        margin-top: 2.5rem;
    }

    .stat-item {
        margin-bottom: 1rem;
    }

    .page-header {
        padding-top: 6rem;
    }

    .leaderboard-table thead th,
    .leaderboard-table tbody td {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}
