* {
    box-sizing: border-box;
}

:root {
    --bg: #08060d;
    --bg-2: #120d1c;
    --card: #14101f;
    --card-2: #1e162c;
    --text: #f3edf8;
    --muted: #b7a9c8;
    --accent: #b21f4b;
    --accent-2: #6b1638;
    --border: #2c223c;
    --glow: rgba(178, 31, 75, 0.35);
    --accent-text: #ffffff;
    --font-body: 'Cormorant Garamond', serif;
    --font-heading: 'Cinzel', serif;
    --header-bg: rgba(8, 6, 13, 0.8);
    --header-image: none;
    --hero-image: none;
}

.theme-goth {
    --header-image: linear-gradient(135deg, rgba(10, 8, 18, 0.85), rgba(10, 8, 18, 0.6)), url("../img/themes/goth.png");
}

.theme-cybergoth {
    --bg: #05070f;
    --bg-2: #0b1120;
    --card: #0d1426;
    --card-2: #141c33;
    --text: #e6fbff;
    --muted: #8fc3d8;
    --accent: #2ef9a0;
    --accent-2: #137a55;
    --border: #1c2b3d;
    --glow: rgba(46, 249, 160, 0.45);
    --accent-text: #07131a;
    --font-body: 'Share Tech Mono', monospace;
    --font-heading: 'Orbitron', sans-serif;
    --header-bg: rgba(3, 12, 20, 0.9);
    --header-image: linear-gradient(120deg, rgba(5, 11, 20, 0.85), rgba(5, 11, 20, 0.4)), url("../img/themes/cybergoth.png");
}

.theme-military {
    --bg: #0c100b;
    --bg-2: #151a12;
    --card: #161d14;
    --card-2: #1d2518;
    --text: #f1f2e8;
    --muted: #aeb4a3;
    --accent: #b08c2b;
    --accent-2: #6f5a1f;
    --border: #2d3827;
    --glow: rgba(176, 140, 43, 0.35);
    --font-body: 'Special Elite', cursive;
    --font-heading: 'Oswald', sans-serif;
    --header-bg: rgba(12, 16, 11, 0.92);
    --header-image: linear-gradient(120deg, rgba(12, 16, 11, 0.85), rgba(12, 16, 11, 0.4)), url("../img/themes/military.png");
}

.theme-steampunk {
    --bg: #120c07;
    --bg-2: #1b130c;
    --card: #1f160f;
    --card-2: #2a1c12;
    --text: #f3e6d3;
    --muted: #c6b39a;
    --accent: #c7782a;
    --accent-2: #8a4b1c;
    --border: #3a2a1c;
    --glow: rgba(199, 120, 42, 0.4);
    --font-body: 'Special Elite', cursive;
    --font-heading: 'IM Fell English SC', serif;
    --header-bg: rgba(18, 12, 7, 0.92);
    --header-image: linear-gradient(120deg, rgba(18, 12, 7, 0.85), rgba(18, 12, 7, 0.45)), url("../img/themes/steampunk.png");
}

.theme-darkwave {
    --bg: #0a0b16;
    --bg-2: #131528;
    --card: #14162c;
    --card-2: #1b1f36;
    --text: #f0eff7;
    --muted: #b6b3c8;
    --accent: #d24f7b;
    --accent-2: #8b3152;
    --border: #2a2f4a;
    --glow: rgba(210, 79, 123, 0.35);
    --font-body: 'Cormorant Garamond', serif;
    --font-heading: 'Playfair Display', serif;
    --header-bg: rgba(10, 11, 22, 0.92);
    --header-image: linear-gradient(120deg, rgba(10, 11, 22, 0.85), rgba(10, 11, 22, 0.4)), url("../img/themes/darkwave.png");
}

body {
    margin: 0;
    font-family: var(--font-body);
    background: radial-gradient(circle at top, var(--card-2) 0%, var(--bg) 55%, var(--bg) 100%);
    color: var(--text);
    min-height: 100vh;
    position: relative;
}

.mist {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(120deg, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 6px);
    opacity: 0.4;
    pointer-events: none;
}

a {
    color: var(--text);
    text-decoration: none;
}

a:hover {
    color: #ffffff;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    letter-spacing: 0.4px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 6vw;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    background: var(--header-bg);
    background-image: var(--header-image);
    background-size: cover;
    background-position: center;
    position: sticky;
    top: 0;
    z-index: 5;
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: var(--font-heading);
}

