:root,
[data-theme="dark"] {
    --primary: #e91e63;
    --primary-dark: #c2185b;
    --primary-light: #f48fb1;
    --secondary: #7c4dff;
    --bg: #0f0f13;
    --bg-card: #1a1a24;
    --bg-input: #252532;
    --text: #ffffff;
    --text-muted: #9ca3af;
    --border: #2d2d3d;
    --success: #4caf50;
    --danger: #f44336;
    --warning: #ff9800;
    --gradient: linear-gradient(135deg, #e91e63 0%, #7c4dff 100%);
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --navbar-bg: rgba(26, 26, 36, 0.95);
    --link: #f48fb1;
    --link-hover: #e91e63;
    --overlay: rgba(0, 0, 0, 0.85);
    --card-overlay: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    --muted-on-card: #cccccc;
    --alert-error-bg: rgba(244, 67, 54, 0.15);
    --alert-error-text: #ef9a9a;
    --alert-success-bg: rgba(76, 175, 80, 0.15);
    --alert-success-text: #a5d6a7;
    --alert-info-bg: rgba(124, 77, 255, 0.15);
    --alert-info-text: #b39ddb;
    --hero-gradient: radial-gradient(ellipse at top, rgba(233,30,99,0.15) 0%, transparent 60%),
                     radial-gradient(ellipse at bottom, rgba(124,77,255,0.1) 0%, transparent 60%);
    --auth-gradient: radial-gradient(ellipse at center, rgba(233,30,99,0.08) 0%, transparent 70%);
    --radius: 12px;
    --radius-lg: 20px;
}

[data-theme="light"] {
    --primary: #e91e63;
    --primary-dark: #ad1457;
    --primary-light: #c2185b;
    --secondary: #651fff;
    --bg: #f4f4f8;
    --bg-card: #ffffff;
    --bg-input: #eef0f4;
    --text: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --link: #c2185b;
    --link-hover: #e91e63;
    --overlay: rgba(17, 24, 39, 0.75);
    --card-overlay: linear-gradient(transparent, rgba(17, 24, 39, 0.82));
    --muted-on-card: #e5e7eb;
    --alert-error-bg: rgba(244, 67, 54, 0.1);
    --alert-error-text: #c62828;
    --alert-success-bg: rgba(76, 175, 80, 0.12);
    --alert-success-text: #2e7d32;
    --alert-info-bg: rgba(124, 77, 255, 0.1);
    --alert-info-text: #512da8;
    --hero-gradient: radial-gradient(ellipse at top, rgba(233,30,99,0.08) 0%, transparent 60%),
                     radial-gradient(ellipse at bottom, rgba(124,77,255,0.06) 0%, transparent 60%);
    --auth-gradient: radial-gradient(ellipse at center, rgba(233,30,99,0.05) 0%, transparent 70%);
}

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

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    width: 100%;
    overflow-x: hidden;
}

img, svg, video {
    max-width: 100%;
    height: auto;
}

table {
    max-width: 100%;
}

input, textarea, select, button {
    max-width: 100%;
    font-family: inherit;
}

.main-content, .qd-dashboard, .app-layout {
    max-width: 100%;
}

/* Any wide table (admin lists, etc.) scrolls horizontally inside its own box
   instead of blowing out the page width on small screens. */
.card:has(> table),
.admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

a { color: var(--link); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--link-hover); }

/* Site Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding-top: var(--header-top-padding, 0px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-brand:hover {
    color: var(--text);
}

.site-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover; object-position: center;
    box-shadow: 0 2px 12px rgba(233, 30, 99, 0.35);
}

/* Full Logo Only mode: the logo is the entire brand mark, so let landscape
   (wide) logos keep their natural aspect ratio instead of being cropped
   into the square icon box above. */
.site-logo-full {
    width: auto;
    height: 42px;
    max-width: 220px;
    border-radius: 0;
    object-fit: contain;
    box-shadow: none;
}

.brand-name {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.brand-icon { color: var(--primary); }

.nav-guest {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary-light);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.nav-links { display: flex; gap: 8px; flex: 1; justify-content: center; flex-wrap: wrap; }

.nav-menu-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--text);
    background: var(--bg-input);
}

.nav-link.active { color: var(--primary-light); }

.badge {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.admin-link { color: var(--warning) !important; }

.nav-user { display: flex; align-items: center; gap: 12px; }

.nav-profile-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-width: 44px;
    min-height: 44px;
}

.nav-profile-link:hover,
.nav-profile-link.active {
    border-color: var(--primary);
    transform: scale(1.05);
}

.nav-profile-link.active {
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.25);
}

.nav-profile-avatar,
.nav-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover; object-position: center;
    display: block;
    pointer-events: none;
}

.nav-avatar {
    border: 2px solid var(--primary);
}

.nav-logout {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Main */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    min-height: calc(100vh - 140px);
}

.main-content:has(.app-layout) {
    max-width: 1400px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(233,30,99,0.4); }

.btn-secondary {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover { border-color: var(--primary); }

.btn-danger { background: var(--danger); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* Forms */
.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

select.form-control { cursor: pointer; }

input[type="date"].form-control,
input[type="datetime-local"].form-control {
    cursor: pointer;
}

input[type="date"].form-control::-webkit-calendar-picker-indicator,
input[type="datetime-local"].form-control::-webkit-calendar-picker-indicator {
    cursor: pointer;
    padding: 4px;
    margin-left: 4px;
    opacity: 1;
}

:root:not([data-theme="light"]) input[type="date"].form-control::-webkit-calendar-picker-indicator,
:root:not([data-theme="light"]) input[type="datetime-local"].form-control::-webkit-calendar-picker-indicator {
    filter: invert(0.8);
}

textarea.form-control { resize: vertical; min-height: 100px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-error { background: var(--alert-error-bg); border: 1px solid var(--danger); color: var(--alert-error-text); }
.alert-success { background: var(--alert-success-bg); border: 1px solid var(--success); color: var(--alert-success-text); }
.alert-info { background: var(--alert-info-bg); border: 1px solid var(--secondary); color: var(--alert-info-text); }

/* Landing Page */
.landing {
    min-height: calc(100vh - 72px);
    display: flex;
    flex-direction: column;
}

.landing-hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px 80px;
    background: var(--hero-gradient);
}

.hero-content { max-width: 700px; }

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.landing-features {
    padding: 80px 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.landing-features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 48px;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: transform 0.2s;
}

.feature-card:hover { transform: translateY(-4px); }

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.feature-card h3 { margin-bottom: 10px; font-size: 1.1rem; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; }

.landing-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    padding: 48px 24px;
    flex-wrap: wrap;
}

.stat-item { text-align: center; }
.stat-number { font-size: 2.5rem; font-weight: 800; color: var(--primary-light); }
.stat-label { color: var(--text-muted); font-size: 0.9rem; }

/* Auth Pages */
.auth-page {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--auth-gradient);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
}

.auth-card h1 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-forgot-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--primary);
}

.password-input-wrap {
    position: relative;
}

.password-input-wrap .form-control {
    padding-right: 44px;
}

.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1rem;
    opacity: 0.6;
}

.password-toggle-btn:hover { opacity: 1; }
.password-toggle-btn.is-visible { opacity: 1; color: var(--primary); }

/* Discover / Swipe */
.discover-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.discover-preference {
    text-align: center;
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.discover-preference strong {
    color: var(--primary-light);
}

.discover-preference a {
    margin-left: 8px;
    font-size: 0.85rem;
}

.discover-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-chip {
    padding: 8px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.filter-chip.active, .filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(233,30,99,0.1);
}

.swipe-stack {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 520px;
    margin-bottom: 24px;
}

.swipe-card {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: grab;
    transition: transform 0.3s ease;
    user-select: none;
}

.swipe-card-image {
    width: 100%;
    height: 75%;
    object-fit: cover; object-position: center;
    background: var(--bg-input);
}

.swipe-card-info {
    padding: 20px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-overlay);
}

.swipe-card-info h2 { font-size: 1.5rem; margin-bottom: 4px; }
.swipe-card-info .location { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 8px; }
.swipe-card-info .bio { font-size: 0.85rem; color: var(--muted-on-card); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.swipe-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.swipe-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1.5rem;
}

.swipe-btn:hover { transform: scale(1.1); }
.swipe-btn.pass:hover { border-color: var(--danger); background: rgba(244,67,54,0.15); }
.swipe-btn.like:hover { border-color: var(--success); background: rgba(76,175,80,0.15); }
.swipe-btn.super:hover { border-color: var(--secondary); background: rgba(124,77,255,0.15); }

