@import url('https://fonts.googleapis.com/css2?family=Amiri+Quran&family=Amiri:ital,wght@0,400;0,700;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600&family=Inter:wght@300;400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');

/* ═══════════════════════════════════════════════
   NAJM AI — Style Sheet (Premium Cosmic Edition)
   ═══════════════════════════════════════════════ */

:root {
    --bg-deep-space: #050a14;
    --sidebar-dark: #0a0f1d;
    --accent-nebula: #1a2a44;
    --gold-primary: #d4af37;
    --gold: #DAA700;
    --gold-mid: #C9A84C;
    --gold-light: #FCF4CC;
    --gold-glow: rgba(218, 167, 0, 0.3);
    --text-main: #e0e0e0;
    --text: #e0e0e0;
    --text-muted: #B9C7AD;
    --border: rgba(218, 167, 0, 0.15);
    --bg: #050B1A;
    --bg2: #0D1628;
    --sidebar-w: 62px;
    --expanded-w: 240px;
    --font-size-base: 15px;
}

/* Font size applicato agli elementi principali */
.bubble,
.message-text,
.settings-field-label,
.settings-field-hint,
.suggestion-btn,
#messagesWrap p,
#messagesWrap li,
#messagesWrap span {
    font-size: var(--font-size-base) !important;
}

/* ═══════════════════════════════════════════════
   ANIMAZIONI FLUIDE E PROFESSIONALI
   ═══════════════════════════════════════════════ */

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide Up */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Down */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Right */
@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Bounce */
@keyframes scaleBounce {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Glow Pulse */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(218, 167, 0, 0.3), inset 0 0 5px rgba(218, 167, 0, 0.1);
    }
    50% {
        box-shadow: 0 0 15px rgba(218, 167, 0, 0.6), inset 0 0 10px rgba(218, 167, 0, 0.2);
    }
}

/* Gentle Pulse */
@keyframes gentlePulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Spin */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Rotate Enter */
@keyframes rotateEnter {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.95);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

/* Expand Height */
@keyframes expandHeight {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 1000px;
        opacity: 1;
    }
}

/* Collapse Height */
@keyframes collapseHeight {
    from {
        max-height: 1000px;
        opacity: 1;
    }
    to {
        max-height: 0;
        opacity: 0;
    }
}

/* Shimmer Loading */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Float */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Heartbeat */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1);
    }
}

/* Bounce In */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* ═══════════════════════════════════════════════
   CLASSI UTILITY PER ANIMAZIONI
   ═══════════════════════════════════════════════ */

.animate-fadeIn {
    animation: fadeIn 0.6s ease-out;
}

.animate-slideUp {
    animation: slideUp 0.5s ease-out;
}

.animate-slideDown {
    animation: slideDown 0.5s ease-out;
}

.animate-slideRight {
    animation: slideRight 0.5s ease-out;
}

.animate-scaleBounce {
    animation: scaleBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-glowPulse {
    animation: glowPulse 2s ease-in-out infinite;
}

.animate-gentlePulse {
    animation: gentlePulse 2.5s ease-in-out infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-rotateEnter {
    animation: rotateEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-heartbeat {
    animation: heartbeat 1.3s ease-in-out infinite;
}

.animate-bounceIn {
    animation: bounceIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Velocità variabili */
.animate-slow {
    animation-duration: 1.2s;
}

.animate-fast {
    animation-duration: 0.3s;
}



/* Chat */





/* Corano */

















/* Preghiere */




/* Hadith */

/* Home */


/* Stelle nascoste nel tema chiaro */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background-color: var(--bg-deep-space);
    background-image: radial-gradient(circle at 50% 20%, var(--accent-nebula) 0%, var(--bg-deep-space) 80%), url('https://www.transparenttextures.com/patterns/stardust.png');
    color: var(--text);
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: row;
}

/* ───────────────────────────────────────────────
   SIDEBAR UNIFICATA ESPANDIBILE
   ─────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(14, 22, 48, 0.97) 0%, rgba(8, 14, 32, 0.98) 50%, rgba(4, 8, 20, 0.99) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(218, 167, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
}

.sidebar.open {
    width: var(--expanded-w);
}

.sidebar-header {
    display: flex;
    align-items: center;
    padding: 10px 11px;
    min-height: 50px;
    gap: 12px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(218, 167, 0, 0.1);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.icon-btn:hover {
    background: rgba(218, 167, 0, 0.1);
    color: var(--gold-light);
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cinzel', serif;
    font-size: 18px;
    letter-spacing: 1px;
    color: var(--gold-light);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    text-shadow: 0 0 10px var(--gold-glow);
}

.sidebar.open .brand-wrap {
    opacity: 1;
    transition-delay: 0.1s;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    padding: 4px 10px;
    gap: 2px;
    flex-shrink: 0;
}

.sidebar-footer {
    flex-shrink: 0;
    padding: 10px 10px;
    background: rgba(4, 8, 20, 1);
    border-top: 1px solid rgba(218, 167, 0, 0.08);
    position: relative;
}

/* ── Footer popup ───────────────────────────── */
.footer-popup {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 10px;
    right: 10px;
    background: #0d1525;
    border: 1px solid rgba(218, 167, 0, 0.15);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 200;
}
.footer-popup.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.footer-popup-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
}
.footer-popup-item:hover {
    background: rgba(218, 167, 0, 0.07);
}
.footer-popup-item svg { opacity: 0.7; flex-shrink: 0; }
.footer-popup-sep {
    height: 1px;
    background: rgba(218, 167, 0, 0.1);
    margin: 4px 0;
}
.footer-popup-danger { color: #ff6b6b !important; }
.footer-popup-danger svg { color: #ff6b6b; opacity: 0.8 !important; }
.footer-popup-danger:hover { background: rgba(255, 80, 80, 0.08) !important; }

/* ── Riga utente (trigger) ──────────────────── */
.sidebar-user-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    transition: background 0.15s ease;
    color: var(--text);
}
.sidebar-user-row:hover {
    background: rgba(218, 167, 0, 0.06);
}
.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    overflow: hidden;
}
.footer-trigger-chevron {
    flex-shrink: 0;
    opacity: 0.4;
    transition: transform 0.18s ease, opacity 0.18s ease;
}
.footer-popup.open ~ .sidebar-user-row .footer-trigger-chevron,
.sidebar-user-row[aria-expanded="true"] .footer-trigger-chevron {
    transform: rotate(180deg);
    opacity: 0.7;
}

/* Sidebar chiusa: nascondi testo, chevron e popup */
.sidebar:not(.open) #userName,
.sidebar:not(.open) .footer-trigger-chevron,
.sidebar:not(.open) .footer-popup {
    display: none !important;
}

/* Sidebar chiusa: centra avatar nella riga utente */
.sidebar:not(.open) .sidebar-user-row {
    justify-content: center;
    padding: 8px 4px;
}

.sidebar:not(.open) .sidebar-user-info {
    flex: unset;
}

/* ═══════════════════════════════════════════════
   SETTINGS VIEW — full screen overlay
   ═══════════════════════════════════════════════ */
.settings-view {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 100;
    flex-direction: row;
    overflow: hidden;
    background: var(--bg-deep-space, #060d1a);
    background-image: radial-gradient(circle at 50% 20%, var(--accent-nebula, rgba(30,50,100,0.3)) 0%, var(--bg-deep-space, #060d1a) 80%);
}
.settings-nav {
    height: 100%;
    box-sizing: border-box;
}
.settings-content {
    height: 100%;
    box-sizing: border-box;
}

/* ── Nav sinistra ─────────────────────────────── */
.settings-nav {
    width: 260px;
    flex-shrink: 0;
    padding: 40px 16px 32px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-right: 1px solid rgba(255,255,255,0.05);
    overflow-y: auto;
}
.settings-nav-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: rgba(218,167,0,0.5);
    margin: 0 0 16px 12px;
}
.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.4);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, color 0.15s;
    width: 100%;
}
.settings-nav-item svg { flex-shrink: 0; opacity: 0.7; }
.settings-nav-item:hover { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.85); }
.settings-nav-item.active {
    background: rgba(218,167,0,0.1);
    color: var(--gold);
}
.settings-nav-item.active svg { opacity: 1; }

/* Mobile back button — nascosto su desktop */
.settings-mob-back { display: none; }

/* ── Settings picker (metodo preghiera, recitatore) ── */
.sopt-picker { position: relative; width: 100%; }

.sopt-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 13px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(218,167,0,0.2);
    color: var(--text);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s, border-color 0.2s;
    box-sizing: border-box;
}
.sopt-trigger:hover { background: rgba(218,167,0,0.08); border-color: rgba(218,167,0,0.38); }

/* Dropdown — position:fixed per non essere tagliato da overflow:hidden */
.sopt-dropdown {
    position: fixed;
    min-width: 220px;
    max-height: 260px;
    overflow-y: auto;
    background: rgba(8,14,28,0.98);
    border: 1px solid rgba(218,167,0,0.22);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.55);
    z-index: 9000;
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(218,167,0,0.2) transparent;
}
.sopt-dropdown.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Opzioni nel dropdown */
.sopt-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: background 0.12s;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}
.sopt-option:last-child { border-bottom: none; }
.sopt-option:hover { background: rgba(218,167,0,0.07); }
.sopt-option.active { background: rgba(218,167,0,0.1); }
.sopt-option-info { display: flex; flex-direction: column; gap: 2px; }
.sopt-option-name { font-size: 13px; font-weight: 500; color: var(--text); }
.sopt-option.active .sopt-option-name { color: var(--gold); }
.sopt-option-sub { font-size: 11px; color: rgba(255,255,255,0.38); }
.sopt-option svg { color: var(--gold); flex-shrink: 0; }

/* ── Back button ─────────────────────────────── */
.settings-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.35);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 28px;
    transition: color 0.15s;
    width: fit-content;
}
.settings-back-btn:hover { color: rgba(255,255,255,0.7); }

/* ── Contenuto destra ─────────────────────────── */
.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 48px 64px 80px;
    scrollbar-width: thin;
    scrollbar-color: rgba(218,167,0,0.12) transparent;
}
.settings-section {
    display: flex;
    flex-direction: column;
    max-width: 640px;
}
.settings-section-title {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 400;
    color: var(--text);
    margin: 0 0 8px;
    letter-spacing: 0.5px;
}
.settings-section-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.35);
    margin: 0 0 32px;
}

/* Card = blocco con righe orizzontali */
.settings-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 12px;
}

/* Ogni riga: label a sinistra, controllo a destra */
.settings-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    min-height: 58px;
}
.settings-field:last-child { border-bottom: none; }
.settings-field-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.settings-field-label {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255,255,255,0.82);
}
.settings-field-hint {
    font-size: 12px;
    color: rgba(255,255,255,0.3);
}
.settings-field-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* Input testuale */
.settings-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(218,167,0,0.18);
    padding: 4px 2px;
    color: rgba(255,255,255,0.7);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    text-align: right;
    width: 200px;
    transition: border-color 0.2s, color 0.2s;
}
.settings-input:focus { border-color: rgba(218,167,0,0.45); color: var(--text); }
.settings-input::placeholder { color: rgba(255,255,255,0.18); }
.settings-input:disabled { opacity: 0.3; cursor: not-allowed; border-color: transparent; }

