/* =========================================================
   XYZ — DISCORD DECORATIONS
   FULL STYLE.CSS
========================================================= */


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background: #080809;
    --app: #111113;
    --sidebar: #1d1d20;
    --card: #202023;
    --card-hover: #28282c;
    --input: #0b0b0d;
    --border: #29292d;
    --border-light: #343438;
    --text: #f1f1f3;
    --muted: #8a8999;
    --muted-dark: #62616d;
    --accent: #ffffff;
    --radius-main: 22px;
    --radius-card: 11px;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 20% 0%,
            #121214 0%,
            #080809 35%,
            #060607 100%
        );

    color: var(--text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    overflow-x: hidden;
}


/* =========================================================
   NAVBAR
========================================================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;

    width: 100%;
    height: 70px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 3%;

    border-bottom: 1px solid #1d1d20;

    background: rgba(7, 7, 8, 0.94);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}


/* =========================================================
   LOGO
========================================================= */

.logo {
    display: flex;
    align-items: center;
    gap: 10px;

    color: #ffffff;

    font-size: 19px;
    font-weight: 800;

    letter-spacing: -0.5px;
}

.logo img {
    width: 34px;
    height: 34px;

    border-radius: 8px;

    object-fit: cover;
}


/* =========================================================
   NAVBAR RIGHT
========================================================= */

.navbar-right {
    display: flex;
    align-items: center;

    gap: 14px;
}

.nav-text {
    color: #767581;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 2px;
}


/* =========================================================
   LANGUAGE SWITCHER
========================================================= */

.language-switcher {
    height: 42px;

    display: flex;
    align-items: center;

    gap: 2px;

    padding: 4px;

    border: 1px solid #202024;

    border-radius: 12px;

    background: #08080a;

    box-shadow:
        0 5px 20px
        rgba(0, 0, 0, 0.18);
}

.language-button {
    min-width: 37px;
    height: 32px;

    padding: 0 9px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    outline: none;

    border-radius: 8px;

    background: transparent;

    color: #777784;

    font-family: inherit;

    font-size: 12px;
    font-weight: 800;

    cursor: pointer;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.language-button:hover {
    color: #d7d7dc;

    background: #151518;
}

.language-button.active {
    background: #29292d;

    color: #ffffff;

    box-shadow:
        inset 0 0 0 1px
        rgba(255, 255, 255, 0.04);
}

.language-button:active {
    transform: scale(0.96);
}


/* =========================================================
   DISCORD BUTTON
========================================================= */

.discord-link {
    display: flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;
}

.discord-link img {
    width: 34px;
    height: 34px;

    object-fit: contain;

    display: block;

    transition:
        transform 0.18s ease,
        opacity 0.18s ease;
}

.discord-link:hover img {
    transform: scale(1.06);

    opacity: 0.9;
}


/* =========================================================
   MAIN
========================================================= */

main {
    width: calc(100% - 70px);
    max-width: 1580px;

    margin: 0 auto;

    padding-top: 22px;
    padding-bottom: 22px;
}


/* =========================================================
   EDITOR
========================================================= */

.editor {
    width: 100%;

    height: calc(100vh - 115px);

    min-height: 620px;
    max-height: 760px;

    display: grid;

    grid-template-columns:
        400px
        minmax(0, 1fr);

    overflow: hidden;

    border: 1px solid #29292d;

    border-radius: var(--radius-main);

    background: #111113;

    box-shadow:
        0 25px 80px
        rgba(0, 0, 0, 0.28);
}


/* =========================================================
   LEFT PREVIEW PANEL
========================================================= */

.preview-panel {
    position: relative;

    grid-column: 1;
    grid-row: 1;

    min-width: 0;

    padding: 26px;

    background:
        linear-gradient(
            145deg,
            #222225 0%,
            #1c1c1f 100%
        );

    border-right: 1px solid #29292d;

    display: flex;
    flex-direction: column;
}


/* =========================================================
   AVATAR PREVIEW
========================================================= */

.avatar-preview {
    position: relative;

    width: 100%;
    height: 235px;

    flex: 0 0 235px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border: 1px solid #36363a;

    border-radius: 19px 19px 0 0;

    background:
        radial-gradient(
            circle at 30% 10%,
            #3b3b3e 0%,
            #29292c 38%,
            #202023 100%
        );
}

.avatar-preview::before {
    content: "";

    position: absolute;

    top: -100px;
    left: -80px;

    width: 280px;
    height: 280px;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.04);

    filter: blur(35px);

    pointer-events: none;
}