.no-profiles {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}

.no-profiles h2 { margin-bottom: 12px; color: var(--text); }

/* Match popup */
.match-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.match-popup {
    text-align: center;
    animation: scaleIn 0.4s;
}

.match-popup h1 {
    font-size: 2.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 24px;
}

.match-avatars {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 32px;
}

.match-avatars img {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    object-fit: cover; object-position: center;
    border: 4px solid var(--primary);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Matches */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.match-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.2s;
    color: var(--text);
    position: relative;
}

.match-card:hover { transform: translateY(-4px); border-color: var(--primary); }

.match-card-photo, .match-card-info { display: block; text-decoration: none; color: inherit; }

.match-card img {
    width: 100%;
    height: 200px;
    object-fit: cover; object-position: center;
}

.match-card-info { padding: 16px; padding-right: 46px; }
.match-card-info h3 { font-size: 1rem; margin-bottom: 4px; }
.match-card-info p { color: var(--text-muted); font-size: 0.85rem; }

.match-card-message-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary, #e91e63);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.95rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.match-card-message-btn:hover { filter: brightness(1.1); }

/* Messages */
.messages-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    height: calc(100vh - 140px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.conversations-list {
    border-right: 1px solid var(--border);
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
    text-decoration: none;
    color: var(--text);
}

.conversation-item:hover, .conversation-item.active { background: var(--bg-input); }

.conversation-item img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover; object-position: center;
}

.conversation-avatar-wrap { position: relative; display: inline-block; flex-shrink: 0; }
.online-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid var(--bg-card);
}
.online-status-text { color: #22c55e; font-weight: 600; }

.conversation-info { flex: 1; min-width: 0; }
.conversation-info h4 { font-size: 0.95rem; margin-bottom: 2px; }
.conversation-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time { font-size: 0.75rem; color: var(--text-muted); }

.chat-area {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.chat-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}

.chat-header-actions {
    flex-wrap: wrap;
}

.chat-header > div:not(.chat-header-actions) {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-header img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover; object-position: center;
}

.chat-back-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--text);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.chat-back-btn:hover {
    background: var(--bg-input);
}

.chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message-bubble.sent {
    align-self: flex-end;
    background: #ffe3ef;
    color: #7a2a4d;
    border-bottom-right-radius: 4px;
}

.message-bubble.received {
    align-self: flex-start;
    background: var(--bg-input);
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.chat-call-event {
    align-self: center;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 80%;
    margin: 6px 0;
    padding: 8px 14px;
    border-radius: 16px;
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 0.82rem;
}
.chat-call-event .chat-call-icon { font-size: 1rem; }
.chat-call-event.missed { color: #dc2626; }
.chat-call-event.missed .chat-call-icon { filter: none; }
.chat-call-event .chat-call-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-left: 4px;
}

.chat-input {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.chat-image-preview,
.chat-audio-preview {
    flex-shrink: 0;
}

.chat-record-timer[hidden] { display: none; }
.chat-record-timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    color: #dc2626;
    font-weight: 600;
    flex-shrink: 0;
}
.chat-record-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #dc2626;
    animation: chat-rec-blink 1s steps(1) infinite;
}
@keyframes chat-rec-blink {
    50% { opacity: 0.15; }
}
.chat-record-len {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.chat-input input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
}

.chat-input .chat-attach-btn,
.chat-input button[type="submit"] {
    flex-shrink: 0;
}

.chat-input input:focus { outline: none; border-color: var(--primary); }

.chat-attach-btn {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-input);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-attach-btn:hover { border-color: var(--primary); }

.chat-attach-wrap {
    position: relative;
    flex-shrink: 0;
}

.chat-attach-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    min-width: 150px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 4px;
    z-index: 30;
}

.chat-attach-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    background: none;
    border: none;
    border-radius: 7px;
    font: inherit;
    font-size: 0.9rem;
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.chat-attach-menu button:hover { background: var(--bg-input); }

.chat-attach-btn.recording {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
    animation: chat-rec-pulse 1s ease-in-out infinite;
}

@keyframes chat-rec-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.chat-audio-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-top: 1px solid var(--border);
}

.chat-audio-preview audio { height: 36px; flex: 1; }

.chat-audio-preview button {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-muted);
    cursor: pointer;
}

.message-audio {
    display: block;
    height: 40px;
    max-width: 240px;
}

.message-bubble.has-audio {
    padding: 6px 8px;
}

.chat-image-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-top: 1px solid var(--border);
}

.chat-image-preview img {
    width: 56px;
    height: 56px;
    object-fit: cover; object-position: center;
    border-radius: 8px;
}

.chat-image-preview button#chatImagePreviewRemove {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-muted);
    cursor: pointer;
    margin-left: auto;
}

.chat-image-preview-opts {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.chat-img-toggle {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}
.chat-img-opt {
    background: var(--bg-input);
    border: none;
    padding: 5px 12px;
    font: inherit;
    font-size: 0.78rem;
    color: var(--text-muted);
    cursor: pointer;
}
.chat-img-opt + .chat-img-opt { border-left: 1px solid var(--border); }
.chat-img-opt.active {
    background: var(--primary, #e91e63);
    color: #fff;
}
.chat-img-opt:disabled { opacity: 0.4; cursor: not-allowed; }
.chat-img-size {
    font-size: 0.72rem;
    color: var(--text-muted);
}
.chat-image-preview.too-big .chat-img-size { color: #dc2626; font-weight: 600; }

.message-bubble.has-image {
    padding: 6px;
    background: transparent;
}

.message-bubble.has-image.sent,
.message-bubble.has-image.received {
    background: transparent;
}

.message-image {
    display: block;
    max-width: 220px;
    max-height: 280px;
    border-radius: 12px;
    object-fit: cover; object-position: center;
    cursor: zoom-in;
}

.chat-lightbox[hidden] { display: none; }
.chat-lightbox {
    position: fixed;
    inset: 0;
    z-index: 4000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.chat-lightbox img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
}
.chat-lightbox-close,
.chat-lightbox-download {
    position: absolute;
    top: 14px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.4rem;
    line-height: 44px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-lightbox-close { right: 14px; }
.chat-lightbox-download { right: 68px; font-size: 1.15rem; }
.chat-lightbox-close:hover,
.chat-lightbox-download:hover { background: rgba(255, 255, 255, 0.28); }

.chat-toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translate(-50%, 20px);
    z-index: 5000;
    background: rgba(20, 20, 20, 0.92);
    color: #fff;
    padding: 10px 18px;
    border-radius: 22px;
    font-size: 0.88rem;
    max-width: 80vw;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.chat-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.message-bubble.has-image .message-time {
    padding: 4px 8px 0;
}

.chat-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
}

/* Profile */
.profile-header {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.profile-avatar-large {
    width: 160px;
    height: 160px;
    border-radius: 20px;
    object-fit: cover; object-position: center;
    border: 4px solid var(--primary);
}

.profile-details h1 { font-size: 2rem; margin-bottom: 8px; }
.profile-meta { color: var(--text-muted); margin-bottom: 12px; }
.profile-bio { max-width: 600px; line-height: 1.7; }

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.btn-like {
    background: var(--primary);
    color: #fff;
    border: none;
    font-weight: 600;
}

.btn-like:hover:not(:disabled) {
    background: var(--primary-dark);
    color: #fff;
}

.btn-like:disabled {
    opacity: 0.7;
    cursor: default;
}

.btn-super-like {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #1a1a2e;
    border: none;
    font-weight: 600;
}

.profile-like-status {
    font-size: 0.9rem;
    color: var(--success);
    font-weight: 500;
}

.profile-like-status.passed {
    color: var(--text-muted);
}

.profile-like-status.matched {
    color: var(--primary-light);
    font-weight: 600;
}

.profile-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.profile-photo {
    aspect-ratio: 1;
    border-radius: var(--radius);
    object-fit: cover; object-position: center;
    width: 100%;
}

/* Full profile view */
body.profile-page .main-content {
    max-width: 1100px;
}

.profile-back-link {
    margin-bottom: 16px;
}

.profile-back-link a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-back-link a:hover {
    color: var(--primary-light);
}

.profile-full-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.profile-gallery-panel,
.profile-detail-panel {
    padding: 0;
    overflow: hidden;
}

.profile-detail-panel {
    padding: 24px;
}

.profile-gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    max-height: 520px;
    background: #11121a;
    cursor: zoom-in;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

body[data-theme="dark"] .profile-gallery-main {
    background: #11121a;
}

.profile-gallery-main img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0 auto;
}

.profile-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}
.profile-gallery-nav:hover { background: rgba(0, 0, 0, 0.75); }
.profile-gallery-nav.prev { left: 10px; }
.profile-gallery-nav.next { right: 10px; }

.profile-gallery-dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    gap: 6px;
    justify-content: center;
    z-index: 3;
}
.profile-gallery-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
}
.profile-gallery-dots span.active { background: #fff; }

.profile-zoom-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
}