/* Toggle group pill */
.settings-toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}
.stg-btn {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: rgba(255,255,255,0.35);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.stg-btn:hover { border-color: rgba(218,167,0,0.35); color: rgba(255,255,255,0.8); }
.stg-btn.active {
    background: rgba(218,167,0,0.12);
    border-color: rgba(218,167,0,0.4);
    color: var(--gold);
}

/* Select */
.settings-select {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(218,167,0,0.18);
    padding: 4px 22px 4px 2px;
    color: rgba(255,255,255,0.7);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(218,167,0,0.6)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2px center;
    min-width: 160px;
    text-align: right;
}
.settings-select option { background: #0d1525; color: #fff; }

/* Salva */
.settings-save-btn {
    align-self: flex-start;
    padding: 10px 28px;
    background: rgba(218,167,0,0.1);
    border: 1px solid rgba(218,167,0,0.28);
    border-radius: 10px;
    color: var(--gold);
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    margin-top: 20px;
}
.settings-save-btn:hover {
    background: rgba(218,167,0,0.17);
    border-color: rgba(218,167,0,0.5);
}

/* ── Toggle switch ────────────────────────────── */
.settings-toggle-switch { position: relative; display: inline-flex; cursor: pointer; }
.settings-toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.sts-track {
    width: 42px; height: 24px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    position: relative;
    transition: background 0.2s, border-color 0.2s;
}
.sts-thumb {
    position: absolute;
    top: 3px; left: 3px;
    width: 16px; height: 16px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}
.settings-toggle-switch input:checked + .sts-track {
    background: rgba(218,167,0,0.3);
    border-color: rgba(218,167,0,0.5);
}
.settings-toggle-switch input:checked + .sts-track .sts-thumb {
    transform: translateX(18px);
    background: var(--gold);
}

/* ── Righe cliccabili (account) ───────────────── */
.settings-field-btn {
    cursor: pointer;
    transition: background 0.15s;
}
.settings-field-btn:hover { background: rgba(255,255,255,0.04); }
.settings-field-danger:hover { background: rgba(255,80,80,0.06) !important; }

.icon-divider {
    width: 28px;
    height: 1px;
    background: var(--border);
    margin: 4px auto;
    flex-shrink: 0;
}

.sidebar.open .icon-divider {
    width: 100%;
    margin: 8px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    height: 38px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    overflow: hidden;
}


.sidebar-divider {
    height: 1px;
    background: rgba(218, 167, 0, 0.15);
    margin: 4px 6px;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border);
    color: var(--gold-light);
    transform: translateX(4px);
}

.menu-item.active {
    color: var(--gold);
}

.new-chat-btn {
    border: 1px solid rgba(218, 167, 0, 0.3);
    color: var(--gold);
}

.new-chat-btn:hover {
    background: rgba(218, 167, 0, 0.15);
    transform: translateY(-2px);
}

.icon-wrap {
    width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-item img,
.icon-wrap svg {
    transition: filter 0.3s;
}

.menu-item:hover img,
.menu-item:hover .icon-wrap svg,
.menu-item.active .icon-wrap svg {
    filter: drop-shadow(0 0 5px var(--gold-glow));
}

.menu-text {
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    opacity: 0;
    padding-left: 8px;
    transition: opacity 0.2s ease;
}

.sidebar.open .menu-text {
    opacity: 1;
    transition-delay: 0.1s;
}

/* Cronologia */
.sidebar-history-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px 10px;
    overflow-y: auto;
    border-top: 1px solid rgba(218, 167, 0, 0.1);
    scrollbar-width: thin;
    scrollbar-color: rgba(218, 167, 0, 0.2) transparent;
}

.sidebar-history-wrap::-webkit-scrollbar {
    width: 3px;
}

.sidebar-history-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-history-wrap::-webkit-scrollbar-thumb {
    background: rgba(218, 167, 0, 0.2);
    border-radius: 99px;
}

.sidebar-history-wrap::-webkit-scrollbar-thumb:hover {
    background: rgba(218, 167, 0, 0.4);
}

.sidebar.open .sidebar-history-wrap {
    opacity: 1;
    transition-delay: 0.15s;
}


.history-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0 10px 10px;
    opacity: 0.7;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.history-title {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    transition: color 0.2s;
}

.history-item:hover .history-title {
    color: var(--text);
}

.history-item.active .history-title {
    color: var(--gold-light);
}

.history-delete {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.2s;
}

.history-item:hover .history-delete {
    opacity: 0.6;
}

.history-delete:hover {
    opacity: 1 !important;
    color: #ff4d4d;
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(218, 167, 0, 0.15);
    border: 1px solid rgba(218, 167, 0, 0.4);
    color: var(--gold);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(218, 167, 0, 0.15);
}

/* ───────────────────────────────────────────────
   MAIN 
   ─────────────────────────────────────────────── */
.main {
    flex: 1;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    z-index: 10;
}

/* ───────────────────────────────────────────────
   HEADER CLOCK & MIHRAB POP-UP
   ─────────────────────────────────────────────── */
.header-clock {
    position: fixed;
    top: 30px;
    right: 120px;
    z-index: 900;
    cursor: pointer;
    background: rgba(13, 22, 40, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(218, 167, 0, 0.4);
    border-radius: 12px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.header-clock:hover {
    border-color: var(--gold);
    background: rgba(13, 22, 40, 0.8);
    transform: translateY(-2px);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--gold);
    animation: pulse 2s infinite;
}

.clock-time {
    font-family: 'Cinzel', serif;
    font-size: 17px;
    color: var(--gold-light);
    font-weight: 500;
    letter-spacing: 1.5px;
    text-shadow: 0 0 5px rgba(218, 167, 0, 0.2);
}

.clock-ar {
    font-family: 'Amiri', serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--gold);
    direction: rtl;
}

/* POP-UP MIHRAB */
.mihrab-overlay {
    position: fixed;
    top: 70px;
    right: 30px;
    z-index: 1000;
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mihrab-overlay.hidden {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    pointer-events: none;
}

.mihrab-card {
    width: 320px;
    height: 480px;
    position: relative;
    padding: 30px 20px 20px 20px;
    padding-top: 65px !important;
    background: transparent;
    border: none;
    box-shadow: none;
}

.mihrab-glass {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 14, 28, 0.95) 0%, rgba(5, 10, 20, 0.98) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    clip-path: path('M 10 480 L 10 240 C 10 200 35 190 40 160 C 45 130 25 110 60 80 C 95 50 130 50 160 15 C 190 50 225 50 260 80 C 295 110 275 130 280 160 C 285 190 310 200 310 240 L 310 480 Z');
    -webkit-clip-path: path('M 10 480 L 10 240 C 10 200 35 190 40 160 C 45 130 25 110 60 80 C 95 50 130 50 160 15 C 190 50 225 50 260 80 C 295 110 275 130 280 160 C 285 190 310 200 310 240 L 310 480 Z');
    z-index: 0;
}

.mihrab-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    filter: drop-shadow(0 0 8px rgba(218, 167, 0, 0.5));
}

.mihrab-glow {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(218, 167, 0, 0.3) 0%, rgba(218, 167, 0, 0) 70%);
    pointer-events: none;
    z-index: 2;
}

/* STRUTTURA INTERNA MIHRAB (Flexbox Pulito) */
.mihrab-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mihrab-header-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    gap: 8px;
    /* Distacco netto prima del Fajr */
}

/* --- LUNA REALE NEL MIHRAB --- */
.real-moon {
    width: 85px;
    border-radius: 50%;
    /* Essenziale per rendere circolari le immagini jpg */
    object-fit: cover;
    /* Effetto bagliore per staccarla dallo sfondo scuro */
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.15)) brightness(1.1);
    transition: opacity 0.5s ease-in-out;
    /* Transizione fluida al cambio fase */

}

.mihrab-moon-container {
    padding-top: 10px;
    margin-bottom: 25px !important;
    display: flex;
    justify-content: center;
}

#popupHijri {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    letter-spacing: 2px;
    color: var(--gold);
    text-align: center;
    margin: 0;
}

.prayer-timeline {
    width: 190px;
    margin: 0 auto;
}

.mihrab-prayer-row {
    display: grid;
    grid-template-columns: 1fr 30px 1fr;
    align-items: center;
    margin-bottom: 8px;
    padding: 6px 5px;
    transition: all 0.3s ease;
    border-radius: 12px;
}

.p-name {
    text-align: right;
    color: var(--text-muted);
    font-size: 15px;
    padding-right: 10px;
}

.p-time {
    text-align: left;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    color: var(--text);
    padding-left: 10px;
}

.t-line {
    position: relative;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.t-line::before {
    content: '';
    position: absolute;
    width: 1px;
    height: 250%;
    background: rgba(218, 167, 0, 0.3);
    z-index: 0;
}

.mihrab-prayer-row:first-child .t-line::before {
    top: 50%;
    height: 100%;
}

.mihrab-prayer-row:last-child .t-line::before {
    bottom: 50%;
    height: 100%;
}

.t-dot {
    width: 6px;
    height: 6px;
    background: var(--gold-mid);
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 5px var(--gold);
    transition: all 0.3s ease;
}

.active-prayer {
    background: rgba(218, 167, 0, 0.12);
    box-shadow: inset 0 0 15px rgba(218, 167, 0, 0.1);
}

.active-prayer .p-name,
.active-prayer .p-time {
    color: var(--gold-light);
    font-weight: bold;
}

.active-prayer .t-dot {
    background: var(--gold-light);
    box-shadow: 0 0 12px var(--gold-light), 0 0 20px var(--gold);
    transform: scale(1.8);
}

.countdown-box {
    margin-top: auto;
    /* Il segreto che spinge il timer sempre in fondo */
    padding-top: 15px;
    border-top: 1px solid rgba(218, 167, 0, 0.1);
    text-align: center;
    font-size: 12px;
    color: var(--gold-mid);
    letter-spacing: 1px;
}

/* ───────────────────────────────────────────────
   CHAT & WELCOME SCREEN
   ─────────────────────────────────────────────── */
.chat-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem 1rem 0;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    background: radial-gradient(circle at 30% 0%, rgba(218, 167, 0, 0.03) 0%, transparent 50%);
    scrollbar-width: thin;
    scrollbar-color: rgba(218, 167, 0, 0.45) rgba(255, 255, 255, 0.04);
}

.chat-container::-webkit-scrollbar {
    width: 3px;
}

.chat-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb {
    background: rgba(218, 167, 0, 0.45);
    border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: rgba(218, 167, 0, 0.8);
}




.messages-wrap {
    max-width: 640px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-bottom: 2rem;
    flex: 1;
}

.welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0px;
    margin-top: auto;
    margin-bottom: auto;
    padding: 28px 24px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* ── Welcome — giant faint arabic background ── */
.welcome-bg-ar {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Amiri', serif;
    font-size: 240px;
    color: #DCA842;
    opacity: 0.04;
    pointer-events: none;
    user-select: none;
    line-height: 1;
    direction: rtl;
    white-space: nowrap;
    z-index: 0;
}

/* ── Welcome — mihrab arch hero section ── */
.welcome-arch-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 640px;
    z-index: 1;
}

.welcome-arch-svg {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    width: min(560px, 100%);
}

.welcome-logo {
    width: 58px;
    height: 58px;
    margin: 22px auto 14px;
    display: block;
    filter: drop-shadow(0 0 14px rgba(220,168,66,0.4));
    animation: welcomeLogoPulse 4s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes welcomeLogoPulse {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(220,168,66,0.3)); }
    50%       { filter: drop-shadow(0 0 26px rgba(220,168,66,0.65)); }
}

/* ── Welcome — star divider ── */
.welcome-star-div {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 10px;
    position: relative;
    z-index: 1;
}

.welcome-star-line {
    width: 54px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(220,168,66,0.5));
}

.welcome-star-line-r {
    background: linear-gradient(90deg, rgba(220,168,66,0.5), transparent);
}

/* ── Welcome — cards section ── */
.welcome-cards-section {
    width: 100%;
    max-width: 720px;
    margin-top: 26px;
    z-index: 1;
    position: relative;
}

.welcome-cards-label {
    font-size: 10px;
    letter-spacing: 2.5px;
    color: var(--gold);
    font-weight: 700;
    text-align: center;
    margin-bottom: 14px;
    opacity: 0.85;
}

/* ── Suggestion card internals ── */
.scard-ar-bg {
    position: absolute;
    top: -14px;
    right: -6px;
    font-family: 'Amiri', serif;
    font-size: 58px;
    color: #DCA842;
    opacity: 0.09;
    line-height: 1;
    pointer-events: none;
    direction: rtl;
}

.scard-content {
    position: relative;
}

.scard-tag {
    font-size: 9.5px;
    letter-spacing: 1.6px;
    color: var(--gold);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: block;
}

.scard-q {
    font-size: 12.5px;
    color: var(--text-main);
    line-height: 1.4;
    font-weight: 400;
}

.welcome-anim {
    opacity: 0;
    animation: welcomeIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes welcomeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-top-line {
    width: 1px;
    height: 32px;
    background: linear-gradient(to bottom, transparent, rgba(218, 167, 0, 0.4));
    margin-bottom: 16px;
}

.welcome-bismillah {
    font-family: 'Amiri', serif;
    font-size: 26px;
    color: var(--gold);
    letter-spacing: 1px;
    margin: 0 0 14px 0;
    text-shadow: 0 0 20px rgba(220, 168, 66, 0.4);
    position: relative;
    z-index: 1;
}

.welcome-heading-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.welcome-title {
    font-family: 'Cinzel', serif;
    font-size: 30px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--text-main);
    margin: 0 0 2px;
    text-shadow: 0 0 40px rgba(218, 167, 0, 0.12);
    position: relative;
    z-index: 1;
}

.welcome-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    width: 260px;
}

.welcome-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(218, 167, 0, 0.3), transparent);
}

.welcome-divider-diamond {
    color: var(--gold-mid);
    font-size: 10px;
    opacity: 0.7;
    flex-shrink: 0;
}

.wt-gold {
    color: var(--gold);
}

.welcome-sub {
    font-size: 13.5px;
    color: var(--text-muted);
    font-style: italic;
    font-weight: 300;
    line-height: 1.7;
    max-width: 400px;
    letter-spacing: 0.2px;
    margin: 0;
    position: relative;
    z-index: 1;
}

.suggestions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    max-width: 680px;
    margin-top: 0;
}

.suggestion-btn {
    position: relative;
    padding: 13px 15px;
    border-radius: 13px;
    background: rgba(10, 22, 40, 0.65);
    border: 1px solid rgba(220, 168, 66, 0.18);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 400;
    cursor: pointer;
    text-align: left;
    transition: all 0.22s ease;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.suggestion-btn:hover {
    background: rgba(220, 168, 66, 0.09);
    border-color: rgba(220, 168, 66, 0.38);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(220, 168, 66, 0.15), 0 2px 8px rgba(0,0,0,0.2);
}

.suggestion-btn:focus {
    outline: none;
    border-color: rgba(220, 168, 66, 0.45);
    box-shadow: 0 0 0 3px rgba(220, 168, 66, 0.12);
}

.message {
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    align-items: flex-start;
}

.message.user {
    flex-direction: row-reverse;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
    overflow: hidden;
}

.avatar.najm {
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.4);
    box-shadow: none;
    overflow: visible;
}

.avatar.user-av {
    background: linear-gradient(135deg, var(--gold), #8b6914);
    border: none;
    color: #0a1628;
    font-size: 13px;
    font-weight: 700;
}

.bubble {
    max-width: 78%;
    padding: 14px 18px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.75;
    font-weight: 300;
    font-family: 'Inter', sans-serif;
    word-break: break-word;
}

/* ── Najm content wrapper ── */
.njm-content {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
    background: rgba(8, 14, 30, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(212,175,55,0.1);
    border-left: 2px solid rgba(212,175,55,0.3);
    border-radius: 0 12px 12px 12px;
    padding: 14px 18px;
    margin-top: -2px;
}
.njm-msg-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
}
.njm-msg-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
}
.njm-msg-meta {
    font-size: 10.5px;
    opacity: 0.5;
}

.message.najm .bubble {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    color: var(--text-main);
    box-shadow: none;
    max-width: 100%;
    padding: 0;
    animation: fadeIn 0.4s ease-out;
}

.message.user .bubble {
    background: linear-gradient(135deg, rgba(218,167,0,0.15) 0%, rgba(180,130,0,0.07) 100%);
    border: 1px solid rgba(218,167,0,0.32);
    border-radius: 14px 14px 4px 14px;
    color: var(--text-main);
    box-shadow: none;
    font-size: 14.5px;
    line-height: 1.55;
    animation: fadeIn 0.35s ease-out;
}

