:root {
    --text-color-about-me: #000000;
    --text-color: #101113;
    --sub-text-color: #202020
}

::-webkit-scrollbar {
    background-color: #fff0;
    width: 0;
    height: 0
}

::-webkit-scrollbar-thumb {
    background: #fff0;
    border-radius: 0
}

* {
    box-sizing: border-box
}

html {
    min-height: 100vh;
    width: 100%;
    scroll-behavior: smooth
}

body {
    margin: 0;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    color: var(--text-color);
    font-family: "Playpen Sans", cursive
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    margin: -15px;
    z-index: -1;
    background-color: #fff;
    background-image: url(../src/assets/images/backgrounds/bg.avif);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    filter: blur(5px)
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none
}

.toast-item {
    pointer-events: auto;
    min-width: 250px;
    max-width: 360px;
    background: #fffffffa;
    color: #333;
    padding: 12px 18px;
    border-radius: 10px;
    box-shadow: 0 4px 18px rgb(0 0 0 / .15);
    border-left: 5px solid #1877f2;
    font-size: .85em;
    font-weight: 600;
    backdrop-filter: blur(10px);
    animation: slideInRight 0.3s ease forwards;
    transition: all 0.3s ease
}

.toast-item.error {
    border-left-color: #ff3860;
    color: #c51236
}

.toast-item.success {
    border-left-color: #23d160;
    color: #0e8638
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}

.edit-banner {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: #ff5277;
    color: #fff;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: .88em;
    box-shadow: 0 4px 12px rgb(0 0 0 / .15);
    flex-wrap: wrap;
    gap: 10px
}

.edit-banner-left,
.edit-banner-right {
    display: flex;
    align-items: center;
    gap: 10px
}

.banner-btn {
    background: #fff;
    color: #ff5277;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: .85em;
    transition: opacity 0.2s ease, transform 0.1s ease
}

.banner-btn:hover {
    opacity: .9;
    transform: translateY(-1px)
}

.btn-reorder {
    background: #fff3c4;
    color: #8a6400
}

.btn-logout {
    background: #2b2b2b;
    color: #fff
}

.container {
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
    max-width: 1400px;
    min-height: fit-content;
    height: 100%;
    max-height: 100%;
    margin: 0 auto;
    padding: 40px 32px
}

.widget {
    padding: 24px;
    background-color: hwb(0 100% 0% / .35);
    border-radius: 12px;
    outline: rgb(128 128 128 / .16) solid 1px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: background-color 0.2s ease-in-out
}

header {
    width: 100%;
    overflow: hidden;
    position: relative
}

.home {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background-color: #ffffff8c;
    box-shadow: rgb(0 0 0 / .2) 0 0 2px 0;
    border-radius: 5px;
    z-index: 1;
    user-select: none;
    cursor: pointer
}

.about {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 20px
}

.avatar {
    width: 131px;
    height: 131px;
    min-width: 131px;
    border-radius: 12px;
    background-image: url(../src/assets/images/profile/av.avif);
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 12px rgb(0 0 0 / .1)
}

.info {
    display: flex;
    flex-direction: column;
    gap: 4px
}

h1 {
    margin: 0
}

.name {
    font-size: 2em;
    font-weight: 700;
    color: var(--text-color-about-me)
}

.id {
    font-size: .9em;
    font-weight: 700;
    color: #303030
}

.bio {
    font-size: .85em;
    color: var(--sub-text-color)
}

.social {
    display: flex;
    gap: 8px;
    margin-top: 8px
}

.icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    box-shadow: rgb(0 0 0 / .15) 0 0 3px 0;
    overflow: hidden;
    text-decoration: none
}

.icon img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.nav-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    width: 100%;
    padding: 12px 16px;
    align-items: center
}

.nav-item {
    position: relative;
    flex: 0 0 auto;
    padding: 0 16px;
    height: 36px;
    font-weight: 700;
    font-size: .84em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff8c;
    color: #2e3035;
    border-radius: 18px;
    border: 1px solid rgb(0 0 0 / .08);
    user-select: none;
    cursor: pointer;
    transition: all 0.2s ease
}

.nav-item:hover {
    background-color: #ffffffd6;
    border-color: rgb(0 0 0 / .16);
    transform: translateY(-1px)
}

.nav-active {
    background-color: #9c71f8 !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 3px 10px rgb(156 113 248 / .35)
}

