/* ============================================================
   Datwoo — Badoo-style dating UI theme  (v2 — polished + responsive)
   Purple gradient brand, yellow accents, rounded cards, animations.
   ============================================================ */

:root {
    --dw-purple: #7b2ff7;
    --dw-purple-2: #b62eff;
    --dw-pink: #ff5580;
    --dw-yellow: #ffce00;
    --dw-dark: #1e1033;
    --dw-muted: #6c5f87;
    --dw-bg: #f6f4fb;
    --dw-gradient: linear-gradient(135deg, #7b2ff7 0%, #b62eff 55%, #ff5580 100%);
    --dw-gradient-soft: linear-gradient(135deg, rgba(123, 47, 247, .12), rgba(255, 85, 128, .12));
    --dw-radius: 18px;
    --dw-shadow: 0 10px 30px rgba(30, 16, 51, .10);
    --dw-shadow-lg: 0 22px 50px rgba(30, 16, 51, .16);
    --dw-nav-h: 62px;
    --dw-bottomnav-h: 64px;
}

* { -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: 'Poppins', system-ui, sans-serif;
    background: var(--dw-bg);
    color: var(--dw-dark);
    min-height: 100dvh;
    overscroll-behavior-y: none;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cfc4e8; border-radius: 8px; border: 2px solid var(--dw-bg); }
::-webkit-scrollbar-thumb:hover { background: #b3a4d6; }

:focus-visible { outline: 3px solid rgba(123, 47, 247, .45); outline-offset: 2px; border-radius: 6px; }

::selection { background: rgba(123, 47, 247, .25); }

/* ------------------------------ Buttons ------------------- */
.btn-gradient {
    background: var(--dw-gradient);
    background-size: 160% 160%;
    color: #fff;
    border: 0;
    font-weight: 600;
    border-radius: 999px;
    padding: .6rem 1.5rem;
    box-shadow: 0 8px 22px rgba(123, 47, 247, .35);
    transition: transform .15s ease, box-shadow .2s ease, background-position .35s ease;
}
.btn-gradient:hover, .btn-gradient:focus-visible {
    color: #fff;
    background-position: 90% 50%;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(123, 47, 247, .42);
}
.btn-gradient:active { transform: translateY(0) scale(.97); }
.btn-gradient:disabled { opacity: .55; transform: none; }

.btn-outline-gradient {
    border: 2px solid var(--dw-purple);
    color: var(--dw-purple);
    border-radius: 999px;
    font-weight: 600;
    background: #fff;
    transition: all .18s ease;
}
.btn-outline-gradient:hover { background: var(--dw-purple); color: #fff; box-shadow: 0 10px 24px rgba(123, 47, 247, .3); }
.btn-yellow {
    background: var(--dw-yellow);
    color: var(--dw-dark);
    border: 0;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(255, 206, 0, .4);
    transition: transform .15s ease, filter .15s ease;
}
.btn-yellow:hover { filter: brightness(1.06); color: var(--dw-dark); transform: translateY(-2px); }
.btn-yellow:active { transform: scale(.97); }

/* ------------------------------ Navbar -------------------- */
.dw-navbar {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 18px rgba(30, 16, 51, .08);
    padding: .55rem 0;
    min-height: var(--dw-nav-h);
}
.dw-logo { font-weight: 800; font-size: 1.3rem; color: var(--dw-dark); display: flex; align-items: center; gap: .5rem; }
.dw-logo:hover { color: var(--dw-purple); }
.dw-logo-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 12px; flex: none;
    background: var(--dw-gradient); color: #fff; font-size: 1.2rem;
    box-shadow: 0 6px 16px rgba(123, 47, 247, .35);
    transition: transform .25s ease;
}
.dw-logo:hover .dw-logo-mark { transform: rotate(-8deg) scale(1.06); }
.dw-nav-link {
    font-weight: 600; color: var(--dw-muted);
    border-radius: 999px; padding: .45rem 1rem !important;
    transition: color .15s ease, background .15s ease;
}
.dw-nav-link:hover { color: var(--dw-purple); background: rgba(123, 47, 247, .08); }
.dw-nav-link.active { color: #fff; background: var(--dw-gradient); box-shadow: 0 6px 16px rgba(123, 47, 247, .3); }
.dw-btn-credits {
    background: rgba(255, 206, 0, .25);
    color: #8a6d00; border-radius: 999px; font-weight: 600; border: 0;
    transition: background .15s ease, transform .15s ease;
}
.dw-btn-credits:hover { background: rgba(255, 206, 0, .45); color: #6d5600; transform: translateY(-1px); }
.dw-icon-btn {
    background: #f1edfa; border-radius: 50%; width: 40px; height: 40px; flex: none;
    display: inline-flex; align-items: center; justify-content: center; color: var(--dw-purple);
    position: relative; border: 0; transition: background .15s ease, transform .15s ease;
}
.dw-icon-btn:hover { background: #e4dbf8; color: var(--dw-purple); transform: translateY(-1px); }
.dw-badge {
    position: absolute; top: -4px; right: -4px;
    background: var(--dw-pink); color: #fff; font-size: .65rem;
    border-radius: 999px; padding: .18rem .42rem;
    box-shadow: 0 3px 8px rgba(255, 85, 128, .5);
    animation: dw-pulse-badge 2.4s ease infinite;
}
@keyframes dw-pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}
.dw-badge-dot {
    position: absolute; top: -2px; right: -3px; width: 10px; height: 10px;
    background: var(--dw-pink); border-radius: 50%; border: 2px solid var(--dw-bg);
}
.dw-avatar-btn { border: 0; background: none; padding: 0; transition: transform .15s ease; }
.dw-avatar-btn:hover { transform: translateY(-1px); }
.dw-avatar-btn img {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--dw-purple);
    box-shadow: 0 4px 12px rgba(123, 47, 247, .25);
}
.dw-dropdown { border-radius: 14px; border: 0; padding: .4rem; box-shadow: var(--dw-shadow-lg); }
.dw-dropdown .dropdown-item { border-radius: 10px; }

/* ------------------------------ Layout -------------------- */
.dw-main { min-height: 60vh; padding-bottom: calc(var(--dw-bottomnav-h) + 2.5rem); }
@media (min-width: 768px) { .dw-main { padding-bottom: 3rem; } }
.dw-sticky { position: sticky; top: calc(var(--dw-nav-h) + 16px); }
.dw-card-panel {
    background: #fff; border-radius: var(--dw-radius);
    box-shadow: var(--dw-shadow); padding: 1.4rem;
    border: 1px solid rgba(30, 16, 51, .04);
    transition: box-shadow .2s ease;
}
.dw-title { font-weight: 800; font-size: 1.25rem; letter-spacing: -.01em; }
.dw-subtitle { color: var(--dw-muted); font-size: .9rem; }
.dw-gradient-text {
    background: var(--dw-gradient);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}

/* ------------------------------ Bottom nav ---------------- */
.dw-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 1040;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 -6px 24px rgba(30, 16, 51, .12);
    display: flex; justify-content: space-around;
    height: var(--dw-bottomnav-h);
    padding: 0 env(safe-area-inset-left) env(safe-area-inset-bottom) env(safe-area-inset-right);
}
.dw-bottom-nav a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--dw-muted); font-size: .64rem; font-weight: 600; text-decoration: none;
    padding: .3rem .9rem; border-radius: 14px; flex: 1;
    transition: color .15s ease, background .15s ease, transform .15s ease;
}
.dw-bottom-nav a i { font-size: 1.3rem; line-height: 1; }
.dw-bottom-nav a.active { color: var(--dw-purple); background: rgba(123, 47, 247, .1); }
.dw-bottom-nav a:active { transform: scale(.92); }

