:root {
    --primary: #a855f7;
    --primary-light: #c084fc;
    --primary-dark: #6d28d9;
    --accent: #22d3ee;
    --mint: #2dd4bf;
    --danger: #ff4d6d;
    --bg-dark: #08050d;
    --bg-panel: #0f0918;
    --bg-card: #130b1f;
    --bg-card-hover: #1a1029;
    --border: rgba(168, 85, 247, 0.24);
    --border-soft: rgba(255, 255, 255, 0.09);
    --text: #ffffff;
    --text-dim: #c8b7dd;
    --text-muted: #826f98;
    --shadow: 0 20px 55px rgba(0, 0, 0, 0.36);
}

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

body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 18% 8%, rgba(168, 85, 247, 0.22), transparent 34%),
        radial-gradient(circle at 84% 18%, rgba(34, 211, 238, 0.1), transparent 28%),
        linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
        var(--bg-dark);
    background-size: auto, auto, 46px 46px, 46px 46px, auto;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

button,
input,
select,
textarea {
    font: inherit;
    letter-spacing: 0;
}

button {
    border: 0;
}

::-webkit-scrollbar {
    width: 7px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.55);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

.main_content {
    min-height: 100vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.main_content.visible {
    opacity: 1;
    pointer-events: auto;
}

header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 16px 38px;
    border-bottom: 1px solid var(--border);
    background: rgba(8, 5, 13, 0.9);
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.header_left,
.header_right,
.logo,
.leak_stats,
.leak_actions,
.footer {
    display: flex;
    align-items: center;
}

.header_left {
    min-width: 0;
}

.header_right {
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.logo {
    gap: 7px;
    line-height: 1;
    white-space: nowrap;
}

.logo_gx,
.logo_stuff {
    font-weight: 950;
    letter-spacing: 0;
    line-height: 1;
}

.logo_gx {
    background: linear-gradient(120deg, var(--primary), #f0d6ff 48%, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 18px rgba(168, 85, 247, 0.45));
}

.logo_stuff {
    color: var(--text);
    font-style: italic;
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.18);
}

.logo .logo_gx,
.logo .logo_stuff {
    font-size: 28px;
}

.search_container {
    position: relative;
    width: min(320px, 31vw);
}

.search_icon {
    position: absolute;
    left: 13px;
    top: 50%;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
    transform: translateY(-50%);
}

.search_input {
    width: 100%;
    height: 38px;
    padding: 0 14px 0 40px;
    border: 1px solid var(--border-soft);
    border-radius: 7px;
    outline: none;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    font-size: 13px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.search_input::placeholder {
    color: #7d6d8e;
}

.search_input:focus {
    border-color: rgba(168, 85, 247, 0.72);
    background: rgba(255, 255, 255, 0.065);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.14);
}

.filter_dropdown {
    position: relative;
}

.filter_btn,
.action_btn,
.filter_item,
.btn_download,
.btn_like,
.btn_delete,
.btn_primary,
.btn_secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.filter_btn,
.action_btn {
    min-height: 38px;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.filter_btn svg,
.action_btn svg {
    width: 15px;
    height: 15px;
}

.filter_btn:hover,
.action_btn:hover {
    transform: translateY(-1px);
    border-color: rgba(168, 85, 247, 0.62);
    background: rgba(168, 85, 247, 0.12);
}

.chevron {
    transition: transform 0.18s ease;
}

.filter_dropdown.active .chevron {
    transform: rotate(180deg);
}

.filter_menu {
    position: absolute;
    right: 0;
    top: calc(100% + 9px);
    z-index: 60;
    display: grid;
    width: 180px;
    gap: 5px;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(11, 7, 18, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.filter_dropdown.active .filter_menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.filter_item {
    justify-content: flex-start;
    width: 100%;
    min-height: 34px;
    padding: 0 10px;
    background: transparent;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 800;
    text-align: left;
}

.filter_item:hover,
.filter_item.selected_filter {
    background: rgba(168, 85, 247, 0.16);
    color: white;
}

.upload_btn {
    border-color: rgba(168, 85, 247, 0.55);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary) 62%, var(--accent));
    color: white;
    box-shadow: 0 14px 28px rgba(168, 85, 247, 0.2);
}

.upload_btn:hover {
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: 0 16px 36px rgba(168, 85, 247, 0.34);
}

.icon_btn {
    width: 38px;
    padding: 0;
}

.leaks_container {
    width: min(1500px, calc(100% - 52px));
    min-height: calc(100vh - 160px);
    margin: 0 auto;
    padding: 34px 0 42px;
}

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

.page_eyebrow,
.modal_kicker,
.result_count,
.footer {
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.page_eyebrow,
.modal_kicker {
    color: var(--primary-light);
}

.page_intro h1 {
    margin-top: 4px;
    color: var(--text);
    font-size: 34px;
    line-height: 1.1;
}

.result_count {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-dim);
}

.leaks_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
    gap: 18px;
}

.leak_card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)), var(--bg-card);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.leak_card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    background: linear-gradient(var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.18s ease;
    z-index: 3;
}