.cat-del-btn {
    display: none;
    margin-left: 8px;
    color: #ff3860;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1
}

body.edit-mode .cat-del-btn {
    display: inline-block
}

#add-list {
    display: none;
    font-size: 1.2em;
    padding: 0 14px
}

body.edit-mode #add-list {
    display: inline-flex
}

.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 12px
}

.search-icon {
    color: #666;
    flex-shrink: 0
}

.search-container input {
    flex: 1;
    background: #fff0;
    border: none;
    outline: none;
    font-size: .9em;
    font-family: inherit;
    color: var(--text-color)
}

.search-clear-btn {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: #888;
    padding: 0 4px
}

.search-clear-btn:hover {
    color: #000
}

.btn-cancel {
    background: #e4e6eb;
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer
}

.btn-cancel:hover {
    background: #d8dadf
}

.reorder-row.dragging {
    opacity: .4;
    background: #e8e8e8
}

.reorder-row.drag-over {
    border-color: #9c71f8;
    background: #f3edff
}

.reorder-left {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden
}

.reorder-drag-handle {
    cursor: grab;
    display: flex;
    align-items: center;
    color: #888;
    transition: color 0.15s
}

.reorder-drag-handle:hover {
    color: #333
}

.reorder-drag-handle:active {
    cursor: grabbing
}

.gear-box {
    width: 100%
}

.listed {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px;
    width: 100%
}

@media (max-width:1260px) {
    .listed {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px
    }
}

@media (max-width:900px) {
    .container {
        padding: 20px 16px;
        gap: 18px
    }

    .about {
        display: flex;
        width: 100%;
        align-items: center;
        gap: 15px
    }

    .setting {
        bottom: 32px !important
    }

    .social {
        margin: 0
    }

    .listed {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px
    }

    .edit-banner {
        padding: 6px 10px;
        flex-wrap: nowrap;
        gap: 6px;
        font-size: .75em;
        overflow-x: auto;
        scrollbar-width: none
    }

    .edit-banner::-webkit-scrollbar {
        display: none
    }

    .edit-banner-left,
    .edit-banner-right {
        gap: 5px;
        flex-shrink: 0;
        white-space: nowrap
    }

    .banner-btn {
        padding: 4px 8px;
        font-size: .82em;
        white-space: nowrap
    }

    footer.widget {
        margin-bottom: 20px
    }
}

.gear-item {
    position: relative;
    background-color: #fcfcfc;
    border-radius: 12px;
    outline: rgb(128 128 128 / .15) solid 1px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none
}

.gear-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgb(0 0 0 / .1)
}

.gear-item img {
    width: 100%;
    height: 145px;
    object-fit: contain;
    background: #fcfcfc;
    padding: 20px 0px 10px 0px;
}

.gear-name {
    margin: 0;
    font-size: .82em;
    font-weight: 600;
    margin: 10px 14px 14px 14px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.star {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 28px;
    height: 28px;
    background-image: url(../src/assets/images/icons/star.svg);
    background-size: cover;
    background-position: center;
    z-index: 5;
    display: none;
    transition: opacity 0.2s ease, transform 0.15s ease
}

.star.stared {
    display: block;
    background-image: url(../src/assets/images/icons/stared.svg) !important;
    opacity: 1 !important;
    cursor: pointer
}

body.edit-mode .star {
    display: block;
    cursor: pointer;
    opacity: .35
}

body.edit-mode .gear-item:hover .star {
    opacity: .75
}

body.edit-mode .star:hover {
    transform: scale(1.15);
    opacity: 1 !important
}

body.edit-mode .star.stared {
    opacity: 1 !important
}

.gear-tag {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #834aff;
    color: #fff;
    padding: 7px 14px;
    border-radius: 0 0 0 6px;
    font-size: .9em;
    font-family: monospace;
    font-weight: 700;
    margin: 0
}

.gear-rating {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #4797ff;
    color: #fff;
    padding: 7px 14px;
    border-radius: 0 0 0 6px;
    font-size: .9em;
    font-family: monospace;
    font-weight: 700;
    margin: 0
}

#add-gear {
    display: none;
    min-height: 190px;
    border: 2px dashed #999;
    background: rgb(255 255 255 / .4);
    align-items: center;
    justify-content: center
}

body.edit-mode #add-gear {
    display: flex
}

#add-gear img {
    width: 36px !important;
    height: 36px !important;
    background: #fff0;
    padding: 0;
    opacity: .6
}