/* =========================================================
   AVATAR IMAGE
========================================================= */

.avatar-image {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 116px;
    height: 116px;

    transform: translate(-50%, -50%);

    object-fit: cover;

    border-radius: 50%;

    background: #080809;

    border: 8px solid #111113;

    box-shadow:
        0 0 0 1px #323237,
        0 12px 30px rgba(0, 0, 0, 0.5);

    display: none;

    z-index: 2;

    user-select: none;
    -webkit-user-drag: none;
}


/* =========================================================
   DECORATION IMAGE
========================================================= */

.decoration-image {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 150px;
    height: 150px;

    transform: translate(-50%, -50%);

    object-fit: contain;

    pointer-events: none;

    display: none;

    z-index: 3;

    user-select: none;
    -webkit-user-drag: none;
}


/* =========================================================
   EMPTY AVATAR
========================================================= */

.avatar-placeholder {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 116px;
    height: 116px;

    transform: translate(-50%, -50%);

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            #111113,
            #09090b
        );

    border: 8px solid #111113;

    box-shadow:
        0 0 0 1px #323237,
        0 12px 30px rgba(0, 0, 0, 0.5);

    pointer-events: none;
}

.avatar-placeholder span,
.avatar-placeholder p {
    display: none !important;
}


/* =========================================================
   PREVIEW INFO
========================================================= */

.preview-info {
    padding:
        38px 24px
        22px;

    border-left: 1px solid #36363a;
    border-right: 1px solid #36363a;

    background: #202023;
}

.preview-info h2 {
    margin-bottom: 8px;

    color: #f3f3f5;

    font-size: 19px;
    font-weight: 800;

    letter-spacing: -0.5px;
}

.preview-info p {
    max-width: 290px;

    color: #8d8c99;

    font-size: 14px;

    line-height: 1.65;
}


/* =========================================================
   BUTTONS
========================================================= */

.upload-button,
.download-button {
    position: relative;
    z-index: 2;

    width: calc(100% - 48px);
    height: 48px;

    margin-left: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    font-family: inherit;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}


/* =========================================================
   UPLOAD
========================================================= */

.upload-button {
    margin-top: 0;

    border: 1px solid #3b3b3f;

    background: #29292c;

    color: #dddddf;
}

.upload-button:hover {
    background: #303034;

    border-color: #48484d;
}

.upload-button:active {
    transform: scale(0.99);
}


/* =========================================================
   DOWNLOAD
========================================================= */

.download-button {
    margin-top: 10px;

    border: 1px solid #ffffff;

    outline: none;

    background: #f0f0f1;

    color: #151517;
}

.download-button:hover:not(:disabled) {
    background: #ffffff;

    transform: translateY(-1px);
}

.download-button:active:not(:disabled) {
    transform: translateY(0);
}

.download-button:disabled {
    background: #727275;

    border-color: #727275;

    color: #222225;

    opacity: 1;

    cursor: not-allowed;
}


/* =========================================================
   PREVIEW LOWER BOX BORDER
========================================================= */

.preview-panel::after {
    content: "";

    position: absolute;

    left: 26px;
    right: 26px;

    top: 235px;
    bottom: 26px;

    border-left: 1px solid #36363a;
    border-right: 1px solid #36363a;
    border-bottom: 1px solid #36363a;

    border-radius: 0 0 19px 19px;

    pointer-events: none;
}


