/* BoboChat — Main Stylesheet */
:root {
    --primary: #e63946;
    --primary-dark: #c1121f;
    --primary-light: #ff6b6b;
    --white: #ffffff;
    --bg: #f8f9fa;
    --surface: #ffffff;
    --text: #1a1a2e;
    --text-muted: #6c757d;
    --border: #e9ecef;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --nav-height: 72px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --success: #2d6a4f;
    --warning: #e9c46a;
    --danger: #e63946;
}

[data-theme="dark"] {
    --bg: #0f0f1a;
    --surface: #1a1a2e;
    --text: #f0f0f5;
    --text-muted: #a0a0b0;
    --border: #2a2a3e;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

html { scroll-behavior: smooth; }

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

body.has-nav { padding-bottom: calc(var(--nav-height) + 16px); }

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

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

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

.btn--primary {
    background: var(--primary);
    color: var(--white);
}
.btn--primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.35);
}

.btn--next {
    background: #2563eb;
    color: #fff;
    border: none;
    font-weight: 600;
}
.btn--next:hover {
    background: #1d4ed8;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.45);
}

.discover-stack__actions .btn--next {
    flex: 1.2;
    min-width: 72px;
}

.btn--compat {
    background: #0f766e;
    color: #fff;
    border: 2px solid #0f766e;
    font-weight: 700;
}
.btn--compat:hover {
    background: #115e59;
    border-color: #115e59;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.38);
}

.btn--outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn--outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn--ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn--ghost:hover { background: var(--border); color: var(--text); }

.btn--sm { padding: 8px 16px; font-size: 0.85rem; }
.btn--lg { padding: 16px 32px; font-size: 1.05rem; }
.btn--icon { padding: 10px; border-radius: 50%; width: 44px; height: 44px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }

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

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    background: var(--surface);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

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

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

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

.form-error {
    background: rgba(230, 57, 70, 0.1);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover { box-shadow: var(--shadow-lg); }

.card__body { padding: 1.5rem; }

/* App layout */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
}

.app-header__logo {
    display: flex;
    align-items: center;
    line-height: 0;
}

.app-header__logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.app-header__actions { display: flex; align-items: center; gap: 12px; }

.app-header__actions .btn--icon,
.app-header__actions .theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text);
}

.app-header__actions [data-icon] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    width: 22px;
    height: 22px;
}

.app-header__actions [data-icon] svg,
.app-header__actions .theme-toggle svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
}

.app-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

/* Footer navigation */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    z-index: 200;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.footer-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
}

.footer-nav__item:hover,
.footer-nav__item--active { color: var(--primary); }

.footer-nav__icon {
    position: relative;
    width: 24px;
    height: 24px;
}

.footer-nav__icon svg { width: 24px; height: 24px; }

.footer-nav__badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Profile cards — Discover */
.discover-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.profile-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
    animation: cardIn 0.4s ease;
}

.profile-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.profile-card--exit-left { animation: cardExitLeft 0.35s ease forwards; }
.profile-card--exit-right { animation: cardExitRight 0.35s ease forwards; }

@keyframes cardIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes cardExitLeft {
    to { opacity: 0; transform: translateX(-120%) rotate(-8deg); }
}

@keyframes cardExitRight {
    to { opacity: 0; transform: translateX(120%) rotate(8deg); }
}

