/* ===== Global ===== */
* { box-sizing: border-box; }

body {
    font-family: 'Nunito', sans-serif;
    background: #fdf0f4;
    min-height: 100vh;
}

/* ===== Navbar ===== */
.app-navbar {
    background: linear-gradient(135deg, #ff6b9d, #ff4757) !important;
    box-shadow: 0 2px 12px rgba(255,71,87,0.3);
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff4757 50%, #c44569 100%);
    min-height: 420px;
    display: flex;
    align-items: center;
}

.hero-emoji { animation: pulse 2s infinite; }

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* ===== Feature cards ===== */
.feature-card {
    background: white;
    border: 1px solid #ffe0eb;
    transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255,107,157,0.18);
}
.feature-icon { font-size: 2.5rem; }

/* ===== Auth / info cards ===== */
.auth-card {
    background: white;
    border: 1px solid #ffe0eb;
}

.info-box {
    background: #fff5f8;
    border: 1px solid #ffd6e7;
}

/* ===== Buttons ===== */
.btn-primary {
    background: linear-gradient(135deg, #ff6b9d, #ff4757);
    border: none;
    color: white;
}
.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #e55f8e, #e03e4b);
    border: none;
    color: white;
}
.btn-outline-pink {
    border-color: #ff6b9d;
    color: #ff6b9d;
}
.btn-outline-pink:hover, .btn-check:checked + .btn-outline-pink {
    background: #ff6b9d;
    color: white;
    border-color: #ff6b9d;
}
.btn-outline-blue {
    border-color: #4facfe;
    color: #4facfe;
}
.btn-outline-blue:hover, .btn-check:checked + .btn-outline-blue {
    background: #4facfe;
    color: white;
    border-color: #4facfe;
}

/* ===== Partner Dashboard ===== */
.partner-status {
    background: #fff5f8;
    border: 1px solid #ffd6e7;
}
.partner-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b9d, #ff4757);
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.partner-avatar-2 {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}
.partner-avatar-empty {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px dashed #ccc;
    color: #ccc;
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.invite-code-display {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 0.25em;
    color: #198754;
    background: #f0faf5;
    padding: 0.5rem 1.5rem;
    border-radius: 12px;
    border: 2px dashed #198754;
    display: inline-block;
    user-select: all;
}

/* ===== Swipe Page ===== */
.swipe-page {
    min-height: calc(100vh - 60px);
}

.card-stack-container {
    position: relative;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    max-width: 380px;
}

/* ===== Name Cards ===== */
.name-card {
    position: absolute;
    width: 320px;
    height: 400px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 1px solid #ffe0eb;
    user-select: none;
    -webkit-user-select: none;
    will-change: transform;
    overflow: hidden;
}

/* Back cards stack up slightly */
.name-card:not(.name-card-top) {
    transform: translateY(9px) scale(0.96);
}
.name-card:not(.name-card-top):nth-child(1) {
    transform: translateY(18px) scale(0.92);
}

/* Color overlay — fills card during drag */
.card-overlay {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    pointer-events: none;
    background: transparent;
    transition: background 0.06s;
    z-index: 1;
}

.name-card-inner {
    text-align: center;
    pointer-events: none;
    position: relative;
    z-index: 2;
}
.name-card-emoji { font-size: 3.5rem; margin-bottom: 1rem; }
.name-card-fullname {
    font-size: 2rem;
    font-weight: 800;
    color: #2d2d2d;
    line-height: 1.1;
    margin: 0 0 0.4rem;
}

/* ── Popularity badge ── */
.popularity-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 11px;
    border-radius: 20px;
    margin-top: 0.6rem;
    letter-spacing: 0.04em;
    border: 1.5px solid;
}
.pop-hot     { background: #fff0f0; color: #c0392b; border-color: #e74c3c; }
.pop-top     { background: #fff8e7; color: #b7770d; border-color: #f0a500; }
.pop-popular { background: #f3f0ff; color: #5b4fcf; border-color: #7c6fcd; }
.pop-less    { background: #f0fff4; color: #1a7a34; border-color: #28a745; }
.pop-rare    { background: #fdf0ff; color: #8e24aa; border-color: #ab47bc; }

/* ── Smart-sort alert ── */
.alert-pink {
    background: #fff0f6;
    border: 1px solid #ffd6e7;
    color: #c2185b;
}
.name-card-firstname {
    font-size: 1rem;
    margin: 0;
}
.name-card-meaning {
    font-size: 0.82rem;
    color: #8c6e8a;
    font-style: italic;
    margin: 0.35rem 0 0;
    letter-spacing: 0.01em;
}

/* ── Swipe stamp indicators ── */
.like-indicator, .pass-indicator {
    position: absolute;
    top: 32px;
    font-size: 1.25rem;
    font-weight: 900;
    pointer-events: none;
    opacity: 0;
    border: 3px solid;
    border-radius: 8px;
    padding: 4px 14px;
    letter-spacing: 0.05em;
    z-index: 3;
    transition: opacity 0.06s;
}
.like-indicator {
    right: 22px;
    color: #198754;
    border-color: #198754;
    transform: rotate(-12deg);
}
.pass-indicator {
    left: 22px;
    color: #dc3545;
    border-color: #dc3545;
    transform: rotate(12deg);
}

/* ── Action Buttons ── */
.action-buttons { gap: 2rem !important; }

.action-btn {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.15s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.13);
}
.action-btn:hover  { transform: scale(1.12); }
.action-btn:active { transform: scale(0.9);  }

.action-btn-pass {
    background: white;
    color: #dc3545;
    border: 2px solid #f8d7da;
    box-shadow: 0 4px 20px rgba(220,53,69,0.18);
}
.action-btn-like {
    background: linear-gradient(135deg, #ff6b9d, #ff4757);
    color: white;
    box-shadow: 0 4px 20px rgba(255,71,87,0.35);
}

/* ===== Empty state ===== */
.empty-state { max-width: 340px; margin: 0 auto; }

/* ===== Match cards ===== */
.match-card {
    background: white;
    border: 1px solid #ffe0eb;
    transition: transform 0.2s, box-shadow 0.2s;
}
.match-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255,107,157,0.2);
}
.match-emoji { font-size: 2rem; }

/* ===== Match Toast ===== */
.match-toast {
    background: linear-gradient(135deg, #ff6b9d, #ff4757) !important;
    border-radius: 12px;
    min-width: 260px;
}

/* ===== Progress bar ===== */
.progress-bar { transition: width 0.5s ease; }

/* ===== Undo button ===== */
.btn-undo {
    background: none;
    border: 1.5px solid #bbb;
    color: #666;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 5px 18px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
    letter-spacing: 0.03em;
}
.btn-undo:hover {
    background: #f5f5f5;
    border-color: #888;
    color: #333;
}
.btn-undo:active { transform: scale(0.93); }

/* Pop-in animation when undo button appears */
@keyframes undoPop {
    0%   { opacity: 0; transform: scale(0.7) translateY(6px); }
    70%  { transform: scale(1.08) translateY(-2px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
.undo-pop { animation: undoPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

/* ===== Votes History Page ===== */
.vote-row {
    border: 1px solid rgba(0,0,0,0.06);
    transition: transform 0.15s, box-shadow 0.15s;
}
.vote-row:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}
.vote-row-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}
.vote-row-emoji {
    font-size: 1.6rem;
    flex-shrink: 0;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .name-card { width: 290px; height: 370px; }
    .name-card-fullname { font-size: 1.7rem; }
    .card-stack-container { height: 390px; }
}
