* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

:root {
    --bg: #08080d;
    --panel: rgba(20, 20, 30, 0.86);
    --panel-light: #171722;
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --muted: #9999b3;
    --purple: #8b5cf6;
    --purple-dark: #6d28d9;
    --purple-glow: rgba(139, 92, 246, 0.22);
    --green: #4ade80;
    --red: #f87171;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

.background {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(139, 92, 246, 0.28),
            transparent 38%
        ),
        radial-gradient(
            circle at 0% 100%,
            rgba(109, 40, 217, 0.14),
            transparent 35%
        ),
        linear-gradient(
            180deg,
            #0a0910 0%,
            #08080d 100%
        );
}

.background::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(
            rgba(255,255,255,0.018) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,0.018) 1px,
            transparent 1px
        );
    background-size: 40px 40px;
    mask-image: linear-gradient(
        to bottom,
        black,
        transparent 80%
    );
}

.container {
    width: min(1050px, 94%);
    margin: 0 auto;
    padding: 55px 0 30px;
}

/* HEADER */

.header {
    text-align: center;
    margin-bottom: 34px;
}

.brand h1 {
    font-size: clamp(34px, 6vw, 52px);
    font-weight: 800;
    letter-spacing: -2px;
}

.brand p {
    color: var(--muted);
    margin-top: 10px;
    font-size: 15px;
}

.subtitle {
    margin-top: 8px;
    color: #d6d1e5;
    font-size: 14px;
}

/* SEARCH */

.search-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: 20px;
    backdrop-filter: blur(18px);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.35),
        0 0 35px var(--purple-glow);
}

.input-wrap {
    flex: 1;
}

.input-label {
    display: block;
    margin: 0 0 7px 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.input-wrap input {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    background: #11111a;
    color: white;
    font-size: 15px;
    transition: 0.2s ease;
}

.input-wrap input::placeholder {
    color: #66667d;
}

.input-wrap input:focus {
    border-color: var(--purple);
    box-shadow:
        0 0 0 3px rgba(139, 92, 246, 0.14);
}

.search-card > button {
    align-self: flex-end;
    height: 50px;
    padding: 0 25px;
    border: 0;
    border-radius: 12px;
    background: var(--purple);
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.search-card > button:hover {
    background: #9b6aff;
    transform: translateY(-1px);
}

.search-card > button:active {
    transform: scale(0.97);
}

/* LOADING */

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    color: var(--muted);
    font-size: 14px;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.12);
    border-top-color: var(--purple);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ERROR */

.error {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(248,113,113,0.35);
    border-radius: 14px;
    background: rgba(127,29,29,0.25);
    color: #fecaca;
    text-align: center;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

/* PROFILE */

.profile {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-card,
.section {
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: 20px;
    backdrop-filter: blur(18px);
    box-shadow:
        0 15px 50px rgba(0,0,0,0.28);
}

/* PROFILE HEADER */

.profile-card {
    padding: 24px;
}

.profile-top {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar {
    width: 110px;
    height: 110px;
    border-radius: 22px;
    object-fit: cover;
    background: #171722;
    border: 2px solid rgba(139,92,246,0.45);
    box-shadow:
        0 10px 35px rgba(0,0,0,0.35),
        0 0 25px rgba(139,92,246,0.15);
}

.identity h2 {
    font-size: 28px;
    font-weight: 800;
    word-break: break-word;
}

.username {
    margin-top: 5px;
    color: var(--muted);
    font-size: 15px;
}

.user-id {
    margin-top: 10px;
    display: inline-block;
    padding: 5px 9px;
    border-radius: 8px;
    background: rgba(139,92,246,0.10);
    color: #bca8ff;
    font-size: 12px;
}

/* ACTIONS */

.profile-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.profile-actions button,
.actions button {
    border: 0;
    border-radius: 11px;
    padding: 12px 16px;
    background: #252536;
    color: white;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s ease;
}

.profile-actions button:hover,
.actions button:hover {
    background: var(--purple);
    transform: translateY(-1px);
}

/* SECTIONS */

.section {
    padding: 24px;
}

.section-title {
    margin-bottom: 18px;
}

.section-title h3 {
    font-size: 18px;
    font-weight: 700;
}

/* GRID */

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

.info-card {
    min-width: 0;
    padding: 17px;
    border: 1px solid rgba(255,255,255,0.055);
    border-radius: 14px;
    background: var(--panel-light);
    transition: 0.2s ease;
}

.info-card:hover {
    border-color: rgba(139,92,246,0.45);
    transform: translateY(-2px);
}

.info-card span {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 12px;
}

.info-card strong {
    display: block;
    color: white;
    font-size: 14px;
    word-break: break-word;
}

/* DESCRIPTION */

.description {
    min-height: 70px;
    padding: 16px;
    border-radius: 13px;
    background: var(--panel-light);
    border: 1px solid rgba(255,255,255,0.05);
    color: #c4c4d4;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;
    font-size: 14px;
}

/* HISTORY */

.history {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 15px;
    border-radius: 12px;
    background: var(--panel-light);
    border: 1px solid rgba(255,255,255,0.05);
}

.history-item span {
    color: white;
    font-size: 14px;
}

.history-item small {
    color: var(--muted);
}

.empty {
    padding: 18px;
    text-align: center;
    color: var(--muted);
    background: var(--panel-light);
    border-radius: 13px;
    font-size: 13px;
}

/* FOOTER */

footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding: 10px 4px;
    color: #66667c;
    font-size: 12px;
}

/* RESPONSIVE */

@media (max-width: 700px) {

    .container {
        width: 94%;
        padding-top: 35px;
    }

    .search-card {
        flex-direction: column;
    }

    .search-card > button {
        width: 100%;
    }

    .profile-top {
        align-items: flex-start;
    }

    .avatar {
        width: 85px;
        height: 85px;
        border-radius: 18px;
    }

    .identity h2 {
        font-size: 22px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .profile-actions {
        flex-direction: column;
    }

    .profile-actions button {
        width: 100%;
    }

    footer {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 420px) {

    .container {
        width: 92%;
    }

    .profile-card,
    .section {
        padding: 17px;
        border-radius: 17px;
    }

    .profile-top {
        gap: 13px;
    }

    .avatar {
        width: 72px;
        height: 72px;
    }

    .identity h2 {
        font-size: 19px;
    }

    .username {
        font-size: 13px;
    }

    .user-id {
        font-size: 10px;
    }

}

/* SELECTION */

::selection {
    background: var(--purple);
    color: white;
}

/* SCROLLBAR */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #08080d;
}

::-webkit-scrollbar-thumb {
    background: #5b21b6;
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--purple);
}
