/* ============================================================
   Oroscopo - tema scuro "notturno", scoping su .oroscopo-theme
   ============================================================ */

.oroscopo-theme {
    --oro-bg: #0A0E27;
    --oro-surface: rgba(18, 23, 52, 0.85);
    --oro-surface-2: #1B2147;
    --oro-border: rgba(212, 168, 67, 0.25);
    --oro-gold: #E3B341;
    --oro-gold-soft: #C9A24A;
    --oro-text: #ECE7D8;
    --oro-text-muted: #9AA0C4;
    --oro-user-bubble: #34507E;
    --oro-assistant-bubble: #262C4E;

    --el-fuoco: #E0673A;
    --el-terra: #5E9E63;
    --el-aria: #56B6C2;
    --el-acqua: #4A78C8;

    --serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;

    color: var(--oro-text);
    background-color: var(--oro-bg);
    background-image:
        radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.45), transparent),
        radial-gradient(1px 1px at 70% 20%, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(255, 255, 255, 0.30), transparent),
        radial-gradient(1px 1px at 85% 60%, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(1px 1px at 15% 85%, rgba(255, 255, 255, 0.30), transparent),
        radial-gradient(circle at 50% 0%, #141A3A 0%, #070A1C 70%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Il menu del sito (da base.html) adattato al tema scuro */
.oroscopo-theme nav[aria-label="Menu principale"] .btn {
    --bs-btn-color: var(--oro-text);
    --bs-btn-border-color: var(--oro-border);
    --bs-btn-hover-color: var(--oro-bg);
    --bs-btn-hover-bg: var(--oro-gold);
    --bs-btn-hover-border-color: var(--oro-gold);
    --bs-btn-bg: transparent;
}

.oroscopo-wrap {
    padding-bottom: 2rem;
}

/* ----------------------------- Card ----------------------------- */
.oro-card {
    background: var(--oro-surface);
    border: 1px solid var(--oro-border);
    border-radius: 20px;
    padding: 1.25rem 1.1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45),
                inset 0 0 60px rgba(120, 100, 200, 0.05);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
}

.oro-card-title {
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--oro-gold);
    margin: 0 0 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.oro-card-title--center {
    justify-content: center;
    text-align: center;
}

.oro-decoro { color: var(--oro-gold-soft); }

.oro-subtitle {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--oro-gold);
    font-weight: 600;
    margin: 1.2rem 0 0.75rem;
    text-align: center;
    border-top: 1px solid var(--oro-border);
    padding-top: 1rem;
}

.oro-subtitle--center { text-align: center; }

/* ------------------------- Emblema segno ------------------------ */
.oro-emblema {
    width: 120px;
    height: 120px;
    margin: 0.25rem auto 0.75rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, #20264a 0%, #11142e 70%);
    border: 2px solid var(--oro-gold);
    box-shadow: 0 0 28px rgba(227, 179, 65, 0.35),
                inset 0 0 22px rgba(227, 179, 65, 0.18);
}

.oro-emblema-glifo {
    font-size: 3.4rem;
    line-height: 1;
    color: var(--oro-gold);
    text-shadow: 0 0 14px rgba(227, 179, 65, 0.5);
}

.oro-segno-nome {
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--oro-gold);
    text-align: center;
    margin: 0;
}

