/* ===================================
   POPULAR NAMES - ROSE/CORAL THEME
   Warm rose gradient with varied typography
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;600;700&family=Montserrat:wght@400;500;600;700&family=Raleway:wght@400;500;600;700&family=Merriweather:wght@400;700&family=Nunito:wght@400;600;700&display=swap');

:root {
    /* Rose/Coral gradient */
    --gradient-start: #F8F2FF;
    /* Soft lavender */
    --gradient-mid: #EEF4FF;
    /* Mist blue */
    --gradient-end: #FFFFFF;
    /* Clean white */

    /* Text colors */
    --text-primary: #1F1B2E;
    /* Deep violet */
    --text-secondary: #5C566E;
    /* Muted violet */
    --text-light: #8D86A6;
    /* Soft lavender */

    /* Accent - User specified */
    --accent: #6C2BD9;
    /* Brand violet */
    --accent-light: #C184F3;
    --accent-lighter: #E9D9FF;
    --accent-secondary: #E2B558;

    /* Card colors */
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(108, 43, 217, 0.15);

    /* Shadows */
    --shadow-soft: 0 2px 14px rgba(108, 43, 217, 0.08);
    --shadow-hover: 0 6px 22px rgba(108, 43, 217, 0.12);
}

/* Main Background Gradient */
#popular-names {
    background: linear-gradient(135deg,
            var(--gradient-start) 0%,
            var(--gradient-mid) 50%,
            var(--gradient-end) 100%);
    min-height: 100vh;
    padding: 85px 20px 35px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 0;
}

.page-title {
    font-family: 'Crimson Text', serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
    letter-spacing: 0.5px;
}

.page-subtitle {
    font-family: 'Raleway', sans-serif;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.update-text {
    font-family: 'Nunito', sans-serif;
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
    font-weight: 400;
    margin-bottom: 0;
}

/* Filters Section */
.filters-section {
    margin-bottom: 0;
    margin-top: 12px;
}

.filters-container {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 22px;
    padding: 28px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(108, 43, 217, 0.2);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.filters-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(108, 43, 217, 0.08), transparent 58%);
    pointer-events: none;
}

.filters-container>* {
    position: relative;
    z-index: 1;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.search-group {
    min-width: 240px;
}

.search-input {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 66px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 2px solid rgba(108, 43, 217, 0.2);
    background: #fff;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.search-input i {
    color: var(--accent);
    font-size: 1.05rem;
}

.search-input input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 1.08rem;
    font-weight: 600;
    font-family: 'Nunito', sans-serif;
    color: var(--text-secondary);
    background: transparent;
}

.search-input:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(108, 43, 217, 0.12);
}

.filter-label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Filter Pills (Gender) */
.filter-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-pill {
    min-height: 44px;
    padding: 10px 16px;
    border: 2px solid var(--accent-lighter);
    background: white;
    color: var(--text-secondary);
    border-radius: 50px;
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-pill:hover {
    background: var(--accent-lighter);
    border-color: var(--accent-light);
}

.filter-pill.active {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
    border-color: var(--accent);
}

.filter-pill i {
    margin-right: 5px;
}

/* Filter Selects (Culture, Region) */
.filter-select {
    width: 100%;
    min-height: 58px;
    padding: 14px 16px;
    border: 2px solid var(--accent-lighter);
    border-radius: 14px;
    background: white;
    color: var(--text-secondary);
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:hover {
    border-color: var(--accent-light);
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(183, 104, 104, 0.1);
}

/* Results Count */
.results-count {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.02rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 8px;
    margin-top: 14px;
    background: rgba(108, 43, 217, 0.08);
    border: 1px solid rgba(108, 43, 217, 0.16);
    border-radius: 999px;
    padding: 10px 14px;
}

.results-count span {
    color: var(--accent);
    font-weight: 700;
}

/* Names Grid */
.names-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Name Card */
.name-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 18px;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    animation: fadeInUp 0.5s ease backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.name-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-light);
}

/* Trend Badge */
.trend-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 9px;
    border-radius: 18px;
    font-size: 0.68rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    display: flex;
    align-items: center;
    gap: 3px;
    letter-spacing: 0.3px;
}

.trend-badge.trending {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
}

