:root {
    --bg: #0a0a0f;
    --surface: #12121a;
    --accent: #4f8ef7;
    --accent2: #a259ff;
    --accent3: #00e5b0;
    --text: #e8e8f0;
    --muted: #6b6b88;
    --border: rgba(79, 142, 247, 0.18);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Syne', sans-serif;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: linear-gradient(rgba(79, 142, 247, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 142, 247, .04) 1px, transparent 1px);
    background-size: 60px 60px;
}

header {
    position: relative;
    z-index: 10;
    padding: 60px 40px 20px;
    text-align: center;
}

.header-tag {
    display: inline-block;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--accent);
    text-transform: uppercase;
    border: 1px solid var(--border);
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 24px;
    background: rgba(79, 142, 247, .06);
}

h1 {
    font-size: clamp(40px, 6vw, 80px);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #fff 30%, var(--accent) 70%, var(--accent2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.header-sub {
    font-family: 'Space Mono', monospace;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 1px;
}

.vote-section {
    position: relative;
    z-index: 10;
    max-width: 700px;
    margin: 40px auto;
    padding: 28px 36px;
    background: linear-gradient(135deg, rgba(162, 89, 255, .12), rgba(79, 142, 247, .12));
    border: 1px solid rgba(162, 89, 255, .3);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    backdrop-filter: blur(10px);
}

.vote-section p {
    font-size: 15px;
    color: #c0c0d8;
    line-height: 1.6;
}

.vote-button {
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent2), var(--accent));
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: .5px;
    transition: opacity .2s, transform .2s;
}

.vote-button:hover {
    opacity: .85;
    transform: translateY(-2px);
}

.filter-bar {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0 20px 40px;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 8px 20px;
    border-radius: 100px;
    cursor: pointer;
    transition: all .2s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.project-container {
    position: relative;
    z-index: 10;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px 80px;
    columns: 2;
    column-gap: 28px;
}

.project-container .project {
    break-inside: avoid;
    margin-bottom: 28px;
    padding-bottom: 28px;
}

.project {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .3s, box-shadow .3s, border-color .3s;
}

.project:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(79, 142, 247, .15);
    border-color: rgba(79, 142, 247, .4);
}

.card-header {
    padding: 28px 28px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.card-title-group {
    flex: 1;
    min-width: 0;
}

.project h2 {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.3;
    word-break: break-word;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tech-badge {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: .5px;
    padding: 3px 10px;
    border-radius: 100px;
    background: rgba(79, 142, 247, .12);
    border: 1px solid rgba(79, 142, 247, .25);
    color: var(--accent);
}

.status-pill {
    flex-shrink: 0;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 100px;
    white-space: nowrap;
    align-self: flex-start;
}

.status-inactive {
    background: rgba(255, 180, 0, .1);
    border: 1px solid rgba(255, 180, 0, .3);
    color: #ffb400;
}

.status-private {
    background: rgba(255, 80, 80, .1);
    border: 1px solid rgba(255, 80, 80, .3);
    color: #ff6060;
}

.status-wip {
    background: rgba(0, 229, 176, .1);
    border: 1px solid rgba(0, 229, 176, .3);
    color: #00e5b0;
}

.status-unavailable {
    background: rgba(150, 150, 180, .1);
    border: 1px solid rgba(150, 150, 180, .3);
    color: #aaa;
}

.card-body {
    padding: 18px 28px 0;
}

.card-body p {
    font-size: 14px;
    color: #a0a0b8;
    line-height: 1.7;
    margin-bottom: 8px;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 0;
}

.features span {
    font-size: 13px;
    color: #a0a0b8;
    line-height: 1.6;
    padding-left: 14px;
    position: relative;
}

.features span::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 10px;
}

.screenshots {
    padding: 20px 28px 0;
}

.ss-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.ss-grid img {
    width: 100%;
    object-position: top;
    border-radius: 10px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform .25s, box-shadow .25s, border-color .25s;
    image-rendering: -webkit-optimize-contrast;
}

.ss-grid img:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .6);
    border-color: rgba(79, 142, 247, .5);
}

