/* ============================================
   VitaMetrics — Baby Names App
   "Blushcore" Design System
   ============================================ */

:root {
    --bn-olive:       #8FAF8C;  /* Pale Olive Green */
    --bn-salmon:      #E8927C;  /* Soft Salmon */
    --bn-periwinkle:  #8B9FD4;  /* Periwinkle Blue */
    --bn-lilac:       #C4A8D4;  /* Warm Lilac */
    --bn-cream:       #FDF6F0;  /* Ivory Cream */
    --bn-text:        #3D3535;  /* Warm Charcoal */
    --bn-muted:       #9A8F8F;  /* Warm Gray */
    --bn-card-bg:     #FFFFFF;
    --bn-shadow:      rgba(143, 112, 112, 0.12);
    --bn-border:      rgba(143, 112, 112, 0.15);
    --bn-like-color:  #7DBF8C;  /* Green for Like */
    --bn-pass-color:  #E07070;  /* Red for Pass */
}

/* ── Page Layout ── */
#baby-names-app {
    font-family: 'Outfit', sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem 4rem;
    color: var(--bn-text);
}

.bn-hero {
    text-align: center;
    padding: 2.5rem 1rem 1.5rem;
}

.bn-hero h2 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--bn-salmon), var(--bn-periwinkle));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.bn-hero p {
    color: var(--bn-muted);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

/* ── Tab Bar ── */
.bn-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.bn-tab {
    padding: 0.5rem 1.4rem;
    border-radius: 50px;
    border: 1.5px solid var(--bn-border);
    background: transparent;
    color: var(--bn-muted);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.bn-tab:hover { border-color: var(--bn-periwinkle); color: var(--bn-periwinkle); }
.bn-tab.active { background: var(--bn-periwinkle); border-color: var(--bn-periwinkle); color: white; }

/* ── Filter Bar ── */
.bn-filters {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.bn-filter-chip {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    border: 1.5px solid var(--bn-border);
    background: transparent;
    color: var(--bn-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.bn-filter-chip:hover { border-color: var(--bn-salmon); color: var(--bn-salmon); }
.bn-filter-chip.active { background: var(--bn-salmon); border-color: var(--bn-salmon); color: white; }

/* ── Vibe Filter Chips ── */
.bn-vibes-label {
    width: 100%;
    text-align: center;
    font-size: 0.75rem;
    color: var(--bn-muted);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Swipe Area ── */
.bn-swipe-area {
    position: relative;
    height: 460px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    perspective: 1000px;
}

/* ── Name Card ── */
.bn-card {
    position: absolute;
    width: 340px;
    height: 420px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, #ffffff 0%, #f7f9fc 50%, #fffcfc 100%);
    border-radius: 30px;
    padding: 2rem;
    box-shadow: 
        0 25px 50px rgba(139, 159, 212, 0.15), 
        inset 0 4px 15px rgba(255, 255, 255, 1),
        inset 0 -6px 20px rgba(232, 146, 124, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.9);
    cursor: grab;
    user-select: none;
    touch-action: none;
    transition: box-shadow 0.2s ease, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center bottom;
    z-index: 3;
    overflow: hidden;
}

/* Subtle gradient header line */
.bn-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 6px;
    background: linear-gradient(to right, var(--bn-salmon), var(--bn-periwinkle));
    opacity: 0.85;
}

.bn-card:active { cursor: grabbing; box-shadow: 0 10px 20px rgba(143, 112, 112, 0.1); }

/* Stacked card visual cue — behind active card, fully opaque */
.bn-card:nth-child(2) {
    transform: scale(0.96) translateY(10px);
    opacity: 1;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(135deg, #fdfdfe 0%, #f3f5fa 100%);
    box-shadow: 0 10px 30px rgba(139, 159, 212, 0.08);
}
.bn-card:nth-child(3) {
    transform: scale(0.92) translateY(20px);
    opacity: 1;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(135deg, #fafbfe 0%, #edf0f7 100%);
    box-shadow: 0 5px 20px rgba(139, 159, 212, 0.05);
}

/* Card content */
.bn-card-name {
    font-size: 3rem;
    font-weight: 900;
    color: var(--bn-text);
    text-align: center;
    margin-bottom: 0.25rem;
    letter-spacing: -1.5px;
    line-height: 1;
}

.bn-card-pronunciation {
    text-align: center;
    color: var(--bn-muted);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    font-style: italic;
    background: rgba(0,0,0,0.02);
    display: inline-block;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.bn-card-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(139, 159, 212, 0.3), transparent);
    margin: 1.5rem 0;
    flex-shrink: 0;
}

.bn-card-origin {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--bn-muted);
    margin-bottom: 0.5rem;
}

.bn-card-origin span { font-weight: 700; color: var(--bn-text); }

.bn-card-meaning {
    font-size: 0.95rem;
    color: var(--bn-text);
    margin-bottom: 0;
    line-height: 1.6;
    background: rgba(255,255,255,0.7);
    padding: 1.2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 1);
    text-align: center;
    box-shadow: 0 4px 15px rgba(139, 159, 212, 0.05);
    flex-shrink: 0;
}

.bn-card-vibes {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.bn-vibe-tag {
    padding: 0.2rem 0.7rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vibe-classic    { background: rgba(139,159,212,0.15); color: var(--bn-periwinkle); }
.vibe-modern     { background: rgba(196,168,212,0.15); color: var(--bn-lilac); }
.vibe-nature     { background: rgba(143,175,140,0.15); color: var(--bn-olive); }
.vibe-strength   { background: rgba(232,146,124,0.2);  color: var(--bn-salmon); }
.vibe-artistic   { background: rgba(196,168,212,0.2);  color: #a07bbf; }
.vibe-whimsical  { background: rgba(232,146,124,0.12); color: #d4856a; }
.vibe-elegant    { background: rgba(139,159,212,0.2);  color: #6a82c4; }
.vibe-bold       { background: rgba(232,100,100,0.15); color: #c06060; }

/* ── Swipe Stamp Overlays ── */
.bn-stamp {
    position: absolute;
    top: 1.5rem;
    font-size: 2rem;
    font-weight: 900;
    border: 3px solid;
    border-radius: 8px;
    padding: 0.2rem 0.7rem;
    opacity: 0;
    transition: opacity 0.1s ease;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1.1rem;
}

.bn-stamp-like {
    right: 1.5rem;
    color: var(--bn-like-color);
    border-color: var(--bn-like-color);
    transform: rotate(15deg);
}

.bn-stamp-pass {
    left: 1.5rem;
    color: var(--bn-pass-color);
    border-color: var(--bn-pass-color);
    transform: rotate(-15deg);
}

/* ── Action Buttons ── */
.bn-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.bn-btn-pass, .bn-btn-like, .bn-btn-info, .bn-btn-dice {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.bn-btn-pass {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--bn-pass-color);
    color: var(--bn-pass-color);
    font-size: 1.5rem;
    box-shadow: 0 4px 16px rgba(224,112,112,0.2);
}

.bn-btn-like {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bn-salmon), var(--bn-lilac));
    color: white;
    font-size: 1.7rem;
    box-shadow: 0 6px 20px rgba(232,146,124,0.4);
}

.bn-btn-info {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--bn-olive);
    color: var(--bn-olive);
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(143,175,140,0.2);
}

.bn-btn-dice {
    width: 52px; height: 52px;
    background: transparent;
    border: none;
    font-size: 3.2rem;
    box-shadow: none;
    padding: 0;
    margin-left: 0.2rem;
}

.bn-btn-pass:hover  { transform: scale(1.1); }
.bn-btn-like:hover  { transform: scale(1.1); }
.bn-btn-info:hover  { transform: scale(1.1); }
.bn-btn-dice:hover  { transform: scale(1.1); }

/* ── Empty State ── */
.bn-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--bn-muted);
    display: none;
}

.bn-empty .bn-empty-emoji { font-size: 3rem; margin-bottom: 1rem; }
.bn-empty h3 { color: var(--bn-text); margin-bottom: 0.5rem; }

/* ── Liked Names Section ── */
.bn-liked-section { margin-top: 1rem; }

.bn-liked-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bn-text);
    margin-bottom: 1rem;
    text-align: center;
}

.bn-liked-count {
    display: inline-block;
    background: var(--bn-salmon);
    color: white;
    border-radius: 50px;
    padding: 0.1rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.4rem;
    vertical-align: middle;
}

.bn-liked-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.bn-liked-pill {
    background: white;
    border: 1.5px solid var(--bn-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s ease;
}

.bn-liked-pill:hover { border-color: var(--bn-salmon); }

.bn-liked-pill .bn-pill-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--bn-text);
}

.bn-liked-pill .bn-pill-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--bn-muted);
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease;
}