/* =========================================================
   RIGHT DECORATIONS PANEL
========================================================= */

.decorations-panel {
    grid-column: 2;
    grid-row: 1;

    min-width: 0;
    min-height: 0;

    padding:
        26px 26px
        0;

    display: flex;
    flex-direction: column;

    background:
        linear-gradient(
            145deg,
            #111113,
            #101012
        );
}


/* =========================================================
   SEARCH
========================================================= */

.search-area {
    flex: 0 0 auto;
}

#decorationSearch {
    width: 100%;
    height: 58px;

    padding: 0 22px;

    border: 1px solid #242428;

    border-radius: 13px;

    outline: none;

    background: #09090b;

    color: #e7e7ea;

    font-family: inherit;

    font-size: 15px;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

#decorationSearch::placeholder {
    color: #777684;
}

#decorationSearch:hover {
    border-color: #313136;
}

#decorationSearch:focus {
    border-color: #3b3b42;

    background: #0c0c0e;

    box-shadow:
        0 0 0 3px
        rgba(255, 255, 255, 0.025);
}


/* =========================================================
   COLLECTION INFO
========================================================= */

.collection-info {
    flex: 0 0 auto;

    padding:
        13px 3px
        12px;
}

.small-label {
    margin-bottom: 2px;

    color: #71707d;

    font-size: 10px;
    font-weight: 600;
}

.collection-info h2 {
    display: none;
}


/* =========================================================
   CATEGORY WRAPPER
========================================================= */

.categories-wrapper {
    position: relative;

    flex: 0 0 auto;

    width: 100%;

    display: flex;
    align-items: center;

    gap: 7px;

    margin-bottom: 15px;
}


/* =========================================================
   CATEGORY SCROLLER
========================================================= */

.categories {
    flex: 1;

    min-width: 0;

    display: flex;
    align-items: center;

    gap: 7px;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-behavior: smooth;

    scrollbar-width: none;

    -ms-overflow-style: none;
}

.categories::-webkit-scrollbar {
    display: none;
}


/* =========================================================
   CATEGORY BUTTON
========================================================= */

.category {
    flex: 0 0 auto;

    min-height: 40px;

    padding: 0 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #29292e;

    border-radius: 10px;

    background: #171719;

    color: #898894;

    font-family: inherit;

    font-size: 12px;
    font-weight: 650;

    white-space: nowrap;

    cursor: pointer;

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.category:hover {
    background: #202023;

    border-color: #37373c;

    color: #dedee2;
}

.category:active {
    transform: scale(0.98);
}

.category.active {
    background: #efeff0;

    border-color: #efeff0;

    color: #171719;
}


/* =========================================================
   CATEGORY ARROWS
========================================================= */

.category-arrow {
    flex: 0 0 auto;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid #29292e;

    border-radius: 10px;

    outline: none;

    background: #171719;

    color: #b5b4bd;

    font-family:
        Arial,
        sans-serif;

    font-size: 24px;

    cursor: pointer;

    user-select: none;

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        opacity 0.18s ease,
        transform 0.18s ease;
}

.category-arrow:hover:not(:disabled) {
    background: #242427;

    border-color: #3a3a3f;

    color: #ffffff;
}

.category-arrow:active:not(:disabled) {
    transform: scale(0.95);
}

.category-arrow:disabled {
    opacity: 0.25;

    cursor: default;
}


/* =========================================================
   DECORATIONS SCROLL AREA
========================================================= */

.decorations-scroll {
    flex: 1;

    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;

    padding:
        0 9px
        25px 0;

    scrollbar-width: thin;

    scrollbar-color:
        #45454a
        transparent;
}

.decorations-scroll::-webkit-scrollbar {
    width: 6px;
}

.decorations-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.decorations-scroll::-webkit-scrollbar-thumb {
    background: #414146;

    border-radius: 20px;
}

.decorations-scroll::-webkit-scrollbar-thumb:hover {
    background: #55555b;
}


/* =========================================================
   DECORATION GRID
========================================================= */

.decoration-grid {
    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(102px, 1fr)
        );

    gap: 10px;

    align-items: start;
}


