
:root {
    --background: #101116;
    --surface: #191b23;
    --surface-light: #222530;
    --surface-hover: #292d3a;
    --border: #2b2e3a;
    --text: #f0f0f5;
    --muted: #9296a7;
    --accent: #7775f5;
    --accent-hover: #9290ff;
    --success: #49ce91;
    --danger: #ef7777;
    --radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--background);
    color: var(--text);
    font-family: Inter, Arial, sans-serif;
    min-height: 100vh;
    line-height: 1.5;
}

button,
input,
select {
    font: inherit;
}

button {
    color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent-hover);
    outline-offset: 3px;
}

.hidden {
    display: none !important;
}

/* HEADER */

.topbar {
    min-height: 70px;
    padding: 0 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.brand-icon {
    width: 34px;
    height: 34px;
    background: var(--accent);
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-size: 19px;
    font-weight: 900;
}

.status {
    color: var(--muted);
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px #49ce9166;
}

/* MAIN LAYOUT */

.container {
    max-width: 1150px;
    margin: auto;
    padding: 60px 24px 30px;
}

.hero {
    max-width: 720px;
    margin: 0 auto 45px;
    text-align: center;
}

.eyebrow {
    color: var(--accent-hover);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.hero h1 {
    font-size: clamp(28px, 5vw, 42px);
    line-height: 1.2;
    margin-bottom: 13px;
}

.hero p {
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}

/* SEARCH */

.search-form {
    display: flex;
    gap: 10px;
    margin-top: 28px;
}

.search-form input,
.toolbar input,
.toolbar select {
    min-width: 0;
    width: 100%;
    padding: 13px 15px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
}

.search-form input {
    flex: 1;
    padding: 16px;
}

.search-form input:focus,
.toolbar input:focus,
.toolbar select:focus {
    border-color: var(--accent);
}

.search-form input::placeholder,
.toolbar input::placeholder {
    color: #777b8b;
}

.search-form button {
    padding: 0 25px;
    border: none;
    border-radius: 9px;
    color: white;
    background: var(--accent);
    cursor: pointer;
    font-weight: 700;
    transition: background .2s, transform .2s;
}

.search-form button:hover {
    background: var(--accent-hover);
}

.search-form button:active {
    transform: scale(.98);
}

.search-form button:disabled {
    opacity: .6;
    cursor: wait;
}

.message {
    margin-top: 15px;
    min-height: 18px;
    color: var(--muted);
    font-size: 13px;
}

/* RESULTS */

.results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* PROFILE */

.profile-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 25px;
}

.profile-main {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar {
    width: 100px;
    height: 100px;
    object-fit: cover;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 13px;
}

.profile-info h2 {
    font-size: 23px;
    margin-bottom: 5px;
    overflow-wrap: anywhere;
}

.username {
    color: var(--muted);
    font-size: 14px;
}

.user-id {
    color: var(--muted);
    font-size: 12px;
    margin-top: 8px;
}

.secondary-button {
    margin-top: 10px;
    padding: 7px 11px;
    color: var(--text);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 11px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.secondary-button:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
}

.profile-link {
    display: inline-block;
    color: var(--accent-hover);
    font-size: 13px;
    margin-top: 17px;
    text-decoration: none;
}

.profile-link:hover {
    text-decoration: underline;
}

.profile-description {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.section-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.profile-description p {
    color: #c4c5d0;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.account-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 25px;
}

.detail {
    background: var(--surface-light);
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
}

.detail span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
}

.detail strong {
    font-size: 20px;
    overflow-wrap: anywhere;
}

/* TABS */

.tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: thin;
}

.tab {
    flex-shrink: 0;
    color: var(--muted);
    background: transparent;
    border: none;
    padding: 13px 18px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color .2s, border-color .2s;
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    color: white;
    border-bottom-color: var(--accent);
}

/* CONTENT PANELS */

.data-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    min-height: 200px;
}

.tab-panel h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.panel-heading p {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}

.result-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    padding: 5px 10px;
    color: var(--accent-hover);
    background: #7775f51a;
    border: 1px solid #7775f533;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

/* SEARCH AND SORT TOOLBARS */

.toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
    gap: 10px;
    margin-bottom: 18px;
}

.toolbar input,
.toolbar select {
    padding: 11px 13px;
    font-size: 13px;
}

.toolbar select {
    cursor: pointer;
}

.toolbar select option {
    background: var(--surface);
    color: var(--text);
}

/* CATEGORY FILTERS */

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-button {
    padding: 8px 14px;
    color: var(--muted);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: color .2s, background .2s, border-color .2s;
}

.filter-button:hover {
    color: var(--text);
    border-color: var(--accent);
}

.filter-button.active {
    color: white;
    background: #7775f52b;
    border-color: var(--accent);
}

/* ITEM GRIDS AND CARDS */

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
}

.item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    padding: 13px;
    border-radius: 9px;
    min-width: 0;
    transition: border-color .2s, background .2s, transform .2s;
}

.item:hover {
    background: var(--surface-hover);
    border-color: #45495b;
    transform: translateY(-1px);
}

.item img {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    border-radius: 8px;
    object-fit: cover;
    background: var(--surface);
}

.item-info {
    min-width: 0;
    flex: 1;
}

.item-info strong {
    display: block;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.item-info span {
    color: var(--muted);
    display: block;
    font-size: 11px;
    margin-top: 5px;
    overflow-wrap: anywhere;
}

.item a {
    margin-left: auto;
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* EMPTY AND STATUS MESSAGES */

.empty {
    color: var(--muted);
    font-size: 13px;
    padding: 15px 0;
    line-height: 1.6;
}

#badge-status:empty,
#inventory-status:empty {
    display: none;
}

/* LOAD MORE */

.load-more {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 13px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
    transition: border-color .2s, background .2s;
}

.load-more:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
}

.load-more:disabled {
    opacity: .5;
    cursor: wait;
}

/* WARNINGS */

.warnings {
    background: #29251d;
    border: 1px solid #65532d;
    color: #e6c98a;
    border-radius: 9px;
    padding: 14px;
    font-size: 12px;
    line-height: 1.8;
}

.warnings > div + div {
    margin-top: 5px;
}

/* FOOTER */

footer {
    margin-top: 65px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .5px;
}

/* RESPONSIVE */

@media (max-width: 700px) {
    .container {
        padding: 40px 15px 25px;
    }

    .data-panel {
        padding: 17px;
    }

    .item-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 600px) {
    .topbar {
        padding: 0 16px;
        min-height: 60px;
    }

    .container {
        padding: 35px 13px 25px;
    }

    .hero {
        margin-bottom: 35px;
    }

    .search-form {
        flex-direction: column;
    }

    .search-form button {
        padding: 14px;
    }

    .account-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-main {
        align-items: flex-start;
        gap: 14px;
    }

    .avatar {
        width: 75px;
        height: 75px;
    }

    .profile-info h2 {
        font-size: 19px;
    }

    .profile-card {
        padding: 17px;
    }

    .toolbar {
        grid-template-columns: 1fr;
    }

    .panel-heading {
        align-items: flex-start;
    }

    .item-grid {
        grid-template-columns: 1fr;
    }

    .tabs {
        gap: 0;
    }

    .tab {
        padding: 12px 14px;
        font-size: 12px;
    }

    footer {
        flex-direction: column;
        margin-top: 45px;
    }
}

@media (max-width: 360px) {
    .account-details {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .detail {
        padding: 11px;
    }

    .detail strong {
        font-size: 17px;
    }

    .brand {
        font-size: 11px;
        gap: 8px;
    }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
