/* ═══════════════════════════════════════════════
   SolKids Name Suggestions — Premium UI
   ═══════════════════════════════════════════════ */

.ns-hero {
    background: linear-gradient(135deg, var(--c-primary) 0%, #6c5ce7 50%, #a29bfe 100%);
    color: #fff;
    padding: 48px 0 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.ns-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255,255,255,.12) 0%, transparent 60%),
                radial-gradient(circle at 80% 20%, rgba(255,255,255,.08) 0%, transparent 50%);
    pointer-events: none;
}
.ns-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin: 0 0 12px;
    text-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.ns-subtitle {
    font-size: clamp(.95rem, 2vw, 1.15rem);
    opacity: .92;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Search Box ── */
.ns-search-section { padding: 40px 0 48px; min-height: 50vh; }
.ns-search-box {
    max-width: 760px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    padding: 28px 32px;
    box-shadow: 0 8px 32px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.04);
}
.ns-textarea {
    width: 100%;
    border: 2px solid #e8e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
    resize: none;
    transition: border-color .2s;
    outline: none;
    line-height: 1.5;
}
.ns-textarea:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(108,92,231,.1);
}
.ns-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
}
.ns-gender-filter {
    display: flex;
    gap: 10px;
}
.ns-gender-btn {
    height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    border: 2px solid #e8e8f0;
    background: #fafafe;
    font-size: .95rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    display: flex; align-items: center; gap: 6px;
    white-space: nowrap;
    color: #555;
}
.ns-gender-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.ns-gender-btn.active {
    border-color: var(--c-primary);
    background: linear-gradient(135deg, var(--c-primary), #6c5ce7);
    color: #fff;
    box-shadow: 0 2px 8px rgba(108,92,231,.25);
}
.ns-btn-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 36px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--c-primary), #6c5ce7);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all .3s;
    box-shadow: 0 4px 16px rgba(108,92,231,.3);
}
.ns-btn-search:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(108,92,231,.4);
}
.ns-btn-search:disabled {
    opacity: .5;
    cursor: not-allowed;
}
.ns-btn-search:active:not(:disabled) {
    transform: translateY(0);
}
.ns-btn-icon { font-size: 1.3rem; }

/* Example chips */
.ns-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #f0f0f5;
    align-items: center;
    justify-content: center;
}
.ns-examples-label {
    font-size: .85rem;
    color: #888;
    font-weight: 500;
}
.ns-example-chip {
    padding: 6px 14px;
    border: 1px solid #e8e8f0;
    border-radius: 20px;
    background: #fafafe;
    font-size: .82rem;
    color: #555;
    cursor: pointer;
    transition: all .2s;
    font-family: 'DM Sans', sans-serif;
}
.ns-example-chip:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
    background: rgba(108,92,231,.04);
}

/* ═══════════════════════════════════════════════
   Gift Box Animation
   ═══════════════════════════════════════════════ */
.ns-gift-box {
    text-align: center;
    padding: 40px 0;
}
.ns-gift-container {
    position: relative;
    width: 160px; height: 180px;
    margin: 0 auto 20px;
}
.ns-gift-wrap {
    position: relative;
    width: 140px;
    margin: 0 auto;
}
.ns-gift-bottom {
    width: 140px; height: 100px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border-radius: 10px;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 8px 24px rgba(238,90,36,.3);
}
.ns-gift-bottom::after {
    content: '';
    position: absolute;
    left: 50%; top: 0; bottom: 0;
    width: 18px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #ffd32a, #f9ca24);
    border-radius: 2px;
}
.ns-gift-lid {
    width: 156px; height: 30px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border-radius: 8px 8px 4px 4px;
    position: relative;
    margin: 0 auto 0;
    z-index: 2;
    transition: transform .6s cubic-bezier(.68,-.55,.265,1.55);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.ns-gift-lid::after {
    content: '';
    position: absolute;
    left: 50%; top: 0; bottom: 0;
    width: 18px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #ffd32a, #f9ca24);
}
.ns-gift-bow {
    position: absolute;
    top: -18px; left: 50%;
    transform: translateX(-50%);
    width: 40px; height: 36px;
}
.ns-gift-bow::before, .ns-gift-bow::after {
    content: '';
    position: absolute;
    width: 22px; height: 22px;
    border: 4px solid #ffd32a;
    border-radius: 50% 50% 0;
    top: 0;
}
.ns-gift-bow::before { left: 0; transform: rotate(-45deg); }
.ns-gift-bow::after { right: 0; transform: rotate(45deg); }

.ns-gift-glow {
    position: absolute;
    inset: -30px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,211,42,.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity .5s;
}

/* Opening animation */
.ns-gift-box.opening .ns-gift-lid {
    transform: translateY(-60px) rotate(-25deg);
}
.ns-gift-box.opening .ns-gift-glow {
    opacity: 1;
    animation: giftPulse 1s ease-in-out infinite;
}
@keyframes giftPulse {
    0%, 100% { transform: scale(1); opacity: .5; }
    50% { transform: scale(1.15); opacity: .8; }
}

/* Sparkles */
.ns-gift-sparkles {
    position: absolute;
    inset: -40px;
    pointer-events: none;
}
.ns-sparkle {
    position: absolute;
    width: 6px; height: 6px;
    background: #ffd32a;
    border-radius: 50%;
    opacity: 0;
}
.ns-gift-box.opening .ns-sparkle {
    animation: sparkleFloat 1.5s ease-out forwards;
}
@keyframes sparkleFloat {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(0); }
}