.brand a {
    font-size: 1.4rem;
    letter-spacing: 1px;
}

.brand small {
    color: var(--muted);
    font-family: var(--font-body);
}

.sigil {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--glow);
    display: inline-block;
    margin-bottom: 4px;
}

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

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card-2);
    color: var(--text);
    cursor: pointer;
    padding: 0;
}

.nav-toggle__icon {
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    display: block;
    position: relative;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}

.nav-toggle__icon::before {
    top: -6px;
}

.nav-toggle__icon::after {
    top: 6px;
}

.nav-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-notify {
    position: relative;
}

.nav-bell {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    position: relative;
}

.nav-bell .bell-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.nav-bell.has-unread {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(178, 31, 75, 0.35);
}

.nav-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.nav-notify.open .nav-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.nav-panel__count {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(178, 31, 75, 0.2);
    color: var(--accent);
    font-size: 0.75rem;
}

.nav-empty {
    color: var(--muted);
    font-size: 0.9rem;
    padding: 8px 4px;
}

.nav-thread-list {
    display: grid;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
}

.nav-thread {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    align-items: start;
    padding: 10px;
    border-radius: 10px;
    background: var(--card-2);
    border: 1px solid transparent;
}

.nav-thread:hover {
    border-color: var(--accent);
}

.nav-thread__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    font-size: 0.8rem;
    color: var(--muted);
}

.nav-thread__meta strong {
    color: var(--text);
}

.nav-thread__badge {
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(178, 31, 75, 0.2);
    color: var(--accent);
    font-size: 0.7rem;
}

.nav-thread__text {
    color: var(--text);
    font-size: 0.9rem;
    margin-top: 4px;
}

.navlinks .nav-form {
    margin: 0;
}

.navlinks .nav-button {
    background: none;
    border: none;
    color: var(--text);
    font: inherit;
    padding: 0;
    cursor: pointer;
}

.navlinks .nav-button:hover {
    color: #ffffff;
}

.container {
    padding: 40px 6vw 80px;
}

.hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
    align-items: center;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    margin: 0 0 12px;
}

.hero p {
    color: var(--muted);
    font-size: 1.1rem;
}

.hero-actions {
    margin-top: 18px;
    display: flex;
    gap: 12px;
}

.hero-card {
    background: var(--card);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.card {
    background: var(--card);
    padding: 24px;
    border-radius: 18px;
    border: 1px solid var(--border);
    margin-bottom: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.card.reveal {
    opacity: 1;
    transform: translateY(0);
}

.btn,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid transparent;
    background: var(--accent);
    color: var(--accent-text);
    cursor: pointer;
}

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--accent);
}

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    background: rgba(178, 31, 75, 0.15);
    border: 1px solid var(--accent);
}

.alert.danger {
    background: rgba(178, 31, 75, 0.25);
}

.form {
    display: grid;
    gap: 14px;
}

.form label {
    display: grid;
    gap: 8px;
    font-weight: 600;
}

.form-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.select-wrap {
    position: relative;
    width: 100%;
    display: block;
}

.select-wrap::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--muted);
    transform: translateY(-50%);
    pointer-events: none;
}

select.input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 44px;
    background-image: none;
    cursor: pointer;
    min-height: 42px;
    background-color: var(--bg-2);
    width: 100%;
    display: block;
}

select.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(178, 31, 75, 0.25);
}

select.input option {
    background: var(--card);
    color: var(--text);
}

.select-wrap.compact {
    max-width: 220px;
    width: 100%;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr minmax(180px, 240px);
    gap: 16px;
    align-items: end;
}

.filter-selects {
    display: grid;
    gap: 12px;
}

.filter-select {
    justify-self: end;
    width: 100%;
}

.filter-toggles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 8px;
}

.toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--card-2);
    border: 1px solid var(--border);
    cursor: pointer;
}

.toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-ui {
    width: 42px;
    height: 24px;
    background: var(--bg-2);
    border-radius: 999px;
    border: 1px solid var(--border);
    position: relative;
    transition: background 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

.toggle-ui::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--muted);
    transition: transform 0.2s ease, background 0.2s ease;
}

.toggle input:checked + .toggle-ui {
    background: rgba(178, 31, 75, 0.25);
    border-color: var(--accent);
}

.toggle input:checked + .toggle-ui::after {
    transform: translateX(18px);
    background: #fff;
}

.toggle-label {
    font-weight: 600;
    color: var(--text);
}