/* =========================================================
   DECORATION CARD
========================================================= */

.decoration-card {
    position: relative;

    width: 100%;
    height: 118px;

    min-width: 0;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    padding:
        8px 7px
        23px;

    overflow: hidden;

    border: 1px solid #353539;

    border-radius: var(--radius-card);

    background: #222225;

    cursor: pointer;

    transition:
        background 0.17s ease,
        border-color 0.17s ease,
        transform 0.17s ease,
        box-shadow 0.17s ease;
}

.decoration-card:hover {
    background: #29292d;

    border-color: #46464c;

    transform: translateY(-2px);

    box-shadow:
        0 10px 25px
        rgba(0, 0, 0, 0.18);
}

.decoration-card.selected {
    background: #29292d;

    border-color: #72727a;
}


/* =========================================================
   DECORATION CARD IMAGE
========================================================= */

.decoration-card > img {
    width: 78px;
    height: 78px;

    max-width: 82%;
    max-height: 82%;

    object-fit: contain;

    pointer-events: none;

    user-select: none;
    -webkit-user-drag: none;

    transition:
        transform 0.18s ease;
}

.decoration-card:hover > img {
    transform: scale(1.04);
}


/* =========================================================
   HIDE COLLECTION BADGES
========================================================= */

.collection-badge {
    display: none !important;
}


/* =========================================================
   DECORATION NAME
========================================================= */

.decoration-name {
    position: absolute;

    left: 5px;
    right: 5px;
    bottom: 7px;

    color: #8d8c96;

    text-align: center;

    font-size: 10px;
    font-weight: 500;

    line-height: 1.05;

    white-space: normal;

    overflow: hidden;

    display: -webkit-box;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    pointer-events: none;
}

.decoration-card:hover .decoration-name,
.decoration-card.selected .decoration-name {
    color: #c7c7cd;
}


/* =========================================================
   DECORATION FALLBACK
========================================================= */

.decoration-fallback {
    position: absolute;

    inset: 0;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    padding: 12px;

    color: #66666f;

    text-align: center;

    pointer-events: none;
}

.decoration-fallback span {
    font-size: 24px;
}

.decoration-fallback small {
    margin-top: 5px;

    font-size: 9px;
}


/* =========================================================
   REMOVE OLD SELECTED CHECK
========================================================= */

.decoration-card.selected::after {
    display: none !important;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    width: 100%;

    min-height: 80px;

    margin-top: 0;

    padding: 0 4%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-top: 1px solid #242429;

    background: #09090b;

    color: #696873;

    font-size: 11px;
}

footer span {
    color: #e4e4e7;

    font-size: 14px;
    font-weight: 800;
}


/* =========================================================
   TEXT SELECTION
========================================================= */

::selection {
    background: rgba(255, 255, 255, 0.18);

    color: #ffffff;
}


/* =========================================================
   BODY SCROLLBAR
========================================================= */

body::-webkit-scrollbar {
    width: 8px;
}

body::-webkit-scrollbar-track {
    background: #080809;
}

body::-webkit-scrollbar-thumb {
    background: #343439;

    border-radius: 20px;
}

body::-webkit-scrollbar-thumb:hover {
    background: #45454b;
}


/* =========================================================
   RESPONSIVE — 1200PX
========================================================= */

@media (max-width: 1200px) {

    main {
        width: calc(100% - 36px);
    }

    .editor {
        grid-template-columns:
            330px
            minmax(0, 1fr);
    }

    .preview-panel {
        padding: 20px;
    }

    .preview-panel::after {
        left: 20px;
        right: 20px;

        bottom: 20px;
    }

    .decoration-grid {
        grid-template-columns:
            repeat(
                auto-fill,
                minmax(95px, 1fr)
            );
    }

}


/* =========================================================
   RESPONSIVE — 900PX
========================================================= */

