/* Muslim Names Website - Complete Styles with Desktop Sidebar */

:root {
    --emerald: #047857;
    --emerald-dark: #065f46;
    --emerald-light: #d1fae5;
    --gold: #d4af37;
    --gold-dark: #b8941f;
    --cream: #faf8f5;
    --text-dark: #1a1a1a;
    --text-light: #6b7280;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, var(--cream) 0%, #fff 100%);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 80px;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(4, 120, 87, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(212, 175, 55, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Utility Classes */
.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

@media (min-width: 769px) {
    .mobile-only {
        display: none;
    }

    .desktop-only {
        display: block;
    }

    body {
        padding-bottom: 0;
    }
}

/* Header */
header {
    background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-dark) 100%);
    color: white;
    padding: 40px 0 60px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

@keyframes float {

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

    50% {
        transform: translate(-20px, 20px) scale(1.1);
    }
}

header .container {
    position: relative;
    z-index: 1;
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -1px;
    animation: slideDown 0.6s ease-out;
}

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

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

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 400;
    animation: slideDown 0.8s ease-out;
}

.stats {
    display: flex;
    gap: 30px;
    margin-top: 25px;
    animation: slideDown 1s ease-out;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.stat-icon {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Desktop Navigation - Hidden on mobile, visible on desktop */
.desktop-nav {
    display: none;
    /* Hidden by default (mobile) */
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

@media (min-width: 769px) {
    .desktop-nav {
        display: flex;
        /* Show on desktop */
    }
}

.desktop-nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.desktop-nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s;
    padding: 8px 16px;
    border-radius: 8px;
}

.desktop-nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

.desktop-nav-link.active {
    background: rgba(255, 255, 255, 0.25);
    font-weight: 600;
}

.desktop-app-btn {
    background: white;
    color: var(--emerald-dark);
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.desktop-app-btn:hover {
    background: var(--gold);
    color: white;
    transform: translateY(-2px);
}

/* Slim App Banner */
.app-banner-slim {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 50;
    animation: slideDown 0.5s ease-out;
}

.app-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 12px;
}

.app-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.app-banner-icon {
    font-size: 24px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

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

    50% {
        transform: scale(1.1);
    }
}

.app-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-banner-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.app-banner-subtitle {
    font-size: 0.8rem;
    color: var(--text-light);
}

.app-banner-btn {
    background: var(--emerald);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.app-banner-btn:hover {
    background: var(--emerald-dark);
    transform: translateY(-1px);
}

.app-banner-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-banner-close:hover {
    background: var(--cream);
    color: var(--text-dark);
}

.app-banner-slim.hidden {
    display: none;
}

/* Search Section (Mobile) */
.search-section {
    background: white;
    margin: -30px 20px 30px;
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 10;
    animation: scaleIn 0.5s ease-out 0.3s both;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.search-box {
    position: relative;
    margin-bottom: 25px;
}

.search-input {
    width: 100%;
    padding: 18px 55px 18px 55px;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 15px;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
    background: var(--cream);
}

.search-input:focus {
    outline: none;
    border-color: var(--emerald);
    background: white;
    box-shadow: 0 0 0 4px rgba(4, 120, 87, 0.1);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 20px;
}

.clear-search {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 20px;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s;
}

.clear-search:hover {
    background: var(--emerald-light);
    color: var(--emerald);
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 10px 24px;
    background: var(--cream);
    border: 2px solid transparent;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.filter-tab:hover {
    background: var(--emerald-light);
    border-color: var(--emerald-light);
}

.filter-tab.active {
    background: var(--emerald);
    color: white;
    border-color: var(--emerald);
}

/* Alphabet Filter */
.alphabet-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.letter-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    color: var(--text-dark);
}

.letter-btn:hover {
    border-color: var(--emerald);
    background: var(--emerald-light);
    transform: translateY(-2px);
}

.letter-btn.active {
    background: var(--emerald);
    border-color: var(--emerald);
    color: white;
}

.letter-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.letter-btn.disabled:hover {
    transform: none;
    background: white;
    border-color: #e5e7eb;
}

/* Clear Letter Button */
.clear-letter-btn {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: var(--text-light);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-letter-btn:hover {
    background: var(--text-dark);
}

/* Desktop Sidebar */
.desktop-sidebar {
    position: sticky;
    top: 20px;
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow-md);
    height: fit-content;
}

.desktop-sidebar h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--emerald-dark);
    margin-bottom: 20px;
}

.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.desktop-search-input {
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
    background: var(--cream);
}

.desktop-search-input:focus {
    outline: none;
    border-color: var(--emerald);
    background: white;
    box-shadow: 0 0 0 4px rgba(4, 120, 87, 0.1);
}

.sidebar-filter-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-filter-tab {
    padding: 10px 16px;
    background: var(--cream);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    color: var(--text-dark);
    text-align: left;
}

.sidebar-filter-tab:hover {
    background: var(--emerald-light);
    border-color: var(--emerald-light);
}

.sidebar-filter-tab.active {
    background: var(--emerald);
    color: white;
    border-color: var(--emerald);
}

.sidebar-alphabet {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.sidebar-letter-btn {
    width: 100%;
    height: 40px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    color: var(--text-dark);
}

.sidebar-letter-btn:hover {
    border-color: var(--emerald);
    background: var(--emerald-light);
    transform: translateY(-2px);
}

.sidebar-letter-btn.active {
    background: var(--emerald);
    border-color: var(--emerald);
    color: white;
}

.sidebar-letter-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.sidebar-letter-btn.disabled:hover {
    transform: none;
    background: white;
    border-color: #e5e7eb;
}

.sidebar-random-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sidebar-random-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Names Container */
.names-container {
    padding: 40px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--emerald-dark);
}

.results-count {
    color: var(--text-light);
    font-size: 0.95rem;
}

.names-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Name Cards */
.name-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    animation: slideUp 0.5s ease-out both;
}

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

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

.name-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--emerald) 0%, var(--gold) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

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