.profile-card__image-wrap {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.profile-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card__status {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6c757d;
}
.status-dot--online { background: #2ecc71; }

.profile-card__body { padding: 1rem; }

.profile-card__name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.profile-card__meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.profile-card__bio {
    font-size: 0.875rem;
    color: var(--text);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.tag {
    background: rgba(230, 57, 70, 0.1);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.profile-card__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-card__actions .btn { flex: 1; min-width: 0; padding: 8px; font-size: 0.8rem; }

/* Nearby grid */
.nearby-filters {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.nearby-filters__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

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

.nearby-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform var(--transition);
}

.nearby-card:hover { transform: translateY(-2px); }

.nearby-card__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid var(--primary);
}

.nearby-card__info { flex: 1; min-width: 0; }
.nearby-card__name { font-weight: 600; font-size: 1rem; }
.nearby-card__distance { font-size: 0.8rem; color: var(--primary); font-weight: 500; }

/* Chats */
.page-title--compact {
    margin-bottom: 0.5rem;
}

body.chats-page .app-main {
    padding: 8px 12px 0;
    max-width: none;
}

body.chats-page--conversation .app-main {
    padding: 0;
}

body.chats-page--conversation .app-header {
    display: none;
}

.chats-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    height: calc(100dvh - var(--nav-height) - 96px);
    max-height: calc(100dvh - var(--nav-height) - 96px);
}

body.chats-page--conversation .chats-layout {
    height: calc(100dvh - var(--nav-height));
    max-height: calc(100dvh - var(--nav-height));
    border-radius: 0;
    box-shadow: none;
}

.chat-list {
    border-right: 1px solid var(--border);
    overflow-y: auto;
    height: 100%;
}

.chat-list__empty {
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.chat-list__empty a {
    color: var(--primary);
    font-weight: 600;
}

.chat-list__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
    text-decoration: none;
    color: inherit;
}

.chat-list__item:hover,
.chat-list__item--active { background: rgba(230, 57, 70, 0.06); }

.chat-list__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

.chat-list__avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-list__avatar .status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    border: 2px solid var(--surface);
}

.chat-list__content { flex: 1; min-width: 0; }
.chat-list__name { font-weight: 600; font-size: 0.95rem; }
.chat-list__preview {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-list__badge {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: var(--bg);
}

.chat-panel--empty {
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.chat-panel__placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.chat-back {
    display: none;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text);
    font-size: 1.25rem;
    text-decoration: none;
    margin-right: 4px;
}

.chat-back:hover { background: var(--border); }

.chat-header {
    flex-shrink: 0;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
}

.chat-header__user { flex: 1; min-width: 0; }

.chat-header__profile-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.chat-header__profile-link img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-header__profile-link strong {
    display: block;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-header__profile-link span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chat-header__profile-btn { flex-shrink: 0; }

.chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
}

.chat-start-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 12px 8px;
    margin: auto 0 0;
}

.message-bubble {
    max-width: 75%;
    padding: 10px 16px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: msgIn 0.25s ease;
}

@keyframes msgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-bubble--sent {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

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

.message-bubble__time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 4px;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 16px;
    align-self: flex-start;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

.chat-input-bar {
    flex-shrink: 0;
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--surface);
}

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

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

.chat-input-bar input[readonly] {
    cursor: pointer;
    background: var(--surface);
}

.chat-send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-send-btn [data-icon] {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.chat-send-btn [data-icon] svg {
    width: 20px;
    height: 20px;
    display: block;
    stroke: currentColor;
}

.chat-preset-bar {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    padding: 10px 16px 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    align-items: center;
}

.chat-preset-bar .form-select {
    flex: 1;
    min-width: 0;
}

.chat-usage-bar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px 0;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.chat-usage-bar strong {
    color: var(--text);
    font-size: 0.88rem;
}

.chat-usage-bar--empty {
    color: var(--primary);
}

.message-bubble--pay-for-me {
    border: 1px solid rgba(37, 99, 235, 0.25);
}

.message-bubble__body {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.message-gift-actions {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message-gift-link {
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-top: 4px;
}

.message-gift-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.message-gift-ready {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 8px 0 0;
}

.message-gift-paid {
    font-size: 0.85rem;
    color: var(--success);
    margin: 8px 0 0;
    font-weight: 600;
}

/* Overlay modals (upgrade, promo, safety notice) */
.promo-modal,
.upgrade-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(15, 15, 26, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    animation: modal-fade-in 0.2s ease;
}

@keyframes modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.promo-modal__card,
.upgrade-modal__card {
    background: var(--surface);
    border-radius: var(--radius);
    max-width: 400px;
    width: 100%;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: modal-slide-up 0.25s ease;
}

@keyframes modal-slide-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.promo-modal__img {
    width: 100%;
    display: block;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.promo-modal__body,
.upgrade-modal__body {
    padding: 1.25rem 1.25rem 1rem;
}

.promo-modal__body h3 {
    font-size: 1.15rem;
    margin: 0 0 10px;
    font-weight: 700;
    color: var(--text);
}

.promo-modal__actions,
.upgrade-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1rem;
}

.promo-modal__actions .btn,
.upgrade-modal__actions .btn {
    flex: 1;
    min-width: 120px;
}

body.modal-open {
    overflow: hidden;
}

.upgrade-modal__title {
    font-size: 1.15rem;
    margin: 0 0 10px;
    font-weight: 700;
    color: var(--text);
}

.upgrade-modal__text {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Shared app modals (confirm, safety, notifications, install) */
.app-modal__card {
    max-width: 420px;
}

.app-modal__hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 1.5rem 1.25rem 1.25rem;
    text-align: center;
    color: #fff;
}

.app-modal__hero--upgrade {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.app-modal__hero--safety {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.app-modal__hero--notify {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
}

.app-modal__hero--install {
    background: linear-gradient(135deg, var(--primary) 0%, #c1121f 100%);
}

.app-modal__hero--promo,
.app-modal__card--promo .app-modal__hero {
    background:
        radial-gradient(circle at top right, rgba(255,255,255,.22), transparent 35%),
        linear-gradient(135deg, #c1121f 0%, #7f1d1d 100%);
}

.app-modal__hero--contact,
.app-modal__card--contact .app-modal__hero {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

.app-modal__card--notify .app-modal__hero {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
}

.app-modal__card--safety .app-modal__hero {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.app-modal__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    margin-bottom: 0.5rem;
}

.app-modal__icon svg {
    width: 26px;
    height: 26px;
    stroke: #fff;
}

.app-modal__title {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
    color: #fff;
    line-height: 1.3;
}

.app-modal__body {
    padding: 1.25rem 1.25rem 1rem;
}

.app-modal__text {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0 0 0.5rem;
}

.app-modal__eyebrow {
    margin-top: 0.35rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.85;
}

.app-modal__promo-image {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.24);
}

.app-modal__promo-copy {
    margin-top: 0.9rem;
    text-align: center;
}

.app-modal__steps {
    font-size: 0.88rem;
    color: var(--text);
    margin: 0.75rem 0 0;
    line-height: 1.55;
}

.app-modal__steps ol {
    margin: 0;
    padding-left: 1.2rem;
}

.app-modal__actions .btn {
    flex: 1;
    min-width: 120px;
}

.safety-notice-modal .safety-notice__list,
.app-modal__card--safety .safety-notice__list {
    margin: 0.75rem 0 0;
    padding-left: 1.2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.safety-notice-modal .safety-notice__list li,
.app-modal__card--safety .safety-notice__list li {
    margin-bottom: 6px;
}

.user-profile__email {
    font-size: 0.95rem;
    margin-top: 4px;
    color: var(--text-muted);
}

/* Friends */
.friends-overview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 1rem;
}

.friends-overview__card {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0.9rem 1rem;
    box-shadow: var(--shadow);
}

.friends-overview__label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.friends-overview__value {
    display: block;
    font-size: 1.3rem;
    color: var(--text);
    font-weight: 700;
}

.friends-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 1.25rem;
}

.friends-tab {
    padding: 0.95rem 0.9rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    color: var(--text-muted);
    font-weight: 500;
    text-decoration: none;
    text-align: left;
    transition: all var(--transition);
    box-shadow: var(--shadow);
}

.friends-tab--active,
.friends-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(230, 57, 70, 0.08);
}

.friends-tab__label {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.friends-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 28px;
    padding: 0 0.7rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: inherit;
    font-size: 0.82rem;
    font-weight: 700;
}

.friends-empty-state {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

@media (min-width: 640px) {
    .friends-overview {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .friends-tabs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 10px;
}

.friend-item__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.friend-item__info { flex: 1; }
.friend-item__actions { display: flex; gap: 8px; }

/* Profile page */
.profile-hero {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.profile-hero--compact {
    padding: 1.25rem 1rem;
    margin-top: 0;
}

.profile-hero--compact .profile-hero__avatar {
    width: 88px;
    height: 88px;
    margin-bottom: 0.75rem;
}

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

.profile-hero__badges {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.profile-referral__lead {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
    margin: 0 0 1rem;
}

.profile-referral__message {
    font-size: 0.9rem;
    line-height: 1.55;
    resize: none;
}

.profile-referral__copy-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-referral__copy-row .form-input {
    flex: 1;
    min-width: 160px;
}

.profile-plans {
    margin-top: 0;
}

.page-title--compact {
    margin-bottom: 0.75rem;
}

.upgrade-modal__close,
.upgrade-modal__cta {
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.app-announcement {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 12px;
    margin: 0 1rem 1rem;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,.08), transparent 32%),
        linear-gradient(135deg, rgba(193,18,31,.18), rgba(37,99,235,.16)),
        var(--surface);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.app-announcement__icon,
.app-announcement__img {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    flex-shrink: 0;
}

.app-announcement__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-announcement__icon svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
}

.app-announcement__img {
    object-fit: cover;
}

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

.app-announcement__eyebrow {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 0.2rem;
}

.app-announcement__title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
}

.app-announcement__text {
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.55;
}

.app-announcement__cta {
    white-space: nowrap;
}

.app-announcement__close {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-size: 1.15rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.app-announcement__close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .app-announcement {
        grid-template-columns: auto 1fr auto;
        gap: 10px;
        margin: 0 0.85rem 0.85rem;
        padding: 12px;
    }

    .app-announcement__body {
        grid-column: 2 / 4;
    }

    .app-announcement__cta {
        grid-column: 2 / 3;
        justify-self: start;
        margin-top: 0.2rem;
    }

    .app-announcement__close {
        grid-column: 3 / 4;
        grid-row: 1 / 2;
        justify-self: end;
    }
}

.profile-hero__avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 4px solid var(--primary);
}

.profile-hero__name { font-size: 1.5rem; font-weight: 700; }

.profile-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.profile-section__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary);
}

.subscription-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.subscription-badge--active {
    background: rgba(45, 106, 79, 0.15);
    color: var(--success);
}

.subscription-badge--inactive {
    background: rgba(230, 57, 70, 0.1);
    color: var(--primary);
}

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

.plan-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: all var(--transition);
    position: relative;
}

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

.plan-card--featured {
    border-color: var(--primary);
}

.plan-card--featured::before {
    content: 'Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.plan-card__badge {
    display: inline-block;
    background: #2563eb;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.plan-card__price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1rem 0;
}

.plan-card__price small { font-size: 1rem; color: var(--text-muted); }

.plan-card__name {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.plan-card__desc {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.plan-card__meta {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.55;
    margin: -0.85rem 0 1.35rem;
}

.plan-card__actions {
    display: grid;
    gap: 0.65rem;
    width: 100%;
    margin-top: 0.25rem;
}

.plan-card__sms-steps {
    background: var(--surface-2, rgba(255,255,255,.05));
    border-radius: 10px;
    padding: 1rem;
    text-align: left;
}

/* Profile page — larger plan cards */
.profile-plans {
    padding-top: 0.5rem;
}

.profile-plans__title {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.profile-plans__lead {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.profile-plans__status {
    margin: 0 0 1.25rem;
}

.plans-grid--profile {
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 560px) {
    .plans-grid--profile {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

.plan-card--profile {
    padding: 2rem 1.75rem 2.25rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

.plan-card--profile .plan-card__name {
    font-size: 1.35rem;
}

.plan-card--profile .plan-card__price {
    font-size: 3rem;
    margin: 0.75rem 0 1rem;
}

.plan-card--profile .plan-card__desc {
    font-size: 1rem;
    margin-bottom: 1.75rem;
    max-width: 280px;
    align-self: center;
}

.plan-card--profile .btn {
    width: 100%;
    max-width: 320px;
    justify-self: center;
}

.plan-card--profile .plan-card__actions {
    max-width: 320px;
    align-self: center;
    width: 100%;
}

/* Theme toggle */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    color: var(--text);
}

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

.badge--banned { background: rgba(230, 57, 70, 0.15); color: var(--danger); }
.badge--verified { background: rgba(45, 106, 79, 0.15); color: var(--success); }
.badge--unverified { background: rgba(108, 117, 125, 0.15); color: var(--text-muted); }

.app-verify-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(233, 196, 106, 0.15);
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}

.app-verify-banner .btn {
    margin-left: auto;
}

/* Toast */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 3.7s forwards;
    max-width: 360px;
}

.toast--success { background: var(--success); }
.toast--error { background: var(--danger); }
.toast--info { background: #457b9d; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateX(40px); }
}

/* Empty & loading states */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}

.empty-state__icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state__title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text); }

.loading-spinner {
    width: 82px;
    height: 82px;
    background: url('../images/bobochat-icon.png') center/contain no-repeat;
    margin: 2rem auto;
    animation: loaderPulse 1.2s ease-in-out infinite;
}

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

@keyframes loaderPulse {
    0%, 100% { transform: scale(0.96); opacity: 0.85; }
    50% { transform: scale(1.03); opacity: 1; }
}

/* Landing page */
.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.landing-hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.08) 0%, var(--bg) 50%);
}

.landing-hero__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.landing-hero__title span { color: var(--primary); }

.landing-hero__subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 2rem;
}

.landing-hero__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    padding: 3rem 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 1.5rem;
}

