body {
    overscroll-behavior: none;
    font-size: 16px;
    background:
        radial-gradient(circle at top, rgba(3, 91, 235, 0.12), transparent 30%),
        linear-gradient(180deg, #f7fbff 0%, #eef4ff 55%, #f8fafc 100%);
}

/* Scroll del chat */
.chat-messages {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    overflow-y: auto;
    overscroll-behavior-y: contain;
}

/* Textos más grandes y legibles */
.text-readable {
    font-size: 17px;
    line-height: 1.6;
}

.text-time {
    font-size: 13px;
}

/* Colores personalizados de Círculo Senior */
.bg-cs-cream {
    background-color: #ecd898;
}

.bg-cs-light-gray {
    background-color: #d0d0ce;
}

.bg-cs-dark-gray {
    background-color: #63666a;
}

.bg-cs-blue {
    background-color: #035beb;
}

.bg-cs-purple {
    background-color: #8031a7;
}

.bg-cs-light-purple {
    background-color: #7474c1;
}

.text-cs-white {
    color: #ffffff;
}

.text-cs-cream {
    color: #ecd898;
}

.text-cs-dark-gray {
    color: #63666a;
}

.text-cs-blue {
    color: #035beb;
}

.text-cs-purple {
    color: #8031a7;
}

.border-cs-cream {
    border-color: #ecd898;
}

.border-cs-purple {
    border-color: #8031a7;
}

.border-cs-blue {
    border-color: #035beb;
}

/* Estilos para contenido Markdown (Chat del Bot) */
.prose h1,
.prose h2,
.prose h3 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #63666a;
}

.prose p,
.prose ul,
.prose li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.prose strong {
    font-weight: 700;
    color: #63666a;
}

.prose ul {
    list-style: disc;
    padding-left: 1.5rem;
}

/* Animaciones de escritura */
@keyframes bounce {

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

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

.animate-bounce {
    animation: bounce 1.4s infinite ease-in-out both;
}

.delay-150 {
    animation-delay: 0.15s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* Animación para el botón de grabar */
@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
        transform: scale(1);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
        transform: scale(1.1);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
        transform: scale(1);
    }
}

.recording-active {
    background-color: #dc3545 !important;
    color: white !important;
    animation: pulse-red 1.5s infinite;
}

/* Estado visual para el input mientras graba */
.input-recording {
    background-color: #ffeef0 !important;
    border: 1px solid #dc3545;
}

/* Estado deshabilitado para botones */
button:disabled,
input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Excepción para el input mientras graba */
.input-recording:disabled {
    opacity: 1;
    cursor: default;
}

/* Sistema de tamaños de fuente */
.font-size-small {
    font-size: 14px;
}

.font-size-medium {
    font-size: 16px;
}

.font-size-large {
    font-size: 18px;
}

[data-font-size="small"] .text-readable {
    font-size: 15px;
}

[data-font-size="medium"] .text-readable {
    font-size: 17px;
}

[data-font-size="large"] .text-readable {
    font-size: 20px;
}

[data-font-size="small"] .text-lg {
    font-size: 1rem;
}

[data-font-size="medium"] .text-lg {
    font-size: 1.125rem;
}

[data-font-size="large"] .text-lg {
    font-size: 1.25rem;
}

[data-font-size="small"] .text-xl {
    font-size: 1.125rem;
}

[data-font-size="medium"] .text-xl {
    font-size: 1.25rem;
}

[data-font-size="large"] .text-xl {
    font-size: 1.5rem;
}

[data-font-size="small"] .prose p {
    font-size: 15px;
}

[data-font-size="medium"] .prose p {
    font-size: 17px;
}

[data-font-size="large"] .prose p {
    font-size: 20px;
}

/* Estado activo del botón de tamaño */
.font-btn-active {
    background-color: #035beb !important;
    color: white !important;
    transform: scale(1.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 2px solid #ffffff !important;
}

/* =========================
   REDISEÑO LANDING
========================= */
#mainView {
    background:
        radial-gradient(circle at top, rgba(3, 91, 235, 0.16), transparent 35%),
        linear-gradient(180deg, #f7fbff 0%, #eef4ff 55%, #f8fafc 100%);
}

#fontSizeControl {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(3, 91, 235, 0.14);
}