.show-more-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: rgba(79, 142, 247, .07);
    border: 1px dashed rgba(79, 142, 247, .3);
    border-radius: 10px;
    color: var(--accent);
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

.show-more-btn:hover {
    background: rgba(79, 142, 247, .15);
    border-color: var(--accent);
}

.extra-imgs {
    display: none;
}

.extra-imgs.open {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.extra-imgs img {
    width: 100%;
    aspect-ratio: 9/19;
    object-fit: cover;
    object-position: top;
    border-radius: 10px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform .25s, box-shadow .25s, border-color .25s;
    image-rendering: -webkit-optimize-contrast;
}

.extra-imgs img:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .6);
    border-color: rgba(79, 142, 247, .5);
}

.download-section {
    margin: 20px 28px 0px;
    padding: 22px 24px;
    text-align: center;
    background: linear-gradient(135deg, rgba(79, 142, 247, .15), rgba(162, 89, 255, .1));
    border: 1px solid rgba(79, 142, 247, .25);
    border-radius: 16px;
}

.download-section h3 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 6px;
}

.download-section p {
    font-size: 13px;
    color: #a0a0b8;
    margin-bottom: 14px;
}

.download-section a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: white;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 12px;
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    font-weight: 600;
    transition: opacity .2s, transform .2s;
}

.download-section a:hover {
    opacity: .85;
    transform: translateY(-2px);
}

.card-footer {
    margin-top: auto;
    padding: 20px 28px 0px;
    display: flex;
    justify-content: flex-end;
}

.btn_more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--accent);
    border: 1px solid rgba(79, 142, 247, .35);
    padding: 10px 22px;
    border-radius: 10px;
    background: rgba(79, 142, 247, .06);
    transition: all .2s;
}

.btn_more:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.btn_more::after {
    content: ' →';
}

#link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dashed rgba(79, 142, 247, .5);
}

#link:hover {
    color: var(--accent2);
}

#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, .92);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
}

#lightbox.active {
    display: flex;
}

#lb-img {
    max-width: 90vw;
    max-height: 88vh;
    border-radius: 16px;
    box-shadow: 0 0 80px rgba(79, 142, 247, .3);
    object-fit: contain;
    user-select: none;
    transition: opacity .15s;
}

#lb-close {
    position: fixed;
    top: 20px;
    right: 28px;
    font-size: 36px;
    color: white;
    cursor: pointer;
    opacity: .7;
    transition: opacity .2s;
    z-index: 10000;
    line-height: 1;
}

#lb-close:hover {
    opacity: 1;
}

#lb-prev,
#lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
    color: white;
    cursor: pointer;
    opacity: .45;
    transition: opacity .2s;
    z-index: 10000;
    padding: 8px 16px;
    background: rgba(255, 255, 255, .06);
    border-radius: 12px;
    line-height: 1;
}

#lb-prev {
    left: 16px;
}

#lb-next {
    right: 16px;
}

#lb-prev:hover,
#lb-next:hover {
    opacity: 1;
    background: rgba(255, 255, 255, .14);
}

#lb-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, .45);
    letter-spacing: 2px;
}

#lb-dots {
    position: fixed;
    bottom: 44px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    z-index: 10000;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 80vw;
}

.lb-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.lb-dot.active {
    background: var(--accent);
    transform: scale(1.5);
}

@media(max-width:700px) {
    .project-container {
        columns: 1;
        padding: 0 14px 60px;
    }

    .vote-section {
        flex-direction: column;
        text-align: center;
        margin: 24px 14px;
    }

    header {
        padding: 40px 20px 16px;
    }

    #lb-prev {
        left: 4px;
        font-size: 34px;
    }

    #lb-next {
        right: 4px;
        font-size: 34px;
    }
}