.feature-card__icon {
    width: 56px;
    height: 56px;
    background: rgba(230, 57, 70, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--primary);
}

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

/* Auth pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.06) 0%, var(--bg) 100%);
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    animation: cardIn 0.5s ease;
}

.auth-card__logo {
    text-align: center;
    margin-bottom: 0.5rem;
    line-height: 0;
}

.auth-card__logo-img {
    height: 88px;
    width: auto;
    margin: 0 auto;
    display: block;
}

.auth-card__subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

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

.legal-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 18px 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.legal-consent input {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    margin-top: 2px;
    accent-color: var(--primary);
}

.legal-consent a { color: var(--primary); }

.feature-comparison-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.feature-comparison {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.feature-comparison th,
.feature-comparison td {
    padding: 0.85rem 0.9rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.feature-comparison thead th {
    color: var(--text);
    background: rgba(230, 57, 70, 0.08);
    font-weight: 700;
}

.feature-comparison thead th:not(:first-child) {
    color: var(--primary);
}

.feature-comparison tbody th {
    width: 42%;
    color: var(--text);
    font-weight: 600;
}

.feature-comparison tbody td {
    color: var(--text-muted);
}

.feature-comparison tbody tr:last-child th,
.feature-comparison tbody tr:last-child td {
    border-bottom: 0;
}

.feature-comparison__note {
    margin: 0.8rem 0 0;
}

.cookie-consent {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 10020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: min(620px, calc(100vw - 36px));
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}

.cookie-consent[hidden] { display: none; }
.cookie-consent strong { display: block; margin-bottom: 3px; }
.cookie-consent p { margin: 0 0 3px; color: var(--text-muted); font-size: 0.78rem; line-height: 1.45; }
.cookie-consent a { font-size: 0.76rem; }
.cookie-consent__actions { display: flex; flex: 0 0 auto; gap: 8px; }

@media (max-width: 600px) {
    .cookie-consent { right: 10px; bottom: 10px; width: calc(100vw - 20px); flex-direction: column; align-items: stretch; gap: 12px; }
    .cookie-consent__actions { display: grid; grid-template-columns: 1fr 1fr; }
}

/* Admin layout moved to assets/css/admin.css */