.input,
.textarea {
    background: var(--bg-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font-family: var(--font-body);
    font-size: 1rem;
}

.input[type="file"] {
    padding: 6px 10px;
    font-size: 0.9rem;
    color: var(--muted);
    min-height: 38px;
}

.input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.input[type="file"]::-webkit-file-upload-button {
    margin-right: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.section-header small {
    color: var(--muted);
}

.tag-editor {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 14px;
    background: var(--card-2);
    border: 1px solid var(--border);
}

.tag-input {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    font-size: 0.95rem;
}

.tag-remove {
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.9rem;
}

.tag-remove:hover {
    color: #fff;
}

.avatar-edit {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border-radius: 14px;
    background: var(--card-2);
    border: 1px solid var(--border);
}

.gallery-editor {
    display: grid;
    gap: 16px;
}

.gallery-list {
    display: grid;
    gap: 12px;
}

.gallery-row {
    display: grid;
    gap: 12px;
    grid-template-columns: 160px 1fr;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    background: var(--card-2);
    border: 1px solid var(--border);
}

.gallery-row.is-removed {
    opacity: 0.55;
}

.gallery-thumb {
    width: 160px;
    height: 110px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.gallery-thumb::after {
    content: "Removed";
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(5, 3, 10, 0.7);
    color: var(--text);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery-row.is-removed .gallery-thumb::after {
    display: flex;
}

.gallery-trash {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(8, 6, 13, 0.7);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.gallery-trash {
    pointer-events: auto;
}

.gallery-trash::before {
    content: "";
    width: 16px;
    height: 16px;
    display: block;
    background-size: contain;
    background-repeat: no-repeat;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M9 3h6l1 2h4v2H4V5h4l1-2zm1 6h2v9h-2V9zm4 0h2v9h-2V9zM6 9h2v9H6V9z'/></svg>");
}

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

.gallery-trash.active {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--glow);
}

.gallery-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-right: 6px;
}

.drag-hint {
    color: var(--muted);
    font-size: 0.9rem;
}

.drag-handle {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px dashed var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.drag-handle::before,
.drag-handle::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 2px;
    background: var(--muted);
}

.drag-handle::after {
    transform: translateY(4px);
}

.gallery-row {
    cursor: grab;
}

.gallery-row.dragging {
    opacity: 0.7;
    cursor: grabbing;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.btn-ghost.danger {
    border-color: var(--accent-2);
    color: var(--muted);
}

.btn-ghost.danger:hover {
    border-color: var(--accent);
    color: #fff;
}

.profile-card {
    padding: 0;
    overflow: hidden;
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.profile-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-2);
    box-shadow: 0 26px 50px rgba(0,0,0,0.45);
}

.profile-card__media {
    position: relative;
    min-height: 140px;
    background-size: cover;
    background-position: center;
}

.profile-card__veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 6, 13, 0.2), rgba(8, 6, 13, 0.9));
}

.profile-card:hover .profile-card__veil {
    background: linear-gradient(180deg, rgba(8, 6, 13, 0.1), rgba(8, 6, 13, 0.85));
}

.profile-card__avatar {
    position: absolute;
    left: 20px;
    bottom: -28px;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 2px solid var(--accent);
    box-shadow: 0 0 18px var(--glow);
}

.profile-card__status {
    position: absolute;
    right: 16px;
    top: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(178, 31, 75, 0.9);
    color: #fff;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.profile-card__body {
    padding: 42px 20px 20px;
    display: grid;
    gap: 10px;
}

.profile-card__title {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
}

.profile-card__title h3 {
    margin: 0;
}

.profile-card__location {
    color: var(--muted);
    font-size: 0.85rem;
}

.profile-card__headline {
    margin: 0;
    color: var(--muted);
}

.profile-filters {
    margin-bottom: 28px;
    background: linear-gradient(140deg, rgba(178, 31, 75, 0.08), rgba(20, 16, 31, 0.6));
    border: 1px solid rgba(178, 31, 75, 0.2);
}

.filter-form .form-grid {
    align-items: end;
}

.filter-form .actions {
    margin-top: 6px;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card-2);
    font-size: 0.85rem;
    color: var(--muted);
}

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

.pill.muted {
    opacity: 0.7;
}

.avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 2px solid var(--accent);
    display: inline-block;
    margin-bottom: 12px;
}

.avatar.large {
    width: 110px;
    height: 110px;
}

.avatar.small {
    width: 42px;
    height: 42px;
    margin-bottom: 0;
    border-width: 1px;
}

