/* ===== ANIMACIONES: AURORA + SCROLL REVEAL ===== */

/* --- Scroll reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.75s cubic-bezier(0.22,1,0.36,1),
                transform 0.75s cubic-bezier(0.22,1,0.36,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* --- Keyframes Aurora --- */
@keyframes orb-1 {
    0%,100% { transform: translate(0,     0)     scale(1);    }
    33%     { transform: translate(80px, -60px)  scale(1.15); }
    66%     { transform: translate(-40px,  40px) scale(0.9);  }
}
@keyframes orb-2 {
    0%,100% { transform: translate(0,      0)    scale(1);    }
    40%     { transform: translate(-90px,  70px) scale(1.2);  }
    80%     { transform: translate(55px,  -35px) scale(0.9);  }
}
@keyframes orb-3 {
    0%,100% { transform: translate(0,     0)    scale(1);    }
    50%     { transform: translate(60px,  80px) scale(1.1);  }
}

/* --- Keyframes nombre letra a letra --- */
@keyframes letter-drop {
    0%   { opacity: 0; transform: translateY(-50px) rotateX(90deg); }
    60%  { opacity: 1; }
    100% { opacity: 1; transform: translateY(0) rotateX(0deg); }
}

/* --- Badge entrada --- */
@keyframes badge-rise {
    0%   { opacity: 0; transform: translateY(20px) scale(0.82); }
    100% { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ===== HEADER ===== */
.name-header {
    position: relative;
    z-index: 10;
    background: #1a0810;
    color: white;
    text-align: center;
    padding: 18px 20px 56px;
    overflow: visible;
}

/* غلاف اللوغو */
.name-header-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
    position: relative;
    z-index: 3;
}

/* Gradiente radial sobre el fondo oscuro */
.name-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%,  rgba(139,38,53,0.55) 0%, transparent 70%),
        radial-gradient(ellipse 50% 80% at 8%  100%, rgba(100,20,35,0.28) 0%, transparent 60%),
        radial-gradient(ellipse 50% 80% at 92% 100%, rgba(120,30,45,0.24) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Onda inferior */
.name-header::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 50px;
    background: #fdf6e3;
    clip-path: ellipse(55% 100% at 50% 100%);
    z-index: 1;
}

/* --- Aurora orbs --- */
.aurora-scene {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}
.aurora-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(75px);
    will-change: transform;
}
.orb-1 {
    width: 440px; height: 440px;
    background: radial-gradient(circle, rgba(255,110,90,0.36) 0%, transparent 65%);
    top: -130px; left: -90px;
    animation: orb-1 20s ease-in-out infinite;
}
.orb-2 {
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(155,45,75,0.30) 0%, transparent 65%);
    top: -70px; right: -70px;
    animation: orb-2 26s ease-in-out infinite;
}
.orb-3 {
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(255,200,90,0.16) 0%, transparent 65%);
    bottom: 10px; left: 43%;
    animation: orb-3 30s ease-in-out infinite;
}

/* --- Barra de navegación --- */
.name-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    position: relative;
    z-index: 3;
}

/* لوغو الرجوع للرئيسية */
.name-back-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
    flex-shrink: 0;
}
.name-back-logo:hover {
    opacity: 0.85;
    transform: scale(1.06);
}
.name-back-logo img {
    height: 52px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35));
}

