/* ── Vibrant & Soft Brand Tokens ────────────────────── */
:root {
    /* Brand Colors */
    --vibrant-pink: #d8267e;
    --deep-magenta: #9d268e;
    --soft-white: #fdf2f8;

    /* Gradients */
    --main-gradient: linear-gradient(135deg, #d8267e 0%, #9d268e 100%);
    --glass-overlay: rgba(255, 255, 255, 0.15);

    /* Smooth Shadows */
    --soft-glow: 0 10px 30px rgba(157, 38, 142, 0.3);

    /* ── Status Palette ───────────────────────────────── */
    /* Error / Danger */
    --error-bg: rgba(255, 75, 75, 0.18);
    --error-bg-strong: rgba(180, 20, 20, 0.38);
    --error-border: rgba(255, 110, 110, 0.55);
    --error-text: #ffd6d6;
    --error-accent: #ff6b6b;
    --error-glow: 0 6px 24px rgba(255, 75, 75, 0.30);

    /* Success */
    --success-bg: rgba(45, 200, 120, 0.15);
    --success-bg-strong: rgba(15, 140, 80, 0.38);
    --success-border: rgba(60, 220, 140, 0.50);
    --success-text: #ccf7e5;
    --success-accent: #5debb8;
    --success-glow: 0 6px 24px rgba(45, 200, 120, 0.28);

    /* Warning */
    --warning-bg: rgba(255, 185, 40, 0.16);
    --warning-bg-strong: rgba(180, 110, 0, 0.38);
    --warning-border: rgba(255, 200, 70, 0.52);
    --warning-text: #fff0c0;
    --warning-accent: #ffd166;
    --warning-glow: 0 6px 24px rgba(255, 185, 40, 0.28);

    /* Info */
    --info-bg: rgba(60, 170, 255, 0.15);
    --info-bg-strong: rgba(15, 100, 190, 0.38);
    --info-border: rgba(90, 190, 255, 0.50);
    --info-text: #cce8ff;
    --info-accent: #74c7ff;
    --info-glow: 0 6px 24px rgba(60, 170, 255, 0.28);

    /* Layout */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --radius-pill: 50px;

    /* Container */
    --container-max: 1100px;
    --content-padding: 24px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-med: 0.25s ease;
}

/* ── Reset & Base ─────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    background: var(--main-gradient);
    background-attachment: fixed;
    color: white;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
.brand {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    color: white;
    letter-spacing: 0.02em;
}

a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: opacity var(--transition-fast);
}

a:hover {
    opacity: 0.8;
}

/* ── Glass Card (shared surface) ──────────────────────── */
.glass-card {
    background: var(--glass-overlay);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--soft-glow);
}

/* ── Container — flex-friendly, full-width on desktop ─── */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--content-padding);
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Auth pages: centered narrow card */
.container.auth {
    justify-content: center;
    align-items: center;
}

.container.auth > .glass-card {
    max-width: 480px;
    width: 100%;
}

/* ── Buttons ──────────────────────────────────────────── */
button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 28px;
    background: white;
    color: var(--vibrant-pink);
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.02em;
    border: none;
    border-radius: var(--radius-pill);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-sizing: border-box;
}

button:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

button:active,
.btn:active {
    transform: translateY(0);
    opacity: 0.88;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.22);
    color: white;
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.32);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    /* Explicit primary variant (same as default button style) */
}

.btn-sm {
    width: auto;
    padding: 8px 20px;
    font-size: 0.85rem;
}

.btn-delete {
    width: auto;
    padding: 8px 20px;
    font-size: 0.85rem;
    background: #e03153;
    color: white;
    box-shadow: 0 6px 20px rgba(224, 49, 83, 0.35);
}

.btn-delete:hover {
    box-shadow: 0 10px 28px rgba(224, 49, 83, 0.50);
}

/* ── Headings ─────────────────────────────────────────── */
h1 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    text-align: center;
}

/* ── Form Elements ────────────────────────────────────── */
label {
    display: block;
    font-family: 'Fredoka', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 7px;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.02em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 13px 18px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-md);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 0.97rem;
    line-height: 1.5;
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

input:hover,
select:hover,
textarea:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
}

input:focus,
select:focus,
textarea:focus {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.70);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

select option {
    background: #7a1a70;
    color: white;
}

input[type="file"] {
    width: 100%;
    padding: 10px 0;
    margin-bottom: 16px;
    font-size: 0.9rem;
    background: transparent;
    border: none;
}

input[type="file"]::file-selector-button {
    background: rgba(255, 255, 255, 0.22);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    cursor: pointer;
    margin-right: 12px;
    transition: background 0.2s;
}

input[type="file"]::file-selector-button:hover {
    background: rgba(255, 255, 255, 0.32);
}