.stat-card__value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.data-table th {
    background: rgba(230, 57, 70, 0.06);
    font-weight: 600;
    font-size: 0.85rem;
}

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

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge--active { background: rgba(45, 106, 79, 0.15); color: var(--success); }
.badge--suspended { background: rgba(233, 196, 106, 0.2); color: #b8860b; }
.badge--banned { background: rgba(230, 57, 70, 0.15); color: var(--danger); }
.badge--pending { background: rgba(69, 123, 157, 0.15); color: #457b9d; }

/* Page subtitle */
.page-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: -0.75rem 0 1.25rem;
}

/* Discover stack — one profile at a time */
.discover-stack {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
    min-height: 480px;
}

.discover-stack__card {
    display: none;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.discover-stack__card--active {
    display: flex;
}

.discover-stack__photo-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.discover-stack__photo-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    background: var(--border);
}

.discover-stack__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-slideshow {
    position: relative;
    overflow: hidden;
}

.photo-slideshow__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.7s ease;
}

.photo-slideshow__slide.is-active {
    opacity: 1;
}

.discover-stack__status {
    top: 12px;
    left: 12px;
    right: auto;
    bottom: auto;
}

.discover-stack__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
}

.discover-stack__overlay .profile-card__name { color: white; margin-bottom: 4px; }
.discover-stack__overlay .profile-card__meta { color: rgba(255,255,255,0.9); margin-bottom: 6px; }
.discover-stack__phone { font-size: 0.9rem; font-weight: 600; margin: 0 0 8px; color: #fff; }
.discover-stack__phone-hint { font-size: 0.75rem; font-weight: 500; opacity: 0.85; }
.discover-stack__overlay .tag { background: rgba(255,255,255,0.2); color: white; }

.discover-stack__actions {
    flex-wrap: wrap;
}

.discover-stack__actions .btn--compat {
    flex: 1.2;
    min-width: 150px;
}

.discover-stack__hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 12px;
}

