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

:root {
    --bg:           #0a0a0f;
    --bg-card:      #12121a;
    --bg-card-h:    #18182a;
    --border:       rgba(255,255,255,.07);
    --border-h:     rgba(255,255,255,.14);
    --accent:       #a855f7;
    --accent-2:     #7c3aed;
    --accent-glow:  rgba(168,85,247,.35);
    --gold:         #f59e0b;
    --green:        #22c55e;
    --text:         #f1f0f5;
    --muted:        #9492a8;
    --danger:       #f43f5e;
    --radius:       16px;
    --radius-sm:    10px;
    --shadow:       0 8px 32px rgba(0,0,0,.55);
    --transition:   .22s cubic-bezier(.4,0,.2,1);
    --font:         'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family:     var(--font);
    background:      var(--bg);
    color:           var(--text);
    min-height:      100dvh;
    -webkit-font-smoothing: antialiased;
    background-image: radial-gradient(ellipse 80% 40% at 50% -20%, rgba(168,85,247,.12) 0%, transparent 70%);
    background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ── Countdown Overlay ── */
#cd-overlay {
    display:         none;
    position:        fixed;
    inset:           0;
    z-index:         9999;
    background:      rgba(0,0,0,.75);
    backdrop-filter: blur(10px);
    align-items:     center;
    justify-content: center;
}
#cd-overlay.active { display: flex; }

#cd-box {
    text-align: center;
    display:    flex;
    flex-direction: column;
    align-items:    center;
    gap:         12px;
}
#cd-ring {
    position: relative;
    width:    90px;
    height:   90px;
}
#cd-ring svg {
    width:    100%;
    height:   100%;
    transform: rotate(-90deg);
}
.cd-track {
    fill:           none;
    stroke:         rgba(255,255,255,.1);
    stroke-width:   5;
}
.cd-progress {
    fill:                 none;
    stroke:               var(--accent);
    stroke-width:         5;
    stroke-linecap:       round;
    stroke-dasharray:     163.36;
    stroke-dashoffset:    0;
    transition:           stroke-dashoffset 1s linear;
    filter:               drop-shadow(0 0 6px var(--accent));
}
#cd-num {
    position:    absolute;
    inset:       0;
    display:     flex;
    align-items: center;
    justify-content: center;
    font-size:   2rem;
    font-weight: 800;
    color:       var(--text);
    line-height: 1;
}
#cd-label {
    font-size:      .82rem;
    color:          var(--muted);
    letter-spacing: .4px;
}

/* ── Page Shell ── */
.page-shell {
    max-width:  960px;
    margin:     0 auto;
    padding:    0 16px 100px;
}