/* ── Alerts ───────────────────────────────────────────── */
.error,
.success,
.warning {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 22px;
    border-radius: var(--radius-lg);
    border: 1px solid;
    backdrop-filter: blur(8px);
    margin-bottom: 16px;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
}

.error {
    background: var(--error-bg-strong);
    border-color: var(--error-border);
    color: var(--error-text);
}

.success {
    background: var(--success-bg-strong);
    border-color: var(--success-border);
    color: var(--success-text);
}

.warning {
    background: var(--warning-bg-strong);
    border-color: var(--warning-border);
    color: var(--warning-text);
}

.info {
    background: var(--info-bg-strong);
    border-color: var(--info-border);
    color: var(--info-text);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 22px;
    border-radius: var(--radius-lg);
    border: 1px solid;
    backdrop-filter: blur(8px);
    margin-bottom: 16px;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
}

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

.warning-actions .btn {
    width: auto;
    font-size: 0.85rem;
    padding: 8px 20px;
}

/* ── Push Prompt ──────────────────────────────────────── */
.push-prompt {
    background: var(--glass-overlay);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--soft-glow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: center;
}

.push-prompt p {
    margin: 0 0 16px;
    font-size: 0.95rem;
    color: white;
}

.push-prompt-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ── Links block ──────────────────────────────────────── */
.links {
    text-align: center;
    margin-top: 16px;
    font-size: 0.875rem;
}

.links a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.links a:hover {
    opacity: 0.8;
}

/* ── Navigation ───────────────────────────────────────── */
nav {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px var(--content-padding);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav .nav-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

nav a:hover {
    opacity: 1;
}

nav .brand {
    font-size: 1.3rem;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    opacity: 1;
}

.brand-logo {
    height: 32px;
    width: 32px;
    flex-shrink: 0;
}

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

nav .nav-links form {
    margin: 0;
    display: inline;
}

nav .nav-links form button {
    background: rgba(255, 255, 255, 0.22);
    color: white;
    box-shadow: none;
    width: auto;
    padding: 8px 20px;
    font-size: 0.85rem;
}

nav .nav-links form button:hover {
    background: rgba(255, 255, 255, 0.32);
    box-shadow: none;
}

/* ── Profile page ─────────────────────────────────────── */
.profile-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
}

.btn-nav {
    text-transform: none;
    padding: 14px 20px;
    font-size: 1rem;
    letter-spacing: 0;
}

#map {
    height: 300px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.22);
    margin-bottom: 16px;
    z-index: 0;
}

.hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.50);
    margin-bottom: 8px;
    margin-top: 2px;
}

.radio-group,
.checkbox-group {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.97rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    margin-bottom: 0;
    font-family: 'Outfit', sans-serif;
}

.radio-label input,
.checkbox-label input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.40);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.10);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
    margin: 0;
    position: relative;
}

.radio-label input[type="radio"] {
    border-radius: 50%;
}

.radio-label input:checked,
.checkbox-label input:checked {
    background: white;
    border-color: white;
}

.checkbox-label input:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: 2px solid var(--vibrant-pink);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.radio-label input:checked::after {
    content: '';
    position: absolute;
    inset: 4px;
    background: var(--vibrant-pink);
    border-radius: 50%;
}

.section-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: 24px 0 16px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-col {
    flex: 1;
}

/* ── Cards page ───────────────────────────────────────── */
.card-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.card-actions .btn {
    width: auto;
    flex: 1;
}

.empty-state {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    padding: 16px 0;
}

.priority-info {
    text-align: center;
    font-size: 0.9rem;
    padding: 8px 0;
    font-weight: 600;
}

.priority-included {
    color: var(--success-accent);
}

.priority-excluded {
    color: rgba(255, 255, 255, 0.5);
}

.priority-detail {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    padding: 4px 0;
}

.next-round-timer {
    text-align: center;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-top: 8px;
}

.card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.card-item {
    flex: 1 1;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Glass Card Base ──────────────────────────────────── */
.glass-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    background: var(--glass-overlay);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
}

/* ── Unified card display (shared between my-cards & vote) ── */
.card-display {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.card-display-title {
    display: block;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 14px 16px 10px;
    flex-shrink: 0;
    color: white;
}

.card-display-image {
    flex: 1;
    min-height: 0;
    width: 100%;
    object-fit: cover;
}

.card-display-text {
    flex: 1;
    min-height: 0;
    padding: 0 16px 16px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    white-space: pre-wrap;
    overflow: auto;
    margin: 0;
}

/* ── Vote page ────────────────────────────────────────── */
.vote-card-btn {
    all: unset;
    width: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    box-sizing: border-box;
    text-align: left;
    transition: transform var(--transition-med), box-shadow var(--transition-med);
}

.vote-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(157, 38, 142, 0.4);
}