.setting {
    position: fixed;
    width: 32px;
    height: 32px;
    bottom: 14px;
    left: 14px;
    z-index: 1001;
    background: var(--image) center/cover no-repeat;
    image-rendering: pixelated;
    filter: opacity(.5);
    cursor: pointer;
    transition: filter 0.2s ease-in-out, transform 0.2s ease-in-out
}

.setting:hover {
    filter: drop-shadow(2px 2px 2px rgb(0 0 0 / .35)) opacity(1);
    transform: rotate(15deg) scale(1.1)
}

.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgb(0 0 0 / .6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 16px
}

.popup-overlay.active {
    display: flex
}

.popup-card {
    position: relative;
    background: #fffffffa;
    border-radius: 16px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 12px 36px rgb(0 0 0 / .25);
    padding: 24px
}

.popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #fff0;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease
}

.popup-close:hover {
    color: #000;
    background: #f0f0f0
}

.auth-card {
    max-width: 360px;
    text-align: center
}

.auth-card h3 {
    margin: 0 0 6px 0;
    font-size: 1.2em
}

.auth-desc {
    font-size: .82em;
    color: #666;
    margin-bottom: 16px
}

.auth-card input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: .9em;
    outline: none;
    transition: border-color 0.2s
}

.auth-card input[type="password"]:focus {
    border-color: #ff5277
}

.auth-error {
    color: #ff3860;
    font-size: .78em;
    margin-top: 8px;
    font-weight: 600
}

.popup-header {
    display: flex;
    gap: 16px;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 16px
}

.popup-thumb-box {
    width: 90px;
    height: 90px;
    min-width: 90px;
    background: #fbfbfb;
    border-radius: 10px;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px
}

.popup-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: contain
}

.popup-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1
}

.popup-meta h3 {
    margin: 0;
    font-size: 1.05em;
    line-height: 1.35
}

.popup-badges {
    display: flex;
    gap: 6px
}

.popup-tag,
.popup-rating {
    font-size: .72em;
    padding: 2px 7px;
    border-radius: 4px;
    color: #fff;
    font-weight: 700
}

.popup-tag {
    background: #7b45f1
}

.popup-rating {
    background: #1877f2
}

.popup-buy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 6px 14px;
    background: #ff5277;
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-size: .82em;
    font-weight: 600;
    width: fit-content;
    box-shadow: 0 2px 6px rgb(255 82 119 / .25);
    transition: all 0.2s ease
}

.popup-buy-btn:hover {
    background: #e63960;
    transform: translateY(-1px)
}

.popup-buy-btn img {
    filter: brightness(0) invert(1)
}

.popup-body {
    margin-top: 14px
}

.popup-body h4 {
    margin: 0 0 8px 0;
    font-size: .9em
}

.popup-body p {
    font-size: .85em;
    line-height: 1.6;
    white-space: pre-wrap;
    color: #444
}

.popup-youtube-container {
    margin-top: 12px;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px
}

.popup-youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0
}

.modal-form form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px
}

.modal-form label {
    font-size: .8em;
    font-weight: 700
}

.modal-form input[type="text"],
.modal-form input[type="url"],
.modal-form select,
.modal-form textarea {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: .85em
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0
}

.direct-buy-box {
    background: #fff0f3;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ffd1dc
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px
}

.btn-save {
    background: #1877f2;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer
}

.btn-delete {
    background: #ff3860;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer
}

.reorder-modal-card {
    max-width: 480px
}

.reorder-hint {
    font-size: .8em;
    color: #666;
    margin: 4px 0 14px 0
}

.reorder-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 50vh;
    overflow-y: auto;
    margin-bottom: 16px
}

.reorder-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f7f7f7;
    border-radius: 8px;
    border: 1px solid #e0e0e0
}

.reorder-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .85em;
    font-weight: 600;
    overflow: hidden
}

.reorder-info img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    background: #fff;
    border-radius: 4px
}

.reorder-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px
}

.reorder-actions {
    display: flex;
    gap: 4px
}

.reorder-btn {
    background: #fff;
    border: 1px solid #ccc;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center
}

.reorder-btn:hover:not(:disabled) {
    background: #eef
}

.reorder-btn:disabled {
    opacity: .3;
    cursor: not-allowed
}

footer.widget {
    text-align: center;
    font-size: .8em;
    color: #666
}