:root {
    --bg: #060913;
    --bg-soft: rgba(11, 17, 31, 0.82);
    --panel: rgba(10, 17, 31, 0.72);
    --panel-strong: rgba(12, 21, 40, 0.9);
    --line: rgba(107, 153, 255, 0.18);
    --line-strong: rgba(0, 229, 255, 0.35);
    --text: #e8eeff;
    --text-soft: #99a9d3;
    --cyan: #00e5ff;
    --blue: #4f7cff;
    --magenta: #ff1f72;
    --violet: #8b5dff;
    --yellow: #f8f005;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
    --radius: 28px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Space Grotesk", "Inter", "Poppins", system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 20%, rgba(0, 229, 255, 0.12), transparent 25%),
        radial-gradient(circle at 85% 10%, rgba(255, 31, 114, 0.12), transparent 22%),
        radial-gradient(circle at 65% 70%, rgba(139, 93, 255, 0.15), transparent 24%),
        linear-gradient(180deg, #04070f 0%, #070c18 48%, #03050a 100%);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.noise-layer,
.grid-layer,
.glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.noise-layer {
    opacity: 0.04;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
    background-size: 120px 120px;
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.88), transparent 92%);
}

.grid-layer {
    background-image:
        linear-gradient(rgba(92, 118, 180, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(92, 118, 180, 0.06) 1px, transparent 1px);
    background-size: 42px 42px;
}

.glow {
    filter: blur(120px);
    opacity: 0.2;
}

.glow-cyan {
    background: rgba(0, 229, 255, 0.4);
    transform: translate(-20%, -10%);
}

.glow-magenta {
    background: rgba(255, 31, 114, 0.28);
    transform: translate(65%, 55%);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 20px 24px 0;
}

.header-glass {
    width: min(1280px, calc(100vw - 48px));
    margin: 0 auto;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: rgba(7, 10, 18, 0.72);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.18), rgba(255, 31, 114, 0.22));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.18);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.brand-wordmark,
.brand-text {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.site-nav a,
.ghost-link,
.text-link {
    color: var(--text-soft);
    transition: color 0.2s ease, opacity 0.2s ease;
}

.site-nav a:hover,
.ghost-link:hover,
.text-link:hover {
    color: var(--text);
}

.page-shell {
    width: min(1280px, calc(100vw - 48px));
    margin: 0 auto;
    padding: 28px 0 40px;
}

.hero-panel,
.content-panel,
.featured-strip,
.auth-card,
.detail-hero {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(10, 17, 31, 0.9), rgba(8, 13, 24, 0.7));
    backdrop-filter: blur(24px);
    box-shadow: var(--shadow);
}

.hero-panel {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 28px;
    padding: 42px;
    overflow: hidden;
}

.hero-copy h1,
.detail-content h1,
.auth-copy h1 {
    margin: 14px 0 18px;
    font-size: clamp(2.5rem, 5vw, 4.9rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.hero-copy p,
.detail-lead,
.auth-copy p {
    margin: 0;
    color: var(--text-soft);
    font-size: 1.03rem;
    line-height: 1.8;
    max-width: 62ch;
}

.eyebrow,
.admin-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.eyebrow::before,
.admin-kicker::before {
    content: "";
    width: 30px;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 229, 255, 0), rgba(0, 229, 255, 1));
}

.hero-actions,
.detail-actions,
.project-actions,
.row-actions,
.footer-links,
.auth-footer-note {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.primary-action,
.secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 16px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-action {
    color: #031119;
    background: linear-gradient(135deg, var(--cyan), #88f5ff);
    box-shadow: 0 14px 30px rgba(0, 229, 255, 0.18);
}

.secondary-action {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.primary-action:hover,
.secondary-action:hover {
    transform: translateY(-2px);
}

.hero-meta-grid,
.auth-metric-grid,
.detail-meta-grid,
.project-meta-grid {
    display: grid;
    gap: 14px;
}

.hero-meta-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    align-content: start;
}

.stat-panel,
.metric-panel {
    padding: 20px 22px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

.stat-panel span,
.metric-panel span {
    display: block;
    font-size: 0.82rem;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.stat-panel strong,
.metric-panel strong {
    display: block;
    margin-top: 10px;
    font-size: 1.25rem;
}

.stat-panel small {
    color: var(--text-soft);
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
}

.section-head h2,
.auth-card-head h2 {
    margin: 10px 0 0;
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    letter-spacing: -0.04em;
}

.featured-strip,
.content-panel {
    padding: 34px;
    margin-top: 28px;
}

.content-panel-tight {
    padding-top: 26px;
}

.filter-bar,
.admin-filter-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    width: min(860px, 100%);
}

.filter-input,
.input-group {
    display: grid;
    gap: 10px;
}

.filter-input span,
.input-group span {
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    color: var(--text-soft);
    text-transform: uppercase;
}

input,
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(0, 229, 255, 0.56);
    box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
}

textarea {
    resize: vertical;
}

.featured-grid,
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.project-grid-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.featured-card,
.project-card,
.compact-project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    overflow: hidden;
}

.featured-card:hover,
.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 229, 255, 0.28);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.featured-card h3,
.project-card h3 {
    margin: 0;
    font-size: 1.34rem;
}

