* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}
html,
body {
    overflow-x: clip;
}

body {
    min-height: 100vh;
    background: var(--paper);
    color: #0f172a;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ---------- hero ---------- */
header.crazy-head {
    position: relative;
    background: var(--ink);
    color: #ffffff;
}
.crazy-aurora {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(60% 60% at 20% 10%, rgba(255, 45, 126, 0.18), transparent 60%),
        radial-gradient(50% 50% at 85% 0%, rgba(124, 58, 237, 0.16), transparent 60%);
}
.crazy-logo-wrap {
    position: relative;
    margin-bottom: 1.5rem;
}
.crazy-logo-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 999px;
    filter: blur(40px);
    transform: scale(0.9);
    background: rgba(255, 45, 126, 0.4);
}
.crazy-logo-wrap h1 img {
    animation: crazy-floaty 6s ease-in-out infinite;
}
@keyframes crazy-floaty {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}
.crazy-eyebrow {
    font-family: "Space Mono", ui-monospace, monospace;
    font-size: 0.75rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 1rem;
}
.crazy-title {
    font-size: clamp(2.25rem, 6vw, 3.75rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.05;
}
.crazy-sub {
    margin-top: 1.25rem;
    max-width: 36rem;
    font-size: 1.05rem;
    color: #cbd5e1;
}
.crazy-divider {
    position: relative;
    z-index: 10;
    height: 1px;
    width: 100%;
    margin-top: 2.5rem;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.15), transparent);
}

/* ---------- sticky filter nav ---------- */
.sticky-safe {
    position: sticky;
    z-index: 40;
}
.crazy-bar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.crazy-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.crazy-brand-logo {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    box-shadow: 0 0 0 2px rgba(255, 45, 126, 0.3);
}
.crazy-brand-name {
    font-weight: 900;
    letter-spacing: -0.01em;
    font-size: 0.95rem;
    color: #0f172a;
    white-space: nowrap;
}
@media (max-width: 640px) {
    .crazy-brand-name {
        display: none;
    }
}
.pill {
    flex: 0 0 auto;
    white-space: nowrap;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.4rem 1rem;
    transition:
        color 0.18s ease,
        background 0.18s ease,
        transform 0.18s ease;
}
.pill:hover {
    color: #0f172a;
    transform: translateY(-1px);
}
.pill.is-active {
    color: #ffffff;
    background: var(--ink);
    border-color: var(--ink);
}

/* ---------- category header ---------- */
.cat-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}
.cat-coin {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.25rem;
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--c, #ff2d7e) 12%, #ffffff);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, #ff2d7e) 25%, transparent);
}
.cat-head-txt {
    line-height: 1.1;
}
.cat-eyebrow {
    font-family: "Space Mono", ui-monospace, monospace;
    font-size: 0.72rem;
    color: #94a3b8;
}
.cat-title {
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #0f172a;
}
.cat-rule {
    flex: 1 1 40px;
    min-width: 24px;
    height: 1px;
    background: linear-gradient(to right, color-mix(in srgb, var(--c, #ff2d7e) 40%, transparent), transparent);
}
.cat-tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--c, #ff2d7e);
    background: color-mix(in srgb, var(--c, #ff2d7e) 10%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--c, #ff2d7e) 20%, transparent);
    border-radius: 999px;
    padding: 0.25rem 0.8rem;
}

/* ---------- cards ---------- */
.crazy-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition:
        transform 0.22s cubic-bezier(0.2, 0.7, 0.3, 1),
        box-shadow 0.22s ease,
        border-color 0.22s ease;
}
.crazy-card:hover,
.crazy-card:focus-visible {
    transform: translateY(-4px);
    border-color: #cbd5e1;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
    outline: none;
}
.crazy-card .ico {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    border-radius: 0.75rem;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px #f1f5f9;
    transition: transform 0.2s ease;
}
.crazy-card:hover .ico {
    transform: scale(1.05);
}
.card-title {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    color: #0f172a;
    transition: color 0.15s ease;
}
.crazy-card:hover .card-title {
    color: var(--c, var(--brand));
}
.card-desc {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    line-height: 1.35;
    color: #64748b;
}
.card-visit {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: "Space Mono", ui-monospace, monospace;
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    transition: color 0.15s ease;
}
.crazy-card:hover .card-visit {
    color: var(--c, var(--brand));
}
.card-visit .arr {
    transition: transform 0.15s ease;
}
.crazy-card:hover .card-visit .arr {
    transform: translateX(2px);
}

/* ---------- badges ---------- */
.crazy-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.68rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    box-shadow: inset 0 0 0 1px currentColor;
    opacity: 0.9;
}
.crazy-badge .dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: currentColor;
}
.crazy-badge.b-hot {
    color: #e11d48;
    background: #fff1f2;
}
.crazy-badge.b-pick {
    color: #d97706;
    background: #fffbeb;
}
.crazy-badge.b-trend {
    color: #7c3aed;
    background: #f5f3ff;
}
.crazy-badge.b-new {
    color: #059669;
    background: #ecfdf5;
}
.crazy-badge.b-top {
    color: #0284c7;
    background: #f0f9ff;
}
.crazy-badge.b-spicy {
    color: #ea580c;
    background: #fff7ed;
}

/* ---------- back to top ---------- */
#toTop {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 60;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    color: #ffffff;
    background: var(--brand);
    border: none;
    box-shadow: 0 10px 24px rgba(255, 45, 126, 0.3);
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition:
        opacity 0.3s ease,
        transform 0.3s ease,
        background 0.2s ease;
}
#toTop.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
#toTop:hover {
    background: var(--brand-ink);
    transform: translateY(-2px);
}

/* ---------- footer ---------- */
footer.crazy-foot {
    background: var(--ink);
    color: #ffffff;
}
.crazy-foot-title {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}
.crazy-foot-tag {
    margin-top: 0.75rem;
    color: #94a3b8;
}
.crazy-foot-contact {
    margin-top: 1.5rem;
}
.crazy-foot-contact a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--brand);
    padding: 0.65rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(255, 45, 126, 0.25);
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}
.crazy-foot-contact a:hover {
    background: var(--brand-ink);
    transform: translateY(-2px);
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .pill,
    .crazy-card,
    .crazy-card .ico,
    .card-visit .arr,
    #toTop,
    .crazy-logo-wrap h1 img {
        transition: none;
        animation: none;
    }
}