.profile-hero {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 24px;
    align-items: center;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
}

.profile-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(178, 31, 75, 0.4);
    background: rgba(178, 31, 75, 0.1);
    color: var(--text);
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.like-btn.active {
    background: var(--accent);
    color: var(--accent-text);
    box-shadow: 0 0 18px var(--glow);
}

.like-hint {
    color: var(--muted);
    font-size: 0.85rem;
}

.profile .headline {
    color: var(--muted);
}

.meta {
    display: flex;
    gap: 12px;
    color: var(--muted);
    margin-bottom: 12px;
}

.gallery-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(140px, 220px));
    justify-content: start;
}

.gallery-card {
    margin: 0;
    background: var(--card-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    position: relative;
    width: 100%;
    max-width: 220px;
}

.gallery-img {
    width: 100%;
    padding-top: 60%;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-img {
    transform: scale(1.04);
}

.gallery-card::after {
    content: "";
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(8, 6, 13, 0.7);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M7 3h6v2H9v4H7V3zm10 0h-4v2h2v2h2V3zM7 15h2v4h4v2H7v-6zm10 0h-2v2h-2v2h4v-4z'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.gallery-card:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.dashboard-stats div {
    padding: 12px;
    border-radius: 12px;
    background: var(--card-2);
    border: 1px solid var(--border);
    text-align: center;
}

.dashboard-stats span {
    font-size: 1.6rem;
    font-weight: 600;
    display: block;
}

.table {
    display: grid;
    gap: 8px;
}

.table .row {
    display: grid;
    grid-template-columns: 1.4fr 1.2fr 0.6fr 0.6fr 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    background: var(--card-2);
}

.table .row.header {
    background: transparent;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.infinite-loader {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    padding: 12px;
    grid-column: 1 / -1;
}

.infinite-sentinel {
    height: 1px;
    grid-column: 1 / -1;
}

.match-post {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    align-items: start;
    background: var(--card-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    width: 100%;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.match-post__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    color: var(--muted);
    font-size: 0.85rem;
}

.match-post__meta strong {
    color: var(--text);
    font-size: 0.95rem;
}

.match-post p {
    margin: 6px 0 0;
    color: var(--text);
}

.match-post:hover {
    border-color: var(--accent);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}

.wall {
    display: grid;
    gap: 16px;
}

.wall-form {
    grid-template-columns: 1fr auto;
    align-items: end;
}

.wall-posts {
    display: grid;
    gap: 14px;
}

.wall-post {
    background: var(--card-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    scroll-margin-top: 120px;
}

.wall-post:target {
    border-color: var(--accent);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.wall-author {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}

.wall-author strong {
    display: block;
}

.wall-author a {
    color: var(--muted);
    font-size: 0.85rem;
    display: block;
}

.wall-author small {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
}

.wall-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text);
    cursor: pointer;
    font-family: var(--font-body);
}

.reaction-btn.active {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--glow);
}

.reaction-btn .count {
    font-size: 0.85rem;
    color: var(--muted);
}

.wall-comments {
    margin-top: 14px;
    display: grid;
    gap: 12px;
}

.comment-form,
.reply-form {
    grid-template-columns: 1fr auto;
    align-items: end;
}

.wall-thread {
    display: grid;
    gap: 12px;
}

.wall-comment {
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card);
}

.wall-children {
    margin-left: 18px;
    margin-top: 10px;
    display: grid;
    gap: 10px;
    border-left: 1px solid var(--border);
    padding-left: 12px;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(5, 3, 10, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 92vw;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}

.match-modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 3, 10, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 60;
}

.match-modal.active {
    display: flex;
}

.match-card {
    background: var(--card);
    border: 1px solid var(--accent);
    border-radius: 18px;
    padding: 26px;
    width: min(420px, 90vw);
    text-align: center;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}

.match-avatars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 16px 0;
}

.match-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background-size: cover;
    background-position: center;
    box-shadow: 0 0 18px var(--glow);
}

.match-heart {
    font-size: 1.6rem;
}

.matches-grid {
    align-items: stretch;
    grid-template-columns: 1fr;
}

.match-list-card {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 18px;
    text-align: left;
    align-items: center;
}

.match-card__avatar {
    width: 90px;
    height: 90px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background-size: cover;
    background-position: center;
    box-shadow: 0 0 18px rgba(0,0,0,0.4);
}

.match-card__body {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 16px;
    align-items: center;
}

.match-card__body h3 {
    margin: 0;
    grid-column: 1;
}