.featured-card p,
.project-card p,
.compact-list span {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.75;
}

.featured-card-top,
.featured-card-meta,
.project-card-head,
.project-card-overlay,
.project-card-head,
.project-meta-grid,
.compact-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.project-card-cover,
.detail-cover {
    min-height: 220px;
    border-radius: 22px;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(0, 229, 255, 0.18), rgba(255, 31, 114, 0.16)),
        radial-gradient(circle at 25% 30%, rgba(255, 255, 255, 0.18), transparent 22%),
        linear-gradient(120deg, #0c1324, #060912);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-card-cover.has-image,
.detail-cover.has-image {
    background:
        radial-gradient(circle at 25% 20%, rgba(0, 229, 255, 0.12), transparent 30%),
        linear-gradient(120deg, rgba(12, 19, 36, 0.98), rgba(6, 9, 18, 0.98));
}

.project-cover-image,
.detail-cover-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 18px;
    z-index: 1;
}

.project-card-overlay,
.detail-cover-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 18px;
    align-items: start;
    background: linear-gradient(180deg, rgba(6, 9, 19, 0.18), rgba(6, 9, 19, 0.62));
}

.project-card-body {
    display: grid;
    gap: 18px;
}

.project-card-head {
    align-items: start;
}

.project-card-head p {
    margin-top: 10px;
}

.project-meta-grid {
    flex-wrap: wrap;
    justify-content: start;
    gap: 10px 22px;
    color: var(--text-soft);
}

.project-meta-grid strong,
.compact-item strong {
    color: var(--text);
}

.file-badge,
.category-pill,
.featured-chip,
.tag-pill,
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.file-badge {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
}