/* Titolo prima riga bubble */
.bubble .bubble-title {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--gold-light);
    margin: 0 0 10px 0;
    letter-spacing: 0.03em;
}

/* Lista strutturata in bubble */
.bubble .najm-list {
    list-style: none;
    padding: 0;
    margin: 4px 0 10px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bubble .najm-list li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-main);
}

.bubble .najm-list li::before {
    content: '·';
    color: var(--gold);
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

/* Frase introduttiva prima del box hadith/versetto */
.bubble .source-intro {
    font-size: 13px;
    color: rgba(218, 167, 0, 0.6);
    font-style: italic;
    margin: 8px 0 0 0;
    padding-top: 8px;
    border-top: 1px solid rgba(218, 167, 0, 0.1);
}

/* Paragrafi normali nel bubble */
.bubble p {
    margin: 0 0 6px 0;
    font-size: 15px;
    line-height: 1.7;
}

/* Markdown nel bubble */
.bubble h1,
.bubble h2,
.bubble h3 {
    font-family: 'Cinzel', serif;
    color: var(--gold-light);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.bubble h1 {
    font-size: 20px;
}

.bubble h2 {
    font-size: 18px;
}

.bubble h3 {
    font-size: 16px;
}

.bubble p {
    margin-bottom: 0.6rem;
}

.bubble ul,
.bubble ol {
    padding-left: 1.5rem;
    margin-bottom: 0.6rem;
}

.bubble li {
    margin-bottom: 0.3rem;
}

.bubble strong {
    color: var(--gold-light);
    font-weight: 600;
}

.bubble em {
    color: var(--text-muted);
}

.bubble code {
    background: rgba(218, 167, 0, 0.1);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 13px;
    color: var(--gold-light);
}

/* Typing */
.typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 14px 16px;
}

.typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold-mid);
    animation: gentlePulse 1.4s ease-in-out infinite;
}

.typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing span:nth-child(3) {
    animation-delay: 0.4s;
}

/* ───────────────────────────────────────────────
   INPUT PREMIUM
   ─────────────────────────────────────────────── */
.input-area {
    position: sticky;
    bottom: 0;
    align-self: stretch;
    margin-top: auto;
    /* Sfugge al padding laterale del chat-container */
    margin-left: -1rem;
    margin-right: -1rem;
    padding: 1.2rem 1rem 1rem;
    background: linear-gradient(to bottom, transparent, var(--bg) 30%);
}



.input-wrap {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: rgba(8, 14, 30, 0.7);
    border: 1px solid rgba(218, 167, 0, 0.18);
    border-radius: 18px;
    padding: 12px 12px 10px 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(218, 167, 0, 0.06);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.input-wrap:focus-within {
    border-color: rgba(218, 167, 0, 0.35);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(218, 167, 0, 0.06), inset 0 1px 0 rgba(218, 167, 0, 0.1);
}

/* Bottom row: dots counter + send button */
.input-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-right: 2px;
}

/* Dots counter inside input */
.msg-dots-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.msg-dots-inner .mlb-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.msg-dots-inner .mlb-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.25);
    transition: background 0.3s;
}

.msg-dots-inner .mlb-dot.used {
    background: var(--gold);
    box-shadow: 0 0 4px rgba(220, 168, 66, 0.5);
}

.msg-dots-inner .mlb-label {
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.02em;
}

.input-box {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 300;
    resize: none;
    min-height: 26px;
    max-height: 140px;
    line-height: 1.6;
    scrollbar-width: none;
    padding: 2px 0;
}

.input-box::placeholder {
    color: rgba(185, 199, 173, 0.3);
}

.send-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, rgba(218, 167, 0, 0.85), rgba(180, 130, 0, 0.9));
    color: #0a1020;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(218, 167, 0, 0.3);
}

.send-btn:hover {
    background: linear-gradient(135deg, rgba(218, 167, 0, 1), rgba(200, 150, 0, 1));
    transform: scale(1.06);
    box-shadow: 0 4px 16px rgba(218, 167, 0, 0.45);
}

.send-btn:active {
    transform: scale(0.94);
}

.send-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.disclaimer {
    text-align: center;
    font-size: 11px;
    color: rgba(185, 199, 173, 0.25);
    margin-top: 8px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* ───────────────────────────────────────────────
   CARD CORANO / TAFSIR / HADITH
   ─────────────────────────────────────────────── */
.quran-ref {
    display: inline-block;
    background: linear-gradient(135deg, #DAA700 0%, #C9A84C 100%);
    color: #050B1A;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-top: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(218, 167, 0, 0.3);
}

.quran-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.6rem;
    text-align: center;
    direction: rtl;
    color: #FCF4CC;
    background: rgba(13, 22, 40, 0.8);
    border: 1px solid rgba(218, 167, 0, 0.3);
    border-radius: 12px;
    padding: 20px 15px;
    margin-bottom: 10px;
    line-height: 2.0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.quran-italian {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    text-align: center;
    color: #DAA700;
    background: rgba(13, 22, 40, 0.5);
    border: 1px dashed rgba(218, 167, 0, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    line-height: 1.6;
    font-style: italic;
}

.tafsir-box {
    background: rgba(8, 14, 30, 0.6);
    border-left: 4px solid #DAA700;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    color: #B9C7AD;
    line-height: 1.7;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tafsir-label {
    font-weight: bold;
    color: #DAA700;
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ───────────────────────────────────────────────
   VISTE SECONDARIE (Preghiera, Corano, Segnalibri)
   ─────────────────────────────────────────────── */
/* ═══════════════════════════════════════════════
   PRAYER — REDESIGN
   ═══════════════════════════════════════════════ */
.prayer-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.prayer-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 20px 40px 30px;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(218, 167, 0, 0.15) transparent;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}



/* Header */
.prayer-page-header {
    flex-shrink: 0;
}

.prayer-page-eyebrow {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(218, 167, 0, 0.6);
    font-weight: 600;
    margin-bottom: 6px;
}

.prayer-page-title {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 14px;
}

.prayer-page-title h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 500;
    margin: 0;
    color: var(--text);
}

.prayer-title-ar {
    font-family: 'Amiri', serif;
    font-size: 26px;
    color: var(--gold);
}

.prayer-page-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.city-search-wrap {
    display: flex;
    gap: 0;
    flex: 1;
    max-width: 300px;
}

#citySearchInput {
    flex: 1;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(218, 167, 0, 0.15);
    border-right: none;
    border-radius: 20px 0 0 20px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    outline: none;
}

.city-search-btn {
    padding: 8px 14px;
    background: var(--gold);
    border: none;
    border-radius: 0 20px 20px 0;
    color: #050B1A;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.prayer-date-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-btn {
    background: rgba(218, 167, 0, 0.08);
    border: 1px solid rgba(218, 167, 0, 0.2);
    color: var(--gold);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
}

.date-btn:hover {
    background: rgba(218, 167, 0, 0.18);
}

#prayerDateDisplay {
    font-size: 13px;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

/* Card prossima preghiera */
.next-prayer-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(26, 43, 66, 0.9), rgba(10, 22, 40, 0.8));
    border: 1px solid rgba(218, 167, 0, 0.25);
    border-radius: 14px;
    padding: 26px 32px;
    flex-shrink: 0;
}

.npc-star {
    position: absolute;
    top: -10px;
    right: -10px;
    opacity: 1;
    pointer-events: none;
}

.npc-label {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(218, 167, 0, 0.6);
    font-weight: 600;
    margin-bottom: 6px;
}

.npc-name-row {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 2px;
}

.npc-name-en {
    font-family: 'Cormorant Garamond', serif;
    font-size: 58px;
    font-weight: 500;
    line-height: 1;
    color: var(--text);
}

.npc-name-ar {
    font-family: 'Amiri', serif;
    font-size: 40px;
    color: var(--gold);
}

.npc-time {
    font-size: 26px;
    font-weight: 700;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
    margin-bottom: 16px;
}

.npc-progress-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.npc-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

.npc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #c9a035, #f2d580, #e4bd52);
    border-radius: 999px;
    transition: none;
    box-shadow: 0 0 8px rgba(218, 167, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.npc-progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    animation: shimmerBar 2.5s ease-in-out infinite;
}

@keyframes shimmerBar {
    0%   { left: -60%; }
    100% { left: 140%; }
}

.npc-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

/* Pulsante notifica preghiera */
.prayer-notif-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.35;
}

.prayer-notif-btn:hover {
    opacity: 0.8;
    background: rgba(218, 167, 0, 0.1);
}

.prayer-notif-btn.active {
    opacity: 1;
    color: var(--gold);
}

.prayer-notif-btn.active svg {
    stroke: var(--gold);
    filter: drop-shadow(0 0 4px rgba(218, 167, 0, 0.6));
}

.prayer-notif-btn.muted svg {
    stroke: rgba(255,255,255,0.3);
}

/* Tabella preghiere */
.prayer-table-wrap {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(218, 167, 0, 0.08);
    border-radius: 14px;
    overflow: hidden;
}

.prayer-table-header {
    display: grid;
    grid-template-columns: 1fr 130px 130px 44px;
    padding: 10px 22px;
    border-bottom: 1px solid rgba(218, 167, 0, 0.15);
    font-size: 10px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
}

.ptable-row {
    display: grid;
    grid-template-columns: 1fr 100px 100px 40px;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.15s;
}

.ptable-row:last-child {
    border-bottom: none;
}

.ptable-row:hover {
    background: rgba(218, 167, 0, 0.04);
}

.ptable-row-next {
    background: rgba(218, 167, 0, 0.06) !important;
}

.ptable-row-past {
    opacity: 0.45;
}

.ptable-row-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.prayer-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.prayer-dot-next {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(218, 167, 0, 0.7);
}

.ptable-row-name-it {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
}

.ptable-row-next .ptable-row-name-it {
    color: var(--gold);
    font-weight: 600;
}

.ptable-row-name-ar {
    font-family: 'Amiri', serif;
    font-size: 18px;
    color: rgba(218, 167, 0, 0.5);
    direction: rtl;
}

.ptable-row-adhan {
    font-size: 16px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.7);
}

.ptable-row-adhan-next {
    color: var(--gold);
    font-weight: 700;
    font-size: 18px;
}

.ptable-row-iqama {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.4);
    font-variant-numeric: tabular-nums;
}

.ptable-row-bell {
    display: flex;
    justify-content: center;
    cursor: pointer;
}

.ptable-row-bell:hover svg {
    opacity: 1 !important;
}

.prayer-update-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid rgba(218, 167, 0, 0.2);
    color: rgba(218, 167, 0, 0.7);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    transition: all 0.2s;
    align-self: flex-start;
}

.prayer-update-btn:hover {
    background: rgba(218, 167, 0, 0.1);
    border-color: var(--gold);
    color: var(--gold);
}

/* ═══════════════════════════════════════════════
   DU'A — DUAS & ADHKAR
   ═══════════════════════════════════════════════ */

.dua-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dua-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(218, 167, 0, 0.4) rgba(218, 167, 0, 0.1);
}

/* Scrollbar styling per Chrome/Edge */
.dua-page::-webkit-scrollbar {
    width: 8px;
}

.dua-page::-webkit-scrollbar-track {
    background: rgba(218, 167, 0, 0.08);
    border-radius: 4px;
}

.dua-page::-webkit-scrollbar-thumb {
    background: rgba(218, 167, 0, 0.4);
    border-radius: 4px;
    border: 2px solid rgba(218, 167, 0, 0.08);
}

.dua-page::-webkit-scrollbar-thumb:hover {
    background: rgba(218, 167, 0, 0.6);
}

.dua-page-header {
    padding: 28px 36px 22px;
    border-bottom: 1px solid rgba(218, 167, 0, 0.1);
    background: rgba(10, 22, 40, 0.5);
    position: sticky;
    top: 0;
    z-index: 10;
    transition: transform 0.28s ease;
}
.dua-page-header.hdr-hidden {
    transform: translateY(-100%);
}

.dua-page-eyebrow {
    font-size: 11px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 6px;
}

.dua-page-title {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.dua-page-title h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 38px;
    font-weight: 500;
    margin: 0;
    letter-spacing: -0.5px;
}

.dua-title-ar {
    font-family: 'Amiri', serif;
    font-size: 28px;
    color: var(--gold);
}

/* Progress Hero */
.dua-progress-hero {
    padding: 24px 36px 8px;
    background: linear-gradient(135deg, rgba(218, 167, 0, 0.15), rgba(218, 167, 0, 0.05));
    border: 1px solid rgba(218, 167, 0, 0.3);
    border-radius: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    margin: 24px 36px 8px;
}

.dua-progress-col {
    display: flex;
    flex-direction: column;
}

.dua-progress-label {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 6px;
}

.dua-progress-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 4px;
}

.dua-progress-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 8px;
}