.profile-gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    border-top: 1px solid var(--border);
}

.profile-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: none;
}

.profile-thumb.active {
    border-color: var(--primary);
}

.profile-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; object-position: center;
}

.profile-photo-count {
    padding: 0 16px 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.profile-detail-header h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.online-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(76,175,80,0.15);
    color: var(--success);
}

.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--radius);
}

.profile-info-item span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.profile-info-item strong {
    font-size: 0.95rem;
}

.profile-about-section h3 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.profile-bio-full {
    line-height: 1.7;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
}

.profile-edit-card {
    margin-top: 32px;
}

.profile-photos-manage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.profile-photo-manage-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.profile-photo-manage-item img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover; object-position: center;
    display: block;
}

.profile-photo-primary-badge,
.profile-photo-pending-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    color: #fff;
}

.profile-photo-primary-badge {
    background: var(--primary);
}

.profile-photo-pending-badge {
    background: #f59e0b;
    top: auto;
    bottom: 44px;
}

.profile-photo-manage-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
}

.profile-photo-manage-actions form {
    display: block;
}

.profile-photo-manage-actions button {
    width: 100%;
}

.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-lightbox img {
    max-width: min(90vw, 900px);
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.photo-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
}

.photo-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 2.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
}

.photo-lightbox-nav.prev { left: 20px; }
.photo-lightbox-nav.next { right: 20px; }

@media (max-width: 768px) {
    .profile-full-layout {
        grid-template-columns: 1fr;
    }
    .profile-gallery-main {
        max-height: 400px;
    }
    .profile-info-grid {
        grid-template-columns: 1fr;
    }
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(76,175,80,0.15);
    color: var(--success);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.verified-tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #2196f3;
    color: #fff;
    border-radius: 50%;
    font-size: 0.65rem;
    vertical-align: middle;
}

.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,152,0,0.15);
    color: var(--warning);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Admin */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    min-height: calc(100vh - 112px);
}

.admin-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 88px;
}

.admin-sidebar h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.admin-nav { list-style: none; }

.admin-nav li { margin-bottom: 4px; }

.admin-nav a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.admin-nav a:hover, .admin-nav a.active {
    background: var(--bg-input);
    color: var(--text);
}

.admin-nav a.active { color: var(--primary-light); border-left: 3px solid var(--primary); }

.admin-content { flex: 1; }

.admin-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.admin-header h1 { font-size: 1.6rem; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-light);
}

.stat-card .stat-title {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.admin-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active { background: rgba(76,175,80,0.15); color: var(--success); }
.status-banned { background: rgba(244,67,54,0.15); color: var(--danger); }
.status-pending { background: rgba(255,152,0,0.15); color: var(--warning); }

.action-btns { display: flex; flex-wrap: wrap; gap: 6px; }

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 24px;
    margin-top: 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.footer-brand p { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }

.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 20px; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }

.footer-copy { color: var(--text-muted); font-size: 0.8rem; width: 100%; text-align: center; margin-top: 16px; }

/* Verification */
.verify-page {
    max-width: 900px;
    margin: 0 auto;
}

.verify-header {
    margin-bottom: 28px;
}

.verify-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.verify-header p {
    color: var(--text-muted);
}

.verify-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
}

.verify-info ul {
    list-style: none;
    margin-top: 12px;
}

.verify-info li {
    padding: 8px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}

.verify-status-card {
    text-align: center;
    padding: 48px 32px;
}

.verify-status-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.verify-status-card.verified .verify-status-icon {
    color: var(--success);
}

.verify-status-card.pending .verify-status-icon {
    color: var(--warning);
}

.verify-submitted {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--radius);
    text-align: left;
}

.form-hint {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.verify-pending-note {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--warning);
}

.verify-pending-note.rejected {
    color: var(--danger);
}

.verify-pending-note a {
    color: var(--primary-light);
}

.verify-review-meta {
    margin-bottom: 24px;
    display: grid;
    gap: 8px;
}

.verify-review-photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.verify-review-photos h4 {
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.verify-review-img {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    background: var(--bg-input);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.verify-review-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.verify-reject-form {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 280px;
}

.verify-reject-form .form-control {
    flex: 1;
}

/* Premium & Payments */
.premium-page, .payment-page {
    max-width: 1100px;
    margin: 0 auto;
}

.premium-header, .payment-header {
    margin-bottom: 32px;
}

.premium-header h1, .payment-header h1 {
    font-size: 2rem;
    margin: 12px 0 8px;
}

.premium-header p {
    color: var(--text-muted);
}

.premium-active-badge {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background: rgba(255, 152, 0, 0.15);
    color: var(--warning);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.credits-display {
    margin-top: 8px;
    color: var(--text-muted);
}

.credits-display strong {
    color: var(--primary-light);
}

.section-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

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

.plan-card {
    position: relative;
    text-align: center;
    padding: 28px 24px;
    transition: transform 0.2s;
}

.plan-card:hover {
    transform: translateY(-4px);
}

.plan-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 10px;
    background: rgba(233, 30, 99, 0.15);
    color: var(--primary-light);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.plan-tag.credits {
    background: rgba(124, 77, 255, 0.15);
    color: #b39ddb;
}

.plan-card h3 {
    margin-bottom: 12px;
}

.plan-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-light);
    margin-bottom: 12px;
}

.plan-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
    min-height: 40px;
}

.plan-features {
    list-style: none;
    text-align: left;
    margin-bottom: 24px;
}

.plan-features li {
    padding: 6px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.plan-features li::before {
    content: '✓ ';
    color: var(--success);
}

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

.method-card {
    text-align: center;
    padding: 20px;
}

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

.method-card h4 {
    margin-bottom: 4px;
}

.method-card p, .method-card small {
    color: var(--text-muted);
    font-size: 0.8rem;
    display: block;
}

.payment-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: start;
}

.payment-summary h3 {
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.summary-row.total {
    font-size: 1.1rem;
    border-bottom: none;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 2px solid var(--border);
}

.summary-row.total strong {
    color: var(--primary-light);
}

.payment-ref {
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius);
    font-size: 0.85rem;
}

.payment-ref code, .qr-info code, .offline-section code {
    background: rgba(233, 30, 99, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--primary-light);
}