.type-zip { color: #7cf3ff; background: rgba(0, 229, 255, 0.12); }
.type-rar { color: #ff9ec2; background: rgba(255, 31, 114, 0.12); }
.type-7z { color: #c4a5ff; background: rgba(139, 93, 255, 0.14); }
.type-pdf { color: #ff6f6f; background: rgba(255, 50, 50, 0.14); }
.type-exe { color: #ffb165; background: rgba(255, 148, 43, 0.14); }
.type-txt { color: #d6def8; background: rgba(214, 222, 248, 0.12); }
.type-json { color: #7affbb; background: rgba(0, 255, 168, 0.12); }
.type-sql { color: #82aaff; background: rgba(79, 124, 255, 0.12); }
.type-msi { color: #f0d96c; background: rgba(248, 240, 5, 0.12); }
.type-generic { color: #ced7f4; background: rgba(255, 255, 255, 0.08); }

.category-pill {
    color: #fff;
    background: color-mix(in srgb, var(--pill-color, #00e5ff) 24%, rgba(255, 255, 255, 0.04));
    border: 1px solid color-mix(in srgb, var(--pill-color, #00e5ff) 48%, rgba(255, 255, 255, 0.08));
}

.featured-chip {
    color: #0d0f18;
    background: linear-gradient(135deg, #f8f005, #ffef7f);
}

.button-49,
.button-49::after {
    width: 200px;
    height: 86px;
    line-height: 86px;
    font-size: 20px;
    font-family: "Space Grotesk", sans-serif;
    background: linear-gradient(45deg, transparent 5%, #ff013c 5%);
    border: 0;
    color: #fff;
    letter-spacing: 3px;
    box-shadow: 6px 0 0 #00e6f6;
    outline: transparent;
    position: relative;
    user-select: none;
    touch-action: manipulation;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.button-49 {
    text-decoration: none;
    overflow: hidden;
}

.button-49::after {
    --slice-0: inset(50% 50% 50% 50%);
    --slice-1: inset(80% -6px 0 0);
    --slice-2: inset(50% -6px 30% 0);
    --slice-3: inset(10% -6px 85% 0);
    --slice-4: inset(40% -6px 43% 0);
    --slice-5: inset(80% -6px 5% 0);
    content: attr(data-alt-text);
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 3%, #00e6f6 3%, #00e6f6 5%, #ff013c 5%);
    text-shadow: -3px -3px 0 #f8f005, 3px 3px 0 #00e6f6;
    clip-path: var(--slice-0);
}

.button-49:hover::after {
    animation: glitch 1s steps(2, end);
}

.button-49-compact,
.button-49-compact::after {
    width: 164px;
    height: 60px;
    line-height: 60px;
    font-size: 0.95rem;
}

.button-49-mini,
.button-49-mini::after {
    width: 142px;
    height: 52px;
    line-height: 52px;
    font-size: 0.85rem;
}

.detail-download,
.detail-download::after {
    width: 240px;
}

@keyframes glitch {
    0% { clip-path: var(--slice-1); transform: translate(-20px, -10px); }
    10% { clip-path: var(--slice-3); transform: translate(10px, 10px); }
    20% { clip-path: var(--slice-1); transform: translate(-10px, 10px); }
    30% { clip-path: var(--slice-3); transform: translate(0, 5px); }
    40% { clip-path: var(--slice-2); transform: translate(-5px, 0); }
    50% { clip-path: var(--slice-3); transform: translate(5px, 0); }
    60% { clip-path: var(--slice-4); transform: translate(5px, 10px); }
    70% { clip-path: var(--slice-2); transform: translate(-10px, 10px); }
    80% { clip-path: var(--slice-5); transform: translate(20px, -10px); }
    90% { clip-path: var(--slice-1); transform: translate(-10px, 0); }
    100% { clip-path: var(--slice-1); transform: translate(0); }
}

.compact-list {
    display: grid;
    gap: 14px;
}

.compact-item {
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.compact-item:hover {
    border-color: rgba(0, 229, 255, 0.28);
}

.empty-state,
.detail-empty {
    padding: 56px 32px;
    text-align: center;
}

.empty-state h3,
.detail-empty h2 {
    margin: 16px 0 12px;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.empty-state p,
.detail-empty p {
    max-width: 60ch;
    margin: 0 auto 24px;
    color: var(--text-soft);
    line-height: 1.8;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    gap: 28px;
    padding: 28px;
}

.detail-content {
    display: grid;
    gap: 18px;
    align-content: center;
}

.detail-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-meta-grid article {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-meta-grid span,
.profile-line span {
    display: block;
    color: var(--text-soft);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.detail-meta-grid strong,
.profile-line strong {
    display: block;
    margin-top: 10px;
    font-size: 1rem;
}

.detail-description {
    color: var(--text-soft);
    line-height: 1.9;
    font-size: 1rem;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.tag-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-soft);
}

.auth-page .page-shell {
    width: min(1180px, calc(100vw - 48px));
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 40px 0;
}

.auth-section {
    width: 100%;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 28px;
    align-items: stretch;
}

.auth-copy {
    padding: 30px 12px;
}

.auth-card {
    padding: 34px;
}

.auth-card-head p,
.auth-footer-note,
.form-alert {
    color: var(--text-soft);
}

.auth-form {
    display: grid;
    gap: 18px;
    margin-top: 26px;
}

.form-alert {
    margin: 18px 0 0;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.form-alert-error {
    border-color: rgba(255, 31, 114, 0.36);
    color: #ffc3d8;
    background: rgba(255, 31, 114, 0.08);
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
}

.site-footer {
    width: min(1280px, calc(100vw - 48px));
    margin: 0 auto 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: var(--text-soft);
}

.footer-brand {
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.toast-stack {
    position: fixed;
    top: 32px;
    right: 24px;
    z-index: 50;
    display: grid;
    gap: 12px;
}

.toast {
    min-width: 280px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(7, 11, 19, 0.9);
    box-shadow: var(--shadow);
}

.toast-success {
    border-color: rgba(0, 229, 255, 0.28);
}

.toast-error {
    border-color: rgba(255, 31, 114, 0.28);
}

.toast-close {
    border: 0;
    background: transparent;
    color: var(--text-soft);
    font-size: 1.2rem;
    cursor: pointer;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    gap: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    background: rgba(5, 8, 14, 0.74);
    backdrop-filter: blur(10px);
}

.loading-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.loading-pulse {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid rgba(0, 229, 255, 0.24);
    border-top-color: var(--cyan);
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
    .hero-panel,
    .detail-hero,
    .auth-section,
    .featured-grid,
    .project-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .site-header,
    .page-shell {
        width: calc(100vw - 28px);
        padding-left: 0;
        padding-right: 0;
    }

    .header-glass,
    .page-shell,
    .site-footer {
        width: calc(100vw - 28px);
    }

    .header-glass,
    .hero-panel,
    .featured-strip,
    .content-panel,
    .auth-card,
    .detail-hero {
        padding: 22px;
    }

    .site-nav {
        display: none;
    }

    .filter-bar,
    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

    .button-49,
    .button-49::after,
    .detail-download,
    .detail-download::after {
        width: 100%;
    }

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 24px;
    }
}