.dua-progress-bar {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.dua-progress-fill {
    height: 100%;
    background: var(--gold);
}

.dua-progress-sub {
    font-size: 12px;
    opacity: 0.7;
}

/* Featured Du'a Card */
.dua-featured-card {
    padding: 26px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(218, 167, 0, 0.15);
    border-left: 4px solid var(--gold);
    margin: 16px 36px 8px;
}

.dua-featured-label {
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 14px;
}

.dua-featured-ref {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(218, 167, 0, 0.2);
    color: var(--gold);
    font-weight: 600;
    display: inline-block;
    margin-bottom: 14px;
}

.dua-featured-ar {
    font-family: 'Amiri', serif;
    font-size: 24px;
    line-height: 2.1;
    margin-bottom: 14px;
}

.dua-featured-it {
    font-size: 13px;
    font-style: italic;
    opacity: 0.85;
    line-height: 1.6;
    margin-bottom: 14px;
}

.dua-featured-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dua-feat-btn {
    padding: 8px 14px;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(218, 167, 0, 0.25);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.dua-feat-btn:hover {
    background: rgba(218, 167, 0, 0.1);
    border-color: var(--gold);
    color: var(--gold);
}

/* Collections */
.dua-collections-wrap {
    padding: 20px 36px 36px;
}

.dua-collections-label {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 14px;
}

.dua-collections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.dua-collection-card {
    padding: 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(218, 167, 0, 0.1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s;
}

.dua-collection-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(218, 167, 0, 0.3);
    transform: translateY(-2px);
}

.dua-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dua-card-ar {
    font-family: 'Amiri', serif;
    font-size: 14px;
    color: var(--gold);
    opacity: 0.7;
}

.dua-card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 500;
}

.dua-card-desc {
    font-size: 11px;
    opacity: 0.6;
}

.dua-card-progress {
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    margin-top: 4px;
}

.dua-card-progress-bar {
    width: 100%;
    height: 100%;
}

.dua-card-progress-fill {
    height: 100%;
    width: 30%;
    background: var(--gold);
}

/* Collection Detail Header */
.dua-collection-header {
    padding: 28px 36px 22px;
    border-bottom: 1px solid rgba(218, 167, 0, 0.1);
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.dua-collection-header > div:last-child {
    flex: 1;
}

/* ─── Ask Najm Section ─── */
.dua-ask-najm {
    background: linear-gradient(135deg, rgba(218, 167, 0, 0.08) 0%, rgba(218, 167, 0, 0.04) 100%);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
    margin: 28px 0;
    backdrop-filter: blur(10px);
}

.dua-ask-button-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

.dua-ask-najm-btn {
    background: transparent;
    border: 1px solid rgba(218, 167, 0, 0.3);
    border-radius: 14px;
    padding: 18px 40px;
    color: var(--gold);
    font-weight: 500;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(218, 167, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: inherit;
}

.dua-ask-najm-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(218, 167, 0, 0.6);
    background: rgba(218, 167, 0, 0.06);
    box-shadow: 0 8px 24px rgba(218, 167, 0, 0.15);
}

.dua-ask-najm-btn:active {
    transform: translateY(-2px);
}

.dua-ask-input-wrapper {
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dua-ask-header {
    margin-bottom: 24px;
}

.dua-ask-header h3 {
    font-size: 22px;
    color: var(--gold);
    margin: 0 0 8px 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.dua-ask-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

.dua-ask-input-wrap {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.dua-ask-input {
    flex: 1;
    background: rgba(8, 14, 30, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.dua-ask-input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(8, 14, 30, 0.9);
    box-shadow: 0 0 16px rgba(218, 167, 0, 0.2);
}

.dua-ask-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.dua-ask-btn {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-mid) 100%);
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    color: #050B1A;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(218, 167, 0, 0.2);
}

.dua-ask-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(218, 167, 0, 0.3);
    background: linear-gradient(135deg, var(--gold-mid) 0%, var(--gold) 100%);
}

.dua-ask-btn:active {
    transform: translateY(0);
}

.dua-ask-result {
    background: rgba(8, 14, 30, 0.4);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin-top: 16px;
}

.dua-ask-loading {
    color: var(--gold);
    font-size: 16px;
    text-align: center;
    padding: 20px;
    animation: gentlePulse 2.5s ease-in-out infinite;
}

#duaSearchContent {
    color: var(--text);
    line-height: 1.7;
}

#duaSearchContent .dua-result-ar {
    direction: rtl;
    font-family: 'Amiri Quran', serif;
    font-size: 20px;
    color: var(--gold);
    margin: 16px 0;
    padding: 12px;
    background: rgba(218, 167, 0, 0.1);
    border-right: 3px solid var(--gold);
    border-radius: 8px;
}

#duaSearchContent .dua-result-it {
    font-size: 15px;
    color: var(--text);
    margin: 12px 0;
}

#duaSearchContent .dua-result-source {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
    .prayer-page {
        padding: 18px 16px 30px;
    }

    .prayer-page-title h2 {
        font-size: 26px;
    }

    .npc-name-en {
        font-size: 36px;
    }

    .prayer-table-header,
    .ptable-row {
        grid-template-columns: 1fr 70px 70px 28px;
    }
}

.date-btn:hover {
    background: var(--gold);
    color: #050B1A;
}

#prayerDateDisplay {
    color: var(--gold-light);
    font-size: 15px;
    font-weight: 500;
    min-width: 140px;
}

.city-search-wrap {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
}

#citySearchInput {
    background: rgba(8, 14, 30, 0.8);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 16px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    width: 100%;
    max-width: 250px;
    outline: none;
    transition: border-color 0.2s;
}

#citySearchInput:focus {
    border-color: var(--gold);
}

.city-search-btn {
    background: var(--gold-mid);
    border: none;
    border-radius: 14px;
    width: 42px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.city-search-btn:hover {
    background: var(--gold);
    transform: scale(1.05);
}

/* ═══════════════════════════════════════════════
   CORANO — REDESIGN (stile screenshot)
   ═══════════════════════════════════════════════ */

/* Container principale */
.quran-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    padding: 0;
    align-items: stretch;
    justify-content: flex-start;
}

/* ═══════════════════════════════════════════════════════════
   HOME — ARCO DEL GIORNO
   ═══════════════════════════════════════════════════════════ */

/* Header */
.harc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    gap: 24px;
}
.harc-greeting {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    opacity: 0.85;
    margin-bottom: 6px;
}
.harc-time-line {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.3px;
}
.harc-time {
    color: var(--gold);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.harc-next-hint {
    font-size: 15px;
    font-style: italic;
    opacity: 0.65;
    font-weight: 400;
}
.harc-location-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    font-size: 11.5px;
    opacity: 0.85;
}
.harc-hijri {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-weight: 500;
    margin-top: 8px;
    line-height: 1.3;
}
.harc-greg {
    font-size: 10.5px;
    opacity: 0.5;
    margin-top: 2px;
}

/* Arc */
.harc-arc-wrap {
    position: relative;
    margin-bottom: 32px;
}

/* ── Mobile prayer compact card (replaces arc on phones) ── */
.harc-mob-card {
    display: none; /* shown only on mobile via media query */
    background: rgba(10,22,40,0.6);
    border: 1px solid rgba(218,167,0,0.2);
    border-radius: 16px;
    padding: 18px 16px 14px;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}
.harc-mob-top {
    text-align: center;
    margin-bottom: 14px;
}
.harc-mob-label {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    margin-bottom: 6px;
}
.harc-mob-next {
    font-size: 26px;
    font-weight: 600;
    color: #DAA700;
    letter-spacing: 0.5px;
    line-height: 1.1;
}
.harc-mob-cd {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin-top: 4px;
    letter-spacing: 0.5px;
}
.harc-mob-pills {
    display: flex;
    gap: 5px;
    justify-content: space-between;
}
.harc-mob-pill {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(218,167,0,0.08);
    border-radius: 10px;
    padding: 8px 3px 7px;
    gap: 3px;
    transition: background 0.3s, border-color 0.3s, opacity 0.3s;
}
.harc-mob-pill.active {
    background: rgba(218,167,0,0.12);
    border-color: rgba(218,167,0,0.42);
}
.harc-mob-pill.passed {
    opacity: 0.32;
}
.harc-mob-pill-name {
    font-size: 8.5px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    font-weight: 600;
}
.harc-mob-pill.active .harc-mob-pill-name {
    color: #DAA700;
}
.harc-mob-pill-time {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    font-family: 'Cormorant Garamond', serif;
}
.harc-mob-pill.active .harc-mob-pill-time {
    color: #DAA700;
}
.harc-horizon {
    display: flex;
    justify-content: space-between;
    padding: 0 4px;
    margin-top: 10px;
}
.harc-hor-lbl {
    font-size: 10px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    opacity: 0.4;
    font-weight: 600;
}

/* Section label */
.harc-section-lbl {
    font-size: 9.5px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    opacity: 0.8;
    margin-bottom: 10px;
}

/* 2-column grid */
.harc-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 28px;
    margin-bottom: 0;
    align-items: start;
}

/* Verse card */
.harc-verse-card {
    position: relative;
    padding: 22px 24px;
    background: linear-gradient(180deg, rgba(20,32,52,0.55), rgba(10,22,40,0.28));
    border: 1px solid rgba(218,167,0,0.2);
    border-radius: 2px;
    overflow: hidden;
}
.harc-corner {
    position: absolute;
    width: 18px;
    height: 18px;
}
.harc-corner-tl { top:12px; left:12px;  border-top:  1px solid rgba(218,167,0,0.5); border-left:  1px solid rgba(218,167,0,0.5); }
.harc-corner-tr { top:12px; right:12px; border-top:  1px solid rgba(218,167,0,0.5); border-right: 1px solid rgba(218,167,0,0.5); }
.harc-corner-bl { bottom:12px; left:12px;  border-bottom: 1px solid rgba(218,167,0,0.5); border-left:  1px solid rgba(218,167,0,0.5); }
.harc-corner-br { bottom:12px; right:12px; border-bottom: 1px solid rgba(218,167,0,0.5); border-right: 1px solid rgba(218,167,0,0.5); }

.harc-verse-ar {
    font-family: 'Amiri', serif;
    font-size: 28px;
    direction: rtl;
    text-align: center;
    line-height: 1.7;
    margin-bottom: 14px;
    color: var(--gold);
}
.harc-verse-div {
    height: 1px;
    width: 44px;
    background: var(--gold);
    margin: 0 auto 14px;
    opacity: 0.45;
}
.harc-verse-it {
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    font-style: italic;
    text-align: center;
    line-height: 1.45;
    margin-bottom: 10px;
    opacity: 0.95;
}
.harc-verse-ref {
    font-size: 10px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--gold);
    text-align: center;
    font-weight: 600;
    opacity: 0.75;
}
.harc-verse-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.harc-vpill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(218,167,0,0.28);
    background: transparent;
    color: rgba(255,255,255,0.7);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    letter-spacing: 0.2px;
}
.harc-vpill:hover {
    background: rgba(218,167,0,0.1);
    border-color: rgba(218,167,0,0.6);
    color: var(--gold);
}

/* Quick actions */
.harc-quick-list {
    display: flex;
    flex-direction: column;
}
.harc-quick-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.055);
    cursor: pointer;
    transition: background .15s;
    border-radius: 4px;
}
.harc-quick-item:hover { background: rgba(218,167,0,0.05); }
.harc-qi-last { border-bottom: none; }
.harc-qi-text { flex: 1; min-width: 0; }
.harc-qi-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 1px;
}
.harc-qi-accent { color: var(--gold); }
.harc-qi-sub { font-size: 11.5px; opacity: 0.5; }
.harc-qi-ar {
    font-family: 'Amiri', serif;
    font-size: 22px;
    color: var(--gold);
    opacity: 0.55;
    flex-shrink: 0;
}

/* Stats row */
.harc-stats {
    display: flex;
    padding: 24px 0;
    border-top:    1px solid rgba(218,167,0,0.12);
    border-bottom: 1px solid rgba(218,167,0,0.12);
}
.harc-stat {
    flex: 1;
    padding: 0 20px;
}
.harc-stat-sep { border-left: 1px solid rgba(255,255,255,0.055); }
.harc-stat-n {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 600;
    line-height: 1;
    color: var(--gold);
    margin-bottom: 5px;
}
.harc-stat-l {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 2px;
}
.harc-stat-sub {
    font-size: 10.5px;
    opacity: 0.45;
}

/* ── HOMEPAGE SURE ───────────────────────────── */
.quran-home {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(218, 167, 0, 0.15) transparent;
}



/* Header sticky stile PageShell */
.quran-home-header {
    padding: 28px 48px 24px;
    border-bottom: 1px solid rgba(218, 167, 0, 0.1);
    background: rgba(10, 22, 40, 0.5);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
    transition: transform 0.28s ease;
}
.quran-home-header.hdr-hidden {
    transform: translateY(-100%);
}

.quran-home-eyebrow {
    font-size: 11px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 6px;
}

.quran-home-title {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.quran-home-title h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 40px;
    font-weight: 500;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.5px;
}

.quran-home-title-ar {
    font-family: 'Amiri', serif;
    font-size: 28px;
    color: var(--gold);
    direction: rtl;
}

/* Corpo con padding */
.quran-home-body {
    padding: 32px 48px 48px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Card featured Al-Fatiha */
.quran-featured-card {
    padding: 32px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(26, 43, 66, 0.9) 0%, rgba(10, 22, 40, 0.8) 100%);
    border: 1px solid rgba(218, 167, 0, 0.25);
    flex-shrink: 0;
}

.quran-featured-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.quran-featured-meta {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 8px;
}

.quran-featured-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 34px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
}

.quran-featured-name-sub {
    font-size: 13px;
    opacity: 0.7;
    font-style: italic;
}

.quran-featured-ar {
    font-family: 'Amiri', serif;
    font-size: 42px;
    color: var(--gold);
    direction: rtl;
}

/* Box bismillah */
.quran-featured-bismillah-box {
    padding: 28px;
    border-radius: 12px;
    text-align: center;
    background: rgba(10, 22, 40, 0.5);
    border: 1px solid rgba(218, 167, 0, 0.15);
    margin-bottom: 20px;
}

.quran-featured-bismillah {
    font-family: 'Amiri', serif;
    font-size: 36px;
    line-height: 2.2;
    direction: rtl;
    color: var(--gold);
    display: block;
    margin-bottom: 10px;
}

.quran-featured-translation {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-style: italic;
    opacity: 0.85;
    color: var(--text);
}

/* Bottoni featured */
.quran-featured-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quran-feat-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.quran-feat-btn-primary {
    background: var(--gold);
    color: #050B1A;
    border: none;
    font-weight: 600;
}

.quran-feat-btn-primary:hover {
    background: var(--gold-light);
}

.quran-feat-btn-secondary {
    background: transparent;
    border: 1px solid rgba(218, 167, 0, 0.3);
    color: var(--text);
}