.trend-badge.popular {
    background: linear-gradient(135deg, #FFD93D 0%, #FFA500 100%);
    color: white;
}

.trend-badge.rising {
    background: linear-gradient(135deg, #6BCF7F 0%, #4CAF50 100%);
    color: white;
}

/* Name Display */
.name-display {
    font-family: 'Playfair Display', serif;
    /* More premium font */
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 5px;
    margin-top: 15px;
    letter-spacing: -0.5px;
    line-height: 1.1;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Gender Badge */
.gender-badge {
    display: inline-block;
    padding: 4px 11px;
    background: var(--accent-lighter);
    color: var(--accent);
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: 'Raleway', sans-serif;
    margin-bottom: 9px;
    letter-spacing: 0.5px;
}

.gender-badge i {
    margin-right: 4px;
}

/* Meaning */
.name-meaning {
    font-family: 'Merriweather', serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 12px;
    margin-bottom: 5px;
    font-style: italic;
    opacity: 0.85;
}

/* Origin Badge */
.origin-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: white;
    border: 1px solid var(--accent-lighter);
    color: var(--accent);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.style-chip-row {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.style-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
}

.style-chip.style-modern {
    background: #eef4ff;
    color: #2f5fd2;
    border-color: #d2defc;
}

.style-chip.style-short-cool {
    background: #f2ecff;
    color: #6a32d5;
    border-color: #dbc8ff;
}

.style-chip.style-nature {
    background: #ebfaef;
    color: #187a3a;
    border-color: #c8edd3;
}

.style-chip.style-spiritual {
    background: #fff6e8;
    color: #9a5b08;
    border-color: #f7debc;
}

.load-more-wrap {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 24px;
    border: 0;
    border-radius: 999px;
    background: var(--accent-gradient);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(108, 43, 217, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(108, 43, 217, 0.3);
}

.load-more-btn:focus-visible {
    outline: 3px solid rgba(108, 43, 217, 0.24);
    outline-offset: 3px;
}

.seo-content-section {
    max-width: 1400px;
    margin: 38px auto 0;
}

.seo-content-section .container {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
}

.seo-content-section h2 {
    margin: 0 0 10px;
    color: var(--text-primary);
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
}

.seo-content-section h3 {
    margin: 16px 0 6px;
    color: var(--text-primary);
    font-size: 1rem;
}

.seo-content-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.seo-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    margin: 18px 0 4px;
}

.seo-link-grid a {
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

/* Like Button */
.like-btn-card {
    position: absolute;
    top: 15px;
    left: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #ddd;
    transition: all 0.3s ease;
}

.like-btn-card:hover {
    transform: scale(1.2);
}

.like-btn-card.liked {
    color: var(--accent);
    animation: heartBeat 0.5s ease;
}

[data-theme='dark'] #popular-names,
body[data-theme='dark'] #popular-names {
    background: linear-gradient(135deg, #0f1117 0%, #151827 52%, #10141f 100%);
    color: #d8e0ec;
}

[data-theme='dark'] #popular-names .page-title,
body[data-theme='dark'] #popular-names .page-title {
    color: #f4f7fb;
    -webkit-text-fill-color: #f4f7fb;
    text-shadow: none;
}

[data-theme='dark'] #popular-names .page-subtitle,
[data-theme='dark'] #popular-names .update-text,
[data-theme='dark'] #popular-names .results-count,
body[data-theme='dark'] #popular-names .page-subtitle,
body[data-theme='dark'] #popular-names .update-text,
body[data-theme='dark'] #popular-names .results-count {
    color: #c7d0dd;
}

[data-theme='dark'] #popular-names .filters-container,
[data-theme='dark'] #popular-names .name-card,
body[data-theme='dark'] #popular-names .filters-container,
body[data-theme='dark'] #popular-names .name-card {
    background: linear-gradient(165deg, rgba(24, 31, 45, 0.98), rgba(16, 21, 33, 0.98));
    border-color: rgba(139, 92, 246, 0.36);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
}

[data-theme='dark'] #popular-names .filter-label,
[data-theme='dark'] #popular-names .name-display,
body[data-theme='dark'] #popular-names .filter-label,
body[data-theme='dark'] #popular-names .name-display {
    color: #f4f7fb;
    text-shadow: none;
}

[data-theme='dark'] #popular-names .name-meaning,
body[data-theme='dark'] #popular-names .name-meaning {
    color: #d8e0ec;
    opacity: 1;
}

[data-theme='dark'] #popular-names .search-input,
[data-theme='dark'] #popular-names .filter-select,
[data-theme='dark'] #popular-names .filter-pill,
[data-theme='dark'] #popular-names .origin-badge,
body[data-theme='dark'] #popular-names .search-input,
body[data-theme='dark'] #popular-names .filter-select,
body[data-theme='dark'] #popular-names .filter-pill,
body[data-theme='dark'] #popular-names .origin-badge {
    background: #111827;
    border-color: rgba(196, 181, 253, 0.38);
    color: #d8e0ec;
}

[data-theme='dark'] #popular-names .search-input input,
body[data-theme='dark'] #popular-names .search-input input {
    color: #f4f7fb;
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(1.1);
    }

    75% {
        transform: scale(1.25);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .page-title {
        font-size: 2.2rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .filters-container {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 16px;
    }

    .filter-group {
        min-width: 100%;
    }

    .names-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .name-display {
        font-size: 1.55rem;
    }
}

/* Keep footer tone aligned with rest of site pages */
body.more-unified-ui footer {
    background: var(--text-dark);
    border-top: 5px solid transparent;
    border-image: var(--accent-gradient) 1;
}

@media (max-width: 480px) {
    #popular-names {
        padding: 78px 14px 28px;
    }

    .page-title {
        font-size: 1.85rem;
    }

    .filters-container {
        padding: 14px;
    }

    .name-card {
        padding: 16px;
    }

    .search-group,
    .filter-group {
        min-width: 100%;
    }

    .filter-pills {
        flex-wrap: wrap;
    }

    .filter-pill {
        flex: 1 1 calc(50% - 8px);
        text-align: center;
        padding: 9px 10px;
    }
}

