:root {
    --background: #050505;
    --surface: #101010;
    --border: #262020;
    --text: #ffffff;
    --muted: #a8a8a8;
    --accent: #ff3030;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--background);
    color: var(--text);
    font-family: 'Nunito', sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 8, 8, 0.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid #301717;
}

.navbar {
    max-width: 1500px;
    min-height: 76px;
    margin: auto;
    padding: 12px 4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: clamp(22px, 3vw, 35px);
    font-weight: 900;
    letter-spacing: -1px;
}

.logo-icon {
    font-size: 38px;
}

.logo span {
    background: linear-gradient(
        110deg,
        #ffffff 0%,
        #ff7777 45%,
        #ff2020 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}


main {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 38px 3.4% 24px;
    flex: 1;
}

.hero {
    position: relative;
    text-align: center;
    padding: 0 16px 34px;
    overflow: hidden;
}

.hero h1 {
    font-size: clamp(36px, 5vw, 62px);
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1.2;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(
        100deg,
        #ffffff 0%,
        #ff5555 45%,
        #ff1515 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.hero p {
    max-width: 610px;
    margin: auto;
    color: #bdc8df;
    font-size: 17px;
    line-height: 1.7;
}

.search-container {
    width: min(690px, 100%);
    margin: 24px auto 0;
    position: relative;
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 19px;
    transform: translateY(-50%);
    font-size: 21px;
    color: #aab7d1;
    pointer-events: none;
}

#search {
    width: 100%;
    padding: 17px 20px 17px 54px;
    border: 1px solid #3a2525;
    outline: none;
    color: #ffffff;
    background: #111111;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#search::placeholder {
    color: #999999;
}

#search:focus {
    border-color: #ff3030;
    box-shadow: 0 0 0 4px #ff303020;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 0 0 19px;
}

.section-heading h2 {
    font-size: 23px;
    font-weight: 900;
}

#result-count {
    color: var(--muted);
    font-size: 14px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.category-card {
    --card-color: #a51212;
    --card-color-dark: #160606;

    position: relative;
    min-width: 0;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid #ff303030;
    background: linear-gradient(
        145deg,
        var(--card-color),
        var(--card-color-dark)
    );
    box-shadow: 0 8px 20px #00000030;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card {
    --card-color: #a51212;
    --card-color-dark: #160606;

    position: relative;
    min-width: 0;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid #ff303030;
    background: linear-gradient(
        145deg,
        var(--card-color),
        var(--card-color-dark)
    );
    box-shadow: 0 8px 20px #00000030;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:focus-visible {
    outline: 3px solid white;
    outline-offset: 4px;
}

.card-art {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: -1;
    overflow: hidden;
}

.card-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            transparent 10%,
            #00000008 38%,
            #000000ad 100%);
}

.card-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-card:hover .card-art img {
    transform: scale(1.07);
}

.card-emoji {
    position: absolute;
    top: 22px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 84px;
    filter: drop-shadow(0 10px 12px #00000025);
    transition: transform 0.3s;
}

.category-card:hover .card-emoji {
    transform: scale(1.12) rotate(-4deg);
}

.card-content {
    position: relative;
    padding: 18px;
    padding-right: 48px;
    z-index: 1;
}

.card-content h3 {
    font-size: clamp(18px, 1.8vw, 24px);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 5px;
}

.card-content p {
    font-size: 14px;
    font-weight: 700;
    color: #ffffffdf;
}

.card-arrow {
    position: absolute;
    right: 15px;
    bottom: 19px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: #00000038;
    font-size: 26px;
    line-height: 1;
    transition: background 0.2s, transform 0.2s;
}

.category-card:hover .card-arrow {
    background: #ffffff35;
    transform: translateX(3px);
}

.empty-state {
    display: none;
    padding: 55px 15px;
    text-align: center;
    color: var(--muted);
}

.empty-state h3 {
    color: white;
    margin-bottom: 8px;
    font-size: 23px;
}

footer {
    margin-top: auto;
    padding: 25px 20px;
    border-top: 1px solid var(--border);
    background: #090909;
    text-align: center;
    width: 100%;
    flex-shrink: 0;
}

.footer-logo {
    display: inline-block;
    font-size: 17px;
    font-weight: 900;
    background: linear-gradient(90deg, #ffffff, #ff3030);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 5px;
}

footer p {
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 1000px) {
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .category-card {
        min-height: 205px;
    }

    .card-emoji {
        font-size: 72px;
    }
}

@media (max-width: 700px) {
    .navbar {
        padding: 13px 5%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .logo {
        font-size: 25px;
    }

    .logo-icon {
        font-size: 30px;
    }

    main {
        padding: 30px 4% 20px;
    }

    .hero {
        padding-bottom: 28px;
    }

    .hero h1 {
        letter-spacing: -1.3px;
    }

    .hero p {
        font-size: 15px;
    }

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .category-card {
        min-height: 190px;
    }

    .card-content {
        padding: 14px;
        padding-right: 40px;
    }

    .card-content h3 {
        font-size: 18px;
    }

    .card-content p {
        font-size: 12px;
    }

    .card-arrow {
        width: 29px;
        height: 29px;
        right: 9px;
        bottom: 15px;
        font-size: 22px;
    }

    .card-emoji {
        font-size: 65px;
        top: 18px;
    }
}

@media (max-width: 380px) {
    .category-card {
        min-height: 165px;
    }

    .card-content h3 {
        font-size: 16px;
    }

    .card-emoji {
        font-size: 55px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}