.quran-feat-btn-secondary:hover {
    background: rgba(218, 167, 0, 0.08);
    border-color: var(--gold);
}

/* Barra TUTTE LE SURE + tabs */
.quran-list-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.quran-list-label {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
}

.quran-tabs {
    display: flex;
    gap: 6px;
    align-items: center;
}

.quran-tab {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text);
    opacity: 0.6;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.18s;
    font-weight: 400;
}

.quran-tab.active {
    background: rgba(218, 167, 0, 0.15);
    border-color: rgba(218, 167, 0, 0.4);
    color: var(--gold);
    opacity: 1;
    font-weight: 600;
}

.quran-tab:hover:not(.active) {
    opacity: 1;
}

/* Grid sure — 2 colonne */
.sura-list {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    align-content: start;
}

/* Card sura — stile esatto dal mockup */
.sura-card-mini {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.sura-card-mini:hover {
    background: rgba(218, 167, 0, 0.06);
    border-color: rgba(218, 167, 0, 0.2);
}

.sura-card-mini.active {
    background: rgba(218, 167, 0, 0.1);
    border-color: rgba(218, 167, 0, 0.4);
}

/* Badge numero con stella islamica */
.s-num-badge {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.s-num-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 48 48' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 2L30 10L41 7L38 18L46 24L38 30L41 41L30 38L24 46L18 38L7 41L10 30L2 24L10 18L7 7L18 10Z' stroke='rgba(218,167,0,0.4)' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

.s-num-text {
    position: relative;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
    font-family: 'Cormorant Garamond', serif;
    z-index: 1;
}

.s-info {
    flex: 1;
    min-width: 0;
}

.s-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.s-meta {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.6;
}

.s-ar {
    font-family: 'Amiri', serif;
    font-size: 20px;
    color: var(--gold);
    flex-shrink: 0;
    direction: rtl;
}

@media (max-width: 900px) {
    .quran-home-header {
        padding: 20px 20px 16px;
    }

    .quran-home-body {
        padding: 20px;
    }

    .quran-home-title h2 {
        font-size: 28px;
    }

    .sura-list {
        grid-template-columns: 1fr;
    }

    .quran-featured-bismillah {
        font-size: 26px;
    }

    .quran-featured-name {
        font-size: 26px;
    }
}

.quran-reader-layout {
    display: none;
    flex: 1;
    overflow: hidden;
    flex-direction: column;
}

/* ── READER TOP CHROME ──────────────────────────────────────── */
.mushaf-top-chrome {
    position: relative;
    z-index: 10;
    padding: 18px 32px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    flex-shrink: 0;
}

.mushaf-back-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.2s;
}

.mushaf-back-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.06);
}

.mushaf-chrome-center {
    text-align: center;
}

.mushaf-chrome-ar {
    font-family: 'Amiri', serif;
    font-size: 24px;
    color: var(--gold);
    display: block;
    margin-bottom: 2px;
}

.mushaf-chrome-sub {
    font-size: 11px;
    opacity: 0.5;
}

.mushaf-chrome-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.mushaf-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(218, 167, 0, 0.2);
    color: inherit;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.mushaf-pill-btn:hover {
    background: rgba(218, 167, 0, 0.12);
    border-color: rgba(218, 167, 0, 0.45);
}

.mushaf-pill-btn.gold {
    background: var(--gold);
    color: #050B1A;
    border-color: var(--gold);
    font-weight: 600;
}

.mushaf-pill-btn.gold:hover {
    background: var(--gold-light);
}

/* ── GRIGLIA MUSHAF CON ANIMAZIONE SLIDE ───────────────────── */
.mushaf-grid {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
    padding: 0 32px 24px;
    gap: 0;
    position: relative;
}

/* Pagina — centrata di default, scivola a sinistra al click */
.mushaf-page {
    background: rgba(245, 241, 232, 0.04);
    border: 1px solid rgba(218, 167, 0, 0.25);
    border-radius: 8px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    flex: 0 0 820px;
    transition: flex-basis 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Quando pannello aperto: pagina si restringe */
.mushaf-grid.panel-open .mushaf-page {
    flex: 0 0 55%;
}

/* Pannello destro — parte con width 0 */
.mushaf-right-panel {
    flex: 0 0 0px;
    overflow: hidden;
    opacity: 0;
    transition: flex-basis 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease,
        margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    margin-left: 0;
}

/* Quando aperto */
.mushaf-grid.panel-open .mushaf-right-panel {
    flex: 0 0 calc(45% - 28px);
    opacity: 1;
    margin-left: 28px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(218, 167, 0, 0.12) transparent;
}


.mrp-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 4px;
}

.mrp-label {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 10px;
}

.mrp-it {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-style: italic;
    line-height: 1.65;
    opacity: 0.9;
    margin-bottom: 16px;
}

.mrp-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.mushaf-page-badge {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 10px;
    opacity: 0.45;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.mushaf-page-star {
    text-align: center;
    padding: 24px 0 8px;
    flex-shrink: 0;
}

.mushaf-page-verses {
    flex: 1;
    overflow-y: auto;
    padding: 8px 48px 32px;
    scrollbar-width: thin;
    scrollbar-color: rgba(218, 167, 0, 0.15) transparent;
    direction: rtl;
}



.mushaf-full-text {
    font-family: 'Amiri', serif;
    font-size: 28px;
    line-height: 2.4;
    text-align: right;
    direction: rtl;
    color: rgba(252, 244, 204, 0.9);
}

.mushaf-ayah-inline {
    display: inline;
    cursor: pointer;
    transition: all 0.15s;
    border-radius: 3px;
    padding: 0 3px;
}

.mushaf-ayah-inline:hover {
    background: rgba(218, 167, 0, 0.1);
}

.mushaf-ayah-inline.highlighted {
    background: linear-gradient(0deg, rgba(218, 167, 0, 0.2) 0%, rgba(218, 167, 0, 0.06) 100%);
    border-bottom: 2px solid var(--gold);
}

.mushaf-ayah-num {
    font-size: 13px;
    vertical-align: super;
    color: rgba(218, 167, 0, 0.7);
    font-weight: 600;
    margin: 0 3px;
    direction: ltr;
    unicode-bidi: bidi-override;
}

.mushaf-page-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 16px 0;
    border-top: 1px solid rgba(218, 167, 0, 0.08);
    flex-shrink: 0;
}

.mushaf-nav-chip {
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.18s;
    font-weight: 500;
}

.mushaf-nav-chip:hover {
    background: rgba(218, 167, 0, 0.1);
    color: var(--gold);
    border-color: rgba(218, 167, 0, 0.3);
}

.mushaf-nav-chip.active-chip {
    background: var(--gold);
    color: #050B1A;
    border-color: var(--gold);
    font-weight: 700;
    cursor: default;
}

/* ── OVERLAY AYAH (sotto la pagina, on-demand) ─────────────── */
.mushaf-ayah-overlay {
    width: 100%;
    max-width: 760px;
    margin-top: 12px;
    background: rgba(10, 16, 30, 0.95);
    border: 1px solid rgba(218, 167, 0, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    animation: overlayIn 0.2s ease;
    flex-shrink: 0;
}

@keyframes overlayIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mao-ref {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 8px;
}

.mao-it {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-style: italic;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 14px;
}

.mao-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.tafsir-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    font-weight: 500;
}

.tafsir-action-btn.primary {
    background: rgba(218, 167, 0, 0.15);
    border: 1px solid rgba(218, 167, 0, 0.4);
    color: var(--gold);
}

.tafsir-action-btn.primary:hover {
    background: rgba(218, 167, 0, 0.25);
}

.tafsir-action-btn.secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
}

.tafsir-action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    color: white;
}

.tafsir-scholar-block {
    padding: 18px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(218, 167, 0, 0.12);
    margin-bottom: 10px;
    animation: tFadeIn 0.3s ease forwards;
    opacity: 0;
}

.tafsir-scholar-block:nth-child(2) {
    animation-delay: 0.08s;
}

.tafsir-scholar-block:nth-child(3) {
    animation-delay: 0.16s;
}

@keyframes tFadeIn {
    to {
        opacity: 1;
    }
}

.tafsir-scholar-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
}

.tafsir-scholar-en {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--text);
}

.tafsir-scholar-ar {
    font-family: 'Amiri', serif;
    font-size: 15px;
    color: var(--gold);
    opacity: 0.8;
}

.tafsir-scholar-body {
    font-size: 13px;
    line-height: 1.6;
    opacity: 0.8;
}

.tafsir-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    padding: 12px 0;
}

.tld {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    animation: tdPulse 1.2s ease-in-out infinite;
}

.tld:nth-child(2) {
    animation-delay: 0.2s;
}

.tld:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes tdPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

#reciterSelect {
    background: rgba(255, 255, 255, 0.05);
    color: var(--gold);
    border: 1px solid rgba(218, 167, 0, 0.2);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 11px;
    cursor: pointer;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.reader-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 16px;
    opacity: 0.35;
}

.reader-placeholder p {
    font-size: 14px;
    color: var(--text-muted);
}

@media (max-width: 1100px) {
    .mushaf-grid {
        padding: 0 16px 20px;
    }

    .mushaf-grid.panel-open .mushaf-page {
        max-width: 50%;
    }

    .mushaf-grid.panel-open .mushaf-right-panel {
        width: calc(50% - 20px);
    }

    .mushaf-top-chrome {
        padding: 14px 20px;
    }

    .mushaf-full-text {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .mushaf-chrome-center {
        display: none;
    }

    .mushaf-page-verses {
        padding: 8px 18px 24px;
    }

    .mushaf-full-text {
        font-size: 20px;
    }

    /* Su mobile: pannello appare sopra come overlay */
    .mushaf-grid.panel-open .mushaf-page {
        max-width: 100%;
    }

    .mushaf-grid.panel-open .mushaf-right-panel {
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 85vw !important;
        margin-left: 0;
        background: rgba(8, 14, 28, 0.97);
        z-index: 20;
        border-left: 1px solid rgba(218, 167, 0, 0.2);
        padding: 20px 16px;
    }
}


/* ═══════════════════════════════════════════════════════
   NEW AYAH-CARD READER LAYOUT
   ═══════════════════════════════════════════════════════ */

/* Scrollable wrapper inside quranReaderLayout */
.ayah-reader-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 32px 48px;
    scrollbar-width: thin;
    scrollbar-color: rgba(218, 167, 0, 0.18) transparent;
}

/* ── SURAH HEADER CARD ─────────────────────────────────── */
.surah-header-card {
    position: relative;
    overflow: hidden;
    padding: 52px 40px;
    border-radius: 18px;
    margin-bottom: 30px;
    background:
        radial-gradient(ellipse at top, rgba(218, 167, 0, 0.12) 0%, transparent 65%),
        linear-gradient(180deg, rgba(26, 43, 66, 0.55) 0%, rgba(10, 22, 40, 0.38) 100%);
    border: 1px solid rgba(218, 167, 0, 0.3);
    text-align: center;
}

.shc-badge {
    font-size: 10px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 16px;
    opacity: 0.85;
}

.shc-name-ar {
    font-family: 'Amiri', serif;
    font-size: 40px;
    color: var(--gold);
    direction: rtl;
    line-height: 1.1;
    margin-bottom: 10px;
    font-weight: 700;
}

.shc-name-en {
    font-family: 'Cormorant Garamond', serif;
    font-size: 19px;
    font-style: italic;
    opacity: 0.7;
    margin-bottom: 22px;
}

.shc-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 auto 22px;
    max-width: 260px;
    opacity: 0.55;
}

.shc-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(218, 167, 0, 0.8), transparent);
}

.shc-bismillah {
    font-family: 'Amiri', serif;
    font-size: 28px;
    color: var(--gold);
    direction: rtl;
    line-height: 1.7;
    opacity: 0.88;
}

/* ── AYAH CARDS LIST ───────────────────────────────────── */
.ayah-cards-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

/* ── SINGLE AYAH CARD ──────────────────────────────────── */
.ayah-card {
    padding: 24px 26px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(218, 167, 0, 0.1);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ayah-card:hover {
    border-color: rgba(218, 167, 0, 0.2);
}

.ayah-card.active-ayah {
    border-color: rgba(218, 167, 0, 0.45);
    box-shadow: 0 0 0 1px rgba(218, 167, 0, 0.15), 0 8px 32px rgba(0, 0, 0, 0.25);
    background: rgba(218, 167, 0, 0.04);
}

/* ── AYAH CARD HEADER ──────────────────────────────────── */
.ayah-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px dashed rgba(218, 167, 0, 0.15);
}

.ayah-num-badge {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(218, 167, 0, 0.1);
    border: 1px solid rgba(218, 167, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
    font-family: 'Cormorant Garamond', serif;
}

.ayah-ref-info {
    flex: 1;
    min-width: 0;
}

.ayah-ref-main {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    opacity: 0.85;
    margin-bottom: 2px;
}

.ayah-ref-sub {
    font-size: 11px;
    opacity: 0.45;
}

.ayah-action-btns {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.ayah-act-btn {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    transition: all 0.18s;
    flex-shrink: 0;
}

.ayah-act-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(218, 167, 0, 0.25);
    color: rgba(255, 255, 255, 0.85);
}

.ayah-act-btn.active {
    background: rgba(218, 167, 0, 0.12);
    border-color: rgba(218, 167, 0, 0.4);
    color: var(--gold);
}

.ayah-act-btn.gold-act {
    color: var(--gold);
    border-color: rgba(218, 167, 0, 0.3);
}

.ayah-act-btn.gold-act:hover {
    background: rgba(218, 167, 0, 0.15);
    border-color: rgba(218, 167, 0, 0.6);
}

/* ── ARABIC TEXT ───────────────────────────────────────── */
.ayah-arabic-text {
    font-family: 'Amiri', serif;
    font-size: 36px;
    direction: rtl;
    text-align: right;
    line-height: 2;
    margin-bottom: 18px;
    color: rgba(252, 244, 204, 0.92);
    font-weight: 400;
}

/* ── TRANSLATION BOX ───────────────────────────────────── */
.ayah-translation-box {
    padding: 14px 18px;
    border-radius: 10px;
    background: rgba(218, 167, 0, 0.04);
    border-left: 3px solid rgba(218, 167, 0, 0.6);
    margin-bottom: 4px;
}

.ayah-trans-label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
}