.landing-shell {
    position: relative;
    margin-top: 2rem;
    padding: 1.2rem 1rem 1.5rem;
    border-radius: 32px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(247, 250, 255, 0.96) 100%);
    border: 1px solid rgba(3, 91, 235, 0.12);
    box-shadow: 0 24px 60px rgba(3, 91, 235, 0.12);
    overflow: hidden;
}

.landing-orb {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(10px);
}

.landing-orb-1 {
    width: 180px;
    height: 180px;
    top: -40px;
    left: -35px;
    background: radial-gradient(circle, rgba(3, 91, 235, 0.18) 0%, rgba(3, 91, 235, 0) 70%);
}

.landing-orb-2 {
    width: 200px;
    height: 200px;
    right: -60px;
    top: 120px;
    background: radial-gradient(circle, rgba(128, 49, 167, 0.12) 0%, rgba(128, 49, 167, 0) 70%);
}

.hero-brand {
    width: 88px;
    height: 88px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 2px solid rgba(3, 91, 235, 0.14);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 26px rgba(3, 91, 235, 0.14);
    overflow: hidden;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #5f6b7a;
    margin-bottom: 0.5rem;
}

.hero-search #mainSearchInput {
    border: 2px solid rgba(3, 91, 235, 0.14);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 14px 32px rgba(3, 91, 235, 0.10);
}

.hero-search #mainSearchInput:focus {
    border-color: #035beb;
    box-shadow: 0 0 0 4px rgba(3, 91, 235, 0.10), 0 14px 32px rgba(3, 91, 235, 0.14);
}

.hero-search #mainMicBtn,
.hero-search #mainSearchBtn {
    transition: all 0.2s ease;
}

.hero-visual {
    margin-top: 1rem;
    text-align: center;
}

.hero-visual a {
    display: inline-block;
    cursor: pointer;
}

.hero-visual a:hover .hero-robot {
    transform: translateY(-2px) scale(1.01);
}

.hero-robot {
    width: min(320px, 92%);
    max-width: 320px;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 18px 30px rgba(3, 91, 235, 0.22));
    transition: transform 0.2s ease, filter 0.2s ease;

}

.hero-card {
    margin-top: 0.5rem;
    padding: 1.4rem 1.1rem;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(3, 91, 235, 0.10);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(3, 91, 235, 0.08);
    color: #035beb;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.hero-info-box {
    font-size: 0.95rem;
    line-height: 1.5;
    background: linear-gradient(180deg, #eff6ff 0%, #e8f1ff 100%);
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(3, 91, 235, 0.10);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.download-box {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(99, 102, 106, 0.12);
}

#chatButton {
    background: linear-gradient(180deg, #0a66ff 0%, #035beb 100%);
    box-shadow: 0 18px 36px rgba(3, 91, 235, 0.35);
    border: 3px solid rgba(255, 255, 255, 0.75);
}

.glass-footer {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
}

/* Vista chat */
#chatView {
    background:
        radial-gradient(circle at top, rgba(3, 91, 235, 0.08), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, #f3f7ff 45%, #f8fafc 100%);
}

/* Modal */
.modal-content {
    border: 1px solid rgba(3, 91, 235, 0.12);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
}

/* Mejoras suaves generales */
button,
a,
input {
    -webkit-tap-highlight-color: transparent;
}

#mainMicBtn:hover,
#mainSearchBtn:hover,
#chatButton:hover,
#sendButton:hover,
#micButton:hover {
    transform: translateY(-1px);
}

#sendButton,
#chatButton,
#mainSearchBtn,
#mainMicBtn,
#micButton,
#headerTtsBtn,
#disclaimerBtn {
    transition: all 0.2s ease;
}

/* Responsive */
@media (max-width: 420px) {
    .landing-shell {
        margin-top: 1.4rem;
        padding: 1rem 0.85rem 1.2rem;
        border-radius: 26px;
    }

    .hero-brand {
        width: 78px;
        height: 78px;
    }

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

    .hero-robot {
        width: min(290px, 94%);
    }

    .hero-card {
        padding: 1.2rem 0.95rem;
        border-radius: 24px;
    }

    #chatButton {
        width: 72px;
        height: 72px;
        bottom: 7rem;
        right: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        animation-duration: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0s !important;
    }
}