.payment-methods-select {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.method-option {
    cursor: pointer;
}

.method-option input {
    display: none;
}

.method-option-box {
    display: block;
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: all 0.2s;
}

.method-option input:checked + .method-option-box {
    border-color: var(--primary);
    background: rgba(233, 30, 99, 0.08);
}

.method-option-box strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.method-option-box small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.method-details-inner {
    padding: 20px;
    background: var(--bg-input);
    border-radius: var(--radius);
    margin-bottom: 8px;
}

.qr-section {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.payment-qr {
    width: 200px;
    height: 200px;
    border-radius: var(--radius);
    border: 4px solid white;
    background: white;
}

.qr-info p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.offline-section h4 {
    margin-bottom: 12px;
}

.offline-section p {
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.method-instructions {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.site-announcement {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.15), rgba(156, 39, 176, 0.1));
    border-bottom: 1px solid var(--border);
    padding: 10px 24px;
    text-align: center;
    font-size: 0.9rem;
}

.site-announcement a {
    margin-left: 8px;
    color: var(--primary-light);
    font-weight: 600;
}

@media (max-width: 1024px) {
    .site-announcement {
        display: none;
    }
}

.impersonation-bar {
    background: #b45309;
    color: #fff;
    padding: 8px 16px;
    text-align: center;
    font-size: 0.85rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.impersonation-bar a {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
}

/* Header center + credits */
.nav-center {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
}

.btn-premium {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #1a1a2e !important;
    font-weight: 700;
    border: none;
}

.btn-premium:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.nav-credits {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.nav-credits strong {
    color: var(--primary-light);
    font-size: 0.95rem;
}

.nav-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text);
}

.nav-icon-badge[hidden] { display: none; }
.nav-icon-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Profile dropdown menu */
.profile-menu {
    position: relative;
}

.profile-menu-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 4px 4px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    color: var(--text);
    font-family: inherit;
    transition: all 0.2s;
    touch-action: manipulation;
}

.profile-menu-trigger:hover,
.profile-menu.open .profile-menu-trigger {
    border-color: var(--primary);
}

.profile-menu-greeting {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-left: 8px;
    white-space: nowrap;
}

.profile-menu-greeting strong {
    color: var(--text);
}

.profile-menu-chevron {
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.profile-menu.open .profile-menu-chevron {
    transform: rotate(180deg);
}

.profile-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s;
    z-index: 200;
    overflow: hidden;
}

.profile-menu.open .profile-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notif-menu {
    position: relative;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(340px, calc(100vw - 24px));
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s;
    z-index: 200;
    overflow: hidden;
}
.notif-menu.open .notif-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.notif-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}
.notif-dropdown-head strong { font-size: 0.95rem; }
.notif-mark-all {
    background: none;
    border: none;
    color: var(--primary);
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}
.notif-dropdown-list {
    max-height: 380px;
    overflow-y: auto;
}
.notif-dropdown-empty {
    padding: 24px 14px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
}
.notif-drop-item {
    display: flex;
    gap: 10px;
    padding: 11px 14px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    font-size: 0.86rem;
}
.notif-drop-item:last-child { border-bottom: none; }
.notif-drop-item:hover { background: var(--bg-input); }
.notif-drop-item.unread { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.notif-drop-icon { font-size: 1.1rem; flex-shrink: 0; }
.notif-drop-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.notif-drop-msg {
    line-height: 1.35;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notif-drop-time { font-size: 0.72rem; color: var(--text-muted); }
.notif-dropdown-foot {
    display: block;
    text-align: center;
    padding: 11px;
    font-size: 0.85rem;
    color: var(--primary);
    border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
    .notif-dropdown {
        position: fixed;
        top: calc(56px + env(safe-area-inset-top, 0px));
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        transform: translateY(-8px);
    }
    .notif-menu.open .notif-dropdown {
        transform: translateY(0);
    }
    .notif-dropdown-list {
        max-height: 60vh;
    }
}

.lang-switcher {
    position: relative;
}

.lang-switcher-trigger {
    font-size: 1.1rem;
}

.lang-switcher-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s;
    z-index: 200;
    overflow: hidden;
    padding: 6px;
}

.lang-switcher.open .lang-switcher-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-switcher-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
}

.lang-switcher-option:hover {
    background: var(--bg-input);
}

.lang-switcher-option.active {
    color: var(--primary-light);
    font-weight: 600;
}

.profile-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.profile-menu-header img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover; object-position: center;
    border: 2px solid var(--primary);
}

.profile-menu-header strong {
    display: block;
    font-size: 0.95rem;
}

.profile-menu-header span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.profile-menu-links {
    padding: 8px;
    max-height: 320px;
    overflow-y: auto;
}

.profile-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    transition: background 0.2s;
}

.profile-menu-link:hover,
.profile-menu-link.active {
    background: var(--bg-input);
    color: var(--primary-light);
}

.profile-menu-theme {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.profile-menu-theme > span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.theme-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.theme-switch-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.theme-switch-btn.active {
    border-color: var(--primary);
    background: rgba(233, 30, 99, 0.1);
    color: var(--primary-light);
}

.profile-menu-logout {
    display: block;
    padding: 14px 16px;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--danger);
    font-weight: 600;
    font-size: 0.9rem;
}

.profile-menu-logout:hover {
    background: rgba(244, 67, 54, 0.08);
}

/* App layout + sidebar */
.app-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}

.app-main {
    min-width: 0;
}

.user-sidebar {
    position: sticky;
    top: 96px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.sidebar-user-card {
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.sidebar-avatar-ring {
    position: relative;
    width: 92px;
    height: 92px;
    margin: 0 auto 10px;
}
.completion-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.completion-ring-track {
    fill: none;
    stroke: var(--border);
    stroke-width: 4;
}
.completion-ring-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.4s ease;
}
.sidebar-avatar {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 80px;
    height: 80px;
    border-radius: 14px;
    object-fit: cover; object-position: center;
    border: 3px solid var(--bg-card);
}
.completion-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: var(--primary);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid var(--bg-card);
    text-decoration: none;
}
.completion-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: -4px 0 10px;
}
.completion-hint a { color: var(--primary); font-weight: 600; }

.sidebar-user-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.sidebar-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.sidebar-stat {
    text-align: center;
    padding: 10px 4px;
    background: var(--bg-input);
    border-radius: var(--radius);
    color: inherit;
}

.sidebar-stat strong {
    display: block;
    font-size: 1.1rem;
    color: var(--primary-light);
}

.sidebar-stat span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

a.sidebar-stat {
    text-decoration: none;
    transition: background 0.2s;
}

a.sidebar-stat:hover {
    background: var(--bg-card);
}

.sidebar-badge {
    display: inline-block;
    min-width: 18px;
    padding: 1px 6px;
    margin-left: 4px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    vertical-align: middle;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--bg-input);
    color: var(--text);
}

.sidebar-link.active {
    color: var(--primary-light);
    border-left: 3px solid var(--primary);
}

.discover-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.discover-toolbar h1 {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.discover-preference-inline {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.discover-section {
    margin-bottom: 32px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-head h2 {
    font-size: 1.15rem;
}

.discover-featured {
    padding-top: 0;
}

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

.profile-grid-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.2s;
}

.profile-grid-card:hover {
    transform: translateY(-3px);
}

.grid-card-photo {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
}

.grid-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #11121a;
}

.grid-card-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.grid-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 4;
}
.grid-card-slider:hover .grid-slider-nav { opacity: 1; }
.grid-slider-nav.prev { left: 6px; }
.grid-slider-nav.next { right: 6px; }

.grid-slider-dots {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    gap: 5px;
    justify-content: center;
    z-index: 4;
}
.grid-slider-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
}
.grid-slider-dots span.active { background: #fff; }

@media (hover: none) {
    .grid-slider-nav { opacity: 1; background: rgba(0, 0, 0, 0.4); }
}

.grid-card-body {
    padding: 14px;
    text-align: center;
}

.grid-card-body h3 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.grid-card-body p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.grid-card-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.grid-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg-input);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.grid-btn.like:hover {
    border-color: var(--success);
    background: rgba(76, 175, 80, 0.15);
}

.grid-btn.pass:hover {
    border-color: var(--danger);
    background: rgba(244, 67, 54, 0.15);
}

/* QuickDate-style User Dashboard */
body.dashboard-page {
    background: #f0f2f5;
}

body.dashboard-page[data-theme="dark"] {
    background: var(--bg);
}

body.dashboard-page .main-content {
    max-width: 100%;
    padding: 20px 24px 40px;
}

.qd-dashboard {
    display: grid;
    grid-template-columns: 240px 1fr 260px;
    gap: 20px;
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
}

.qd-card {
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

body.dashboard-page[data-theme="dark"] .qd-card {
    background: var(--bg-card);
    border-color: var(--border);
}

.qd-sidebar {
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 88px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

body.dashboard-page[data-theme="dark"] .qd-sidebar {
    background: var(--bg-card);
    border-color: var(--border);
}

.popularity-meter {
    margin: 12px 0;
    text-align: left;
}

.popularity-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.popularity-bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.popularity-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #9c27b0);
    border-radius: 3px;
}

.sidebar-boost-btn {
    margin-top: 8px;
}

.qd-stats {
    margin-bottom: 16px;
}

.sidebar-nav-group {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav-heading {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 6px;
    padding-left: 12px;
}

.qd-nav .sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.88rem;
    white-space: nowrap;
}

.qd-main {
    min-width: 0;
}

.qd-section {
    margin-bottom: 28px;
}

.qd-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.qd-section-head h2,
.qd-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 16px;
}

.qd-filter-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 600;
}

.qd-featured-bar {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    scrollbar-width: thin;
}

body.dashboard-page[data-theme="dark"] .qd-featured-bar {
    background: var(--bg-card);
    border-color: var(--border);
}

.qd-featured-thumb {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: all 0.2s;
}

.qd-featured-thumb img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover; object-position: center;
    border: 2px solid #eee;
}

.qd-featured-thumb.active {
    border-color: var(--primary);
    color: var(--primary);
}

.qd-featured-thumb.active img {
    border-color: var(--primary);
}

.qd-featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    overflow: hidden;
    min-height: 380px;
}

.qd-featured-photo {
    position: relative;
    overflow: hidden;
    display: block;
    color: inherit;
    text-decoration: none;
}

.qd-featured-photo img {
    width: 100%;
    height: 100%;
    min-height: 380px;
    object-fit: cover; object-position: center;
}