.ayah-trans-flag {
    font-size: 13px;
}

.ayah-trans-lang {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
}

.ayah-trans-author {
    font-size: 11px;
    opacity: 0.55;
    font-style: italic;
}

.ayah-trans-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.88;
    font-weight: 400;
}

/* ── TAFSIR SLOT ───────────────────────────────────────── */
.ayah-tafsir-slot {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(218, 167, 0, 0.1);
}

/* ── SURA NAVIGATION FOOTER ────────────────────────────── */
.sura-nav-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(218, 167, 0, 0.1);
    margin-top: 8px;
}

.sura-nav-btn {
    padding: 9px 18px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
    background: transparent;
    border: 1px solid rgba(218, 167, 0, 0.22);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.18s;
}

.sura-nav-btn:hover {
    background: rgba(218, 167, 0, 0.1);
    border-color: rgba(218, 167, 0, 0.45);
    color: var(--gold);
}

.sura-nav-btn.primary {
    background: linear-gradient(135deg, var(--gold), #b8942b);
    color: #050B1A;
    border-color: transparent;
    font-weight: 600;
}

.sura-nav-btn.primary:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

.sura-nav-center {
    text-align: center;
}

.sura-nav-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--gold);
}

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 768px) {
    .ayah-reader-scroll {
        padding: 0 16px 48px;
    }

    .surah-header-card {
        padding: 28px 20px;
    }

    .shc-name-ar {
        font-size: 32px;
    }

    .ayah-card {
        padding: 18px 16px;
    }

    .ayah-arabic-text {
        font-size: 28px;
    }

    .ayah-action-btns {
        gap: 4px;
    }

    .ayah-act-btn {
        width: 26px;
        height: 26px;
    }

    .sura-nav-footer {
        padding: 16px;
    }

    .sura-nav-btn {
        font-size: 12px;
        padding: 8px 12px;
    }

    .mushaf-chrome-center {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════
   DUA — CONTENT WRAPPER
   ═══════════════════════════════════════════════════════ */
.dua-content-wrap {
    padding: 24px 36px 48px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ═══════════════════════════════════════════════════════
   DUA — CHIEDI A NAJM TRIGGER CARD
   ═══════════════════════════════════════════════════════ */

.dua-ask-trigger {
    position: relative;
    padding: 28px 32px;
    border-radius: 18px;
    margin-bottom: 24px;
    overflow: hidden;
    background: radial-gradient(ellipse at 25% 50%, rgba(218,167,0,0.13) 0%, transparent 60%),
                linear-gradient(135deg, rgba(218,167,0,0.06), rgba(218,167,0,0.015));
    border: 1px solid rgba(218,167,0,0.4);
    cursor: pointer;
    transition: border-color 0.22s, box-shadow 0.22s, transform 0.18s;
    user-select: none;
    min-height: 110px;
    display: flex;
    align-items: center;
}
.dua-ask-trigger:hover {
    border-color: rgba(218,167,0,0.7);
    box-shadow: 0 6px 28px rgba(218,167,0,0.14);
    transform: translateY(-2px);
}

.dat-deco {
    position: absolute;
    color: var(--gold);
    pointer-events: none;
    line-height: 1;
    font-family: 'Amiri', serif;
    opacity: 0.08;
}
.dat-deco-1 { top: -10px; right: 20px; font-size: 100px; letter-spacing: -4px; }
.dat-deco-2 { bottom: -20px; right: 140px; font-size: 60px; opacity: 0.05; }

.dat-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    position: relative;
    width: 100%;
}

.dat-icon-wrap {
    position: relative;
    flex-shrink: 0;
}
.dat-icon-box {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--gold), #b8942b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #0a1628;
    box-shadow: 0 8px 24px rgba(218,167,0,0.35);
}
.dat-pulse-ring {
    position: absolute;
    inset: -5px;
    border-radius: 21px;
    border: 1px solid rgba(218,167,0,0.4);
    animation: dat-pulse 2.5s ease-in-out infinite;
    pointer-events: none;
}
@keyframes dat-pulse {
    0%, 100% { transform: scale(1); opacity: 0.65; }
    50%       { transform: scale(1.14); opacity: 0; }
}

.dat-text { flex: 1; min-width: 0; }
.dat-eyebrow {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 5px;
}
.dat-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 27px;
    font-weight: 500;
    margin: 0 0 4px;
    letter-spacing: -0.2px;
    line-height: 1.25;
    white-space: nowrap;
}
.dat-sub {
    font-size: 12.5px;
    opacity: 0.55;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dat-example-box {
    flex-shrink: 0;
    padding: 12px 18px;
    border-radius: 12px;
    width: 240px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(218,167,0,0.2);
    display: flex;
    align-items: center;
    gap: 9px;
}
.dat-star-small { color: var(--gold); font-size: 12px; opacity: 0.7; flex-shrink: 0; }
.dat-example-text {
    font-size: 12.5px;
    font-style: italic;
    opacity: 0.78;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}
.dat-cursor {
    width: 1.5px;
    height: 14px;
    background: var(--gold);
    flex-shrink: 0;
    animation: dat-blink 1s step-end infinite;
}
@keyframes dat-blink {
    0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; }
}

/* ═══════════════════════════════════════════════════════
   DUA — PANNELLO CHIEDI A NAJM (search experience)
   ═══════════════════════════════════════════════════════ */

/* Il pannello usa dua-content-wrap come wrapper */
.dua-content-wrap .dan-back-btn,
.dua-content-wrap .dan-search-wrap,
.dua-content-wrap #duaAiResult,
.dua-content-wrap #danEmptyState { }

.dan-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(218,167,0,0.2);
    font-family: inherit;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.15s;
}
.dan-back-btn:hover {
    border-color: rgba(218,167,0,0.5);
    background: rgba(218,167,0,0.06);
}

/* Search bar — bordo gold sottile, inner dark */
.dan-search-wrap {
    padding: 2px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(218,167,0,0.7), rgba(218,167,0,0.25));
    margin-bottom: 32px;
    box-shadow: 0 4px 24px rgba(218,167,0,0.08);
}
.dan-search-inner {
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(8,18,36,0.95);
    display: flex;
    align-items: center;
    gap: 14px;
}
.dan-search-icon-box {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gold), #b8942b);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(218,167,0,0.3);
}
.dan-input-area { flex: 1; min-width: 0; }
.dan-input-label {
    font-size: 9.5px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 3px;
    opacity: 0.85;
}
.dan-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    padding: 0;
}
.dan-input::placeholder { opacity: 0.3; font-style: italic; font-size: 15px; }
.dan-search-btn {
    flex-shrink: 0;
    padding: 11px 22px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--gold), #b8942b);
    color: #0a1628;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: opacity 0.15s, transform 0.12s;
    box-shadow: 0 4px 14px rgba(218,167,0,0.3);
}
.dan-search-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* Empty state */
.dan-empty-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}
.dan-empty-sub {
    font-size: 13px;
    opacity: 0.5;
    text-align: center;
    margin-bottom: 32px;
    line-height: 1.55;
}
.dan-categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.dan-cat-card {
    padding: 20px 22px 18px;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(218,167,0,0.15);
    transition: border-color 0.2s, background 0.2s;
}
.dan-cat-card:hover {
    border-color: rgba(218,167,0,0.3);
    background: rgba(218,167,0,0.04);
}
.dan-cat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(218,167,0,0.1);
}
.dan-cat-header > span:first-child { font-size: 18px; }
.dan-cat-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-size: 11px;
}
.dan-cat-tags { display: flex; gap: 7px; flex-wrap: wrap; }
.dan-tag {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    line-height: 1.4;
}
.dan-tag:hover {
    background: rgba(218,167,0,0.15);
    border-color: rgba(218,167,0,0.5);
    color: var(--gold);
}

/* Loading state */
.dua-result-loading {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    border-radius: 14px;
    background: rgba(218,167,0,0.06);
    border: 1px solid rgba(218,167,0,0.2);
    margin-bottom: 20px;
}
.dua-result-loading-icon {
    font-size: 24px;
    color: var(--gold);
    animation: dhb-pulse 1.5s ease-in-out infinite;
}

/* Confidence bar */
.dua-confidence-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(74,222,128,0.06);
    border: 1px solid rgba(74,222,128,0.25);
    margin-bottom: 16px;
}
.dcb-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dua-grade-badge {
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* Result card */
.dua-result-card {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(218,167,0,0.35);
}

.drc-header {
    padding: 22px 28px;
    background: linear-gradient(135deg, rgba(218,167,0,0.15), rgba(218,167,0,0.04));
    border-bottom: 1px solid rgba(218,167,0,0.2);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.drc-eyebrow {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 6px;
}
.drc-title-it {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 4px;
}
.drc-title-ar {
    font-family: 'Amiri', serif;
    font-size: 18px;
    color: var(--gold);
    direction: rtl;
    opacity: 0.85;
}

.drc-arabic-block {
    padding: 28px 32px;
    text-align: center;
    border-bottom: 1px dashed rgba(218,167,0,0.15);
}
.drc-arabic {
    font-family: 'Amiri', serif;
    font-size: 32px;
    direction: rtl;
    line-height: 2;
    font-weight: 400;
    margin-bottom: 12px;
}
.drc-translit {
    font-size: 13px;
    font-style: italic;
    opacity: 0.55;
    line-height: 1.5;
}

.drc-section {
    padding: 20px 28px;
    border-bottom: 1px dashed rgba(218,167,0,0.12);
}
.drc-section-label {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 10px;
}
.drc-translation {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    line-height: 1.55;
    font-style: italic;
}

.drc-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 18px 28px;
    border-bottom: 1px dashed rgba(218,167,0,0.12);
}
.drc-meta-label {
    font-size: 10px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    opacity: 0.5;
    margin-bottom: 5px;
    font-weight: 600;
}
.drc-meta-val {
    font-size: 13px;
    font-weight: 500;
    color: var(--gold);
    line-height: 1.4;
}

.drc-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.drc-benefits li {
    font-size: 13.5px;
    opacity: 0.85;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}
.drc-benefit-dot {
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--gold);
    font-size: 9px;
}

.drc-actions {
    padding: 18px 24px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.drc-btn-primary {
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--gold), #b8942b);
    color: #0a1628;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}
.drc-btn-secondary {
    padding: 10px 16px;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    border: 1px solid rgba(218,167,0,0.25);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

/* Other results */
.dua-other-results {
    padding: 20px 22px;
    border-radius: 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 16px;
}
.dor-label {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 12px;
}
.dor-accordion {
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
    margin-bottom: 6px;
    overflow: hidden;
    transition: border-color 0.15s;
}
.dor-accordion.dor-open {
    border-color: rgba(218,167,0,0.35);
}
.dor-item {
    width: 100%;
    padding: 14px 16px;
    text-align: left;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: background 0.15s;
}
.dor-item:hover { background: rgba(218,167,0,0.05); }
.dor-title { font-size: 13.5px; font-weight: 500; margin-bottom: 2px; }
.dor-preview { font-size: 12px; opacity: 0.45; font-style: italic; }
.dor-match {
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(218,167,0,0.12);
    color: var(--gold);
    font-weight: 600;
    flex-shrink: 0;
}
.dor-chevron {
    flex-shrink: 0;
    color: var(--gold);
    opacity: 0.5;
    transition: transform 0.2s;
}
.dor-open .dor-chevron { transform: rotate(180deg); }

/* Expanded content */
.dor-expand {
    padding: 0 20px 18px;
    border-top: 1px dashed rgba(218,167,0,0.15);
    padding-top: 16px;
}
.dor-arabic {
    font-family: 'Amiri', serif;
    font-size: 26px;
    direction: rtl;
    text-align: right;
    line-height: 1.9;
    margin-bottom: 12px;
}
.dor-italian {
    font-size: 13.5px;
    opacity: 0.7;
    line-height: 1.6;
    margin-bottom: 12px;
    font-style: italic;
}
.dor-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.dor-source { font-size: 11px; opacity: 0.4; }
.dor-grade-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(74,222,128,0.12);
    color: #4ade80;
    border: 1px solid rgba(74,222,128,0.3);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.dor-copy-btn {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 7px;
    background: transparent;
    border: 1px solid rgba(218,167,0,0.2);
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.dor-copy-btn:hover {
    border-color: rgba(218,167,0,0.5);
    color: var(--gold);
}

/* ── Collezione inline (click su risultato correlato) ── */
.dan-coll-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(218,167,0,0.12), rgba(218,167,0,0.04));
    border: 1px solid rgba(218,167,0,0.3);
    margin-bottom: 16px;
}
.dan-coll-icon { font-size: 32px; flex-shrink: 0; }
.dan-coll-info { flex: 1; min-width: 0; }
.dan-coll-label {
    font-size: 9.5px; letter-spacing: 2px; text-transform: uppercase;
    color: var(--gold); font-weight: 700; margin-bottom: 3px; opacity: 0.8;
}
.dan-coll-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px; font-weight: 500; line-height: 1.2;
}
.dan-coll-ar {
    font-family: 'Amiri', serif; font-size: 16px;
    color: var(--gold); opacity: 0.75; direction: rtl; text-align: left;
}
.dan-coll-desc {
    font-size: 12px; opacity: 0.5; flex-shrink: 0; text-align: right;
}