/* ------------------------------ Member cards -------------- */
.dw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 1rem; }
.dw-card {
    background: #fff; border-radius: var(--dw-radius); overflow: hidden;
    box-shadow: var(--dw-shadow); transition: transform .18s ease, box-shadow .18s ease;
    border: 1px solid rgba(30, 16, 51, .04);
}
.dw-card:hover { transform: translateY(-4px); box-shadow: var(--dw-shadow-lg); }
.dw-card-photo { position: relative; display: block; aspect-ratio: 3/4; overflow: hidden; background: #ece7f8; }
.dw-card-photo img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .35s ease;
}
.dw-card:hover .dw-card-photo img { transform: scale(1.06); }
.dw-online {
    position: absolute; top: 10px; left: 10px; width: 14px; height: 14px;
    background: #2ecc71; border-radius: 50%; border: 2.5px solid #fff;
    box-shadow: 0 0 0 0 rgba(46, 204, 113, .5);
    animation: dw-pulse-online 2s ease infinite;
}
@keyframes dw-pulse-online {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, .45); }
    70% { box-shadow: 0 0 0 8px rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}
.dw-verified { position: absolute; top: 6px; right: 8px; color: var(--dw-yellow); font-size: 1.1rem; filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
.dw-distance {
    position: absolute; bottom: 8px; left: 8px;
    background: rgba(30, 16, 51, .65); color: #fff; font-size: .7rem;
    padding: .15rem .55rem; border-radius: 999px; backdrop-filter: blur(4px);
}
.dw-card-body { padding: .65rem .8rem .8rem; font-size: .9rem; }
.dw-like-btn {
    background: rgba(255, 85, 128, .12); color: var(--dw-pink);
    border-radius: 50%; width: 34px; height: 34px; padding: 0; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    transition: transform .15s ease, background .15s ease, color .15s ease;
}
.dw-like-btn:hover { background: var(--dw-pink); color: #fff; transform: scale(1.12); }
.dw-like-btn:active { transform: scale(.9); }

/* ------------------------------ Encounters / swipe -------- */
.dw-encounters-head h4 { font-size: clamp(1.15rem, 4vw, 1.5rem); }

.dw-encounters-meta {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: .5rem; margin: 0 auto 1.1rem;
}
.dw-meta-pill {
    display: inline-flex; align-items: center; gap: .4rem;
    background: #fff; color: var(--dw-muted);
    border: 1px solid rgba(123, 47, 247, .14);
    border-radius: 999px; padding: .34rem .85rem;
    font-size: .78rem; font-weight: 500;
    box-shadow: 0 4px 14px rgba(30, 16, 51, .06);
    white-space: nowrap;
}
.dw-meta-pill b { color: var(--dw-purple); font-weight: 800; }
.dw-meta-pill i { color: var(--dw-purple); font-size: .9rem; }
.dw-meta-premium {
    background: rgba(255, 206, 0, .18); border-color: rgba(255, 206, 0, .5); color: #8a6d00;
}
.dw-meta-premium i, .dw-meta-premium b { color: #8a6d00; }
.dw-meta-warn { border-color: rgba(255, 77, 109, .4); }
.dw-meta-warn i, .dw-meta-warn b { color: #e0294b; }

.dw-swipe-stage {
    position: relative;
    width: min(420px, 100%);
    margin: 0 auto;
    user-select: none;
    -webkit-user-select: none;
}
.dw-swipe-card {
    position: relative; border-radius: 26px; overflow: hidden;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .7), 0 26px 60px rgba(30, 16, 51, .3);
    cursor: grab; background: #2a1a4a;
    aspect-ratio: 3/4.1;
    touch-action: pan-y;
    max-height: calc(100dvh - 340px);
    min-height: 420px;
    animation: dw-card-in .3s ease;
}
@keyframes dw-card-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.dw-swipe-card.dragging { cursor: grabbing; }
.dw-swipe-card img.dw-swipe-photo { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* card overlay — Badoo-style */
.dw-swipe-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(30,16,51,.28) 0%, transparent 26%, transparent 50%, rgba(30,16,51,.88) 100%);
    color: #fff;
}
.dw-ov-top {
    position: absolute; top: 1rem; left: 1rem; right: 1rem;
    display: flex; flex-wrap: wrap; gap: .4rem;
}
.dw-ov-pill {
    display: inline-flex; align-items: center; gap: .34rem;
    background: rgba(30, 16, 51, .55);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    color: #fff; font-size: .67rem; font-weight: 700; letter-spacing: .2px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px; padding: .3rem .7rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
}
.dw-ov-online { background: rgba(46, 204, 113, .88); }
.dw-ov-verified { background: rgba(255, 206, 0, .92); color: var(--dw-dark); }
.dw-ov-bottom {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 1rem 1.15rem 1.2rem;
}
.dw-ov-name {
    font-size: clamp(1.35rem, 5vw, 1.75rem); font-weight: 800; line-height: 1.15;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .4);
}
.dw-ov-name span { font-weight: 600; font-size: .72em; opacity: .85; }
.dw-ov-meta { font-size: .86rem; opacity: .94; margin-top: .15rem; }
.dw-ov-bio {
    font-size: .8rem; opacity: .85; margin: .45rem 0 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.dw-ov-chip {
    display: inline-flex; align-items: center; gap: .3rem;
    background: rgba(255, 206, 0, .22); border: 1px solid rgba(255, 206, 0, .45);
    color: #ffe37a; font-size: .72rem; font-weight: 700;
    border-radius: 999px; padding: .22rem .7rem; margin-top: .55rem;
}
/* legacy overlay helpers (kept for older markup) */
.dw-swipe-name { font-size: clamp(1.15rem, 4.5vw, 1.5rem); font-weight: 800; }
.dw-swipe-meta { font-size: .85rem; opacity: .9; }
.dw-swipe-bio { font-size: .8rem; opacity: .85; margin-top: .35rem; max-height: 3.4em; overflow: hidden; }
.dw-stamp {
    position: absolute; top: 24px; padding: .3rem 1rem; font-weight: 800;
    border: 4px solid; border-radius: 14px; font-size: 1.3rem; letter-spacing: 1px;
    opacity: 0; transition: opacity .12s ease; pointer-events: none;
}
.dw-stamp.like { left: 20px; color: #2ecc71; border-color: #2ecc71; transform: rotate(-14deg); text-transform: uppercase; }
.dw-stamp.nope { right: 20px; color: #ff4d6d; border-color: #ff4d6d; transform: rotate(14deg); text-transform: uppercase; }
.dw-stamp.super { top: auto; bottom: 110px; left: 50%; transform: translateX(-50%); color: var(--dw-yellow); border-color: var(--dw-yellow); }

/* ------------------------------ Encounters shell: deck + details ------ */
.dw-encounters-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 420px);
    justify-content: center;
    gap: 1.4rem;
    margin-top: .4rem;
    padding: 1.4rem 1rem 1.6rem;
    border-radius: 30px;
    background-image: radial-gradient(rgba(123, 47, 247, .10) 1.5px, transparent 1.5px);
    background-size: 22px 22px;
    overflow: hidden;
}
.dw-encounters-shell::before, .dw-encounters-shell::after {
    content: ""; position: absolute; border-radius: 50%; filter: blur(70px);
    opacity: .45; pointer-events: none; z-index: 0;
}
.dw-encounters-shell::before {
    width: 300px; height: 300px; left: -90px; top: -40px;
    background: rgba(123, 47, 247, .35);
    animation: dw-float 8s ease-in-out infinite alternate;
}
.dw-encounters-shell::after {
    width: 250px; height: 250px; right: -70px; bottom: -30px;
    background: rgba(255, 85, 128, .3);
    animation: dw-float 9s ease-in-out -4s infinite alternate;
}
.dw-swipe-stage { z-index: 1; }

/* stacked deck look */
.dw-swipe-ghost {
    position: absolute; inset: 0; border-radius: 26px; background: #fff;
    border: 1px solid rgba(30, 16, 51, .05);
    box-shadow: 0 14px 34px rgba(30, 16, 51, .12);
    pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
}
.dw-swipe-ghost.g1 { transform: scale(.955) translateY(10px); opacity: .95; }
.dw-swipe-ghost.g2 { transform: scale(.91) translateY(19px); opacity: .6; }
.dw-stage-empty .dw-swipe-ghost { display: none; }

/* details panel — desktop companion */
.dw-encounter-details {
    display: none; /* mobile keeps the focused one-card flow */
    flex-direction: column; gap: .95rem;
    background: #fff; border-radius: 20px;
    border: 1px solid rgba(30, 16, 51, .05);
    box-shadow: var(--dw-shadow-lg);
    padding: 1.25rem;
    z-index: 1;
    animation: dw-card-in .35s ease;
    max-width: 340px;
}
.dw-dtl-avatar {
    width: 64px; height: 64px; border-radius: 18px; object-fit: cover; flex: none;
    border: 3px solid #fff; box-shadow: 0 8px 20px rgba(123, 47, 247, .3);
}
.dw-dtl-bio { max-height: 5.6em; overflow-y: auto; }
.dw-dtl-fact {
    display: flex; align-items: center; gap: .55rem;
    font-size: .87rem; padding: .34rem 0;
    border-bottom: 1px dashed #eee9f7;
}
.dw-dtl-fact:last-child { border-bottom: 0; }
.dw-dtl-fact i { color: var(--dw-purple); }

@media (min-width: 992px) {
    .dw-encounters-shell {
        grid-template-columns: minmax(0, 450px) minmax(280px, 340px);
        align-items: start; gap: 1.75rem;
        padding: 1.8rem 2rem 2rem;
    }
    .dw-encounter-details { display: flex; position: sticky; top: 88px; }
    .dw-encounter-details[data-empty="1"] { display: none; }
    .dw-swipe-card { min-height: 500px; max-height: calc(100dvh - 300px); }
    .dw-swipe-actions { gap: 1.25rem; }
}

/* ------------------------------ Action bar (dw-swipe-actions) ----- */
.dw-swipe-actions {
    display: flex; align-items: center; justify-content: center;
    gap: clamp(.7rem, 3vw, 1.2rem);
    margin: 1.2rem auto 0;
    padding: .62rem 1.05rem;
    background: linear-gradient(#fff, #fff) padding-box, var(--dw-gradient) border-box;
    border: 2px solid transparent;
    border-radius: 999px;
    box-shadow: 0 16px 38px rgba(30, 16, 51, .15);
    width: fit-content; max-width: 100%;
    position: sticky; bottom: calc(var(--dw-bottomnav-h) + 10px);
    z-index: 30;
    transition: box-shadow .2s ease;
}
@media (min-width: 768px) {
    .dw-swipe-actions { position: static; bottom: auto; }
}

.dw-swipe-actions > * { animation: dw-action-in .45s cubic-bezier(.34, 1.4, .64, 1) backwards; }
.dw-swipe-actions > *:nth-child(1) { animation-delay: .02s; }
.dw-swipe-actions > *:nth-child(3) { animation-delay: .08s; }
.dw-swipe-actions > *:nth-child(4) { animation-delay: .14s; }
.dw-swipe-actions > *:nth-child(5) { animation-delay: .2s; }
@keyframes dw-action-in { from { opacity: 0; transform: translateY(14px) scale(.8); } to { opacity: 1; transform: none; } }

.dw-action-divider { width: 2px; height: 30px; background: #eee9f7; border-radius: 2px; }

.dw-action-btn {
    position: relative;
    width: 58px; height: 58px; border-radius: 50%; border: 0; flex: none;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem;
    box-shadow: 0 8px 22px rgba(30, 16, 51, .16);
    transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease;
}
.dw-action-btn:hover { transform: translateY(-3px) scale(1.07); }
.dw-action-btn:active { transform: scale(.88); }
.dw-action-btn:disabled { opacity: .4; transform: none; box-shadow: none; pointer-events: none; }

.dw-action-info { width: 46px; height: 46px; background: #fff; color: #6c7bff; font-size: 1.25rem; box-shadow: inset 0 0 0 2px #e8e2f5; }
.dw-action-info:hover { color: #4252d6; box-shadow: inset 0 0 0 2px #c5b8f0; }
.dw-action-info.disabled { opacity: .4; pointer-events: none; }

.dw-action-pass { background: #fff; color: #b3a8cc; box-shadow: inset 0 0 0 2px #e8e2f5, 0 6px 16px rgba(30,16,51,.08); }
.dw-action-pass:hover { color: #ff4d6d; box-shadow: inset 0 0 0 2px #ffd3da, 0 10px 26px rgba(255, 77, 109, .25); }

.dw-action-super { width: 52px; height: 52px; background: var(--dw-yellow); color: var(--dw-dark); box-shadow: 0 8px 24px rgba(255, 206, 0, .45); }
.dw-action-super:hover { box-shadow: 0 12px 30px rgba(255, 206, 0, .6); }

.dw-action-like {
    background: var(--dw-gradient); color: #fff; width: 70px; height: 70px; font-size: 1.8rem;
    box-shadow: 0 10px 30px rgba(255, 85, 128, .45);
}
.dw-action-like:hover { box-shadow: 0 14px 36px rgba(255, 85, 128, .6); }
.dw-action-like::after {
    content: ""; position: absolute; inset: -6px; border-radius: 50%;
    border: 2px solid rgba(255, 85, 128, .4);
    animation: dw-like-ring 2.2s ease infinite;
}
@keyframes dw-like-ring {
    0% { transform: scale(.9); opacity: .9; }
    70%, 100% { transform: scale(1.22); opacity: 0; }
}

.dw-match-modal {
    position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
    background: rgba(30, 16, 51, .6); backdrop-filter: blur(6px);
    padding: 1rem;
}
.dw-match-box {
    background: var(--dw-gradient); border-radius: 28px; padding: 2.4rem 2rem; text-align: center; color: #fff;
    width: min(92vw, 420px); animation: dw-pop .35s cubic-bezier(.34, 1.56, .64, 1);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
}
@keyframes dw-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ------------------------------ Profile ------------------- */
.dw-hero { position: relative; border-radius: 24px; overflow: hidden; box-shadow: var(--dw-shadow-lg); }
.dw-hero img.dw-hero-main { width: 100%; max-height: 480px; object-fit: cover; display: block; }
.dw-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(30,16,51,.05), transparent 35%, rgba(30,16,51,.8));
}
.dw-hero-content { position: absolute; bottom: 0; padding: 1.3rem; color: #fff; width: 100%; }
.dw-chip {
    display: inline-flex; align-items: center; gap: .3rem;
    background: var(--dw-gradient-soft); color: var(--dw-purple);
    border-radius: 999px; padding: .3rem .85rem; font-size: .8rem; font-weight: 600;
    border: 1px solid rgba(123, 47, 247, .15);
    transition: transform .15s ease, box-shadow .15s ease;
    cursor: pointer;
}
.dw-chip:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(123, 47, 247, .18); }
.dw-chip.active { background: var(--dw-gradient); color: #fff; border-color: transparent; }
.dw-gallery img {
    width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; cursor: pointer;
    transition: transform .2s ease;
}
.dw-gallery img:hover { transform: scale(1.04); }
.dw-info-row { display: flex; gap: .7rem; align-items: center; padding: .5rem 0; }
.dw-info-row i { color: var(--dw-purple); }
.dw-badge-verified { color: var(--dw-yellow); }

/* ------------------------------ Chat ---------------------- */
.dw-chat-box { display: flex; flex-direction: column; height: 62vh; min-height: 400px; }
.dw-chat-header {
    display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem;
    border-bottom: 1px solid #eee9f7;
    position: sticky; top: 0; background: #fff; z-index: 5;
}
.dw-chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; scroll-behavior: smooth; }
.dw-bubble {
    max-width: 78%; padding: .55rem .95rem; border-radius: 18px; font-size: .92rem;
    animation: dw-msg-in .22s ease; word-wrap: break-word;
}
@keyframes dw-msg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dw-bubble.mine { align-self: flex-end; background: var(--dw-gradient); color: #fff; border-bottom-right-radius: 6px; }
.dw-bubble.theirs { align-self: flex-start; background: #efe9fb; color: var(--dw-dark); border-bottom-left-radius: 6px; }
.dw-bubble time { display: block; font-size: .62rem; opacity: .75; margin-top: .15rem; }
.dw-chat-input { display: flex; gap: .5rem; padding: .8rem; border-top: 1px solid #eee9f7; background: #fff; }

/* chat page: give the conversation the full screen on mobile */
body.chat-page .dw-bottom-nav { display: none; }
body.chat-page .dw-main { padding-bottom: 1.5rem; }
body.chat-page .dw-chat-box { height: calc(100dvh - var(--dw-nav-h) - 140px); }
body.chat-page .dw-chat-messages { -webkit-overflow-scrolling: touch; padding-bottom: 1.2rem; }

/* ------------------------------ Auth / landing ------------ */
.dw-auth-wrap {
    position: relative;
    min-height: 100dvh;
    display: flex; align-items: center; justify-content: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(60rem 40rem at 110% -10%, rgba(182, 46, 255, .18), transparent 60%),
        radial-gradient(50rem 34rem at -10% 110%, rgba(255, 85, 128, .16), transparent 60%),
        var(--dw-bg);
    overflow: hidden;
}
.dw-auth-wrap::before, .dw-auth-wrap::after {
    content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none;
    animation: dw-float 9s ease-in-out infinite alternate;
}
.dw-auth-wrap::before { width: 300px; height: 300px; background: rgba(123, 47, 247, .28); top: -60px; left: -80px; }
.dw-auth-wrap::after { width: 260px; height: 260px; background: rgba(255, 85, 128, .25); bottom: -50px; right: -70px; animation-delay: -4s; }
@keyframes dw-float { from { transform: translateY(0) scale(1); } to { transform: translateY(28px) scale(1.08); } }
.dw-auth-card {
    max-width: 460px; width: 100%; margin: 0 auto;
    animation: dw-card-in .4s ease;
}
.dw-hero-landing {
    background: var(--dw-gradient);
    color: #fff; border-radius: 0 0 46px 46px;
    padding: 3rem 1rem 4rem; text-align: center;
    position: relative; overflow: hidden;
}
.dw-hero-landing::before, .dw-hero-landing::after {
    content: ""; position: absolute; border-radius: 50%;
    background: rgba(255, 255, 255, .12); pointer-events: none;
    animation: dw-bubble 7s ease-in-out infinite alternate;
}
.dw-hero-landing::before { width: 340px; height: 340px; top: -140px; right: -120px; }
.dw-hero-landing::after { width: 240px; height: 240px; bottom: -120px; left: -90px; animation-delay: -3s; }
@keyframes dw-bubble { from { transform: translateY(0); } to { transform: translateY(26px); } }
.dw-hero-landing h1 { font-weight: 800; font-size: clamp(1.8rem, 5.5vw, 3.2rem); letter-spacing: -.02em; }
.dw-stat-pill {
    background: rgba(255, 255, 255, .15); backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 16px; padding: .8rem 1rem;
    transition: transform .2s ease, background .2s ease;
}
.dw-stat-pill:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .22); }
.dw-stat-pill .num { font-size: 1.3rem; font-weight: 800; color: var(--dw-yellow); }
.dw-feature-icon {
    width: 54px; height: 54px; border-radius: 16px;
    background: var(--dw-gradient-soft); color: var(--dw-purple);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem;
    transition: transform .2s ease;
}
.dw-feature:hover .dw-feature-icon { transform: rotate(-8deg) scale(1.1); }

.form-control, .form-select {
    border-radius: 12px; padding: .6rem .9rem; border-color: #e8e2f5;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus, .form-select:focus { border-color: var(--dw-purple); box-shadow: 0 0 0 .2rem rgba(123, 47, 247, .15); }
.dw-form-label { font-weight: 600; font-size: .85rem; color: var(--dw-muted); }

/* ------------------------------ Credit / premium packs ------- */
.dw-pack {
    position: relative; overflow: hidden;
    background: #fff; border: 2px solid rgba(30, 16, 51, .05);
    border-radius: 22px; padding: 1.6rem 1.3rem 1.3rem;
    text-align: center;
    box-shadow: var(--dw-shadow);
    display: flex; flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.dw-pack:hover {
    transform: translateY(-6px);
    box-shadow: var(--dw-shadow-lg);
    background: linear-gradient(#fff, #fff) padding-box, var(--dw-gradient) border-box;
    border-color: transparent;
}
.dw-pack-featured { border-color: rgba(255, 206, 0, .6); }
.dw-pack-featured:hover {
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #ffce00, #ff9500) border-box;
    border-color: transparent;
}

.dw-pack-badge {
    position: absolute; top: 14px; right: -36px; transform: rotate(45deg);
    background: var(--dw-gradient); color: #fff;
    font-size: .58rem; font-weight: 800; letter-spacing: 1.2px;
    padding: .32rem 2.8rem; box-shadow: 0 4px 12px rgba(123, 47, 247, .35);
}
.dw-pack-badge-pop { background: linear-gradient(135deg, #ffce00, #ff9500); color: var(--dw-dark); }

.dw-pack-icon {
    width: 62px; height: 62px; border-radius: 20px; margin: 0 auto .85rem;
    display: flex; align-items: center; justify-content: center; font-size: 1.65rem;
    background: var(--dw-gradient); color: #fff;
    box-shadow: 0 10px 24px rgba(123, 47, 247, .35);
    transition: transform .25s ease;
}
.dw-pack:hover .dw-pack-icon { transform: rotate(-8deg) scale(1.08); }
.dw-pack-premium .dw-pack-icon {
    background: linear-gradient(135deg, #ffce00, #ff9500); color: var(--dw-dark);
    box-shadow: 0 10px 24px rgba(255, 206, 0, .45);
}

.dw-pack-price {
    font-size: 2rem; font-weight: 800; letter-spacing: -.02em;
    margin: .15rem 0 .95rem; color: var(--dw-purple);
}
.dw-pack-premium .dw-pack-price { color: #b07d00; }
.dw-pack-price small { font-size: .68rem; color: var(--dw-muted); font-weight: 600; letter-spacing: 0; }

.dw-pack-list {
    list-style: none; padding: 0; margin: 0 0 1.15rem;
    display: flex; flex-direction: column; gap: .45rem;
    text-align: left;
}
.dw-pack-list li {
    font-size: .84rem; color: var(--dw-muted);
    display: flex; align-items: center; gap: .55rem;
}
.dw-pack-list li i { color: #2ecc71; font-size: 1rem; }
.dw-pack-premium .dw-pack-list li i { color: #e6a800; }

@media (max-width: 575.98px) {
    .dw-pack { padding: 1.25rem 1rem 1.05rem; border-radius: 18px; }
    .dw-pack-icon { width: 52px; height: 52px; font-size: 1.4rem; border-radius: 16px; }
    .dw-pack-price { font-size: 1.6rem; }
    .dw-pack-list li { font-size: .8rem; }
}

/* ------------------------------ Footer ---------------------- */
.dw-foot {
    position: relative;
    background:
        radial-gradient(38rem 16rem at 110% -20%, rgba(123, 47, 247, .25), transparent 60%),
        radial-gradient(30rem 14rem at -10% 120%, rgba(255, 85, 128, .16), transparent 60%),
        var(--dw-dark);
    color: #cfc4e8;
    margin-top: 3rem;
}
.dw-foot::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--dw-gradient);
}
.dw-foot .dw-logo-mark { width: 34px; height: 34px; font-size: 1.05rem; border-radius: 11px; }
.dw-foot-brand { color: #fff; font-weight: 800; font-size: 1.15rem; }
.dw-foot-tagline {
    color: #a99ec7; font-size: .82rem; line-height: 1.6;
    max-width: 320px; margin: .7rem 0 0;
}
.dw-foot h6 {
    color: #fff; font-size: .72rem; font-weight: 800;
    letter-spacing: 1.6px; text-transform: uppercase;
    margin-bottom: .75rem;
}
.dw-foot h6::after {
    content: ""; display: block; width: 22px; height: 2px;
    background: var(--dw-gradient); border-radius: 2px; margin-top: .45rem;
}
.dw-foot a {
    display: block; color: #b3a4d6; font-size: .85rem;
    padding: .22rem 0;
    transition: color .15s ease, transform .15s ease;
}
.dw-foot a:hover { color: #fff; transform: translateX(3px); }
.dw-foot-bottom {
    display: flex; justify-content: space-between; align-items: center; gap: .5rem;
    border-top: 1px solid rgba(255, 255, 255, .09);
    padding: 1rem 0 1.2rem;
    color: #8d81a8; font-size: .75rem;
}
@media (max-width: 767.98px) {
    .dw-foot { margin-top: 2rem; padding-bottom: var(--dw-bottomnav-h); }
    .dw-foot-bottom { flex-direction: column; text-align: center; }
}

/* ------------------------------ Legal pages ------------------ */
.dw-legal-hero {
    background: var(--dw-gradient);
    color: #fff; padding: 2.6rem 0 2.3rem;
    border-radius: 0 0 44px 44px;
    text-align: center;
    position: relative; overflow: hidden;
}
.dw-legal-hero::after {
    content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%;
    background: rgba(255, 255, 255, .1); top: -130px; right: -90px;
}
.dw-legal-hero h1 { font-weight: 800; font-size: clamp(1.6rem, 5vw, 2.3rem); }
.dw-legal { max-width: 800px; padding: 2.4rem 1rem 3rem; }
.dw-legal h5 {
    font-weight: 800; font-size: 1rem; margin: 1.7rem 0 .55rem;
    position: relative; padding-left: 1rem;
}
.dw-legal h5::before {
    content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px;
    border-radius: 4px; background: var(--dw-gradient);
}
.dw-legal p, .dw-legal li { color: var(--dw-muted); font-size: .92rem; line-height: 1.7; }
.dw-legal ul { padding-left: 1.2rem; }
.dw-legal li { margin-bottom: .35rem; }
.dw-legal li::marker { color: var(--dw-purple); }
.dw-legal .alert { border-radius: 14px; }

/* ------------------------------ Ads ----------------------- */
.dw-ad { background: #fff; border: 1px dashed #d9d0ec; border-radius: 14px; padding: .5rem; text-align: center; overflow: hidden; }
.dw-ad-label { display: block; font-size: .6rem; letter-spacing: 2px; text-transform: uppercase; color: #b3a8cc; margin-bottom: .3rem; }
.dw-ad-top { margin-bottom: 1rem; }
.dw-ad-side .dw-ad { min-height: 320px; display: flex; flex-direction: column; justify-content: center; }

/* ------------------------------ Misc ---------------------- */
.dw-empty { text-align: center; padding: 3rem 1rem; color: var(--dw-muted); }
.dw-empty i { font-size: 3rem; color: #d9d0ec; }
.pagination .page-link { border-radius: 10px !important; margin: 0 2px; color: var(--dw-purple); border-color: #e8e2f5; }
.pagination .active .page-link { background: var(--dw-gradient); border-color: transparent; }
a { text-decoration: none; }

/* ============================================================
   RESPONSIVE — phones first
   ============================================================ */
@media (max-width: 575.98px) {
    :root { --dw-nav-h: 56px; --dw-bottomnav-h: 60px; }

    body { font-size: .95rem; }

    /* keep iOS from zooming when focusing inputs */
    .form-control, .form-select { font-size: 16px; }

    .container { padding-left: 14px; padding-right: 14px; }

    .dw-navbar .dw-logo { font-size: 1.1rem; }
    .dw-logo-mark { width: 34px; height: 34px; font-size: 1.05rem; }
    .dw-icon-btn { width: 36px; height: 36px; }
    .dw-avatar-btn img { width: 36px; height: 36px; }
    .dw-navbar .container { gap: .25rem; }

    .dw-card-panel { padding: 1.05rem; border-radius: 16px; }
    .dw-title { font-size: 1.1rem; }

    .dw-grid { grid-template-columns: repeat(2, 1fr); gap: .7rem; }
    .dw-card-body { font-size: .82rem; padding: .5rem .6rem .6rem; }
    .dw-like-btn { width: 30px; height: 30px; }

    /* encounters: thumb-friendly action bar */
    .dw-encounters-shell { padding: .4rem .2rem .6rem; background-image: none; margin-top: .2rem; }
    .dw-encounters-meta { gap: .35rem; margin-bottom: .9rem; }
    .dw-meta-pill { font-size: .7rem; padding: .28rem .65rem; }
    .dw-swipe-stage { width: 100%; }
    .dw-swipe-card {
        min-height: 0;
        aspect-ratio: 3/4.4;
        max-height: calc(100dvh - 350px);
        border-radius: 20px;
    }
    .dw-swipe-actions {
        gap: .55rem;
        padding: .5rem .8rem;
        bottom: calc(var(--dw-bottomnav-h) + 8px);
        margin-top: .9rem;
    }
    .dw-action-btn { width: 50px; height: 50px; font-size: 1.2rem; }
    .dw-action-super { width: 46px; height: 46px; font-size: 1.1rem; }
    .dw-action-info { width: 40px; height: 40px; font-size: 1.05rem; }
    .dw-action-like { width: 62px; height: 62px; font-size: 1.55rem; }
    .dw-action-like::after { inset: -4px; }
    .dw-action-divider { height: 26px; }

    /* profile */
    .dw-hero img.dw-hero-main { max-height: 62vh; }
    .dw-hero-content { padding: .9rem 1rem; }
    .dw-hero-content h3 { font-size: 1.25rem; }

    /* auth */
    .dw-auth-wrap { padding: 1.25rem 1rem; align-items: flex-start; padding-top: 3rem; }
    .dw-hero-landing { padding: 2.2rem 1rem 3rem; border-radius: 0 0 32px 32px; }

    /* chat */
    .dw-chat-header { padding: .6rem .7rem; }
    .dw-chat-messages { padding: .7rem; }
    .dw-bubble { max-width: 85%; }
    .dw-chat-input { padding: .6rem; }
    .dw-chat-input .form-control { border-radius: 999px; }

    .dw-bottom-nav a { padding: .25rem .4rem; }
    .dw-bottom-nav a span { font-size: .58rem; }
}

/* very small phones */
@media (max-width: 360px) {
    .dw-grid { grid-template-columns: repeat(2, 1fr); gap: .55rem; }
    .dw-btn-credits { padding: .25rem .5rem; }
}

/* tablets */
@media (min-width: 576px) and (max-width: 991.98px) {
    .dw-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .dw-swipe-card { max-height: calc(100dvh - 330px); }
}

/* desktop extras */

/* large desktops */
@media (min-width: 1400px) {
    .dw-main .container { max-width: 1180px; }
    .dw-encounters-shell { grid-template-columns: minmax(0, 470px) minmax(300px, 350px); }
}

/* accessibility: honour reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