.qd-view-profile {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.qd-featured-about {
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.qd-featured-about h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--primary);
}

.qd-about-list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.qd-about-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

body.dashboard-page[data-theme="dark"] .qd-about-list li {
    border-color: var(--border);
}

.qd-about-list span {
    color: var(--text-muted);
}

.qd-featured-bio {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    flex: 1;
}

.qd-featured-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

.qd-action-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

.qd-action-btn:hover {
    transform: scale(1.08);
}

.qd-action-btn.like {
    background: #fff;
    color: var(--primary);
}

.qd-action-btn.pass {
    background: #fff;
    color: #666;
}

.qd-action-btn.super {
    background: #ffc107;
    color: #333;
}

.qd-profile-grid {
    gap: 16px;
}

.qd-grid-card {
    background: #fff;
    border: 1px solid #e8eaed;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

body.dashboard-page[data-theme="dark"] .qd-grid-card {
    background: var(--bg-card);
    border-color: var(--border);
}

.grid-card-photo {
    position: relative;
}

.grid-verified,
.grid-premium {
    position: absolute;
    top: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #fff;
}

.grid-verified {
    right: 8px;
    background: #2196f3;
}

.grid-premium {
    left: 8px;
    background: #ffc107;
    color: #333;
}

.grid-location {
    font-size: 0.8rem !important;
    color: var(--text-muted) !important;
}

.grid-card-body h3 a {
    color: inherit;
    text-decoration: none;
}

.grid-card-body h3 a:hover {
    color: var(--primary-light);
}

.grid-view-profile {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 10px;
}

.grid-view-profile:hover {
    text-decoration: underline;
}

.qd-load-more {
    text-align: center;
    margin-top: 24px;
}

.qd-right-sidebar {
    position: sticky;
    top: 88px;
}

.qd-widget {
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

body.dashboard-page[data-theme="dark"] .qd-widget {
    background: var(--bg-card);
    border-color: var(--border);
}

.qd-widget h3 {
    font-size: 0.95rem;
    margin-bottom: 14px;
    font-weight: 700;
}

.premium-users-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.premium-user-avatar {
    position: relative;
    aspect-ratio: 1;
}

.premium-user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    object-fit: cover; object-position: center;
    border: 2px solid #ffc107;
}

.mini-verified {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #2196f3;
    color: #fff;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-story-card {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.success-story-card:last-child {
    border-bottom: none;
}

.story-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.success-story-card strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.success-story-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.qd-theme-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: right center;
    background: var(--primary);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px 8px 0 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    z-index: 100;
}

.qd-filter-panel {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.qd-filter-panel.open {
    opacity: 1;
    visibility: visible;
}

.qd-filter-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.qd-filter-content {
    position: relative;
    width: min(420px, calc(100vw - 32px));
    padding: 24px;
    z-index: 1;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.qd-filter-content .qd-filter-header {
    position: sticky;
    top: -24px;
    background: var(--bg-card);
    padding-top: 4px;
    z-index: 2;
}

@media (max-width: 600px) {
    .qd-filter-panel {
        align-items: flex-end;
        justify-content: stretch;
    }
    .qd-filter-content {
        width: 100%;
        max-width: 100%;
        max-height: 88dvh;
        border-radius: 18px 18px 0 0;
        padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    }
    .qd-filter-content .form-row {
        grid-template-columns: 1fr 1fr;
    }
    .qd-filter-content .qd-filter-header {
        top: -20px;
    }
}

.qd-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.qd-filter-header button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.profile-photo-blurred {
    filter: blur(20px);
    transform: scale(1.05);
}

.profile-photo-blur-note {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    color: #fff;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.35);
}

.distance-slider-wrap {
    padding: 4px 0;
}

.distance-slider-value {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 8px;
}

.distance-slider-value strong {
    color: var(--primary);
    font-size: 1.05rem;
}

.distance-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-input);
    outline: none;
    cursor: pointer;
}

.distance-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 3px solid var(--bg-card, #fff);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.distance-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 3px solid var(--bg-card, #fff);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.distance-slider-scale {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.profile-safety-actions {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.profile-safety-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
}

.profile-safety-link:hover { color: var(--primary); }

.report-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.report-modal.open {
    opacity: 1;
    visibility: visible;
}

.report-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.report-modal-content {
    position: relative;
    width: min(420px, calc(100vw - 32px));
    padding: 24px;
    z-index: 1;
}

.qd-scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(233,30,99,0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 200;
}

.qd-scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.nav-boost-btn {
    color: #ffc107 !important;
    border-color: #ffc107 !important;
}

.nav-boost-btn svg {
    stroke: #ffc107;
}

.btn-find-matches {
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #333;
    font-weight: 600;
}

body[data-theme="dark"] .btn-find-matches {
    background: var(--bg-input);
    border-color: var(--border);
    color: var(--text);
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.footer-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-input);
    color: var(--text-muted);
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.footer-social-icon:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

/* Responsive */
.qd-dashboard-inner {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 1100px) {
    .qd-dashboard-inner {
        grid-template-columns: 220px 1fr;
    }
}

.likes-page-header {
    margin-bottom: 20px;
}

.likes-page-header h1 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.likes-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.likes-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.likes-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.likes-tab:hover {
    border-color: var(--primary);
    color: var(--text);
}

.likes-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.likes-tab-count {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}

.likes-tab:not(.active) .likes-tab-count {
    background: var(--bg-input);
}

.liked-date {
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
    margin-bottom: 10px !important;
}

.likes-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

/* Profile Settings (QuickDate style) */
.profile-settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.profile-settings-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 72px;
    padding: 10px 8px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.profile-settings-tab:hover {
    background: var(--bg-input);
    color: var(--text);
}

.profile-settings-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.profile-settings-tab-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.profile-settings-section {
    padding: 24px;
    margin-bottom: 20px;
}

.profile-settings-section-title {
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.profile-settings-form-narrow {
    max-width: 480px;
}

.blocked-users-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.blocked-user-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.blocked-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover; object-position: center;
    flex-shrink: 0;
}

.blocked-user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.blocked-user-info a {
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.blocked-user-info span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.profile-settings-save {
    position: sticky;
    bottom: 16px;
    text-align: center;
    padding: 16px 0 8px;
}

.profile-settings-save .btn-lg {
    min-width: 200px;
    padding: 14px 32px;
    font-size: 1rem;
}

.profile-security-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-security-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.profile-security-item:last-child {
    border-bottom: none;
}

.profile-security-item p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-checkbox-group {
    margin-bottom: 12px;
}

.profile-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
}

.profile-delete-section {
    border-color: rgba(220, 53, 69, 0.3);
}

.profile-extended-details {
    margin-top: 24px;
}

.profile-detail-section {
    margin-bottom: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.profile-detail-section h3 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.profile-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--bg-input);
    color: var(--primary-light);
    font-size: 0.8rem;
}

.grid-super-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ffc107;
    color: #333;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 12px;
}

.grid-match-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
}