/* --- Título del nombre: letra a letra (via JS) --- */
.name-hero-title {
    font-family: 'Playfair Display', 'Cairo', 'Traditional Arabic', Georgia, serif;
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -1px;
    text-shadow: 0 0 50px rgba(255,110,90,0.3), 0 4px 24px rgba(0,0,0,0.5);
    margin-bottom: 18px;
    position: relative;
    z-index: 2;
    line-height: 1.1;
    perspective: 900px;
}
.name-hero-title .letter {
    display: inline-block;
    opacity: 0;
    animation: letter-drop 0.65s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

/* --- Botón de pronunciación en el hero --- */
.hero-speak-btn {
    background: rgba(255,255,255,0.14);
    border: 1.5px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    width: 46px;
    height: 46px;
    font-size: 20px;
    cursor: pointer;
    vertical-align: middle;
    margin-inline-start: 12px;
    transition: background 0.2s, transform 0.2s;
    line-height: 1;
    padding: 0;
}
.hero-speak-btn:hover {
    background: rgba(255,255,255,0.28);
    transform: scale(1.12);
}
.hero-speak-btn:active { transform: scale(0.95); }
.name-hero-title .letter-space {
    display: inline-block;
    width: 0.28em;
}

/* --- Badge género --- */
.name-badge-wrap {
    position: relative;
    z-index: 2;
    margin-bottom: 4px;
}
.name-badge {
    display: inline-block;
    padding: 7px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 18px rgba(0,0,0,0.22);
    opacity: 0;
    animation: badge-rise 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.5s forwards;
}
.badge-male   { background: rgba(219,234,254,0.92); color: #1e4e8c; }
.badge-female { background: rgba(252,231,243,0.92); color: #9d174d; }

/* --- Botones del header --- */
.lang-dropdown-btn-dark,
.user-menu-btn-dark {
    background: rgba(255,255,255,0.13);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 20px;
    padding: 6px 14px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    color: white;
    transition: background 0.2s;
}
.lang-dropdown-btn-dark:hover,
.user-menu-btn-dark:hover { background: rgba(255,255,255,0.22); }

.back-btn {
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    background: rgba(255,255,255,0.11);
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    transition: all 0.2s;
    position: relative;
    z-index: 3;
}
.back-btn:hover { color: white; background: rgba(255,255,255,0.20); }

/* زر المصعد الموحد — مُعرَّف في navbar.php */

/* ===== CONTENIDO PRINCIPAL ===== */
.name-main {
    max-width: 680px;
    margin: 0 auto;
    padding: 32px 16px 60px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail-card {
    background: #fffef5;
    border: 1px solid #e0c98a;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(139,38,53,0.08), 0 1px 4px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.three-langs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    text-align: center;
    background: #fdf6e3;
    border-radius: 14px;
    padding: 16px;
    border: 1px solid #e8d5a3;
}
.lang-name  { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lang-flag  { font-size: 1.6rem; }
.lang-word  { font-family: 'Playfair Display', Georgia, serif; font-size: 1.3rem; font-weight: 700; color: #8B2635; line-height: 1.2; }
.lang-word.arabic { font-family: 'Traditional Arabic','Scheherazade',serif; font-size: 1.5rem; direction: rtl; }

.divider { border: none; border-top: 1px dashed #e0c98a; }

.detail-row { display: flex; align-items: flex-start; gap: 16px; padding: 4px 0; }
.detail-icon  { font-size: 1.5rem; min-width: 36px; text-align: center; margin-top: 2px; }
.detail-label { font-size: 10px; font-weight: 800; color: #b89a6a; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 5px; }
.detail-value { font-size: 16px; color: #2c1810; font-weight: 600; line-height: 1.4; }

.pop-bar-bg   { height: 8px; background: #f0e6d0; border-radius: 999px; overflow: hidden; }
.pop-bar-fill { height: 100%; border-radius: 999px; transition: width 1s ease; }
.bar-red      { background: linear-gradient(90deg, #c0392b, #e74c3c); }
.bar-yellow   { background: linear-gradient(90deg, #d4a017, #f1c40f); }
.bar-green    { background: linear-gradient(90deg, #27ae60, #2ecc71); }
.bar-purple   { background: linear-gradient(90deg, #8e44ad, #9b59b6); }
.bar-gray     { background: #d0c4b0; }

/* ===== SECCIÓN DE COMENTARIOS ===== */
.comments-section {
    background: #fffef5;
    border: 1px solid #e0c98a;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(139,38,53,0.06);
}
.comments-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #8B2635;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #e0c98a;
}
.comment-form-box   { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.comment-input,
.comment-textarea   { border: 2px solid #d4b483; border-radius: 12px; padding: 11px 16px; font-size: 14px; background: #fdf6e3; color: #2c1810; outline: none; transition: border-color 0.2s; font-family: inherit; resize: vertical; }
.comment-input:focus,
.comment-textarea:focus { border-color: #8B2635; }
.comment-submit     { background: #8B2635; color: white; border: none; border-radius: 10px; padding: 10px 22px; font-size: 14px; font-weight: 700; cursor: pointer; align-self: flex-start; transition: opacity 0.2s; }
.comment-submit:hover { opacity: 0.85; }
.comment-msg        { font-size: 13px; font-weight: 600; }
.login-to-comment   { text-align: center; padding: 20px; background: #fdf6e3; border-radius: 12px; }
.login-to-comment p { color: #8a6a4a; margin-bottom: 12px; font-weight: 600; }
.comments-list      { display: flex; flex-direction: column; gap: 12px; }
.no-comments        { text-align: center; color: #b89a6a; padding: 20px; font-style: italic; }
.comment-item       { background: #fdf6e3; border-radius: 12px; padding: 14px 16px; border: 1px solid #e8d5a3; }
.comment-header     { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.comment-author     { font-weight: 700; color: #5a3e2b; font-size: 14px; }
.comment-date       { font-size: 12px; color: #b89a6a; }
.comment-text       { color: #2c1810; font-size: 14px; line-height: 1.5; }

/* ===== DROPDOWNS (lang + user) ===== */
.lang-dropdown-wrap { position: relative; }
.lang-dropdown-menu {
    position: absolute;
    top: 110%; left: 0;
    background: white;
    border: 1px solid #e8d5b7;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    overflow: hidden;
    min-width: 160px;
    z-index: 1000;
}
.lang-dropdown-menu a {
    display: block;
    padding: 9px 16px;
    color: #5a3e2b;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
}
.lang-dropdown-menu a:hover { background: #fdf6ee; }

/* ── ردود الفعل على الاسم ── */
.reactions-section {
    background: white;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 4px 20px rgba(139,38,53,0.06);
    border: 1px solid #e8d5a3;
}
.reactions-title {
    font-size: 13px;
    font-weight: 700;
    color: #b89a6a;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}
.reactions-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.reaction-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: 2px solid #e8d5a3;
    border-radius: 999px;
    background: #fdf6e3;
    color: #6b4c3b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    line-height: 1;
}
.reaction-btn:hover {
    border-color: #8B2635;
    color: #8B2635;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139,38,53,0.15);
}
.reaction-btn.active {
    border-color: #8B2635;
    background: #8B2635;
    color: white;
    box-shadow: 0 4px 12px rgba(139,38,53,0.30);
}
.reaction-emoji { font-size: 18px; line-height: 1; }
.reaction-count { font-size: 13px; font-weight: 700; }

/* ============================================
   الوضع الليلي — Name Page Dark Mode
   ============================================ */
[data-theme="dark"] .name-main { background: transparent; }

[data-theme="dark"] .detail-card,
[data-theme="dark"] .comments-section,
[data-theme="dark"] .reactions-section {
    background: #1a0e26;
    border-color: rgba(180,100,220,0.18);
    box-shadow: 0 4px 20px rgba(100,40,160,0.12);
}

[data-theme="dark"] .three-langs {
    background: #120a1e;
    border-color: rgba(180,100,220,0.15);
}
[data-theme="dark"] .lang-word { color: #c890e8; }
[data-theme="dark"] .divider   { border-top-color: rgba(180,100,220,0.15); }

[data-theme="dark"] .detail-label { color: #9070b0; }
[data-theme="dark"] .detail-value { color: #e0c8f0; }

[data-theme="dark"] .pop-bar-bg { background: #2a1a3a; }

[data-theme="dark"] .comments-title {
    color: #c890e8;
    border-bottom-color: rgba(180,100,220,0.2);
}
[data-theme="dark"] .comment-input,
[data-theme="dark"] .comment-textarea {
    background: #120a1e;
    border-color: rgba(180,100,220,0.25);
    color: #e0c8f0;
}
[data-theme="dark"] .comment-input:focus,
[data-theme="dark"] .comment-textarea:focus { border-color: #9060c0; }

[data-theme="dark"] .comment-item  { background: #120a1e; border-color: rgba(180,100,220,0.15); }
[data-theme="dark"] .comment-text  { color: #c0a0d0; }
[data-theme="dark"] .comment-date  { color: #7a6088; }
[data-theme="dark"] .no-comments   { color: #7a6088; }
[data-theme="dark"] .login-to-comment { background: #120a1e; }

[data-theme="dark"] .reaction-btn {
    background: #1a0e26;
    border-color: rgba(180,100,220,0.25);
    color: #c0a0d0;
}
[data-theme="dark"] .reaction-btn:hover {
    border-color: #9060c0;
    color: #c890e8;
}
[data-theme="dark"] .reaction-btn.active {
    background: #6030a0;
    border-color: #6030a0;
    color: white;
}

/* body background في الوضع الليلي */
[data-theme="dark"] body {
    background-color: #0e0818;
}
[data-theme="dark"] body::after {
    background: #0e0818;
}
[data-theme="dark"] .name-header::after {
    background: #0e0818;
}

/* ===== قسم التصويت ===== */
.vote-section {
    background: #fffef5;
    border: 1px solid #e0c98a;
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 0 4px 20px rgba(139,38,53,0.06);
    text-align: center;
}
.vote-question {
    font-size: 15px;
    font-weight: 700;
    color: #5a3e2b;
    margin-bottom: 18px;
}
.vote-row { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.vote-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.vote-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 28px;
    border-radius: 999px;
    border: 2px solid #e0c98a;
    background: #fdf6e3;
    color: #5a3e2b;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
    min-width: 130px;
    justify-content: center;
}
.vote-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,0.12); }
.vote-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.vote-pct {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.7;
    background: rgba(0,0,0,0.07);
    border-radius: 999px;
    padding: 1px 7px;
}
.vote-yes.vote-active-yes  { background: #dcfce7; border-color: #16a34a; color: #15803d; }
.vote-no.vote-active-no    { background: #fee2e2; border-color: #dc2626; color: #b91c1c; }
.vote-bar-wrap { display: flex; width: 100%; max-width: 340px; height: 8px; border-radius: 999px; overflow: hidden; background: #f0e6d0; }
.vote-bar-yes  { background: linear-gradient(90deg, #16a34a, #4ade80); transition: width 0.5s ease; }
.vote-bar-no   { background: linear-gradient(90deg, #dc2626, #f87171); transition: width 0.5s ease; }
.vote-total-label { font-size: 12px; color: #b89a6a; font-weight: 600; margin: 0; }

/* ===== قسم الأسماء المشابهة ===== */
.section-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #8B2635;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e0c98a;
}
.similar-section,
.celeb-section {
    background: #fffef5;
    border: 1px solid #e0c98a;
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 0 4px 20px rgba(139,38,53,0.06);
}
.similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}
.similar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 10px;
    background: #fdf6e3;
    border: 1px solid #e8d5a3;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.18s;
}
.similar-card:hover {
    border-color: #8B2635;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(139,38,53,0.14);
}
.similar-name   { font-size: 14px; font-weight: 700; color: #2c1810; text-align: center; line-height: 1.3; }
.similar-origin { font-size: 11px; color: #b89a6a; font-weight: 600; }

/* ===== قسم المشاهير ===== */
.celeb-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.celeb-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: #fdf6e3;
    border: 1px solid #e8d5a3;
    border-radius: 14px;
}
.celeb-emoji { font-size: 1.8rem; min-width: 40px; text-align: center; }
.celeb-info  { display: flex; flex-direction: column; gap: 2px; }
.celeb-name  { font-size: 14px; font-weight: 700; color: #2c1810; }
.celeb-role  { font-size: 12px; color: #8a6a4a; }

/* ===== Dark Mode: أقسام التصويت والمشابهة والمشاهير ===== */
[data-theme="dark"] .vote-section,
[data-theme="dark"] .similar-section,
[data-theme="dark"] .celeb-section {
    background: #1a0e26;
    border-color: rgba(180,100,220,0.18);
    box-shadow: 0 4px 20px rgba(100,40,160,0.12);
}
[data-theme="dark"] .vote-question { color: #c0a0d0; }
[data-theme="dark"] .vote-btn {
    background: #120a1e;
    border-color: rgba(180,100,220,0.25);
    color: #c0a0d0;
}
[data-theme="dark"] .vote-btn:hover { border-color: #9060c0; }
[data-theme="dark"] .vote-yes.vote-active-yes { background: #052e16; border-color: #16a34a; color: #4ade80; }
[data-theme="dark"] .vote-no.vote-active-no   { background: #2d0808; border-color: #dc2626; color: #f87171; }
[data-theme="dark"] .vote-bar-wrap  { background: #2a1a3a; }
[data-theme="dark"] .vote-total-label { color: #7a6088; }
[data-theme="dark"] .section-heading { color: #c890e8; border-bottom-color: rgba(180,100,220,0.2); }
[data-theme="dark"] .similar-card,
[data-theme="dark"] .celeb-card { background: #120a1e; border-color: rgba(180,100,220,0.15); }
[data-theme="dark"] .similar-card:hover { border-color: #9060c0; }
[data-theme="dark"] .similar-name,
[data-theme="dark"] .celeb-name  { color: #e0c8f0; }
[data-theme="dark"] .similar-origin,
[data-theme="dark"] .celeb-role  { color: #7a6088; }

/* ══════════════════════════════════════════════
   قسم الحفظ والاقتراح
══════════════════════════════════════════════ */
.fav-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    padding: 8px 0 4px;
    flex-wrap: wrap;
}

/* زر الحفظ */
.fav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #fff;
    border: 2px solid #e8d5a3;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: #5a3a2a;
    cursor: pointer;
    transition: all 0.22s ease;
    position: relative;
}
.fav-btn:hover {
    border-color: #e05090;
    background: #fff0f7;
    color: #b03060;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(224,80,144,0.15);
}
.fav-btn.fav-active {
    background: #fff0f7;
    border-color: #e05090;
    color: #b03060;
}
.fav-btn #fav-icon {
    font-size: 18px;
    display: inline-block;
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.fav-count {
    background: #e05090;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    border-radius: 999px;
    padding: 2px 7px;
    min-width: 20px;
    text-align: center;
}

/* زر الاقتراح للشريك */
.suggest-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: #fff;
    border: 2px solid #ffd6e8;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: #a03060;
    cursor: pointer;
    transition: all 0.22s ease;
}
.suggest-btn:hover {
    border-color: #b05080;
    background: linear-gradient(135deg,#fff0f7,#ffe6f2);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(176,80,128,0.18);
}
.suggest-icon { font-size: 16px; }

/* Dark mode */
[data-theme="dark"] .fav-btn {
    background: #1a0a28;
    border-color: rgba(180,100,220,0.25);
    color: #c0a0d8;
}
[data-theme="dark"] .fav-btn:hover,
[data-theme="dark"] .fav-btn.fav-active {
    background: #2a0a3a;
    border-color: #9060c0;
    color: #e0c0f8;
}
[data-theme="dark"] .suggest-btn {
    background: #1a0a28;
    border-color: rgba(200,80,140,0.25);
    color: #c080a0;
}
[data-theme="dark"] .suggest-btn:hover {
    background: #2a0a20;
    border-color: #b05080;
    color: #f0a0c0;
}


/* ── زر مشاركة الاسم (بنفس روح suggest-btn) ── */
.share-name-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: linear-gradient(135deg, #eef6ff, #e4f0ff);
    border: 2px solid #bcdcff;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: #2b5f9e;
    cursor: pointer;
    transition: all 0.22s ease;
}
.share-name-btn:hover {
    border-color: #4a90d9;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(74,144,217,0.18);
}
.share-name-btn:active { transform: scale(0.97); }
.share-icon { font-size: 16px; }
[data-theme="dark"] .share-name-btn {
    background: rgba(74,144,217,0.15);
    border-color: rgba(120,170,230,0.4);
    color: #a9cdf5;
}

/* توست "تم نسخ الرابط" */
.share-toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1f9d55;
    color: #fff;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 99999;
}
.share-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* ── زر بطاقة الاسم (بنفس روح المشاركة) ── */
.card-name-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: linear-gradient(135deg, #fff3dd, #ffe9bd);
    border: 2px solid #e6c988;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: #8a6a2a;
    cursor: pointer;
    transition: all 0.22s ease;
}
.card-name-btn:hover { border-color: #C4973A; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(196,151,58,0.2); }
.card-name-btn:active { transform: scale(0.97); }
.card-icon { font-size: 16px; }
[data-theme="dark"] .card-name-btn { background: rgba(196,151,58,0.15); border-color: rgba(212,168,67,0.4); color: #eac07e; }

/* استيراد خطوط ممتازة تدعم العربية والانجليزية بجمالية عالية */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700;900&family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=Tajawal:wght@400;700;900&display=swap');

/* ── بطاقة الاسم (تُحوَّل لصورة) ── */
.namecard-stage {
    position: fixed;
    left: -9999px;
    top: 0;
    pointer-events: none;
    /* تحسين جودة الريندر أثناء التحويل لصورة */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.namecard {
    width: 500px;
    padding: 34px 40px 28px;
    border-radius: 30px;
    /* siempre LTR: evita que el punto del eslogan latino salte a la izquierda en RTL */
    direction: ltr;
    position: relative;
    overflow: hidden;
    text-align: center;
    color: #ffffff;
    font-family: 'Tajawal', Georgia, serif;
    box-sizing: border-box;
    /* خواص تمنع تشتت بكسلات الخطوط والصور عند التصدير */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* تدرجات ألوان أكثر فخامة وعمق — طبقة لمعة قطرية فوق تدرج خطي أعمق */
.nc-boy {
    background:
        radial-gradient(115% 85% at 50% 8%, rgba(150,200,255,0.28) 0%, rgba(150,200,255,0) 55%),
        linear-gradient(150deg, #142a55 0%, #22437c 48%, #2f63aa 100%);
}
.nc-girl {
    background:
        radial-gradient(115% 85% at 50% 8%, rgba(255,190,215,0.28) 0%, rgba(255,190,215,0) 55%),
        linear-gradient(150deg, #5e1538 0%, #a33266 48%, #d95f86 100%);
}

/* هالة مضيئة ناعمة خلف المحتوى */
.namecard::after {
    content: "";
    position: absolute;
    top: -40px; 
    left: 50%;
    width: 380px; 
    height: 380px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
    z-index: 1;
}

/* زخارف خلفية هادئة */
.nc-deco { 
    position: absolute; 
    font-size: 110px; 
    opacity: 0.06; 
    line-height: 1; 
    z-index: 1;
    user-select: none;
}
.nc-deco-1 { bottom: 15px; right: 20px; }

/* نجوم ديكورية متناثرة */
.nc-star { 
    position: absolute; 
    opacity: 0.6; 
    line-height: 1; 
    pointer-events: none; 
    z-index: 1;
}
.nc-s1 { top: 35px;  left: 35px;  font-size: 18px; }
.nc-s2 { top: 95px;  right: 40px; font-size: 24px; }
.nc-s3 { bottom: 100px; left: 45px; font-size: 22px; }
.nc-s4 { top: 160px; left: 65px;  font-size: 14px; opacity: 0.4; }

/* الهوية والشعار */
.nc-brand {
    position: relative; 
    z-index: 2;
    display: flex; 
    flex-direction: column; 
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}
.nc-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.25));
}
.nc-top {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 3px;
    opacity: 1;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.28);
}
.nc-plus {
    color: #ffd043;
    font-family: "Trebuchet MS", Verdana, sans-serif;
    font-variant-numeric: slashed-zero;
    font-weight: bold;
    letter-spacing: 0;
    text-shadow: 0 0 14px rgba(255,208,67,0.5);
}

/* الاسم الانجليزي */
.nc-name {
    position: relative; 
    z-index: 2;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 56px;
    font-weight: 900;
    line-height: 1.3;
    padding-bottom: 16px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.25);
    letter-spacing: -0.5px;
}

/* الاسم العربي (تم معالجة تلاحم الحروف والخط هنا) */
.nc-name-ar { 
    position: relative; 
    z-index: 2; 
    font-family: 'Cairo', 'Tajawal', sans-serif;
    font-size: 32px; 
    font-weight: 900; 
    opacity: 0.95; 
    margin-top: 8px;
    direction: rtl; /* يضمن تماسك الحروف العربية من اليمين لليسار */
    unicode-bidi: isolate;
    text-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* شارة الجنس (ولد / بنت) */
.nc-gender {
    position: relative; 
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(5px); /* تأثير زجاجي ناعم */
    -webkit-backdrop-filter: blur(5px);
    padding: 9px 18px;
    border-radius: 30px;
    font-size: 15px;
    line-height: 1;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.15);
}
/* محاذاة الإيموجي مع الكلمة عمودياً بدقة */
.nc-g-ico { font-size: 17px; line-height: 1; display: inline-flex; }
.nc-g-lbl { line-height: 1; display: inline-block; transform: translateY(-10px); }

/* معنى الاسم (يدعم لغات متعددة بسلاسة) */
.nc-meaning {
    position: relative; 
    z-index: 2;
    font-family: 'Tajawal', 'Playfair Display', serif;
    font-size: 18px;
    line-height: 1.55;
    margin-top: 20px;
    font-style: italic; 
    opacity: 0.95;
    max-width: 400px; 
    margin-left: auto; 
    margin-right: auto;
    direction: auto; /* يحدد الاتجاه تلقائياً حسب لغة النص المعروض */
}

/* تذييل البطاقة */
.nc-foot {
    position: relative; 
    z-index: 2;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    margin-top: 26px;
    font-size: 13px;
    opacity: 0.85;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 14px;
}
.nc-tag { 
    font-style: italic; 
    font-family: 'Playfair Display', serif;
}