.discover-stack__card--ad {
    min-height: 420px;
}

.discover-ad {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.5rem;
    min-height: 420px;
    background: linear-gradient(160deg, var(--surface) 0%, rgba(230, 57, 70, 0.08) 100%);
    border: 2px dashed var(--primary);
}

.discover-ad__icon {
    font-size: 2.75rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.discover-ad__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.65rem;
    color: var(--text);
}

.discover-ad__text {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin: 0 0 1.25rem;
    max-width: 28ch;
    line-height: 1.5;
}

.discover-ad__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 260px;
}

.discover-ad__tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.status-dot--recent {
    background: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35);
}

/* Discover horizontal scroll (legacy) */
.discover-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 4px 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.discover-scroll::-webkit-scrollbar { display: none; }

.discover-scroll__card {
    flex: 0 0 min(85vw, 300px);
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
}

.profile-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.profile-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: white;
}

.profile-card__overlay .profile-card__name { color: white; margin-bottom: 2px; }
.profile-card__overlay .profile-card__meta { color: rgba(255,255,255,0.85); }
.profile-card__overlay .tag { background: rgba(255,255,255,0.2); color: white; }

.profile-card__quick-actions {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.profile-card__quick-actions .btn { flex: 1; font-size: 0.8rem; padding: 8px 4px; }

/* User profile view */
.user-profile__back {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}
.user-profile__back:hover { color: var(--primary); }

.user-profile__name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.user-profile__meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.user-profile__phone {
    font-size: 0.95rem;
    font-weight: 500;
}

.user-profile__phone-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 4px;
}

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