.vote-card-btn:active {
    transform: translateY(0);
    box-shadow: var(--soft-glow);
}

.vote-container {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: center;
}

.vote-slot {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 340px;
}

.vote-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    padding: 0 8px;
    opacity: 0.7;
}

@media (max-width: 640px) {
    .vote-container {
        flex-direction: column;
        align-items: center;
    }

    .vote-slot {
        max-width: 100%;
        width: 100%;
    }

    .vote-vs {
        padding: 8px 0;
        margin-top: 0;
    }
}

/* ── Match / Chat page ─────────────────────────────────── */
.chat-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    max-height: calc(100vh - 60px);
    padding-bottom: 0;
    overflow: hidden;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.chat-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-partner-name {
    font-size: 1.3rem;
    margin: 0;
    text-align: left;
}

.chat-match-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.chat-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Chat messages area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
}

.chat-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: auto 0;
    padding: 24px 0;
}

.chat-message {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.chat-message--partner {
    align-self: flex-start;
    background: var(--glass-overlay);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.chat-message--own {
    align-self: flex-end;
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.30);
}

.chat-sender {
    display: block;
    font-family: 'Fredoka', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2px;
}

.chat-content {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    white-space: pre-wrap;
}

.chat-time {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    text-align: right;
}

/* Chat input bar */
.chat-input-bar {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
    align-items: center;
}

.chat-input-bar input[type="text"] {
    flex: 1;
    margin-bottom: 0;
    padding: 10px 14px;
    border-radius: var(--radius-pill);
}

.chat-input-bar button {
    flex-shrink: 0;
}

/* Screen reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Partner profile page ─────────────────────────────── */
.partner-gender {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 24px;
}

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: white;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.back-link:hover {
    opacity: 0.8;
}

/* ── Admin stats table ─────────────────────────────────── */
.admin-stats {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 0.9rem;
}

.admin-stats td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-stats td:first-child {
    color: rgba(255, 255, 255, 0.6);
}

.admin-stats td:last-child {
    text-align: right;
    font-weight: 600;
    color: white;
}

/* ── Admin layout (sidebar + content) ──────────────────── */
.admin-layout {
    flex-direction: row;
    gap: 24px;
    max-width: 1300px;
}

.admin-sidebar {
    width: 220px;
    flex-shrink: 0;
    padding: 20px;
    align-self: flex-start;
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-sidebar-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
    text-align: left;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-nav-link {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    transition: background var(--transition-fast), color var(--transition-fast);
}

.admin-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.admin-nav-link.active {
    background: white;
    color: var(--vibrant-pink);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.admin-back-link {
    margin-top: 16px;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 12px;
}

.admin-content {
    flex: 1;
    min-width: 0;
}

.admin-content h1 {
    text-align: left;
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.admin-content h2 {
    font-size: 1.1rem;
    margin: 24px 0 12px;
    text-align: left;
}

/* ── Stat grid (dashboard cards) ───────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.stat-card {
    padding: 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

/* ── Admin table (reports, etc.) ───────────────────────── */
.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.admin-table th,
.admin-table td {
    padding: 13px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: middle;
}

.admin-table thead tr {
    background: rgba(255, 255, 255, 0.18);
}

.admin-table th {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

.admin-table th:first-child {
    border-radius: 14px 0 0 0;
}

.admin-table th:last-child {
    border-radius: 0 14px 0 0;
}

.admin-table tbody tr {
    transition: background 0.18s;
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.08);
}

.admin-table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 14px;
}

.admin-table tbody tr:last-child td:last-child {
    border-radius: 0 0 14px 0;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table td {
    color: rgba(255, 255, 255, 0.88);
}

.admin-table td a {
    font-weight: 600;
}

/* ── Admin search & pagination ─────────────────────────── */
.admin-search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.admin-search-input {
    flex: 1;
    max-width: 400px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.9rem;
}

.admin-search-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.admin-search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.70);
    background: rgba(255, 255, 255, 0.16);
}

.admin-results-info {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
}

.admin-pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.admin-page-info {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ── Badges ────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid;
}

.badge-danger {
    background: var(--error-bg-strong);
    border-color: var(--error-border);
    color: var(--error-text);
}

.badge-ok,
.badge-success {
    background: var(--success-bg-strong);
    border-color: var(--success-border);
    color: var(--success-text);
}

.badge-admin {
    background: var(--info-bg-strong);
    border-color: var(--info-border);
    color: var(--info-text);
}

.text-danger {
    color: var(--error-accent);
    font-weight: 600;
}

.text-safe {
    color: var(--success-accent);
    font-weight: 600;
}

.text-muted {
    color: rgba(255, 255, 255, 0.5);
}

/* ── Danger zone cards ─────────────────────────────────── */
.danger-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.danger-card {
    padding: 24px;
}

.danger-card h2 {
    margin: 0 0 8px;
}

.danger-card p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 16px;
    line-height: 1.5;
}

.danger-card form button {
    width: auto;
}

.danger-card--destructive {
    border-color: var(--error-border);
}

/* ── User detail page ──────────────────────────────────── */
.user-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.user-detail-section {
    padding: 20px;
}

.user-detail-section h2 {
    margin: 0 0 12px;
}

.ban-form {
    margin-top: 12px;
}

.ban-form button {
    width: auto;
}

/* ── Match history (collapsible) ───────────────────────── */
.match-history-item {
    padding: 0;
    margin-bottom: 12px;
}

.match-history-summary {
    padding: 14px 18px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    list-style: disclosure-closed;
}

.match-history-item[open] .match-history-summary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    list-style: disclosure-open;
}