.ns-gift-text {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.1rem;
    color: #6c5ce7;
    font-weight: 500;
    animation: textPulse 1.5s ease-in-out infinite;
}
@keyframes textPulse {
    0%, 100% { opacity: .7; }
    50% { opacity: 1; }
}

/* Confetti */
.ns-confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}
.ns-confetti-piece {
    position: absolute;
    width: 10px; height: 10px;
    top: -20px;
    animation: confettiFall 2.5s ease-in forwards;
}
@keyframes confettiFall {
    0% { opacity: 1; transform: translateY(0) rotate(0deg); }
    100% { opacity: 0; transform: translateY(100vh) rotate(720deg); }
}

/* ═══════════════════════════════════════════════
   Result Cards
   ═══════════════════════════════════════════════ */
.ns-results { max-width: 900px; margin: 0 auto; }
.ns-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.ns-results-header h2 {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    margin: 0;
}
.ns-btn-more {
    padding: 10px 20px;
    border: 2px solid var(--c-primary);
    border-radius: 12px;
    background: transparent;
    color: var(--c-primary);
    font-size: .9rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all .2s;
}
.ns-btn-more:hover {
    background: var(--c-primary);
    color: #fff;
}

.ns-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 24px;
}

.ns-card {
    background: #fff;
    border-radius: 20px;
    padding: 28px 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
    border: 1px solid #f0f0f5;
    transition: all .3s;
    opacity: 0;
    transform: translateY(30px);
    animation: cardReveal .6s ease-out forwards;
}
.ns-card:nth-child(2) { animation-delay: .15s; }
.ns-card:nth-child(3) { animation-delay: .3s; }
@keyframes cardReveal {
    to { opacity: 1; transform: translateY(0); }
}
.ns-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,.1);
}