.profile-actions .profile-action {
    border-radius: 12px;
    font-weight: 700;
}

.profile-actions .btn--friend {
    background: #d97706;
    color: #fff;
    border: 2px solid #d97706;
}
.profile-actions .btn--friend:hover {
    background: #b45309;
    border-color: #b45309;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}

.profile-actions .btn--chat {
    background: #7c3aed;
    color: #fff;
    border: 2px solid #7c3aed;
}
.profile-actions .btn--chat:hover {
    background: #6d28d9;
    border-color: #6d28d9;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.profile-actions .btn--report {
    background: transparent;
    color: #f87171;
    border: 2px solid rgba(248, 113, 113, 0.65);
}
.profile-actions .btn--report:hover {
    background: rgba(248, 113, 113, 0.12);
    border-color: #f87171;
    color: #fecaca;
}

.profile-actions .btn--compat {
    flex: 1 1 180px;
}

.profile-actions-hint {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* Photo gallery */
.photo-gallery__main {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/5;
    max-height: 420px;
    margin-bottom: 12px;
}

.photo-gallery__main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-gallery__swipe-hint {
    position: absolute;
    left: 50%;
    bottom: 14px;
    z-index: 2;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 28px);
    padding: 7px 13px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(15, 15, 26, 0.72);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    pointer-events: none;
    backdrop-filter: blur(6px);
}

.photo-gallery__thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.photo-gallery__thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    background: none;
}