.match-card__body p {
    margin: 0;
    color: var(--muted);
    grid-column: 1;
}

.match-card__body small {
    grid-column: 1;
}

.match-card__body .match-meta {
    grid-column: 1;
}

.match-card__body .actions {
    grid-column: 2;
    grid-row: 1 / span 4;
    justify-self: end;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.match-card__body .actions form {
    margin: 0;
}

.match-card__body .actions .btn,
.match-card__body .actions .btn-ghost {
    padding: 6px 12px;
    font-size: 0.7rem;
    letter-spacing: 0.8px;
}

@media (max-width: 720px) {
    .match-list-card {
        grid-template-columns: 1fr;
    }

    .match-card__avatar {
        width: 100%;
        height: 180px;
        border-radius: 14px;
    }

    .match-card__body {
        grid-template-columns: 1fr;
    }

    .match-card__body .actions {
        grid-column: 1;
        grid-row: auto;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

.match-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.match-card h3 {
    margin-top: 0;
    font-family: var(--font-heading);
}

.match-card p {
    color: var(--muted);
}

.muted {
    color: var(--muted);
}

.chat-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 18px;
    min-height: 60vh;
}

.chat-users {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
}

.chat-users ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.chat-users a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: transparent;
}

.chat-users a.active,
.chat-users a:hover {
    background: var(--card-2);
}

.chat-thread {
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 12px;
}

.chat-messages {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    overflow-y: auto;
    max-height: 55vh;
}

.chat-message {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.chat-message.me {
    align-items: flex-end;
}

.chat-message .bubble {
    padding: 10px 14px;
    border-radius: 16px;
    background: var(--card-2);
    max-width: 70%;
}

.chat-message.me .bubble {
    background: var(--accent);
}

.chat-message .meta {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 4px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-message .meta .time {
    opacity: 0.8;
}

.chat-input {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.empty {
    color: var(--muted);
    text-align: center;
    padding: 40px 0;
}

.footer {
    padding: 24px 6vw 40px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .topbar {
        flex-direction: column;
        gap: 12px;
    }
    .navlinks {
        flex-wrap: wrap;
        justify-content: center;
    }
    .chat-shell {
        grid-template-columns: 1fr;
    }
    .profile-hero {
        grid-template-columns: 1fr;
    }

    .avatar-edit {
        grid-template-columns: 1fr;
    }

    .gallery-row {
        grid-template-columns: 1fr;
    }

    .wall-form {
        grid-template-columns: 1fr;
    }

    .comment-form,
    .reply-form {
        grid-template-columns: 1fr;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    .filter-select {
        justify-self: start;
    }

    .filter-selects {
        width: 100%;
    }

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

@media (max-width: 720px) {
    .topbar {
        position: static;
        padding: 16px 5vw 12px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .navlinks {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--border);
    }

    .topbar.nav-open .navlinks {
        display: flex;
    }

    .navlinks > a,
    .navlinks .nav-button {
        text-align: left;
        padding: 10px 12px;
        border-radius: 10px;
        border: 1px solid var(--border);
        background: var(--card-2);
        width: 100%;
    }

    .navlinks > a.btn {
        background: var(--accent);
        border-color: transparent;
        color: #fff;
    }

    .nav-group {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
        padding: 6px 10px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--card-2);
    }

    .nav-group > a {
        flex: 1;
    }

    .nav-panel {
        right: 50%;
        width: min(92vw, 320px);
        transform: translate(50%, -6px);
    }

    .nav-notify.open .nav-panel {
        transform: translate(50%, 0);
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 200px));
        justify-content: center;
        gap: 10px;
    }

    .gallery-card {
        max-width: 200px;
    }
}

@media (max-width: 520px) {
    .match-card__avatar {
        height: 140px;
    }

    .match-card__body {
        gap: 10px;
    }

    .match-card__body .actions {
        width: 100%;
        justify-content: flex-start;
    }

    .match-card__body .actions .btn,
    .match-card__body .actions .btn-ghost {
        padding: 6px 10px;
        font-size: 0.65rem;
        letter-spacing: 0.6px;
    }
}

@media (max-width: 420px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 180px));
    }

    .gallery-card {
        max-width: 180px;
    }
}

.auth {
    display: flex;
    justify-content: center;
}

.auth .card {
    width: min(520px, 100%);
}

.profile {
    display: grid;
    gap: 24px;
}

.hero-card ul {
    padding-left: 18px;
    color: var(--muted);
}
