:root {
    --bg: #f8f9fa;
    --text: #212529;
    --muted: #6c757d;
    --accent: #FF7F97;
    --accent-light: #e9f2ff;
    --max-width: 1024px;
    --radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #ffffff;
    color: var(--text);
    display: flex;
    justify-content: flex-start;
}

.container {
    max-width: var(--max-width);
    width: 100%;
    border-radius: var(--radius);
    padding: 24px 48px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
    text-align: left;
}

.credit {
    margin-top: 30px;
    text-align: center;
}

.credit a {
    font-size: 10px;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.credit a:hover {
    color: var(--accent);
}

h1 {
    font-weight: 600;
    font-size: clamp(28px, 4vw, 36px);
    color: var(--text);
    align-self: flex-start;
    width: 100%;
    margin-left: -20px;
    margin-bottom: 20px;
}

h1::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background-color: var(--accent);
    margin-top: 10px;
    border-radius: 999px;
}

p.description {
    font-weight: 300;
    font-size: 18px;
    color: var(--muted);
    line-height: 1.6;
    text-align: left;
    width: 100%;
    margin-bottom: 10px;
}

p.description a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 400;
}

p.description a:hover {
    text-decoration: underline;
}

.items-layout {
    display: flex;
    align-items: flex-start;
    gap: 50px;
    width: 100%;
}

.pill {
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 14px;
    background: #e9ecef;
    color: var(--muted);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill:hover {
    background: #dee2e6;
}

.pill.active {
    background-color: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 600;
}

.items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 120px;
}

#item-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    flex: 1;
}

.item-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 140px;
    height: 160px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.item-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.item-box img {
    display: block;
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 6px;
    margin: 0 auto 8px;
}

.item-box .item-name {
    font-weight: 500;
    font-size: 14px;
    color: var(--text);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.item-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #0b0b0b;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: var(--muted);
    font-size: 16px;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 480px) {
    body {
        padding: 20px;
    }
    .container {
        padding: 24px;
        gap: 16px;
    }
    .pill {
        padding: 8px 14px;
        font-size: 13px;
    }
    #item-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 6px;
    }
    .item-box {
        width: 100px;
        height: 120px;
        padding: 8px;
    }
    .item-box img {
        width: 70px;
        height: 70px;
    }
}