.match-history-chat {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

/* ── Index / Landing page ──────────────────────────────── */
.hero {
    text-align: center;
    padding: 60px 0;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 20px;
    color: white;
    line-height: 1.1;
}

.hero-tagline {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 auto 40px;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-cta .btn {
    width: auto;
    padding: 12px 36px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.value-card {
    text-align: center;
    padding: 28px 18px;
    border-radius: var(--radius-xl);
}

.value-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.value-card h2 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.value-card p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
    :root {
        --content-padding: 16px;
    }

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

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    nav .nav-inner {
        flex-direction: column;
        gap: 10px;
    }

    nav .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .card-grid {
        flex-direction: column;
    }

    .chat-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .chat-message {
        max-width: 85%;
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    .admin-sidebar-title {
        margin-bottom: 0;
        margin-right: auto;
    }

    .admin-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
    }

    .admin-back-link {
        margin-top: 0;
        border-top: none;
        padding-top: 0;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .user-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Popup / Modal ───────────────────────────────────── */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(80, 0, 60, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.popup-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.popup {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 28px;
    padding: 40px 40px 32px;
    width: min(480px, calc(100vw - 40px));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.30);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s;
    opacity: 0;
    position: relative;
}

.popup-overlay.open .popup {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.popup-close {
    position: absolute;
    top: 18px;
    right: 20px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.24);
}

.popup h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.popup p {
    font-size: 0.97rem;
    opacity: 0.82;
    line-height: 1.6;
    margin-bottom: 28px;
}

.popup-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

@media (max-width: 480px) {
    .popup-actions {
        flex-direction: column-reverse;
    }
}

/* ── FAQ Section ─────────────────────────────────────── */
.faq {
    max-width: 720px;
    margin: 48px auto 24px;
    padding: 0 0 32px;
}

.faq-heading {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 28px;
    color: white;
}

/* ── Accordion ───────────────────────────────────────── */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.accordion-item {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    overflow: hidden;
    transition: background var(--transition-fast);
}

.accordion-item:has(.accordion-toggle:focus-visible) {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.accordion-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: none;
    border: none;
    border-radius: 0;
    color: white;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-fast);
    box-shadow: none;
}

.accordion-toggle:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: none;
    box-shadow: none;
}

.accordion-chevron {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.accordion-chevron svg {
    display: block;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.accordion-item.open .accordion-chevron {
    background: rgba(255, 255, 255, 0.22);
}

.accordion-item.open .accordion-chevron svg {
    transform: rotate(180deg);
}

.accordion-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.28s ease;
}

.accordion-item.open .accordion-body {
    grid-template-rows: 1fr;
}

.accordion-inner {
    overflow: hidden;
}

.accordion-content {
    padding: 16px 22px 18px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.65;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}

/* ── Site Footer ─────────────────────────────────────── */
.site-footer {
    padding: 14px var(--content-padding);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-weight: 400;
}

.footer-links a:hover {
    color: white;
}

/* ── Legal pages ─────────────────────────────────────── */
.legal-doc {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 0 40px;
}

.legal-doc h1 {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.legal-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 28px;
}

.legal-doc section {
    margin-bottom: 28px;
}

.legal-doc h2 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: white;
}

.legal-doc p,
.legal-doc li {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.legal-doc ul {
    padding-left: 20px;
    margin: 8px 0;
}

.legal-doc li {
    margin-bottom: 4px;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    margin: 12px 0;
    overflow-x: auto;
    display: block;
}

.legal-table th,
.legal-table td {
    text-align: left;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.legal-table th {
    background: var(--glass-overlay);
    font-weight: 600;
}

/* ── Utility Classes ──────────────────────────────────── */
.text-center {
    text-align: center;
}

.code-input {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.5em;
}

/* ── PWA Install ──────────────────────────────────────── */
.pwa-install-section {
    background: var(--glass-overlay);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.pwa-install-section h3 {
    margin-bottom: 8px;
}

.pwa-install-section p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 16px;
}

.pwa-install-btn {
    width: auto;
}