.dan-coll-list {
    display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px;
}
.dan-coll-item {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 18px 20px;
    border-radius: 12px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    transition: border-color 0.15s;
}
.dan-coll-item:hover { border-color: rgba(218,167,0,0.25); }
.dan-ci-num {
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
    background: rgba(218,167,0,0.12); border: 1px solid rgba(218,167,0,0.3);
    color: var(--gold); font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.dan-ci-body { flex: 1; min-width: 0; }
.dan-ci-arabic {
    font-family: 'Amiri', serif; font-size: 22px; direction: rtl;
    line-height: 1.8; margin-bottom: 8px; text-align: right;
}
.dan-ci-italian {
    font-size: 13.5px; opacity: 0.75; line-height: 1.55; margin-bottom: 10px;
    font-style: italic;
}
.dan-ci-footer {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.dan-ci-source { font-size: 11px; opacity: 0.45; }
.dan-ci-grade {
    font-size: 10px; padding: 2px 8px; border-radius: 999px;
    border: 1px solid; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.dan-ci-count { font-size: 11px; color: var(--gold); opacity: 0.65; }
.dan-ci-copy {
    margin-left: auto; background: transparent; border: none;
    color: rgba(255,255,255,0.3); cursor: pointer; padding: 4px;
    border-radius: 6px; transition: color 0.15s;
}
.dan-ci-copy:hover { color: var(--gold); }

/* Not found / disclaimer */
.dua-not-found {
    padding: 28px;
    border-radius: 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    text-align: center;
    margin-bottom: 16px;
}
.dua-disclaimer {
    padding: 13px 16px;
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    font-size: 12px;
    opacity: 0.7;
    line-height: 1.5;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    /* Trigger card Chiedi a Najm */
    .dua-ask-trigger {
        padding: 20px 16px;
        min-height: unset;
    }
    .dat-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .dat-icon-wrap { align-self: flex-start; }
    .dat-icon-box { width: 50px; height: 50px; font-size: 20px; border-radius: 13px; }
    .dat-title {
        font-size: 21px;
        white-space: normal;
    }
    .dat-sub {
        white-space: normal;
        font-size: 12px;
    }
    .dat-example-box {
        min-width: unset;
        width: 100%;
        box-sizing: border-box;
    }

    /* Griglie Du'a */
    .dan-categories { grid-template-columns: 1fr; }
    .drc-meta-grid { grid-template-columns: 1fr 1fr; }
    .drc-arabic { font-size: 24px; }
}

/* Bookmarks & Toast */
.bookmarks-history-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 5px 10px;
    max-height: 180px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-mid) transparent;
}



.sidebar:not(.open) .bookmarks-history-list {
    display: none;
}

.bookmark-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.bookmark-item:hover {
    background: rgba(218, 167, 0, 0.1);
}

#bookmarksView {
    padding-top: 100px !important;
    padding-bottom: 100px !important;
    overflow-y: auto !important;
    height: 100vh;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-mid) transparent;
}





#bookmarksGridLarge {
    padding: 20px;
    margin-bottom: 50px;
}

#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-notification {
    background: rgba(13, 22, 40, 0.95);
    color: var(--gold-light);
    border: 1px solid var(--gold-mid);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.3s ease, fadeOut 0.5s ease 2.5s forwards;
    min-width: 250px;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: rgba(13, 22, 40, 0.95);
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.5);
    z-index: 1000 !important;
    border: 1px solid var(--border);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.dropdown-content a {
    color: var(--text);
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    font-size: 13px;
}

.dropdown-content a:hover {
    background-color: rgba(218, 167, 0, 0.1);
    color: var(--gold);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Animazioni */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.3);
    }

    100% {
        opacity: 0.5;
        transform: scale(1);
    }
}

/* Mobile */
@media (max-width:768px) {
    .sidebar {
        position: relative;
        left: 0;
    }

    .sidebar.open {
        position: fixed;
        left: 0;
        width: 240px;
    }

    .sidebar-overlay.active {
        display: block;
        background: rgba(0, 0, 0, 0.5);
        position: fixed;
        inset: 0;
        z-index: 1900;
    }

    .input-area {
        padding: 0 1rem 1rem;
    }

    .quran-split-layout {
        flex-direction: column;
    }

    .quran-sidebar {
        width: 100%;
        height: 300px;
        flex-shrink: 0;
    }
}

/* --- BOX VERSETTO CORANICO --- */
.quran-cite-box {
    margin-top: 16px;
    padding: 16px 18px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(2, 30, 20, 0.85), rgba(4, 45, 30, 0.7));
    border: 1px solid rgba(80, 200, 120, 0.2);
    border-left: 3px solid rgba(80, 200, 120, 0.6);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    position: relative;
}

.qcb-ref {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(100, 220, 140, 0.8);
    margin-bottom: 12px;
}

.qcb-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.35rem;
    color: rgba(160, 240, 180, 0.95);
    direction: rtl;
    text-align: right;
    line-height: 2;
    display: block;
    margin-bottom: 12px;
}

.qcb-italian {
    font-family: 'Georgia', serif;
    font-style: italic;
    font-size: 0.85rem;
    color: rgba(200, 230, 210, 0.8);
    line-height: 1.65;
    border-top: 1px solid rgba(80, 200, 120, 0.12);
    padding-top: 10px;
}

/* --- BOX HADITH NAJM (Stile Pergamena Blu/Bronzo) --- */

.hadith-container {
    background: linear-gradient(145deg, #050a14 0%, #1a2a44 100%);
    /* Cambiato in Accent Nebula */
    border-left: 5px solid #d4af37;
    /* Sostituito Bronzo con Gold Primary */
    border-radius: 12px;
    padding: 18px;
    margin: 15px 0;
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.1);
    /* Glow dorato leggero */
    position: relative;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.hadith-text-ara {
    color: #d4af37;
    /* Arabo in Oro Primary invece che Bronzo */
    font-family: 'Amiri', serif;
    font-size: 1.4rem;
    direction: rtl;
    text-align: right;
    display: block;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    padding-top: 12px;
    line-height: 1.8;
}

/* Icona del Calamo (✒️) in trasparenza */
.hadith-container::after {
    content: '✒️';
    position: absolute;
    bottom: 12px;
    right: 15px;
    font-size: 1.4rem;
    opacity: 0.2;
    /* Molto sottile per non disturbare la lettura */
}

/* Testo Italiano (Livello 1 della Piramide) */
.hadith-text-ita {
    color: #e0e0e0;
    font-family: 'Georgia', serif;
    font-style: italic;
    font-size: 0.78rem;
    line-height: 1.55;
    display: block;
    margin-bottom: 12px;
}


/* Meta-info: Autenticità e Fonte (Livello 2) */
.hadith-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    font-size: 0.75rem;
    color: #8892b0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: 1px dashed rgba(136, 146, 176, 0.2);
    padding-top: 10px;
}

.hadith-auth {
    color: #4ade80;
    /* Verde per dare fiducia sull'autenticità */
    font-weight: bold;
}

.hadith-ref {
    font-style: normal;
    color: #a8b2d1;
}

/* ═══════════════════════════════════════════════
   NUOVE CARD CHAT — QuoteCard + HadithCard (v3)
   ═══════════════════════════════════════════════ */

/* ── Quran QuoteCard ────────────────────────── */
.njm-quote-card {
    margin: 18px 0;
    padding: 20px 22px;
    border-radius: 10px;
    background: rgba(212,175,55,0.06);
    border: 1px solid rgba(212,175,55,0.2);
    border-left: 3px solid var(--gold);
    animation: fadeIn 0.35s ease;
}
.njm-quote-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}
.njm-quote-ref {
    font-size: 10px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
}
.njm-quote-badge {
    font-size: 8px;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(212,175,55,0.2);
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 0.5px;
}
.njm-quote-arabic {
    font-family: 'Amiri', serif;
    font-size: 22px;
    text-align: right;
    line-height: 1.9;
    color: var(--gold);
    margin-bottom: 12px;
    direction: rtl;
}
.njm-quote-translation {
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    font-style: italic;
    line-height: 1.5;
    opacity: 0.92;
}

/* ── Hadith HadithCard ──────────────────────── */
.njm-hadith-card {
    margin: 18px 0;
    padding: 20px 22px;
    border-radius: 10px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.08);
    border-left: 3px solid #4ade80;
    animation: fadeIn 0.35s ease;
}
.njm-hadith-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}
.njm-hadith-ref {
    font-size: 10px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #4ade80;
    font-weight: 700;
}
.njm-hadith-badges {
    display: flex;
    gap: 6px;
}
.njm-hadith-grade {
    font-size: 8px;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(74,222,128,0.12);
    color: #4ade80;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.njm-hadith-badge-h {
    font-size: 8px;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(255,255,255,0.06);
    color: var(--text-main);
    opacity: 0.7;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.njm-hadith-arabic {
    font-family: 'Amiri', serif;
    font-size: 18px;
    text-align: right;
    line-height: 1.9;
    margin-bottom: 10px;
    direction: rtl;
    opacity: 0.95;
}
.njm-hadith-translation {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-style: italic;
    line-height: 1.5;
    opacity: 0.85;
    margin-bottom: 6px;
}
.njm-hadith-narrator {
    font-size: 11px;
    opacity: 0.55;
}

/* ── Sources footer ─────────────────────────── */
.njm-sources-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 11px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.njm-sources-count {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gold);
    font-weight: 600;
}
.njm-source-sep {
    opacity: 0.35;
}
.njm-source-ref {
    opacity: 0.65;
}

/* ── Message actions row ────────────────────── */
/* ── Message limit bar ──────────────────────── */
#msg-limit-bar {
    width: 100%;
    margin-left: -1rem;
    margin-right: -1rem;
    padding: 0 1rem;
}

.msg-limit-counter {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px 2px;
}
.mlb-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}
.mlb-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(212,175,55,0.35);
    transition: background 0.3s;
}
.mlb-dot.used {
    background: var(--gold);
}
.mlb-label {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.02em;
}

.msg-limit-wall {
    margin: 8px 12px 4px;
    padding: 18px 20px;
    background: rgba(212,175,55,0.06);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 14px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}
.mlw-icon {
    font-size: 22px;
    color: var(--gold);
    margin-bottom: 6px;
}
.mlw-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 4px;
}
.mlw-sub {
    font-size: 12px;
    opacity: 0.5;
    line-height: 1.5;
    margin-bottom: 8px;
}
.mlw-timer {
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
}

/* ── Chips suggerimento (sopra input) ───────── */
.najm-chips-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 16px 4px;
    animation: fadeIn 0.25s ease;
}
.njm-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 13px;
    border-radius: 20px;
    border: 1px solid rgba(212,175,55,0.35);
    background: rgba(212,175,55,0.07);
    color: var(--text-main);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, transform 0.12s;
    white-space: nowrap;
}
.njm-chip:hover {
    background: rgba(212,175,55,0.18);
    border-color: rgba(212,175,55,0.65);
    transform: translateY(-1px);
}
.njm-chip:active {
    transform: translateY(0);
}

/* ── Dislike Popup ──────────────────────────── */
.dislike-popup {
    position: fixed;
    z-index: 9999;
    width: 320px;
    background: #0f1b32;
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.55);
    animation: fadeIn 0.18s ease;
}
.dp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.dp-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}
.dp-close {
    background: none;
    border: none;
    color: var(--text-main);
    opacity: 0.5;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
}
.dp-close:hover { opacity: 1; }
.dp-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
}
.dp-reason-chip {
    padding: 5px 11px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: var(--text-main);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.dp-reason-chip:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.25);
}
.dp-reason-chip.selected {
    background: rgba(212,175,55,0.15);
    border-color: rgba(212,175,55,0.55);
    color: var(--gold);
}
.dp-textarea {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 13px;
    padding: 9px 12px;
    resize: none;
    outline: none;
    box-sizing: border-box;
    margin-bottom: 12px;
    transition: border-color 0.15s;
}
.dp-textarea:focus { border-color: rgba(212,175,55,0.4); }
.dp-textarea::placeholder { opacity: 0.4; }
.dp-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dp-note {
    font-size: 11px;
    opacity: 0.4;
}
.dp-submit {
    padding: 6px 16px;
    border-radius: 8px;
    border: none;
    background: var(--gold);
    color: #0a1628;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s;
}
.dp-submit:hover { opacity: 0.85; }
.dp-thanks {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #4ade80;
    padding: 4px 0;
}

.njm-msg-actions {
    display: flex;
    gap: 2px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.njm-action-btn {
    padding: 5px 9px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-main);
    opacity: 0.6;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-family: 'Inter', sans-serif;
    transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.njm-action-btn.icon-only {
    padding: 5px 7px;
}
.njm-action-btn:hover {
    opacity: 0.85;
    background: rgba(255,255,255,0.05);
}
.njm-action-btn.active {
    opacity: 1;
    color: var(--gold);
}

/* ── Streaming indicator ────────────────────── */
.njm-streaming-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 0;
}
.njm-streaming-dots .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
}
.njm-streaming-dots .dot:nth-child(1) { animation: najmDotPulse 1.4s ease 0s infinite; }
.njm-streaming-dots .dot:nth-child(2) { animation: najmDotPulse 1.4s ease 0.18s infinite; }
.njm-streaming-dots .dot:nth-child(3) { animation: najmDotPulse 1.4s ease 0.36s infinite; }
@keyframes najmDotPulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.35; }
    40% { transform: scale(1); opacity: 1; }
}
.njm-streaming-label {
    font-size: 13px;
    opacity: 0.5;
    margin-left: 4px;
}

/* ── RECITER PICKER ──────────────────────────────────────────── */
.reciter-picker {
    position: relative;
}

.reciter-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(218, 167, 0, 0.2);
    color: inherit;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    white-space: nowrap;
}

.reciter-trigger:hover {
    background: rgba(218, 167, 0, 0.1);
    border-color: rgba(218, 167, 0, 0.4);
}

.reciter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: rgba(8, 14, 28, 0.98);
    border: 1px solid rgba(218, 167, 0, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    z-index: 100;
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    pointer-events: none;
    transition: all 0.2s ease;
}