.leak_card:hover {
    transform: translateY(-4px);
    border-color: rgba(168, 85, 247, 0.55);
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.08), rgba(255, 255, 255, 0.02)), var(--bg-card-hover);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.32);
}

.leak_card:hover::before {
    opacity: 1;
}

.leak_media {
    position: relative;
    display: grid;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(168, 85, 247, 0.26), rgba(34, 211, 238, 0.12)),
        #10091a;
}

.leak_media::after {
    content: "GL";
    color: rgba(255, 255, 255, 0.17);
    font-size: 34px;
    font-weight: 950;
}

.leak_media img {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leak_category {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    min-height: 26px;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(8, 5, 13, 0.76);
    color: white;
    font-size: 11px;
    font-weight: 850;
    backdrop-filter: blur(10px);
}

.leak_content {
    display: flex;
    min-height: 220px;
    flex-direction: column;
    padding: 17px;
}

.leak_header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.leak_title {
    min-width: 0;
    color: var(--text);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.35;
    overflow-wrap: anywhere;
    text-transform: uppercase;
}

.leak_badge,
.version_badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 950;
    white-space: nowrap;
}

.leak_badge {
    border: 1px solid rgba(45, 212, 191, 0.42);
    background: rgba(45, 212, 191, 0.13);
    color: var(--mint);
}

.version_badge {
    border: 1px solid rgba(168, 85, 247, 0.42);
    background: rgba(168, 85, 247, 0.14);
    color: #ead7ff;
}

.leak_description {
    display: -webkit-box;
    min-height: 43px;
    margin-top: 10px;
    overflow: hidden;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.leak_meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 15px;
    color: var(--text-muted);
    font-size: 12px;
}

.leak_uploader {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
}

.leak_uploader span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leak_uploader svg,
.leak_stat svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.leak_stats {
    flex: 0 0 auto;
    gap: 10px;
}

.leak_stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.leak_actions {
    gap: 8px;
    margin-top: 14px;
}

.btn_download {
    flex: 1;
    min-height: 36px;
    gap: 8px;
    border: 1px solid rgba(168, 85, 247, 0.5);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    box-shadow: 0 12px 24px rgba(168, 85, 247, 0.18);
}

.btn_download:hover {
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: 0 16px 32px rgba(168, 85, 247, 0.3);
}

.btn_download svg,
.btn_like svg,
.btn_delete svg {
    width: 15px;
    height: 15px;
}

.btn_like,
.btn_delete {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-muted);
}

.btn_like:hover,
.btn_like.liked {
    border-color: rgba(168, 85, 247, 0.62);
    background: rgba(168, 85, 247, 0.14);
    color: var(--primary-light);
}

.btn_delete:hover {
    border-color: rgba(255, 77, 109, 0.58);
    background: rgba(255, 77, 109, 0.12);
    color: var(--danger);
}

.empty_state {
    grid-column: 1 / -1;
    display: grid;
    min-height: 340px;
    place-items: center;
    border: 1px dashed rgba(168, 85, 247, 0.35);
    border-radius: 8px;
    background: rgba(19, 11, 31, 0.55);
}

.empty_inner {
    max-width: 420px;
    padding: 34px 20px;
    text-align: center;
}