@media (max-width: 900px) {

    .nav-text {
        display: none;
    }

    .editor {
        grid-template-columns:
            310px
            minmax(0, 1fr);
    }

    .decoration-grid {
        grid-template-columns:
            repeat(
                auto-fill,
                minmax(90px, 1fr)
            );
    }

}


/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (max-width: 750px) {

    .navbar {
        height: 64px;

        padding:
            0 18px;
    }

    main {
        width: calc(100% - 24px);

        padding-top: 12px;
    }

    .editor {
        height: auto;

        min-height: 0;
        max-height: none;

        grid-template-columns: 1fr;

        overflow: visible;
    }

    .preview-panel {
        grid-column: 1;
        grid-row: 1;

        border-right: none;

        border-bottom: 1px solid #29292d;
    }

    .decorations-panel {
        grid-column: 1;
        grid-row: 2;

        min-height: 650px;
    }

    .avatar-preview {
        width: 100%;
        max-width: 420px;

        margin: 0 auto;
    }

    .preview-info {
        width: 100%;
        max-width: 420px;

        margin: 0 auto;
    }

    .upload-button,
    .download-button {
        width: 100%;
        max-width: 372px;

        margin-left: auto;
        margin-right: auto;
    }

    .preview-panel::after {
        display: none;
    }

}


/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 600px) {

    .navbar {
        height: 62px;

        padding:
            0 12px;
    }

    .logo {
        font-size: 16px;

        gap: 7px;
    }

    .logo img {
        width: 30px;
        height: 30px;

        border-radius: 7px;
    }

    .navbar-right {
        gap: 8px;
    }

    .discord-link img {
        width: 30px;
        height: 30px;
    }


    /* LANGUAGE */

    .language-switcher {
        height: 38px;

        padding: 4px;

        border-radius: 10px;
    }

    .language-button {
        min-width: 32px;
        height: 29px;

        padding: 0 7px;

        border-radius: 7px;

        font-size: 10px;
    }


    /* MAIN */

    main {
        width: calc(100% - 16px);

        padding-top: 8px;
        padding-bottom: 15px;
    }

    .editor {
        border-radius: 17px;
    }


    /* PREVIEW */

    .preview-panel {
        padding: 14px;
    }

    .avatar-preview {
        height: 215px;

        flex-basis: 215px;

        border-radius: 15px 15px 0 0;
    }

    .preview-info {
        padding:
            27px 18px
            20px;
    }

    .preview-info h2 {
        font-size: 18px;
    }

    .preview-info p {
        font-size: 13px;
    }

    .upload-button,
    .download-button {
        height: 46px;
    }


    /* DECORATIONS */

    .decorations-panel {
        min-height: 600px;

        padding:
            16px 12px
            0;
    }

    #decorationSearch {
        height: 52px;

        padding: 0 16px;

        font-size: 13px;
    }

    .collection-info {
        padding:
            11px 2px
            10px;
    }


    /* CATEGORY */

    .categories-wrapper {
        gap: 5px;
    }

    .category-arrow {
        width: 36px;
        height: 36px;

        border-radius: 9px;

        font-size: 21px;
    }

    .category {
        min-height: 36px;

        padding: 0 13px;

        border-radius: 9px;

        font-size: 10px;
    }


    /* GRID */

    .decoration-grid {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );

        gap: 7px;
    }

    .decoration-card {
        height: 105px;

        border-radius: 10px;
    }

    .decoration-card > img {
        width: 65px;
        height: 65px;
    }

    .decoration-name {
        font-size: 9px;
    }


    /* FOOTER */

    footer {
        min-height: 65px;

        padding: 0 18px;
    }

}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .language-switcher {
        gap: 0;
    }

    .language-button {
        min-width: 29px;

        padding: 0 5px;
    }

    .discord-link {
        display: none;
    }

    .decoration-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .decoration-card {
        height: 115px;
    }

    .decoration-card > img {
        width: 75px;
        height: 75px;
    }

}