.photo-gallery__thumb--active { border-color: var(--primary); }
.photo-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* My photos management */
.my-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.my-photos-grid__item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.my-photos-grid__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.my-photos-grid__badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.my-photos-grid__actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 4px;
    padding: 6px;
    background: rgba(0,0,0,0.6);
}

.my-photos-grid__actions .btn {
    flex: 1;
    font-size: 0.65rem;
    padding: 4px;
    color: white;
    border-color: rgba(255,255,255,0.3);
}

.my-photos-grid__add {
    aspect-ratio: 1;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    transition: border-color var(--transition);
}

.my-photos-grid__add:hover { border-color: var(--primary); color: var(--primary); }

/* Nearby location */
.location-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
}

.location-banner[hidden] {
    display: none !important;
}

.auth-card .location-banner {
    margin-bottom: 1.25rem;
}

.location-banner__icon { font-size: 2rem; }
.location-banner__text { flex: 1; }
.location-banner__text strong { display: block; margin-bottom: 4px; }
.location-banner__text p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

.location-status { color: var(--success); font-weight: 500; }

.location-banner--compact {
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
    gap: 12px;
}

.location-banner--compact .location-banner__icon { font-size: 1.5rem; }

.nearby-filters-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.nearby-filters-bar__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    list-style: none;
}

.nearby-filters-bar__toggle::-webkit-details-marker { display: none; }

.nearby-filters-bar__active-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    margin-left: 8px;
}

.nearby-filters-bar__form {
    padding: 0 12px 12px;
    border-top: 1px solid var(--border);
}

.nearby-filters-bar__row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
    align-items: center;
}

.nearby-filters-bar__row .form-select--sm,
.nearby-filters-bar__row .form-input--sm {
    flex: 1 1 120px;
    min-width: 0;
    padding: 8px 10px;
    font-size: 0.85rem;
}

.nearby-tile__phone {
    font-size: 0.78rem;
    font-weight: 500;
    margin-top: 4px;
    color: var(--text);
}

.nearby-tile__status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 1.5rem;
    padding-bottom: 0.5rem;
}

.pagination__info {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nearby-grid--2col {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.nearby-tile {
    display: block;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition);
}

.nearby-tile:hover { transform: translateY(-3px); }

.nearby-tile__img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.nearby-tile__media {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.nearby-tile__body { padding: 10px 12px; }
.nearby-tile__name { font-weight: 600; font-size: 0.9rem; line-height: 1.3; }
.nearby-tile__distance { font-size: 0.8rem; color: var(--primary); font-weight: 500; margin-top: 2px; }

/* Search */
.search-panel {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
}

.search-panel__main {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.search-panel__input { flex: 1; }

.search-panel__filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

/* Profile details */
.profile-details {
    display: grid;
    gap: 10px;
}

.profile-details div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.9rem;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.profile-details dt { color: var(--text-muted); font-weight: 500; }
.profile-details dd { font-weight: 600; text-align: right; }

.user-profile__tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 8px 0;
}

/* Signup wide card */
.auth-card--wide { max-width: 640px !important; }

.form-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 1.5rem 0 1rem;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.form-section-title:first-of-type { margin-top: 0; }

/* Footer — 5 tabs */
.footer-nav__label { font-size: 0.68rem; }

@media (max-width: 380px) {
    .footer-nav__label { font-size: 0.6rem; }
}

/* Responsive */
@media (max-width: 1024px) {
    .discover-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .discover-grid { grid-template-columns: 1fr; }

    body.chats-page .chats-layout {
        height: calc(100dvh - var(--nav-height) - 72px);
        max-height: calc(100dvh - var(--nav-height) - 72px);
        grid-template-columns: 1fr;
    }

    body.chats-page:not(.chats-page--conversation) .chat-panel {
        display: none;
    }

    body.chats-page:not(.chats-page--conversation) .chat-list {
        height: 100%;
        border-right: none;
    }

    body.chats-page--conversation .chat-list {
        display: none;
    }

    body.chats-page--conversation .chats-layout {
        height: calc(100dvh - var(--nav-height));
        max-height: calc(100dvh - var(--nav-height));
    }

    body.chats-page--conversation .chat-back {
        display: flex;
    }

    body.chats-page--conversation .chat-header__profile-btn {
        display: none;
    }

    .chat-header__profile-link strong {
        max-width: 160px;
    }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .auth-card { padding: 1.5rem; }
    .profile-card__actions { flex-direction: column; }
}

.pwa-modal,
.promo-modal.app-modal {
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    backdrop-filter: blur(4px);
}

/* PWA install prompt — uses app-modal styles */
.pwa-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 15, 26, 0.55);
    display: flex;
}

