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

:root {
    --bg: #0b0c10;
    --surface: #13151c;
    --surface-2: #1c1f2a;
    --border: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(255, 255, 255, 0.14);
    --text-primary: #eef0f6;
    --text-muted: #7b7f94;
    --text-faint: #44485a;
    --accent: #7c6aff;
    --accent-glow: rgba(124, 106, 255, 0.18);

    --kotlin: #e66cff;
    --dart: #00c2a8;
    --java: #ff8c3b;
    --python: #4ec9b0;
    --php: #7f8fff;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;

    --font-display: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg);
    font-family: var(--font-body);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    padding: 3rem 1rem 5rem;
    position: relative;
    overflow-x: hidden;
}

.bg-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 680px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.header {
    text-align: center;
    padding-bottom: 0.5rem;
}

.header-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid rgba(124, 106, 255, 0.3);
    border-radius: 20px;
    padding: 4px 14px;
    margin-bottom: 1rem;
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 40%, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.6rem;
}

.header-sub {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 300;
}

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

.search-icon {
    position: absolute;
    left: 14px;
    width: 16px;
    height: 16px;
    color: var(--text-faint);
    pointer-events: none;
}

.search {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 44px 12px 42px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search::placeholder {
    color: var(--text-faint);
}

.search:focus {
    border-color: rgba(124, 106, 255, 0.5);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.count {
    position: absolute;
    right: 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-glow);
    padding: 2px 8px;
    border-radius: 20px;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.pill {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.18s;
}

.pill:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.collapse-btn {
    font-family: var(--font-body);
    font-size: 12px;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.18s;
}

.collapse-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.accordion-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.accordion {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.18s;
    animation: fadeIn 0.35s ease both;
}

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

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

.accordion:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.accordion.active {
    border-color: var(--accent-glow);
    box-shadow: 0 0 0 1px rgba(124, 106, 255, 0.2), 0 8px 32px rgba(0, 0, 0, 0.4);
}

.acc-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    cursor: pointer;
    user-select: none;
}

.lang-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    background: var(--surface-2);
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.accordion:hover .lang-icon {
    transform: scale(1.08) rotate(-3deg);
}

.acc-title-group {
    flex: 1;
    min-width: 0;
}

.acc-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acc-tags {
    display: flex;
    gap: 5px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.acc-tag {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid;
}

.acc-chevron {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.2s, color 0.2s;
}

.accordion.active .acc-chevron {
    transform: rotate(180deg);
    background: var(--accent-glow);
    color: var(--accent);
    border-color: rgba(124, 106, 255, 0.3);
}

.acc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion.active .acc-body {
    max-height: 500px;
}

.acc-divider {
    height: 1px;
    background: var(--border);
    margin: 0 20px;
}

.acc-content {
    padding: 18px 20px 20px 76px;
}

.acc-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.75;
    font-weight: 300;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.badge {
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid;
    transition: transform 0.15s;
    cursor: default;
}

.badge:hover {
    transform: translateY(-1px);
}

mark {
    background: rgba(124, 106, 255, 0.28);
    color: #c4b8ff;
    border-radius: 2px;
    padding: 0 1px;
}

.no-results {
    text-align: center;
    color: var(--text-faint);
    font-size: 0.9rem;
    padding: 2.5rem 0;
}

.hidden {
    display: none;
}

@media (max-width: 520px) {
    body {
        padding: 2rem 0.75rem 4rem;
    }

    .acc-content {
        padding-left: 20px;
    }

    .acc-title {
        font-size: 0.95rem;
    }
}