/* ── Site Header ── */
.site-header {
    padding:    20px 0 0;
    position:   sticky;
    top:        0;
    z-index:    100;
    background: linear-gradient(to bottom, var(--bg) 70%, transparent);
    margin-bottom: 4px;
}
.header-inner {
    display:     flex;
    align-items: center;
    justify-content: space-between;
    gap:         12px;
    flex-wrap:   wrap;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.site-logo {
    display:     flex;
    align-items: center;
    gap:         8px;
}
.logo-icon { font-size: 1.4rem; }
.logo-text {
    font-size:   1.2rem;
    font-weight: 800;
    letter-spacing: -.3px;
    background:  linear-gradient(135deg, #e0aaff, var(--accent), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.live-badge {
    display:     inline-flex;
    align-items: center;
    gap:         6px;
    font-size:   .8rem;
    font-weight: 600;
    color:       var(--text);
    background:  rgba(255,255,255,.05);
    border:      1px solid var(--border);
    padding:     5px 12px;
    border-radius: 999px;
}
.pulse-dot {
    width:        8px;
    height:       8px;
    border-radius: 50%;
    background:  var(--green);
    box-shadow:  0 0 0 0 rgba(34,197,94,.6);
    animation:   pulse 1.8s ease infinite;
    flex-shrink: 0;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.6); }
    70%  { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* ── Hero Strip ── */
.hero-strip {
    text-align: center;
    padding:    14px 0 18px;
}
.hero-copy {
    font-size:      .85rem;
    color:          var(--muted);
    letter-spacing: .3px;
}
.accent-text {
    color:       var(--accent);
    font-weight: 600;
}

/* ── Profiles Grid ── */
.profiles-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap:                   18px;
}

/* ── Profile Card ── */
.profile-card {
    background:    var(--bg-card);
    border:        1px solid var(--border);
    border-radius: var(--radius);
    overflow:      hidden;
    transition:    transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    display:       flex;
    flex-direction: column;
}
.profile-card:hover {
    transform:     translateY(-4px);
    border-color:  var(--border-h);
    box-shadow:    0 16px 48px rgba(0,0,0,.6), 0 0 0 1px rgba(168,85,247,.18);
}
.profile-card.status-online  { --status-color: var(--green); }
.profile-card.status-offline { --status-color: var(--muted); }

/* Card inner (clickable area) */
.card-inner {
    display:  block;
    cursor:   pointer;
    flex:     1;
}

/* Photo area */
.card-photo {
    position:      relative;
    aspect-ratio:  3/4;
    overflow:      hidden;
}
.card-photo img {
    transition: transform .4s ease;
}
.profile-card:hover .card-photo img {
    transform: scale(1.04);
}
.card-overlay {
    position:   absolute;
    inset:      0;
    background: linear-gradient(to top, rgba(10,10,15,.92) 0%, rgba(10,10,15,.1) 55%, transparent 100%);
}
.status-pill {
    position:     absolute;
    top:          12px;
    right:        12px;
    font-size:    .72rem;
    font-weight:  600;
    padding:      4px 10px;
    border-radius: 999px;
    background:   rgba(0,0,0,.55);
    backdrop-filter: blur(6px);
    border:       1px solid rgba(255,255,255,.1);
    color:        var(--text);
    letter-spacing: .3px;
}
.status-online .status-pill  { border-color: rgba(34,197,94,.35); }
.status-offline .status-pill { color: var(--muted); }

/* Card info */
.card-info {
    padding:  12px 14px 10px;
}
.card-name-row {
    display:     flex;
    align-items: baseline;
    gap:         8px;
    margin-bottom: 4px;
}
.card-name {
    font-size:   1rem;
    font-weight: 700;
    line-height: 1.2;
    flex:        1;
    white-space: nowrap;
    overflow:    hidden;
    text-overflow: ellipsis;
}
.card-age {
    font-size:   .78rem;
    color:       var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.card-location {
    display:     flex;
    align-items: center;
    gap:         4px;
    font-size:   .78rem;
    color:       var(--muted);
}
.pin-icon {
    width:      13px;
    height:     13px;
    flex-shrink: 0;
    color:      var(--accent);
}

/* Card action buttons */
.card-actions {
    display:   grid;
    grid-template-columns: 1fr;
    gap:       8px;
    padding:   10px 14px 14px;
}
.btn-action {
    display:        flex;
    align-items:    center;
    justify-content: center;
    gap:            6px;
    padding:        9px 10px;
    border-radius:  var(--radius-sm);
    font-size:      .8rem;
    font-weight:    600;
    cursor:         pointer;
    transition:     background var(--transition), transform var(--transition);
    border:         1px solid transparent;
}
.btn-action svg {
    width:  16px;
    height: 16px;
    flex-shrink: 0;
}
.btn-action:active { transform: scale(.96); }

.btn-dm {
    background:   rgba(255,255,255,.06);
    border-color: var(--border);
    color:        #ffffff;
}
.btn-dm:hover {
    background:  rgba(255,255,255,.1);
    border-color: var(--border-h);
}

.btn-cart {
    background:  linear-gradient(135deg, var(--accent), var(--accent-2));
    color:       #fff;
    box-shadow:  0 4px 16px var(--accent-glow);
}
.btn-cart:hover {
    filter:  brightness(1.12);
}

/* ── Floating CTA ── */
.floating-cta {
    position:       fixed;
    bottom:         24px;
    left:           50%;
    transform:      translateX(-50%);
    z-index:        200;
    display:        inline-flex;
    align-items:    center;
    gap:            8px;
    padding:        14px 30px;
    border-radius:  999px;
    font-size:      .92rem;
    font-weight:    700;
    white-space:    nowrap;
    cursor:         pointer;
    background:     #ffffff;
    color:          var(--bg);
    box-shadow:     0 6px 30px var(--accent-glow), 0 2px 8px rgba(0,0,0,.4);
    letter-spacing: .3px;
    transition:     filter var(--transition), transform var(--transition), box-shadow var(--transition);
}
.floating-cta:hover {
    filter:     brightness(.95);
    transform:  translateX(-50%) translateY(-2px);
    box-shadow: 0 10px 36px var(--accent-glow), 0 2px 10px rgba(0,0,0,.5);
}
.floating-cta:active { transform: translateX(-50%) scale(.97); }

/* ── Chat Bubble ── */
.chat-bubble {
    position:       fixed;
    bottom:         84px;
    right:          18px;
    z-index:        300;
    display:        flex;
    align-items:    center;
    gap:            10px;
    background:     rgba(18,18,26,.95);
    backdrop-filter: blur(14px);
    border:         1px solid rgba(168,85,247,.3);
    border-radius:  14px;
    padding:        10px 14px;
    max-width:      min(300px, calc(100vw - 36px));
    box-shadow:     0 8px 32px rgba(0,0,0,.5), 0 0 0 1px rgba(168,85,247,.1);
    animation:      slideUp .35s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(18px) scale(.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-bubble.hidden { display: none; }
.chat-avatar {
    position:      relative;
    width:         40px;
    height:        40px;
    border-radius: 50%;
    overflow:      visible;
    flex-shrink:   0;
}
.chat-avatar img {
    width:         40px;
    height:        40px;
    border-radius: 50%;
    object-fit:    cover;
    border:        2px solid var(--accent);
}
.chat-dot {
    position:      absolute;
    bottom:        1px;
    right:         1px;
    width:         10px;
    height:        10px;
    border-radius: 50%;
    background:    var(--green);
    border:        2px solid var(--bg-card);
}
.chat-body {
    flex:    1;
    min-width: 0;
}
.chat-body strong {
    display:     block;
    font-size:   .82rem;
    font-weight: 700;
    color:       var(--text);
    margin-bottom: 2px;
}
.chat-body span {
    display:         block;
    font-size:       .78rem;
    color:           var(--muted);
    white-space:     nowrap;
    overflow:        hidden;
    text-overflow:   ellipsis;
}
.chat-close {
    background: none;
    border:     none;
    color:      var(--muted);
    font-size:  1.1rem;
    line-height: 1;
    cursor:     pointer;
    padding:    2px 4px;
    flex-shrink: 0;
    transition: color var(--transition);
}
.chat-close:hover { color: var(--text); }

/* ── Site Footer ── */
.site-footer {
    text-align:  center;
    padding:     28px 0 0;
    margin-top:  32px;
    border-top:  1px solid var(--border);
    font-size:   .74rem;
    color:       var(--muted);
    line-height: 1.7;
}
.site-footer a { color: var(--accent); }
.site-footer a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .profiles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .card-name { font-size: .9rem; }
    .btn-action { font-size: .74rem; padding: 8px 8px; }
    .btn-action svg { width: 14px; height: 14px; }
    .floating-cta { font-size: .84rem; padding: 12px 22px; }
    .page-shell { padding-bottom: 90px; }
}
@media (max-width: 360px) {
    .profiles-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}