.empty_icon {
    display: inline-grid;
    width: 54px;
    height: 54px;
    margin-bottom: 16px;
    place-items: center;
    border: 1px solid rgba(168, 85, 247, 0.45);
    border-radius: 8px;
    background: rgba(168, 85, 247, 0.13);
    color: var(--primary-light);
}

.empty_icon svg {
    width: 25px;
    height: 25px;
}

.empty_inner h3 {
    color: var(--text);
    font-size: 19px;
    line-height: 1.3;
}

.empty_inner p {
    margin-top: 10px;
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.55;
}

.footer {
    justify-content: center;
    gap: 14px;
    padding: 28px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

.footer_text {
    color: var(--text-dim);
}

.auth_screen {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 5, 13, 0.94);
    opacity: 1;
    transition: opacity 0.25s ease;
}

.auth_screen.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.auth_container {
    width: min(420px, calc(100% - 32px));
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-panel);
    box-shadow: var(--shadow);
    text-align: center;
}

.auth_logo {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.auth_logo .logo_gx,
.auth_logo .logo_stuff {
    font-size: 40px;
}

.auth_subtitle {
    margin: 12px 0 24px;
    color: var(--text-dim);
    font-weight: 700;
}

.discord_auth_btn {
    display: inline-flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 7px;
    background: #5865f2;
    color: white;
    cursor: pointer;
    font-weight: 900;
}

.discord_auth_btn svg {
    width: 19px;
    height: 19px;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.modal.active {
    display: flex;
}

.modal_overlay {
    position: absolute;
    inset: 0;
    background: rgba(4, 3, 7, 0.8);
    backdrop-filter: blur(10px);
}

.modal_container {
    position: relative;
    z-index: 1;
    width: min(620px, 100%);
    max-height: min(760px, calc(100vh - 36px));
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)), var(--bg-panel);
    box-shadow: var(--shadow);
}

.modal_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border-soft);
}

.modal_header h2 {
    margin-top: 3px;
    color: var(--text);
    font-size: 21px;
    line-height: 1.2;
}

.modal_close {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 77, 109, 0.45);
    border-radius: 7px;
    background: rgba(255, 77, 109, 0.1);
    color: var(--danger);
    cursor: pointer;
}

.modal_close svg {
    width: 16px;
    height: 16px;
}

.modal_body {
    padding: 22px;
}

.form_row {
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: 14px;
}

.form_group {
    margin-bottom: 15px;
}

.form_group label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 850;
}

.form_group input,
.form_group select,
.form_group textarea {
    width: 100%;
    border: 1px solid var(--border-soft);
    border-radius: 7px;
    outline: none;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form_group input,
.form_group select {
    height: 42px;
    padding: 0 12px;
}

.form_group textarea {
    min-height: 112px;
    resize: vertical;
    padding: 12px;
}

.form_group select option {
    background: var(--bg-panel);
}

.form_group input:focus,
.form_group select:focus,
.form_group textarea:focus {
    border-color: rgba(168, 85, 247, 0.72);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.14);
}

.modal_footer {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn_primary,
.btn_secondary {
    min-height: 42px;
    flex: 1;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.btn_primary {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--accent));
    color: white;
}

.btn_secondary {
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
}

.btn_primary:hover,
.btn_secondary:hover {
    transform: translateY(-1px);
}

.upload_note {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
    text-transform: uppercase;
}

@media (max-width: 980px) {
    header {
        align-items: stretch;
        flex-direction: column;
        padding: 15px 22px;
    }

    .header_right {
        justify-content: flex-start;
    }

    .search_container {
        width: 100%;
        flex: 1 1 100%;
    }

    .leaks_container {
        width: min(100% - 32px, 1500px);
        padding-top: 26px;
    }
}

@media (max-width: 620px) {
    .logo .logo_gx,
    .logo .logo_stuff {
        font-size: 24px;
    }

    .filter_dropdown,
    .filter_btn,
    .upload_btn {
        flex: 1 1 auto;
    }

    .filter_btn,
    .upload_btn {
        width: 100%;
    }

    .filter_menu {
        left: 0;
        right: auto;
        width: min(220px, 90vw);
    }

    .page_intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .page_intro h1 {
        font-size: 30px;
    }

    .leaks_grid {
        grid-template-columns: 1fr;
    }

    .form_row,
    .modal_footer {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
}