@media (max-width: 380px) {
    .filter-pill {
        flex: 1 1 100%;
    }
}

body.more-unified-ui[data-theme='dark'] #popular-names,
[data-theme='dark'] body.more-unified-ui #popular-names {
    background:
        radial-gradient(1200px 520px at 14% 0%, rgba(139, 92, 246, 0.2), transparent 62%),
        radial-gradient(1100px 520px at 82% 0%, rgba(45, 212, 191, 0.12), transparent 60%),
        linear-gradient(135deg, #0f1117 0%, #151827 52%, #10141f 100%) !important;
    color: #d8e0ec;
}

body.more-unified-ui[data-theme='dark'] #popular-names .hero-section,
[data-theme='dark'] body.more-unified-ui #popular-names .hero-section {
    background:
        radial-gradient(circle at 20% 12%, rgba(196, 181, 253, 0.18), transparent 44%),
        linear-gradient(135deg, rgba(31, 41, 55, 0.98), rgba(76, 29, 149, 0.94)) !important;
    border-color: rgba(196, 181, 253, 0.34) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34) !important;
}

body.more-unified-ui[data-theme='dark'] #popular-names .page-title,
[data-theme='dark'] body.more-unified-ui #popular-names .page-title {
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc !important;
    text-shadow: none !important;
}

body.more-unified-ui[data-theme='dark'] #popular-names .page-subtitle,
body.more-unified-ui[data-theme='dark'] #popular-names .update-text,
[data-theme='dark'] body.more-unified-ui #popular-names .page-subtitle,
[data-theme='dark'] body.more-unified-ui #popular-names .update-text {
    color: #dbe4f0 !important;
}

body.more-unified-ui[data-theme='dark'] #popular-names .filters-container,
body.more-unified-ui[data-theme='dark'] #popular-names .name-card,
[data-theme='dark'] body.more-unified-ui #popular-names .filters-container,
[data-theme='dark'] body.more-unified-ui #popular-names .name-card {
    background: linear-gradient(165deg, rgba(24, 31, 45, 0.98), rgba(16, 21, 33, 0.98)) !important;
    border-color: rgba(139, 92, 246, 0.36) !important;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34) !important;
    color: #d8e0ec;
}

body.more-unified-ui[data-theme='dark'] #popular-names .filter-label,
body.more-unified-ui[data-theme='dark'] #popular-names .name-display,
[data-theme='dark'] body.more-unified-ui #popular-names .filter-label,
[data-theme='dark'] body.more-unified-ui #popular-names .name-display {
    color: #f4f7fb !important;
    text-shadow: none !important;
}

body.more-unified-ui[data-theme='dark'] #popular-names .name-meaning,
body.more-unified-ui[data-theme='dark'] #popular-names .results-count,
[data-theme='dark'] body.more-unified-ui #popular-names .name-meaning,
[data-theme='dark'] body.more-unified-ui #popular-names .results-count {
    color: #c7d0dd !important;
    opacity: 1 !important;
}

body.more-unified-ui[data-theme='dark'] #popular-names .results-count,
[data-theme='dark'] body.more-unified-ui #popular-names .results-count {
    background: rgba(248, 250, 252, 0.08) !important;
    border-color: rgba(196, 181, 253, 0.24) !important;
}

body.more-unified-ui[data-theme='dark'] #popular-names .search-input,
body.more-unified-ui[data-theme='dark'] #popular-names .filter-select,
body.more-unified-ui[data-theme='dark'] #popular-names .filter-pill,
body.more-unified-ui[data-theme='dark'] #popular-names .origin-badge,
[data-theme='dark'] body.more-unified-ui #popular-names .search-input,
[data-theme='dark'] body.more-unified-ui #popular-names .filter-select,
[data-theme='dark'] body.more-unified-ui #popular-names .filter-pill,
[data-theme='dark'] body.more-unified-ui #popular-names .origin-badge {
    background: #111827 !important;
    border-color: rgba(196, 181, 253, 0.38) !important;
    color: #d8e0ec !important;
    -webkit-text-fill-color: #d8e0ec !important;
}

body.more-unified-ui[data-theme='dark'] #popular-names .search-input input,
body.more-unified-ui[data-theme='dark'] #popular-names .search-input input::placeholder,
[data-theme='dark'] body.more-unified-ui #popular-names .search-input input,
[data-theme='dark'] body.more-unified-ui #popular-names .search-input input::placeholder {
    color: #f4f7fb !important;
    -webkit-text-fill-color: #f4f7fb !important;
}

body.more-unified-ui[data-theme='dark'] #popular-names .gender-badge,
body.more-unified-ui[data-theme='dark'] #popular-names .style-chip,
[data-theme='dark'] body.more-unified-ui #popular-names .gender-badge,
[data-theme='dark'] body.more-unified-ui #popular-names .style-chip {
    border-color: rgba(196, 181, 253, 0.28) !important;
}