.ns-card-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f5;
}
.ns-card-name {
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--c-primary);
    margin: 0;
    line-height: 1.2;
}
.ns-card-gender {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    margin-top: 6px;
}
.ns-card-gender.f { background: #ffeef5; color: #e84393; }
.ns-card-gender.m { background: #eef3ff; color: #4a6cf7; }
.ns-card-gender.u { background: #f0f0f5; color: #666; }

.ns-card-origin {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 500;
    background: #f5f3ff;
    color: #6c5ce7;
    margin-top: 4px;
    margin-left: 4px;
}

.ns-card-section {
    margin-bottom: 14px;
}
.ns-card-label {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #999;
    margin-bottom: 4px;
}
.ns-card-value {
    font-size: .92rem;
    color: #333;
    line-height: 1.55;
}
.ns-card-value.emotional {
    font-style: italic;
    color: #6c5ce7;
    background: linear-gradient(135deg, #f5f3ff, #ede8ff);
    padding: 10px 14px;
    border-radius: 12px;
    border-left: 3px solid #6c5ce7;
}

.ns-card-facts {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ns-card-facts li {
    font-size: .85rem;
    color: #555;
    padding: 3px 0 3px 18px;
    position: relative;
}
.ns-card-facts li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: #ffd32a;
    font-size: .7rem;
}

.ns-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.ns-card-tag {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: .7rem;
    background: #f5f5fa;
    color: #777;
}

.ns-card-ai {
    background: linear-gradient(135deg, #fff9e6, #fff3cc);
    border-radius: 12px;
    padding: 12px 14px;
    margin: 16px 0;
    border-left: 3px solid #ffd32a;
}
.ns-card-ai .ns-card-label { color: #b8860b; }
.ns-card-ai .ns-card-value { font-size: .88rem; color: #665500; }

.ns-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f5;
}
.ns-card-action {
    flex: 1;
    padding: 10px 8px;
    border: 1px solid #e8e8f0;
    border-radius: 10px;
    background: #fafafe;
    font-size: .82rem;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
}
.ns-card-action:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
}
.ns-card-action.favorited {
    background: #ffeef5;
    border-color: #e84393;
    color: #e84393;
}

/* ── Favorites ── */
.ns-favorites {
    max-width: 900px;
    margin: 32px auto 0;
    padding-top: 32px;
    border-top: 2px solid #f0f0f5;
}
.ns-favorites h2 {
    font-family: 'Fraunces', serif;
    font-size: 1.3rem;
    margin: 0 0 16px;
}
.ns-fav-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.ns-fav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #f0f0f5;
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
    transition: all .2s;
}
.ns-fav-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.ns-fav-name {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--c-primary);
}
.ns-fav-meta {
    font-size: .78rem;
    color: #999;
}
.ns-fav-remove {
    margin-left: auto;
    width: 30px; height: 30px;
    border-radius: 8px;
    border: none;
    background: #fef0f0;
    color: #e84393;
    cursor: pointer;
    font-size: .9rem;
    display: grid; place-items: center;
    transition: all .2s;
}
.ns-fav-remove:hover { background: #e84393; color: #fff; }

/* ── Share Modal ── */
.ns-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.ns-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.ns-modal-content {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 28px;
    max-width: 440px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.ns-modal-content h3 {
    margin: 0 0 16px;
    font-family: 'Fraunces', serif;
}
.ns-modal-close {
    position: absolute;
    top: 12px; right: 16px;
    border: none;
    background: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
}
.ns-share-card {
    background: linear-gradient(135deg, #f5f3ff, #ede8ff);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 16px;
}
.ns-share-card .share-name {
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--c-primary);
}
.ns-share-card .share-meaning {
    font-size: .95rem;
    color: #555;
    margin-top: 6px;
}
.ns-share-card .share-origin {
    font-size: .8rem;
    color: #999;
    margin-top: 4px;
}
.ns-share-card .share-brand {
    font-size: .75rem;
    color: #aaa;
    margin-top: 12px;
}
.ns-share-actions {
    display: flex;
    gap: 8px;
}
.ns-share-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid #e8e8f0;
    border-radius: 10px;
    background: #fafafe;
    font-size: .82rem;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
}
.ns-share-btn:hover { border-color: var(--c-primary); }
.ns-share-whatsapp:hover { background: #25d366; color: #fff; border-color: #25d366; }
.ns-share-facebook:hover { background: #1877f2; color: #fff; border-color: #1877f2; }

/* ═══════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .ns-hero { padding: 36px 0 32px; }
    .ns-search-box { padding: 18px; border-radius: 16px; }
    .ns-controls { flex-direction: column; align-items: center; gap: 10px; }
    .ns-gender-filter { justify-content: center; }
    .ns-btn-search { width: 100%; justify-content: center; }
    .ns-cards { grid-template-columns: 1fr; }
    .ns-card { padding: 22px 18px; }
    .ns-card-actions { flex-direction: column; }
    .ns-results-header { flex-direction: column; align-items: flex-start; }
    .ns-share-actions { flex-direction: column; }
    .ns-modal-content { padding: 20px; }
}

@media (max-width: 480px) {
    .ns-title { font-size: 1.5rem; }
    .ns-subtitle { font-size: .88rem; }
    .ns-card-name { font-size: 1.6rem; }
    .ns-examples { gap: 6px; }
    .ns-example-chip { font-size: .75rem; padding: 5px 10px; }
    .ns-fav-list { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════
   Top Liked Names Section
   ═══════════════════════════════════════════════ */
.ns-top-liked {
    padding: 56px 0 64px;
    background: var(--c-bg-soft, #f8f9fa);
}
.ns-top-liked .section-head {
    text-align: center;
    margin-bottom: 32px;
}
.ns-top-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}
.ns-top-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--c-bg, #fff);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
}
.ns-top-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
.ns-top-rank {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #a78bfa);
    color: #fff;
    font-weight: 800;
    font-size: .85rem;
}
.ns-top-card:nth-child(1) .ns-top-rank { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.ns-top-card:nth-child(2) .ns-top-rank { background: linear-gradient(135deg, #94a3b8, #cbd5e1); }
.ns-top-card:nth-child(3) .ns-top-rank { background: linear-gradient(135deg, #d97706, #f59e0b); }
.ns-top-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex-shrink: 0;
}
.ns-top-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--c-text, #1a1a2e);
    line-height: 1.2;
}
.ns-top-meta {
    font-size: .78rem;
    color: var(--c-text-muted, #888);
    margin-top: 2px;
}
.ns-top-meaning {
    flex: 1;
    font-size: .82rem;
    color: var(--c-text-muted, #666);
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.ns-top-likes {
    flex-shrink: 0;
    font-size: .82rem;
    font-weight: 600;
    color: #e11d48;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .ns-top-grid { grid-template-columns: 1fr; }
    .ns-top-meaning { display: none; }
}
@media (max-width: 480px) {
    .ns-top-card { padding: 10px 12px; gap: 10px; }
    .ns-top-rank { width: 28px; height: 28px; font-size: .75rem; }
}