.oro-segno-date {
    text-align: center;
    color: var(--oro-text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0.15rem 0 1rem;
}

/* ------------------------ Lista pianeti ------------------------- */
.oro-pianeti {
    list-style: none;
    margin: 0;
    padding: 0;
}

.oro-pianeta {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.28rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.oro-pianeta-glifo {
    color: var(--oro-gold);
    width: 1.2rem;
    text-align: center;
    flex: none;
}

.oro-pianeta-nome { flex: 1; }

.oro-pianeta-pos {
    color: var(--oro-text-muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

/* -------------------------- Elementi --------------------------- */
.oro-elementi {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    text-align: center;
}

.oro-elemento {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.oro-elemento-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    border: 1px solid currentColor;
    background: rgba(255, 255, 255, 0.03);
}

.oro-elemento-nome {
    font-size: 0.72rem;
    color: var(--oro-text-muted);
}

.oro-elemento-valore {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--oro-text);
}

.oro-elemento--fuoco .oro-elemento-icon { color: var(--el-fuoco); }
.oro-elemento--terra .oro-elemento-icon { color: var(--el-terra); }
.oro-elemento--aria  .oro-elemento-icon { color: var(--el-aria); }
.oro-elemento--acqua .oro-elemento-icon { color: var(--el-acqua); }

/* ===================== Colonna destra: dati ==================== */
.oro-dati {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.oro-dato {
    display: flex;
    gap: 0.75rem;
}

.oro-dato-icon {
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--oro-gold);
    border: 1px solid var(--oro-border);
    background: rgba(227, 179, 65, 0.06);
}

.oro-dato-body { display: flex; flex-direction: column; }

.oro-dato-etichetta {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--oro-gold);
    font-weight: 600;
}

.oro-dato-valore {
    font-weight: 700;
    font-size: 0.95rem;
}

.oro-dato-desc {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: var(--oro-text-muted);
    line-height: 1.35;
}

/* ----------------------- Mappa astrale ------------------------- */
.oro-mappa {
    max-width: 260px;
    margin: 0 auto;
}

.oro-mappa-svg {
    width: 100%;
    aspect-ratio: 1 / 1;
}

.oro-mappa-cerchio {
    fill: none;
    stroke: var(--oro-border);
    stroke-width: 1;
}

.oro-mappa-cerchio--int { stroke: rgba(227, 179, 65, 0.35); }

.oro-mappa-raggi line {
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 0.8;
}

.oro-mappa-asse {
    fill: var(--oro-gold-soft);
    font-size: 7px;
    letter-spacing: 0.04em;
}

.asp-trigono { fill: rgba(74, 120, 200, 0.12); stroke: #4A78C8; stroke-width: 0.9; }
.asp-quadrato { stroke: #C0473A; stroke-width: 0.9; }
.asp-sestile { stroke: #5E9E63; stroke-width: 0.9; }

/* ========================= Chat =============================== */
.oro-chat { min-height: 540px; }

.oro-chat-head { text-align: center; margin-bottom: 0.5rem; }

.oro-chat-sub {
    color: var(--oro-text-muted);
    margin: -0.3rem 0 0;
    font-size: 0.9rem;
}

.oro-chat-flusso {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-top: 1px solid var(--oro-border);
    margin-top: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: var(--oro-border) transparent;
}

.oro-chat-flusso::-webkit-scrollbar { width: 6px; }
.oro-chat-flusso::-webkit-scrollbar-thumb {
    background: var(--oro-border);
    border-radius: 6px;
}

.oro-msg {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    max-width: 85%;
}

.oro-msg--assistente { align-self: flex-start; }

.oro-msg--utente {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.oro-msg-avatar {
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--oro-gold);
    border: 1px solid var(--oro-border);
    background: rgba(227, 179, 65, 0.06);
    font-size: 0.85rem;
}

.oro-msg-bolla {
    background: var(--oro-assistant-bubble);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    padding: 0.6rem 0.85rem 0.45rem;
}

.oro-msg--utente .oro-msg-bolla {
    background: var(--oro-user-bubble);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 4px;
}

.oro-msg-testo {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.oro-msg-ora {
    display: block;
    text-align: right;
    font-size: 0.68rem;
    color: var(--oro-text-muted);
    margin-top: 0.25rem;
}

.oro-msg-ora .fa-check-double { color: #6fa8dc; margin-left: 0.2rem; }

/* indicatore di digitazione */
.oro-typing .oro-msg-bolla {
    display: flex;
    gap: 4px;
    padding: 0.75rem 0.9rem;
}

.oro-typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--oro-text-muted);
    animation: oro-blink 1.4s infinite both;
}

.oro-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.oro-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes oro-blink {
    0%, 80%, 100% { opacity: 0.2; }
    40% { opacity: 1; }
}

/* form input */
.oro-chat-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--oro-border);
}

.oro-chat-input {
    flex: 1;
    background: var(--oro-surface-2);
    border: 1px solid var(--oro-border);
    border-radius: 999px;
    padding: 0.6rem 1rem;
    color: var(--oro-text);
    font-size: 0.9rem;
}

.oro-chat-input::placeholder { color: var(--oro-text-muted); }

.oro-chat-input:focus {
    outline: none;
    border-color: var(--oro-gold);
    box-shadow: 0 0 0 2px rgba(227, 179, 65, 0.25);
}

.oro-chat-send {
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 50%;
    border: none;
    background: var(--oro-gold);
    color: var(--oro-bg);
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
}

.oro-chat-send:hover { background: #f0c252; transform: scale(1.05); }
.oro-chat-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.oro-chat-send:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(227, 179, 65, 0.4);
}

/* ----------------------- Responsive ---------------------------- */
@media (max-width: 991.98px) {
    .oro-chat { min-height: 60vh; }
    .oro-msg { max-width: 90%; }
}