@media (max-width: 1100px) {
    .qd-dashboard {
        grid-template-columns: 220px 1fr;
    }
    .user-right-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-center { display: none; }
    .nav-menu-links { display: none; }
    .profile-menu-greeting { display: none; }
    .nav-credits span { display: none; }

    .main-content { padding: 12px; }

    .nav-container { padding: 0 12px; gap: 8px; }
    .nav-actions { gap: 6px; }
    .brand-name { display: none; }
    .nav-boost-btn { display: none; }
    .nav-credits { padding: 6px 8px; }

    /* Discover / swipe screen: the user sidebar duplicates the profile-menu
       dropdown, so on mobile we hide it and let the card use the full width —
       matches how a Tinder-style app puts the deck front and center. */
    .qd-dashboard {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .qd-dashboard > .qd-sidebar {
        display: none;
    }
    .qd-main { min-width: 0; }

    .qd-featured-bar {
        display: none;
    }

    .qd-featured-card {
        grid-template-columns: 1fr;
        margin: 0 -12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .qd-featured-photo img {
        min-height: min(70vh, 520px);
    }
    .qd-featured-about {
        padding: 16px;
    }
    .qd-featured-actions {
        position: sticky;
        bottom: 12px;
        justify-content: center;
        gap: 20px;
        padding: 12px;
        background: transparent;
    }
    .qd-action-btn {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    }
    .qd-action-btn.super {
        width: 48px;
        height: 48px;
        font-size: 1.15rem;
    }

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

    .profile-menu-dropdown { width: min(280px, calc(100vw - 32px)); }
    .hero-content h1 { font-size: 2.2rem; }
    .form-row { grid-template-columns: 1fr; }
    .messages-layout { grid-template-columns: 1fr; }
    .conversations-list { max-height: 200px; border-right: none; border-bottom: 1px solid var(--border); }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; }
    .profile-header { flex-direction: column; align-items: center; text-align: center; }
    .verify-grid { grid-template-columns: 1fr; }
    .verify-review-photos { grid-template-columns: 1fr; }
    .payment-layout { grid-template-columns: 1fr; }
    .qr-section { justify-content: center; text-align: center; }
}

/* Discover reactions on mobile/tablet: put Like/Pass/Super Like as one
   touch-friendly bar overlaid on the bottom of the photo (Tinder-style)
   instead of buried below the bio text, which required scrolling to reach. */
@media (max-width: 1024px) {
    .qd-featured-actions {
        display: none;
    }

    /* Top strip of profile-thumbnail avatars — removed on mobile/tablet since it
       duplicates the swipe deck below and just adds clutter on small screens. */
    .qd-featured-bar {
        display: none;
    }

    .qd-featured-photo .photo-quick-actions {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        gap: 18px;
        padding: 28px 12px 16px;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.35) 60%, transparent);
    }

    .qd-featured-photo .photo-quick-btn {
        width: 54px;
        height: 54px;
        font-size: 1.3rem;
        border-width: 2px;
    }

    .qd-featured-photo .photo-quick-btn.super {
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }

    .qd-featured-photo .photo-quick-btn.like,
    .qd-featured-photo .photo-quick-btn.dislike {
        background: rgba(255, 255, 255, 0.92);
        border-color: rgba(255, 255, 255, 0.92);
    }

    .qd-featured-photo .photo-quick-btn.like { color: var(--primary); }
    .qd-featured-photo .photo-quick-btn.dislike { color: #666; }
    .qd-featured-photo .photo-quick-btn.super { background: #ffc107; border-color: #ffc107; color: #333; }
    .qd-featured-photo .photo-quick-btn.remove { display: none; }

    .grid-card-photo .photo-quick-actions {
        top: auto;
        bottom: 6px;
        gap: 6px;
    }

    .grid-card-photo .photo-quick-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
}

@media (max-width: 420px) {
    .qd-profile-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .admin-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Blog */
.blog-page { max-width: 1100px; margin: 0 auto; }
.blog-header { text-align: center; margin-bottom: 32px; }
.blog-header h1 { font-size: 2.2rem; margin-bottom: 8px; }
.blog-header p { color: var(--text-muted); }

.blog-categories-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 32px;
}

.blog-cat-pill {
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
}

.blog-cat-pill:hover { border-color: var(--primary); }
.blog-cat-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.blog-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }

.blog-card-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover; object-position: center;
    display: block;
}

.blog-card-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: var(--bg-input);
}

.blog-card-body { padding: 16px; }
.blog-card-cat {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
    text-decoration: none;
}
.blog-card-body h3 { font-size: 1.1rem; margin-bottom: 8px; line-height: 1.3; }
.blog-card-body p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; margin-bottom: 12px; }
.blog-card-meta { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); }

.blog-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.blog-page-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
}

.blog-page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.blog-post-page { max-width: 800px; margin: 0 auto; }
.blog-post-article h1 { font-size: 2rem; margin: 12px 0; line-height: 1.25; }
.blog-post-meta { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }
.blog-post-featured-img { width: 100%; border-radius: 14px; margin-bottom: 24px; object-fit: cover; object-position: center; max-height: 420px; }
.blog-post-content { line-height: 1.8; font-size: 1.02rem; }
.blog-post-content img { max-width: 100%; border-radius: 10px; }
.blog-related { margin-top: 48px; }
.blog-related h2 { margin-bottom: 20px; }

/* Gifts */
.gifts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.gift-item-card {
    text-align: center;
    padding: 16px;
}

.gift-item-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    margin-bottom: 12px;
}

.gift-item-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: var(--bg-input);
    border-radius: 10px;
}

.gift-item-card h3 { font-size: 0.95rem; margin-bottom: 4px; }
.gift-item-cost { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 12px; }

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

.event-card { overflow: hidden; padding: 0; display: block; color: inherit; text-decoration: none; transition: transform 0.15s ease; }
.event-card:hover { transform: translateY(-4px); border-color: var(--primary); }

.event-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover; object-position: center;
}

.event-card-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: var(--bg-input);
}

.event-card-body { padding: 16px; }
.event-card-body h3 { font-size: 1.05rem; margin-bottom: 8px; }
.event-card-meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 4px; }

/* Premium-locked grid cards — blurred preview with a lock overlay that links to Premium. */
.locked-grid-card {
    position: relative;
}

.locked-grid-card .grid-card-photo img,
.locked-grid-card .grid-card-body {
    filter: blur(7px);
    user-select: none;
    pointer-events: none;
}

.locked-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    text-decoration: none;
    border-radius: inherit;
    transition: background 0.2s ease;
}

.locked-card-overlay:hover {
    background: rgba(0, 0, 0, 0.5);
}

