*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #0a0a0a;
    color: #d4d4d4;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    min-height: 100vh;
}

/* ── header ── */
header {
    text-align: center;
    padding: 64px 20px 32px;
}

.logo {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(18px, 3.5vw, 36px);
    color: #ffffff;
    letter-spacing: 3px;
    white-space: nowrap;
}

.logo .blue {
    color: #60a5fa;
}

.tagline {
    margin-top: 20px;
    font-size: 13px;
    color: #888;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.tagline a {
    color: #888;
    text-decoration: none;
    transition: color 0.15s;
}

.tagline a:hover {
    color: #60a5fa;
}

.about-link {
    display: inline-block;
    margin-top: 14px;
    font-size: 10px;
    color: #333;
    text-decoration: none;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: color 0.15s;
}

.about-link:hover { color: #60a5fa; }

/* ── count bar ── */
.count-bar {
    text-align: center;
    font-size: 11px;
    color: #333;
    padding: 14px 20px;
    border-top: 1px solid #141414;
    border-bottom: 1px solid #141414;
    margin-bottom: 40px;
    letter-spacing: 2px;
}

.count-bar b {
    color: #60a5fa;
    font-weight: 500;
}

/* ── layout ── */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 100px;
}

/* ── toolbar ── */
.toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    align-items: center;
}

.search-wrap {
    flex: 1;
    min-width: 220px;
    position: relative;
}

.search-prefix {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #60a5fa;
    font-size: 12px;
    pointer-events: none;
}

input[type="text"] {
    width: 100%;
    background: #111;
    border: 1px solid #1e1e1e;
    color: #d4d4d4;
    font-family: inherit;
    font-size: 12px;
    padding: 10px 14px 10px 30px;
    outline: none;
    transition: border-color 0.15s;
}

input[type="text"]::placeholder {
    color: #333;
}

input[type="text"]:focus {
    border-color: #60a5fa;
}

.select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

select {
    background: #111;
    border: 1px solid #1e1e1e;
    color: #777;
    font-family: inherit;
    font-size: 11px;
    padding: 10px 28px 10px 14px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
    appearance: none;
    -webkit-appearance: none;
}

select:focus {
    border-color: #60a5fa;
}

.select-arrow {
    position: absolute;
    right: 10px;
    pointer-events: none;
    font-size: 11px;
    color: #777;
    line-height: 1;
}

/* ── grid ── */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 14px;
}

/* ── card ── */
.card {
    background: #0f0f0f;
    border: 1px solid #1a1a1a;
    padding: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    cursor: default;
}

.card:hover {
    border-color: #2a2a2a;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

/* dots */
.dots {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    align-items: center;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-r {
    background: #ff5f56;
}

.dot-y {
    background: #ffbd2e;
}

.dot-g {
    background: #27c93f;
}

.card-handle {
    margin-left: auto;
    font-size: 9px;
    color: #222;
    letter-spacing: 1px;
}

/* profile row */
.profile {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.avatar {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border: 1px solid #1e1e1e;
    background: #111;
}

.profile-text {
    flex: 1;
    min-width: 0;
}

.name {
    font-size: 12px;
    font-weight: 500;
    color: #efefef;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.username {
    font-size: 11px;
    color: #93c5fd;
    margin-top: 3px;
}

.bio {
    margin-top: 6px;
    font-size: 10px;
    color: #555;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.empty { color: #2a2a2a !important; }

/* tooltip */
[data-tooltip] {
    position: relative;
    cursor: default;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #aaa;
    font-size: 10px;
    line-height: 1.6;
    padding: 7px 10px;
    white-space: pre-wrap;
    width: max-content;
    max-width: 220px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 10;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* meta */
.meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    color: #444;
    min-width: 0;
}

.meta-icon {
    color: #2a2a2a;
    flex-shrink: 0;
    width: 12px;
    text-align: center;
}

.meta-val {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-val a {
    color: #444;
    text-decoration: none;
    transition: color 0.15s;
}

.meta-val a:hover {
    color: #60a5fa;
}

/* divider */
hr {
    border: none;
    border-top: 1px solid #161616;
    margin: 12px 0;
}

/* stats */
.stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    text-align: center;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stat-n {
    font-size: 15px;
    color: #e0e0e0;
    font-weight: 500;
    letter-spacing: -0.5px;
}

.stat-l {
    font-size: 8px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* card footer */
.card-footer {
    margin-top: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.desde {
    font-size: 9px;
    color: #2a2a2a;
    letter-spacing: 1px;
}

.desde b {
    color: #3a3a3a;
}

.gh-link {
    font-size: 9px;
    color: #2a2a2a;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.15s;
}

.gh-link:hover {
    color: #60a5fa;
}

/* discord row */
.discord-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #161616;
}

.discord-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #111;
}

.discord-name {
    font-size: 10px;
    color: #555;
    text-decoration: none;
    transition: color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.discord-name:hover { color: #7289da; }

/* states */
.state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    font-size: 12px;
    letter-spacing: 2px;
}

.state-loading {
    color: #2a2a2a;
}

.state-error {
    color: #ff5f56;
}

.state-empty {
    color: #2a2a2a;
}

.blink {
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* scrollbar */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb:hover {
    background: #252525;
}