.pwa-modal__card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    width: min(100%, 420px);
    box-shadow: var(--shadow-lg);
}

.pwa-modal__title {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.pwa-modal__text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.pwa-modal__steps {
    font-size: 0.88rem;
    color: var(--text);
    margin-bottom: 16px;
}

.pwa-modal__steps ol {
    padding-left: 1.2rem;
}

.pwa-modal__actions {
    display: flex;
    gap: 10px;
}

.pwa-modal__actions .btn {
    flex: 1;
}

/* Friend status (48h stories) */
.status-feed {
    margin-bottom: 1.25rem;
}

.status-feed__scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    scrollbar-width: none;
}

.status-feed__scroll::-webkit-scrollbar { display: none; }

.status-bubble {
    flex: 0 0 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.status-bubble__ring {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    padding: 3px;
    background: var(--border);
}

.status-bubble__ring--active {
    background: linear-gradient(135deg, var(--primary), #f59e0b);
}

.status-bubble__ring--unseen {
    background: linear-gradient(135deg, var(--primary), #22c55e);
}

.status-bubble__ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid var(--surface);
}

.status-bubble__add {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 1rem;
    line-height: 22px;
    text-align: center;
    border: 2px solid var(--surface);
}

.status-bubble__name {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-post-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.status-help-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
}

.status-post-panel__actions {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

.status-strip-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.empty-state--compact {
    padding: 1.5rem 1rem;
}

.status-viewer {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: #0a0a12;
    display: flex;
    flex-direction: column;
    color: #fff;
}

.status-viewer__progress {
    display: flex;
    gap: 4px;
    padding: 10px 12px 0;
    position: relative;
    z-index: 2;
}

.status-viewer__bar {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.25);
    border-radius: 2px;
    overflow: hidden;
}

.status-viewer__bar-fill {
    display: block;
    height: 100%;
    width: 0;
    background: #fff;
    transition: width 0.1s linear;
}

.status-viewer__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    position: relative;
    z-index: 4;
}

.status-viewer__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.status-viewer__meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.status-viewer__meta span {
    font-size: 0.78rem;
    opacity: 0.8;
}

.status-viewer__close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    position: relative;
    z-index: 5;
}

.status-viewer__body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: relative;
    z-index: 1;
    overflow: auto;
}

.status-viewer__empty {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 24px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.status-viewer__empty h2 {
    margin: 0 0 10px;
    font-size: 1.3rem;
}

.status-viewer__empty p {
    margin: 0;
    max-width: 30ch;
    color: rgba(255,255,255,0.8);
    line-height: 1.5;
}

.status-viewer__text {
    font-size: 1.35rem;
    line-height: 1.5;
    text-align: center;
    max-width: 32ch;
    margin: 0;
}

.status-viewer__media {
    margin: 0;
    max-width: 100%;
    text-align: center;
}

.status-viewer__media img {
    max-width: 100%;
    max-height: min(70vh, 520px);
    border-radius: var(--radius);
    object-fit: contain;
}

.status-viewer__media figcaption {
    margin-top: 12px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.status-viewer__nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    bottom: 0;
    display: flex;
    z-index: 2;
    pointer-events: none;
}

.status-viewer__tap {
    flex: 1;
    background: transparent;
    border: none;
    pointer-events: auto;
    cursor: pointer;
}

.status-viewer__footer {
    padding: 12px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.chats-status-strip {
    padding: 0 0 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}
