:root {
    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --bg: #0A1A1A;
    --surface: #122222;
    --surface-2: #1A2E2E;
    --border: rgba(0, 206, 201, .1);
    --border-hover: rgba(0, 206, 201, .3);
    --primary: #00CEC9;
    --primary-glow: rgba(0, 206, 201, .1);
    --secondary: #81ECEC;
    --accent: #FDCB6E;
    --text: #E2E8F0;
    --text-muted: #94A3B8;
    --text-dim: #64748B;
    --green: #4ADE80;
    --red: #F87171;
    --radius: 12px;
    --radius-sm: 8px
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6
}

.header {
    padding: .85rem 2rem;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    background: rgba(10, 26, 26, .85);
    position: sticky;
    top: 0;
    z-index: 50
}

.header-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center
}

.logo {
    display: flex;
    align-items: center;
    gap: .6rem
}

.logo-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 206, 201, .08);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 1.1rem
}

.logo-text {
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.main {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.25rem 2rem 3rem
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.15rem;
    margin-bottom: 1rem;
    animation: fadeIn .4s ease backwards
}

.section-title {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin-bottom: .65rem
}

.code-input {
    width: 100%;
    resize: vertical;
    padding: .5rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--secondary);
    font-family: var(--font-mono);
    font-size: .78rem;
    outline: none
}

.code-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow)
}

.result-box {
    margin-top: .5rem;
    padding: .5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: .75rem
}

.result-pass {
    background: rgba(74, 222, 128, .05);
    border: 1px solid rgba(74, 222, 128, .2);
    color: var(--green)
}

.result-fail {
    background: rgba(248, 113, 113, .05);
    border: 1px solid rgba(248, 113, 113, .2);
    color: var(--red)
}

.catalog {
    display: flex;
    flex-direction: column;
    gap: .35rem
}

.cat-item {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: .5rem;
    align-items: center;
    padding: .4rem .55rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    font-size: .75rem
}

.cat-label {
    font-weight: 600
}

.cat-code {
    font-family: var(--font-mono);
    font-size: .68rem;
    color: var(--secondary);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.cat-status {
    font-size: .72rem;
    font-weight: 700;
    padding: .1rem .3rem;
    border-radius: 3px
}

.cat-pass {
    background: rgba(74, 222, 128, .1);
    color: var(--green)
}

.cat-fail {
    background: rgba(248, 113, 113, .1);
    color: var(--red)
}

.cat-copy {
    font-size: .65rem;
    color: var(--text-dim);
    cursor: pointer;
    text-decoration: underline
}

.cat-copy:hover {
    color: var(--primary)
}

.bench-results {
    margin-top: .5rem;
    font-size: .75rem
}

.bench-row {
    display: flex;
    justify-content: space-between;
    padding: .3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .03)
}

.bench-bar {
    flex: 1;
    max-width: 200px;
    height: 6px;
    background: var(--surface-2);
    border-radius: 3px;
    margin: 0 .5rem;
    overflow: hidden
}

.bench-fill {
    height: 100%;
    border-radius: 3px;
    transition: width .5s ease
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary), #00B4A6);
    color: #0A1A1A;
    padding: .45rem .75rem;
    box-shadow: 0 4px 16px var(--primary-glow)
}

.btn--primary:hover {
    transform: translateY(-1px)
}

.btn--accent {
    background: var(--accent);
    color: #0A1A1A;
    padding: .35rem .6rem
}

.btn--ghost {
    background: transparent;
    color: var(--text-muted);
    padding: .3rem .5rem
}

.btn--sm {
    font-size: .72rem;
    padding: .25rem .4rem
}

.hidden {
    display: none !important
}

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: .6rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .8rem;
    font-weight: 500;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .4);
    opacity: 0;
    pointer-events: none;
    transition: all .4s cubic-bezier(.16, 1, .3, 1);
    z-index: 100
}

.toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0)
}

@media(max-width:600px) {
    .header {
        padding: .75rem 1rem
    }

    .main {
        padding: 1rem
    }

    .cat-item {
        grid-template-columns: 1fr auto auto
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px)
    }

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