.name-card:hover::before {
    transform: scaleX(1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.name-info {
    flex: 1;
}

.english-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--emerald-dark);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.arabic-name {
    font-family: 'Amiri', serif;
    font-size: 1.8rem;
    color: var(--gold-dark);
    direction: rtl;
    font-weight: 700;
    margin-bottom: 8px;
}

.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: #d1d5db;
    transition: all 0.2s;
    padding: 4px;
}

.favorite-btn:hover {
    color: #fbbf24;
    transform: scale(1.2);
}

/* Gender Badge - Restored */
.gender-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.gender-badge.male {
    background: #dbeafe;
    color: #1e40af;
}

.gender-badge.female {
    background: #fce7f3;
    color: #be185d;
}

.meaning {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loading & Empty States */
.loading-container {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--emerald-light);
    border-top: 4px solid var(--emerald);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Updated Favorite Button (Heart) - Without Green Background */
.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: #ef4444;
    /* Red-500 */
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.favorite-btn svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.favorite-btn.active svg {
    fill: currentColor;
    stroke: none;
    animation: heartBeat 0.3s ease-in-out;
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

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

/* Icon-only Download Button */
#download-name-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--emerald-light);
    color: var(--emerald-dark);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

#download-name-btn:hover {
    background: var(--emerald);
    color: white;
    transform: translateY(-2px) rotate(5deg);
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.3);
}

#download-name-btn svg {
    width: 24px;
    height: 24px;
}

/* Name Card Modal - Second Gender Badge Fix */
.name-detail .gender-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.name-detail .gender-badge.male {
    background: #dbeafe;
    color: #1e40af;
}

.name-detail .gender-badge.female {
    background: #fce7f3;
    color: #be185d;
}

.name-detail .meaning {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loading & Empty States */
.loading-container {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--emerald-light);
    border-top: 4px solid var(--emerald);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-container p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.no-results p {
    color: var(--text-light);
    font-size: 1rem;
}

.load-more-container {
    text-align: center;
    padding: 40px 0;
}

.load-more-btn {
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-dark) 100%);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* FAB */
.fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-dark) 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    z-index: 99;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 40px rgba(4, 120, 87, 0.3);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 12px 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
    padding: 8px 16px;
    border-radius: 12px;
}

.nav-item:hover,
.nav-item.active {
    color: var(--emerald);
    background: var(--emerald-light);
}

.nav-icon {
    font-size: 22px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
}

.modal-small {
    max-width: 400px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--cream);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-dark);
    transition: all 0.2s;
    z-index: 1;
}

.modal-close:hover {
    background: var(--emerald);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 40px;
}

.modal-body h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--emerald-dark);
    margin-bottom: 20px;
}

.modal-body h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--emerald-dark);
    margin: 30px 0 15px;
}

.modal-body p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 15px;
}

.modal-body ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.modal-body ul li {
    padding: 10px 0;
    color: var(--text-light);
    line-height: 1.6;
}

/* Name Detail Modal */
.name-detail {
    text-align: center;
}

.name-detail .english-name {
    font-size: 3rem;
    margin-bottom: 10px;
}

.name-detail .arabic-name {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.name-detail .gender-badge {
    font-size: 0.9rem;
    padding: 8px 20px;
    margin-bottom: 30px;
}

.name-detail .meaning {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: left;
    -webkit-line-clamp: unset;
}

.name-detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 24px;
    background: var(--cream);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
}

.action-btn:hover {
    background: var(--emerald);
    color: white;
    border-color: var(--emerald);
    transform: translateY(-2px);
}

.action-btn.primary {
    background: var(--emerald);
    color: white;
    border-color: var(--emerald);
}

.action-btn.primary:hover {
    background: var(--emerald-dark);
}

/* Share Modal */
.share-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
}

.share-btn {
    padding: 16px;
    background: var(--cream);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.share-btn:hover {
    background: var(--emerald-light);
    border-color: var(--emerald);
    transform: translateY(-2px);
}

.share-branding {
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .stats {
        gap: 20px;
    }

    .search-section {
        margin: -20px 15px 20px;
        padding: 20px;
    }

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

    .section-title {
        font-size: 1.4rem;
    }

    .alphabet-filter {
        gap: 6px;
    }

    .letter-btn {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .fab {
        bottom: 100px;
        right: 15px;
        width: 55px;
        height: 55px;
    }

    .modal-body {
        padding: 30px 20px;
    }

    .name-detail .english-name {
        font-size: 2.2rem;
    }

    .name-detail .arabic-name {
        font-size: 2.5rem;
    }

    .share-options {
        grid-template-columns: 1fr;
    }
}

/* Desktop (>768px) */
@media (min-width: 769px) {
    .names-container {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 30px;
        align-items: start;
    }

    .names-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

/* Large Desktop (>1200px) */
@media (min-width: 1200px) {
    .names-container {
        grid-template-columns: 300px 1fr;
        gap: 40px;
    }

    .names-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

/* Legal Pages */
.legal-page {
    min-height: 100vh;
    padding: 20px;
    background: var(--cream);
}

.legal-page h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--emerald-dark);
    margin-bottom: 10px;
}

.legal-page h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--emerald-dark);
    margin-top: 30px;
    margin-bottom: 15px;
}

.legal-page p {
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 15px;
}

.legal-page ul {
    margin: 15px 0;
    padding-left: 30px;
}

.legal-page li {
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--text-light);
}

.legal-page a {
    color: var(--emerald);
    text-decoration: none;
    font-weight: 600;
}

.legal-page a:hover {
    text-decoration: underline;
}