.bn-liked-pill .bn-pill-remove:hover { color: var(--bn-pass-color); }

.bn-liked-empty {
    text-align: center;
    padding: 2rem;
    color: var(--bn-muted);
    font-size: 0.9rem;
}

/* ── Name Detail Modal (Bento Grid) ── */
.bn-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(61, 53, 53, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.bn-modal-overlay.open { display: flex; }

.bn-modal {
    background: var(--bn-cream);
    border-radius: 24px;
    padding: 2rem;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(61,53,53,0.2);
    position: relative;
    animation: bn-modal-in 0.25s ease;
}

@keyframes bn-modal-in {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.bn-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--bn-muted);
    line-height: 1;
}

.bn-modal-name {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--bn-salmon), var(--bn-periwinkle));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}

.bn-modal-pronunciation {
    color: var(--bn-muted);
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 1.25rem;
}

/* Bento Grid */
.bn-bento {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.bn-bento-block {
    background: white;
    border-radius: 14px;
    padding: 1rem;
    border: 1px solid var(--bn-border);
}

.bn-bento-block.full-width { grid-column: 1 / -1; }

.bn-bento-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bn-muted);
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.bn-bento-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--bn-text);
    line-height: 1.4;
}

.bn-bento-vibe-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.bn-modal-actions {
    display: flex;
    gap: 0.75rem;
}

.bn-modal-btn {
    flex: 1;
    padding: 0.8rem;
    border-radius: 12px;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease;
}

.bn-modal-btn:hover { opacity: 0.88; transform: scale(0.98); }

.bn-modal-btn-like {
    background: linear-gradient(135deg, var(--bn-salmon), var(--bn-lilac));
    color: white;
}

.bn-modal-btn-pass {
    background: white;
    border: 1.5px solid var(--bn-border);
    color: var(--bn-muted);
}

/* ── Progress Bar ── */
.bn-progress-bar {
    height: 4px;
    background: var(--bn-border);
    border-radius: 4px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.bn-progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--bn-salmon), var(--bn-periwinkle));
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .bn-card { width: 260px; padding: 1.5rem; }
    .bn-card-name { font-size: 2.2rem; }
    .bn-swipe-area { height: 380px; }
    .bn-bento { grid-template-columns: 1fr; }
}