.locked-card-lock-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.locked-card-overlay span {
    font-size: 0.75rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Discover: like / dislike / remove quick-action overlay at the top of a
   profile photo, for both the featured card and grid cards. */
.photo-quick-actions {
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.photo-quick-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(20, 20, 24, 0.55);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: transform 0.15s ease, background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.photo-quick-btn:active {
    transform: scale(0.9);
}

.photo-quick-btn.like {
    color: #ff4d6d;
}

.photo-quick-btn.like:hover {
    background: #ff4d6d;
    color: #fff;
}

.photo-quick-btn.dislike:hover {
    background: #6b7280;
    color: #fff;
}

.photo-quick-btn.super {
    color: #ffc107;
}

.photo-quick-btn.super:hover {
    background: #ffc107;
    color: #333;
}

.photo-quick-btn.remove:hover {
    background: #ef4444;
    color: #fff;
}

.grid-card-photo .photo-quick-actions {
    top: 8px;
    gap: 4px;
}

.grid-card-photo .photo-quick-btn {
    width: 23px;
    height: 23px;
    font-size: 0.62rem;
}

/* Interests picker — tap-to-toggle common interests, plus manual add. */
.interests-picker {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.interests-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 20px;
}

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

.interest-chip-selected {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px 6px 14px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
}

.interest-chip-selected button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
}

.interest-chip-selected button:hover {
    background: rgba(255, 255, 255, 0.4);
}

.interests-add-row {
    display: flex;
    gap: 8px;
}

.interests-add-row .form-control {
    flex: 1;
}

.interests-suggest-label {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.interests-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.interest-chip {
    padding: 8px 16px;
    min-height: 40px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.interest-chip:active {
    transform: scale(0.96);
}

.interest-chip.interest-chip-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Notifications list */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    transition: background 0.15s ease;
}

.notification-item:last-child { border-bottom: none; }
.notification-item:hover { background: var(--bg-input); }

.notification-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.notification-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.notification-message { font-size: 0.9rem; }
.notification-time { font-size: 0.75rem; color: var(--text-muted); }

/* Mobile & tablet bottom tab bar — fixed quick nav, hidden on desktop.
   Desktop top navbar (.navbar) is untouched at all breakpoints. */
.mobile-tab-bar {
    display: none;
}

@media (max-width: 1024px) {
    .mobile-tab-bar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 150;
        background: var(--bg-card);
        border-top: 1px solid var(--border);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
        backdrop-filter: blur(10px);
    }

    .mobile-tab-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 8px 2px;
        min-height: 48px;
        color: var(--text-muted);
        position: relative;
        min-width: 0;
        border-radius: 12px;
        -webkit-tap-highlight-color: transparent;
        transition: color 0.2s ease, transform 0.15s ease;
    }

    .mobile-tab-item svg {
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .mobile-tab-item:active {
        transform: scale(0.92);
    }

    .mobile-tab-item span {
        font-size: 0.65rem;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        transition: color 0.2s ease;
    }

    .mobile-tab-item.active {
        color: var(--primary);
    }

    .mobile-tab-item.active svg {
        transform: scale(1.12);
        stroke-width: 2.4;
    }

    .mobile-tab-item.active::before {
        content: '';
        position: absolute;
        top: -6px;
        left: 50%;
        transform: translateX(-50%);
        width: 20px;
        height: 3px;
        border-radius: 0 0 3px 3px;
        background: var(--primary);
        animation: tabIndicatorIn 0.25s ease;
    }

    @keyframes tabIndicatorIn {
        from { width: 0; opacity: 0; }
        to { width: 20px; opacity: 1; }
    }

    .mobile-tab-badge {
        position: absolute;
        top: 2px;
        right: calc(50% - 18px);
        background: var(--primary);
        color: #fff;
        font-size: 0.6rem;
        font-weight: 600;
        min-width: 16px;
        height: 16px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 4px;
        border: 2px solid var(--bg-card);
        animation: tabBadgePop 0.25s ease;
    }

    @keyframes tabBadgePop {
        from { transform: scale(0); }
        to { transform: scale(1); }
    }

    /* Keep content clear of the fixed bar. */
    body:has(.mobile-tab-bar) .main-content {
        padding-bottom: 84px;
    }
    body:has(.mobile-tab-bar) .footer {
        margin-bottom: 60px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-tab-item,
    .mobile-tab-item svg,
    .mobile-tab-item span,
    .mobile-tab-badge {
        transition: none;
        animation: none;
    }
}

/* All user-dashboard pages (Matches, Messages, Visitors, Likes, Notifications,
   Gifts, Profile Settings, etc.) on tablet & mobile: hide the full profile
   sidebar — it's redundant next to the bottom tab bar, and stacking it above
   the page content made the "sidebar" look like a different size/shape on
   every page. Messages additionally shows only the relevant chat section. */
@media (max-width: 1024px) {
    .qd-dashboard-inner {
        grid-template-columns: 1fr;
    }

    .qd-dashboard-inner > .user-sidebar {
        display: none;
    }

    .qd-focus-section .messages-layout {
        grid-template-columns: 1fr;
        height: calc(100vh - 180px);
    }

    .qd-focus-section .conversations-list {
        max-height: none;
        border-right: none;
        border-bottom: none;
    }

    .qd-focus-section .chat-area {
        display: none;
    }

    .qd-focus-section .messages-layout.has-active-chat .conversations-list {
        display: none;
    }

    .qd-focus-section .messages-layout.has-active-chat .chat-area {
        display: flex;
        flex-direction: column;
    }

    .chat-back-btn {
        display: flex;
    }

    .chat-header {
        padding: 12px;
        gap: 8px;
    }

    .chat-header-actions {
        gap: 6px;
    }

    .chat-header-actions .btn-sm {
        padding: 6px 8px;
        font-size: 0.85rem;
    }

    /* Collapse "Send Gift" to just its icon on narrow phones so the header
       actions (call, video, gift, more) fit without overflowing the screen. */
    .chat-action-label {
        display: none;
    }

    .chat-input {
        padding: 12px;
        gap: 8px;
    }
}

/* Voice / Video Call Modal */
.call-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.call-modal.open {
    display: flex;
}

.call-modal-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.call-remote-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; object-position: center;
    background: #111;
}

.call-local-video {
    position: absolute;
    bottom: 120px;
    right: 20px;
    width: 110px;
    height: 150px;
    object-fit: cover; object-position: center;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: #222;
    z-index: 2;
    cursor: grab;
    touch-action: none;
    user-select: none;
    transition: box-shadow 0.15s ease;
}

.call-local-video.dragging {
    cursor: grabbing;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.call-modal-overlay {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.call-modal-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover; object-position: center;
    border: 3px solid rgba(255, 255, 255, 0.4);
    margin-bottom: 8px;
}

.call-modal-title {
    font-size: 1.4rem;
    margin: 0;
}

.call-modal-subtitle {
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

.call-modal-status {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin: 0;
}

.call-incoming-actions,
.call-active-actions {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 24px;
}

.call-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.call-accept-btn { background: #22c55e; color: #fff; }
.call-decline-btn,
.call-hangup-btn { background: #ef4444; color: #fff; }
.call-hangup-icon { transform: rotate(135deg); }
.call-mute-btn { background: rgba(255, 255, 255, 0.15); color: #fff; }
.call-video-btn { background: rgba(255, 255, 255, 0.15); color: #fff; }
.call-flip-btn,
.call-beauty-btn { background: rgba(255, 255, 255, 0.15); color: #fff; }
.call-btn.is-off { background: rgba(255, 255, 255, 0.4); color: #1f2937; }

.call-beauty-btn { position: relative; }
.call-beauty-btn:not(.is-off)::after {
    content: attr(data-level);
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 88px;
    padding: 2px 7px;
    border-radius: 9px;
    background: var(--primary, #e91e63);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Success stories - couple profile picker */
.success-story-partner-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}
.success-story-partner-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 90px;
    padding: 10px 8px;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-align: center;
    font-size: 0.78rem;
}
.success-story-partner-option img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover; object-position: center;
}
.success-story-partner-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.success-story-partner-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(233, 30, 99, 0.06);
}

.success-story-avatars {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}
.success-story-avatars img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover; object-position: center;
    border: 3px solid var(--bg-card);
}
.success-story-avatars img.success-story-avatar-2 {
    margin-left: -20px;
}

/* ===================== New feature UI ===================== */

/* Weekly Streak card (profile page) */
.checkin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 14px);
    padding: 18px 20px;
    margin: 16px 0;
}
.checkin-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.checkin-card-head h3 { margin: 0; font-size: 1rem; }
.checkin-details-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
}
.checkin-details-btn:hover { color: var(--primary, #e91e63); }

.checkin-week-row {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 16px;
}
.checkin-week-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
}
.checkin-week-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-input);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}
.checkin-week-dot.checked { background: var(--primary, #e91e63); color: #fff; }
.checkin-week-dot.today:not(.checked) { outline: 2px solid var(--primary, #e91e63); outline-offset: 2px; }
.checkin-week-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }

.checkin-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.checkin-card-streak {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.checkin-flame { font-size: 1.2rem; }
.checkin-card-streak strong { color: var(--text-main); }
.checkin-done-tag {
    font-size: 0.85rem;
    color: var(--primary, #e91e63);
    font-weight: 600;
}

.checkin-details[hidden] { display: none; }
.checkin-calendar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16px, 1fr));
    gap: 4px;
    margin-top: 16px;
}
.checkin-day {
    aspect-ratio: 1;
    border-radius: 3px;
    background: var(--bg-input);
}
.checkin-day.checked { background: var(--primary, #e91e63); }
.checkin-day.today { outline: 2px solid var(--primary, #e91e63); outline-offset: 1px; }

.checkin-history-title {
    margin: 18px 0 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}
.checkin-history-list {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.checkin-history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--border);
}
.checkin-history-row:last-child { border-bottom: none; }
.checkin-history-day { font-weight: 600; color: var(--text-main); flex: 0 0 auto; }
.checkin-history-date { color: var(--text-muted); flex: 1; text-align: center; }
.checkin-history-reward { color: var(--primary, #e91e63); font-weight: 600; flex: 0 0 auto; }

/* Boosted profile badges */
.boosted-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6a00, #ee0979);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 12px;
    margin-top: 6px;
}
.grid-boosted {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #ff6a00, #ee0979);
    color: #fff;
    font-size: 0.8rem;
    padding: 3px 6px;
    border-radius: 50%;
}

/* Compatibility badge */
.compat-badge {
    display: inline-block;
    background: var(--bg-input);
    color: var(--primary, #e91e63);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 12px;
    border: 1px solid var(--primary, #e91e63);
    margin-top: 6px;
}

.dating-goal-badge {
    display: inline-block;
    background: #7c3aed;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 12px;
    margin-top: 6px;
}
.grid-dating-goal {
    display: inline-block;
    background: #7c3aed;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin: 2px 0 6px;
}

/* Undo swipe button */
.qd-action-btn.undo {
    background: var(--bg-input);
    color: var(--text-muted);
}
.qd-action-btn.undo:hover { color: var(--primary, #e91e63); }

/* Boost page */
.boost-card { max-width: 560px; }
.boost-active-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #ff6a00, #ee0979);
    color: #fff;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
}
.boost-active-icon { font-size: 1.6rem; }
.boost-active-banner p { margin: 2px 0 0; font-size: 0.85rem; opacity: 0.9; }
.boost-offer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 14px;
}
.boost-offer-icon { font-size: 1.6rem; }
.boost-offer-body { flex: 1; }
.boost-offer-body h3 { margin: 0 0 4px; font-size: 1rem; }
.boost-offer-body p { margin: 0; font-size: 0.82rem; color: var(--text-muted); }
.boost-offer-price { font-weight: 700; font-size: 1.1rem; color: var(--primary, #e91e63); }
.boost-balance { text-align: center; color: var(--text-muted); margin-bottom: 12px; }

/* Read receipts upsell */
.read-receipt-upsell {
    margin-left: 8px;
    font-size: 0.75rem;
    color: var(--primary, #e91e63);
    text-decoration: none;
}
.read-receipt-upsell:hover { text-decoration: underline; }

/* Stories */
.story-strip {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 2px 14px;
    margin-bottom: 8px;
}
.matches-story-strip { margin-bottom: 18px; }

/* Small Facebook-style story cards: full-bleed thumbnail, avatar chip top-left, label at bottom. */
.story-card-strip { gap: 8px; }
.story-card {
    position: relative;
    flex: 0 0 auto;
    width: 78px;
    height: 132px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-input) center/cover no-repeat;
    border: none;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.story-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 55%, rgba(0,0,0,0.55) 100%);
}
.story-card-ring {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #1877f2;
    background: #fff;
    overflow: hidden;
    z-index: 2;
}
.story-card-ring img { width: 100%; height: 100%; object-fit: cover; }
.story-card-label {
    position: absolute;
    bottom: 6px;
    left: 6px;
    right: 6px;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    z-index: 2;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* "Create story" card: photo top, white label strip at bottom, big + button on the seam. */
.story-card-add {
    display: block;
    text-decoration: none;
    filter: brightness(0.85);
}
.story-card-add::after { background: rgba(0,0,0,0.15); }
.story-card-add::before {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 34px;
    background: var(--bg-card);
    z-index: 1;
}
.story-card-add-plus {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #1877f2;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    border: 3px solid var(--bg-card);
    z-index: 2;
}
.story-card-add-label {
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 6px;
    z-index: 2;
    color: var(--text-main);
    font-size: 0.66rem;
    font-weight: 700;
    text-align: center;
}

.story-section-title { margin: 20px 0 10px; font-size: 1rem; }
.story-thumb {
    position: relative;
    width: 100px;
    height: 150px;
    border-radius: 10px;
    overflow: hidden;
    flex: 0 0 auto;
    background: var(--bg-input);
}
.story-thumb img, .story-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.story-thumb .story-views {
    position: absolute;
    bottom: 4px;
    left: 6px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    color: #fff;
    font-size: 0.7rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}
.story-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
}
.story-upload-card { margin-bottom: 20px; }

.story-viewer {
    position: fixed;
    inset: 0;
    z-index: 4500;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.story-viewer[hidden] { display: none; }

.story-viewer-frame {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-y;
    transition: transform 0.15s ease-out, opacity 0.15s ease-out;
}

.story-viewer-media { max-width: 100%; max-height: 100%; }
.story-viewer-media img, .story-viewer-media video {
    max-width: 100%;
    max-height: 100vh;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.story-viewer-header {
    position: absolute;
    top: 16px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 3;
}
.story-viewer-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(255,255,255,0.8);
}
.story-viewer-who { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.story-viewer-who strong { color: #fff; font-size: 0.88rem; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.story-viewer-who span { color: rgba(255,255,255,0.75); font-size: 0.72rem; }

.story-viewer-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 3;
}

.story-viewer-tap {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2;
}
.story-viewer-tap.prev { left: 0; }
.story-viewer-tap.next { right: 0; }

.story-viewer-caption {
    position: absolute;
    bottom: 24px;
    left: 12px;
    right: 12px;
    text-align: center;
    color: #fff;
    font-size: 0.9rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    z-index: 3;
    pointer-events: none;
}

.story-viewer-progress {
    position: absolute;
    top: 6px;
    left: 10px;
    right: 10px;
    display: flex;
    gap: 4px;
    z-index: 3;
}
.story-progress-seg {
    flex: 1;
    height: 2.5px;
    border-radius: 2px;
    background: rgba(255,255,255,0.35);
    overflow: hidden;
}
.story-progress-seg i {
    display: block;
    height: 100%;
    width: 0%;
    background: #fff;
    border-radius: 2px;
}

/* Compatibility quiz */
.quiz-form { max-width: 620px; }
.quiz-question { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.quiz-question h3 { margin: 0 0 10px; font-size: 0.95rem; }
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88rem;
}
.quiz-option:has(input:checked) {
    border-color: var(--primary, #e91e63);
    background: var(--bg-input);
}

/* Story reactions + owner status view */
.story-reaction-bar {
    position: absolute;
    bottom: 56px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 3;
    pointer-events: auto;
}
.story-reaction-btn {
    background: rgba(255,255,255,0.12);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.15s;
}
.story-reaction-btn:hover, .story-reaction-btn:active { transform: scale(1.25); }
.story-reaction-sent {
    position: absolute;
    bottom: 104px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 0.85rem;
    z-index: 3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.story-viewer-views {
    position: absolute;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    background: #fff;
    color: #111;
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.story-viewer-views:hover { background: #f0f0f0; transform: translateX(-50%) scale(1.03); }

.story-thumb-mine { cursor: pointer; }

.story-status-modal {
    position: fixed;
    inset: 0;
    z-index: 4600;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.story-status-modal[hidden] { display: none; }
.story-status-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}
.story-status-panel {
    position: relative;
    background: var(--bg-card);
    width: 100%;
    max-width: 480px;
    max-height: 70vh;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.story-status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}
.story-status-header h3 { margin: 0; font-size: 1rem; }
.story-status-header button {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-muted);
}
.story-status-list { overflow-y: auto; padding: 6px 0; }
.story-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    font-size: 0.88rem;
}
.story-status-row:hover { background: var(--bg-input); }
.story-status-time { color: var(--text-muted); font-size: 0.78rem; }

/* Site footer: Play Store / App Store download badges, centered */
.footer-store-badges {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 8px 0 20px;
}
.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #000;
    color: #fff;
    border-radius: 8px;
    padding: 8px 16px;
    text-decoration: none;
    line-height: 1.15;
    border: 1px solid #2a2a2a;
    transition: transform 0.15s, background 0.15s;
}
.store-badge:hover { transform: translateY(-2px); background: #1a1a1a; }
.store-badge-glyph { width: 28px; height: 28px; flex-shrink: 0; }
.store-badge-apple .store-badge-glyph { width: 24px; height: 24px; }
.store-badge-text { display: flex; flex-direction: column; font-size: 1.02rem; font-weight: 600; }
.store-badge-text small { font-size: 0.62rem; letter-spacing: 0.03em; font-weight: 400; opacity: 0.85; }

/* Local Meetup Boards */
.meetup-filter-card, .meetup-create-card, .meetup-detail-card, .meetup-comments-card {
    padding: 20px;
    margin-bottom: 20px;
}
.meetup-create-card h3 { margin: 0 0 16px; font-size: 1.05rem; }
.meetup-filter-form { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.meetup-filter-form .form-group { margin: 0; min-width: 160px; }
.meetup-create-card .form-group { margin-bottom: 16px; }
.meetup-create-card .form-row { gap: 16px; }

.meetup-list { display: flex; flex-direction: column; gap: 14px; }
.meetup-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    transition: transform 0.15s;
}
.meetup-list-item:hover { transform: translateY(-2px); border-color: var(--primary, #e91e63); }
.meetup-list-main {
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    display: block;
}
.meetup-list-main h4 { margin: 0 0 6px; font-size: 1rem; }
.meetup-list-meta { color: var(--text-muted); font-size: 0.8rem; margin: 0 0 8px; line-height: 1.5; }
.meetup-list-excerpt { color: var(--text-muted); font-size: 0.85rem; margin: 0; line-height: 1.5; }
.meetup-list-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.meetup-list-counts { font-weight: 600; color: var(--primary, #e91e63); }
.meetup-interest-btn { white-space: nowrap; }

.meetup-back-link {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}
.meetup-back-link:hover { color: var(--primary, #e91e63); }

.meetup-detail-card h1 { margin: 0 0 10px; font-size: 1.4rem; line-height: 1.3; }
.meetup-detail-body { margin: 14px 0 0; line-height: 1.6; }

.meetup-detail-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.meetup-interested-count { color: var(--text-muted); font-size: 0.85rem; }
.meetup-interested-list {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.meetup-interested-avatar img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-card);
}
.meetup-interested-more { color: var(--text-muted); font-size: 0.8rem; margin-left: 4px; }

.meetup-comments-card h3 { margin: 0 0 16px; font-size: 1rem; }
.meetup-comment-form textarea { resize: vertical; }
.meetup-comment-list { margin-top: 18px; display: flex; flex-direction: column; gap: 16px; }
.meetup-comment { display: flex; gap: 10px; }
.meetup-comment-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.meetup-comment-body { flex: 1; }
.meetup-comment-body p { margin: 4px 0 0; font-size: 0.9rem; line-height: 1.5; }
.meetup-comment-time { color: var(--text-muted); font-size: 0.75rem; margin-left: 8px; }