.reciter-dropdown.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.reciter-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: inherit;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    text-align: left;
    transition: background 0.15s;
}

.reciter-option:last-child {
    border-bottom: none;
}

.reciter-option:hover {
    background: rgba(218, 167, 0, 0.07);
}

.reciter-option.active {
    background: rgba(218, 167, 0, 0.1);
}

.reciter-option-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reciter-option-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.reciter-option-style {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.6;
}

.reciter-option.active .reciter-option-name {
    color: var(--gold);
}

.reciter-option svg {
    color: var(--gold);
    flex-shrink: 0;
}


/* Input chat */


/* Mushaf testo arabo — scuro su beige */



/* Header chat benvenuto */

/* Suggestion chips */

/* Scrollbar chiara */

/* Chat messages container */

/* Hadith box */

/* Home cards */


/* Card versetto del giorno — tema chiaro */








/* ═══════════════════════════════════════════════════════════
   TEMA CHIARO — OVERRIDE GLOBALE
   Copre tutto ciò che non è già gestito
   ═══════════════════════════════════════════════════════════ */

/* Tutti i div/section con background scuro */

/* Testo generico */

/* Mantieni oro */

/* Bordi scuri → chiari */



/* Card generiche con sfondo scuro */

/* Input chat — nessun bordo */


/* Scrollbar */

/* Nav pagine corano — tema chiaro */



/* Input chat — rimuove TUTTI i bordi */

/* Send button — tema chiaro */



/* ── SIDEBAR CLASSI NUOVE ───────────────────────── */
.menu-text {
    flex: 1;
}

.sidebar-nav-label {
    font-size: 9px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
    padding: 8px 4px 4px 12px;
    opacity: 0;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.sidebar.open .sidebar-nav-label {
    opacity: 0.6;
    transition-delay: 0.08s;
}

.menu-ar {
    font-family: 'Amiri', serif;
    font-size: 12px;
    direction: rtl;
    color: var(--gold);
    opacity: 0;
    padding-right: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.sidebar.open .menu-ar {
    opacity: 0.4;
    transition-delay: 0.12s;
}

.menu-item.active .menu-ar {
    opacity: 0.65;
}

.sidebar-prayer-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 10px 6px;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(218, 167, 0, 0.07);
    border: 1px solid rgba(218, 167, 0, 0.18);
    flex-shrink: 0;
    overflow: hidden;
    cursor: pointer;
}

.spm-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 7px;
    background: rgba(218, 167, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
}

.spm-text {
    flex: 1;
    min-width: 0;
    opacity: 0;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.sidebar.open .spm-text {
    opacity: 1;
    transition-delay: 0.08s;
}

.spm-label {
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.65;
}

.spm-value {
    font-size: 11px;
    font-weight: 600;
    color: var(--gold);
    margin-top: 1px;
    font-variant-numeric: tabular-nums;
}

.sidebar-history-wrap {
    visibility: hidden;
}

.sidebar.open .sidebar-history-wrap {
    visibility: visible;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE RESPONSIVE — max-width 768px
   ═══════════════════════════════════════════════════════════ */

/* Mobile hamburger button (hidden on desktop) */
.mob-menu-btn {
    display: none;
}

@media (max-width: 768px) {

    /* ── Sidebar come drawer ───────────────────────────────── */
    .sidebar {
        position: fixed !important;
        left: 0;
        top: 0;
        height: 100% !important;
        width: 280px !important;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
        z-index: 3000;
    }
    .sidebar.open {
        transform: translateX(0);
        width: 280px !important;
    }
    /* Mostra testo nel menu quando il drawer è aperto */
    .sidebar .menu-text,
    .sidebar .menu-ar,
    .sidebar .brand-wrap,
    .sidebar .sidebar-nav-label,
    .sidebar .sidebar-history-wrap,
    .sidebar #userName,
    .sidebar .footer-trigger-chevron {
        display: flex !important;
        opacity: 1 !important;
        max-width: none !important;
    }
    .sidebar .sidebar-nav-label { display: block !important; }
    .sidebar .brand-wrap { display: flex !important; }
    .sidebar .sidebar-history-wrap { visibility: visible !important; }

    /* Overlay scuro dietro il drawer */
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.55);
        z-index: 2999;
        display: none;
        backdrop-filter: blur(2px);
    }
    .sidebar.open ~ .sidebar-overlay { display: block; }

    /* Main prende tutta la larghezza */
    body { flex-direction: column; }
    .main {
        width: 100% !important;
        height: 100vh;
    }

    /* ── Mobile hamburger ─────────────────────────────────── */
    .mob-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 2998;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: rgba(10,22,40,0.85);
        border: 1px solid rgba(218,167,0,0.25);
        color: var(--gold);
        cursor: pointer;
        backdrop-filter: blur(10px);
        transition: background 0.2s;
    }
    .mob-menu-btn:hover { background: rgba(218,167,0,0.15); }

    /* ── Home — Arco del giorno ───────────────────────────── */
    #homeArcScroll { padding: 56px 14px 24px !important; }

    /* Nascondi l'arco SVG sul mobile, mostra la card compatta */
    .harc-arc-wrap { display: none !important; }
    .harc-mob-card { display: block !important; }

    .harc-header {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 12px;
    }
    .harc-header > div:last-child { text-align: left; }
    .harc-time-line { font-size: 24px; }
    .harc-next-hint { font-size: 14px; }
    .harc-hijri { margin-top: 4px; font-size: 14px; }

    .harc-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    .harc-verse-card { padding: 18px 16px; }
    .harc-verse-ar { font-size: 24px; }
    .harc-verse-it { font-size: 15px; }

    .harc-quick-item { padding: 10px 2px; }
    .harc-qi-title { font-size: 16px; }

    /* ── Chat ─────────────────────────────────────────────── */
    .chat-input-bar { padding: 10px 12px; }
    #chatInput { font-size: 15px; }

    /* ── Quran home ───────────────────────────────────────── */
    .quran-home-header { padding: 56px 16px 16px; }
    .quran-home-body { padding: 16px; }
    .quran-home-title h2 { font-size: 28px; }
    .quran-sura-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* ── Du'a ─────────────────────────────────────────────── */
    .dua-page-header { padding: 56px 16px 16px; }
    .dua-page-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .dua-page-title h2 { font-size: 26px; }
    .dua-title-ar { font-size: 20px; }
    .dua-page-eyebrow { font-size: 10px; letter-spacing: 1.4px; }
    .dua-content-wrap { padding: 16px !important; }
    .dua-collections-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* ── Prayer ───────────────────────────────────────────── */
    .prayer-page { padding: 56px 14px 20px; gap: 12px; }

    /* Header compatto */
    .prayer-page-title { gap: 10px; margin-bottom: 8px; }
    .prayer-page-title h2 { font-size: 24px; }
    .prayer-title-ar { font-size: 20px; }
    .prayer-page-eyebrow { font-size: 9px; letter-spacing: 1.5px; }

    /* Card prossima preghiera — ridotta su mobile */
    .next-prayer-card { padding: 16px 18px; }
    .npc-name-en { font-size: 38px !important; }
    .npc-name-ar { font-size: 26px !important; }
    .npc-time { font-size: 20px; margin-bottom: 12px; }
    .npc-label { font-size: 9px; }
    .npc-name-row { gap: 10px; }

    /* Tabella: nascondi colonna IQAMA, adatta colonne */
    .ptt-iqama { display: none !important; }
    .ptt-iqama-col { display: none !important; }
    td.ptt-name { padding: 11px 14px !important; }
    td.ptt-adhan { padding: 11px 14px !important; font-size: 14px !important; }
    th.ptt-adhan { padding: 9px 14px !important; }
    .ptt-bell { padding: 11px 8px !important; }
    .ptt-name-ar { display: none !important; } /* rimuove nome arabo nelle righe su mobile */
    .prayer-times-table { table-layout: auto !important; }

    /* Search e controlli */
    .prayer-page-controls { gap: 10px; }
    .city-search-wrap { max-width: 100%; }
    .prayer-date-nav { gap: 8px; }
    #prayerDateDisplay { font-size: 12px; }

    /* ── Sura reader ──────────────────────────────────────── */
    .mushaf-page-wrap { padding: 12px 6px; }
    .mushaf-ayah { font-size: 22px; }

    /* ══ SETTINGS — layout a stack su mobile ═══════════════ */
    .settings-view { padding: 0; flex-direction: column; overflow: hidden; }

    /* ── Nav: lista a schermo intero ── */
    .settings-nav {
        width: 100% !important;
        height: 100% !important;
        padding: 56px 0 32px !important;
        border-right: none !important;
        border-bottom: none;
        overflow-y: auto;
    }
    .settings-nav-title {
        margin: 0 0 8px 18px !important;
        font-size: 10px !important;
        letter-spacing: 2px !important;
    }
    .settings-nav-item {
        padding: 16px 20px !important;
        border-radius: 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.05) !important;
        font-size: 15px !important;
        background: transparent !important;
        color: rgba(255,255,255,0.8) !important;
        gap: 14px !important;
    }
    .settings-nav-item.active {
        background: transparent !important;
        color: rgba(255,255,255,0.8) !important;
    }
    .settings-nav-item:last-child { border-bottom: none !important; }
    .settings-nav-item::after {
        content: '›';
        margin-left: auto;
        font-size: 22px;
        opacity: 0.2;
        line-height: 1;
    }

    /* ── Nascondi nav quando si è in una sezione ── */
    .settings-nav.mob-hidden { display: none !important; }

    /* ── Contenuto sezione ── */
    .settings-content {
        width: 100% !important;
        height: 100% !important;
        padding: 0 0 60px !important;
        display: none !important;
        overflow-y: auto;
    }
    .settings-content.mob-active { display: flex !important; flex-direction: column; }

    /* Back button mobile */
    .settings-mob-back {
        display: flex !important;
        align-items: center;
        gap: 8px;
        padding: 52px 18px 14px;
        border: none;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        background: transparent;
        color: var(--gold);
        font-family: 'Inter', sans-serif;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 0;
    }

    /* ── Sezione contenuto ── */
    .settings-section {
        max-width: 100% !important;
        padding: 20px 16px 0 !important;
    }
    .settings-section-title {
        font-size: 20px !important;
        margin-bottom: 16px !important;
    }

    /* Card: layout verticale pulito */
    .settings-card {
        border-radius: 14px !important;
        margin-bottom: 16px !important;
    }
    .settings-field {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        padding: 14px 16px !important;
        min-height: unset !important;
    }
    .settings-field-left { gap: 2px !important; }
    .settings-field-label { font-size: 13px !important; color: rgba(255,255,255,0.55) !important; }
    .settings-field-hint { font-size: 11px !important; }

    .settings-field-right {
        width: 100% !important;
        justify-content: flex-start !important;
    }

    /* Input testo: full width, allineato a sinistra */
    .settings-input {
        width: 100% !important;
        text-align: left !important;
        font-size: 15px !important;
        color: rgba(255,255,255,0.9) !important;
        padding: 6px 0 !important;
        box-sizing: border-box;
    }

    /* Select: full width */
    .settings-select {
        width: 100% !important;
        text-align: left !important;
        font-size: 14px !important;
        padding: 8px 28px 8px 0 !important;
        box-sizing: border-box;
        min-width: unset !important;
    }

    /* Toggle pills: allineati a sinistra, wrap */
    .settings-toggle-group {
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
        gap: 7px !important;
    }
    .stg-btn { font-size: 13px !important; padding: 7px 14px !important; }

    /* Salva */
    .settings-save-btn {
        width: calc(100% - 32px) !important;
        align-self: center !important;
        text-align: center !important;
        margin: 8px 16px 0 !important;
        padding: 13px !important;
        font-size: 15px !important;
        border-radius: 12px !important;
    }

    /* ── Bookmarks ────────────────────────────────────────── */
    .bookmarks-content { padding: 56px 14px 24px; }

    /* ── Nasconde elementi solo desktop ───────────────────── */
    .header-clock { display: none !important; }

    /* ── Welcome screen ───────────────────────────────────── */
    .welcome { padding: 20px 16px 24px; }
    .welcome-bg-ar { font-size: 160px; opacity: 0.03; }
    .welcome-bismillah { font-size: 17px; margin-bottom: 10px; }
    .welcome-title { font-size: 22px; letter-spacing: 0.04em; }
    .welcome-arch-svg { display: none; }
    .welcome-logo { width: 48px; height: 48px; margin-top: 10px; }
    .welcome-star-div { margin: 10px 0 8px; }
    .welcome-sub { font-size: 13px; }
    .welcome-cards-section { margin-top: 18px; }
    .suggestions { grid-template-columns: 1fr 1fr; gap: 8px; }
    .suggestion-btn { padding: 12px 14px; }
    .scard-q { font-size: 12.5px; }
    .scard-ar-bg { font-size: 48px; }

    /* ── Messaggi Najm ────────────────────────────────────── */
    .njm-msg-meta { display: none; } /* nasconde "assistente verificato · ora" */
    .njm-msg-header { margin-bottom: 6px; }
    .njm-content { padding: 12px 14px; }

    .message.najm .bubble p,
    .message.najm .bubble li { font-size: 14px; line-height: 1.65; }

    .njm-quote-arabic { font-size: 18px; }
    .njm-quote-translation { font-size: 14px; }
    .njm-hadith-arabic { font-size: 15px; }
    .njm-hadith-translation { font-size: 13px; }

    /* ── Barra azioni messaggi ────────────────────────────── */
    .njm-action-btn { font-size: 11px; padding: 5px 8px; }
    .njm-msg-actions { gap: 2px; }

    /* ── Avatar ───────────────────────────────────────────── */
    .avatar.najm { width: 28px; height: 28px; font-size: 13px; }
    .avatar.user-av { width: 28px; height: 28px; font-size: 12px; }

    /* ── Limite messaggi ──────────────────────────────────── */
    .mlb-label { font-size: 10px; }
}
