html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
}

/* ===== LIGHT MODE IMPROVEMENTS ===== */
/* Comprehensive fixes to ensure all elements have proper contrast in light mode */

/* Override carousel slides - force white background in light mode */
html:not(.dark) .ia-slide {
    background-color: #ffffff !important;
    color: #111827 !important;
}

/* Fix all sections with white background */
html:not(.dark) .bg-white {
    background-color: #ffffff !important;
}

/* Fix all sections and containers with gray backgrounds */
html:not(.dark) .bg-gray-50 {
    background-color: #f9fafb !important;
}

html:not(.dark) .bg-gray-100 {
    background-color: #f3f4f6 !important;
}

/* Fix modal backgrounds */
html:not(.dark) #info-modal .bg-white,
html:not(.dark) #strategy-modal .bg-white {
    background-color: #ffffff !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

html:not(.dark) #info-modal header,
html:not(.dark) #strategy-modal header {
    border-bottom: 2px solid #e5e7eb !important;
}

/* Fix text colors - ensure they're visible on light backgrounds */
html:not(.dark) .text-gray-900 {
    color: #111827 !important;
}

html:not(.dark) .text-gray-800 {
    color: #1f2937 !important;
}

html:not(.dark) .text-gray-700 {
    color: #374151 !important;
}

html:not(.dark) .text-gray-600 {
    color: #4b5563 !important;
}

html:not(.dark) .text-gray-500 {
    color: #6b7280 !important;
}

html:not(.dark) .text-gray-400 {
    color: #9ca3af !important;
}

html:not(.dark) .text-gray-300 {
    color: #d1d5db !important;
}

html:not(.dark) .text-gray-200 {
    color: #e5e7eb !important;
}

/* Fix blog cards with colored backgrounds */
html:not(.dark) .bg-blue-50 {
    background-color: #eff6ff !important;
}

html:not(.dark) .bg-pink-50 {
    background-color: #fdf2f8 !important;
}

html:not(.dark) .bg-green-50 {
    background-color: #f0fdf4 !important;
}

html:not(.dark) .text-blue-700 {
    color: #1d4ed8 !important;
}

html:not(.dark) .text-blue-800 {
    color: #1e40af !important;
}

html:not(.dark) .text-pink-700 {
    color: #be185d !important;
}

html:not(.dark) .text-pink-800 {
    color: #9f1239 !important;
}

html:not(.dark) .text-green-700 {
    color: #15803d !important;
}

html:not(.dark) .text-green-800 {
    color: #166534 !important;
}

/* Fix form inputs 9ca3af !important;
    border-width: 1.5px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

html:not(.dark) input:focus,
html:not(.dark) select:focus,
html:not(.dark) textarea:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1)re white background and dark text */
html:not(.dark) input,
html:not(.dark) select,
html:not(.dark) textarea {
    background-color: #ffffff !important;
    color: #111827 !important;
    border-color: #d1d5db !important;
}

html:not(.dark) input::placeholder,
html:not(.dark) select::placeholder,
html:not(.dark) textarea::placeholder {
    color: #9ca3af !important;
}

/* Fix dynamic content cards */
html:not(.dark) #use-case-content > div,
html:not(.dark) #deep-dive-content > div {
    background-color: #f3f4f6 !important;
    color: #111827 !important;
    border: 1px solid #d1d5db !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

/* Fix header background */
html:not(.dark) header {
    background-color: rgba(255, 255, 255, 0.8) !important;
}

/* Fix buttons */
html:not(.dark) .bg-gray-200 {
    background-color: #e5e7eb !important;
    color: #111827 !important;
}

html:not(.dark) .bg-gray-700 {
    background-color: #f3f4f6 !important;
    color: #111827 !important;
}

/* Fix logo cards */
html:not(.dark) .logo-card {
    background-color: #ffffff !important;
}

/* Fix borders - add more visible colors */
html:not(.dark) .border-gray-200 {
    border-color: #d1d5db !important;
}

html:not(.dark) .border-gray-300 {
    border-color: #9ca3af !important;
}

html:not(.dark) .border-gray-600 {
    border-color: #9ca3af !important;
}

html:not(.dark) .border-gray-700 {
    border-color: #6b7280 !important;
}

/* Add subtle colored borders to sections and cards */
html:not(.dark) section.bg-white {
    border: 1px solid #e5e7eb;
}

html:not(.dark) .ia-slide {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

html:not(.dark) .logo-card {
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

/* Enhance colored border cards visibility */
html:not(.dark) .border-green-400 {
    border-color: #4ade80 !important;
    border-width: 2px !important;
}

html:not(.dark) .border-blue-400 {
    border-color: #60a5fa !important;
    border-width: 2px !important;
}

html:not(.dark) .border-yellow-400 {
    border-color: #facc15 !important;
    border-width: 2px !important;
}

html:not(.dark) .border-purple-400 {
    border-color: #c084fc !important;
    border-width: 2px !important;
}

html:not(.dark) .border-pink-200 {
    border-color: #fbcfe8 !important;
}

html:not(.dark) .border-blue-200 {
    border-color: #bfdbfe !important;
}

html:not(.dark) .border-green-200 {
    border-color: #bbf7d0 !important;
}

/* Add colored borders for tool selector cards in light mode */
html:not(.dark) .border-orange-500 {
    border-color: #f97316 !important;
    border-width: 2px !important;
}

html:not(.dark) .border-purple-500 {
    border-color: #a855f7 !important;
    border-width: 2px !important;
}

html:not(.dark) .border-pink-500 {
    border-color: #ec4899 !important;
    border-width: 2px !important;
}

html:not(.dark) .border-blue-500 {
    border-color: #3b82f6 !important;
    border-width: 2px !important;
}

html:not(.dark) .border-red-500 {
    border-color: #ef4444 !important;
    border-width: 2px !important;
}

html:not(.dark) .border-yellow-500 {
    border-color: #eab308 !important;
    border-width: 2px !important;
}

#cursor-spotlight {
    background: radial-gradient(circle 400px at var(--x) var(--y), rgba(239, 68, 68, 0.1), transparent 80%);
    mix-blend-mode: multiply;
}

.dark #cursor-spotlight {
    background: radial-gradient(circle 300px at var(--x) var(--y), rgba(79, 70, 229, 0.2), transparent 80%);
    mix-blend-mode: screen;
}

.chart-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    height: 350px;
    max-height: 450px;
}

@media (min-width: 768px) {
    .chart-container {
        height: 400px;
    }
}

.active-tool {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-width: 2px;
}

.dark .active-tool {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.25);
}

.active-tab,
.deep-dive-tab.active {
    background-color: #4f46e5;
    color: #ffffff;
}

.tab-btn,
.deep-dive-tab {
    transition: all 0.3s ease;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4f46e5;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

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

.tool-checkbox:checked+label {
    border-color: #4f46e5;
    background-color: #eef2ff;
}

.dark .tool-checkbox:checked+label {
    border-color: #6366f1;
    background-color: #3730a3;
}

/* Style for active nav link */
.nav-link.active {
    font-weight: 600;
    color: #4f46e5;
}

.dark .nav-link.active {
    color: #818cf8;
}

section {
    scroll-margin-top: 4.5rem;
    /* Offset for sticky header */
}

.copy-toast {
    transition: opacity 0.3s ease-in-out;
}

/* Logo Scroller Styles */
.logo-scroller {
    -webkit-mask-image: linear-gradient(to right, transparent, white 20%, white 80%, transparent);
    mask-image: linear-gradient(to right, transparent, white 20%, white 80%, transparent);
}

.scroller-inner {
    animation: scroll 60s linear infinite;
}

.scroller-inner[data-direction="right"] {
    animation-direction: reverse;
}

@keyframes scroll {
    to {
        transform: translate(calc(-50% - 0.5rem));
    }
}

/* Typing effect styles */
@keyframes blink {
    50% {
        opacity: 0;
    }
}

.typing-cursor {
    animation: blink 1s step-end infinite;
}

/* AI Generated Report Styles */
#strategy-modal-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #374151;
    /* gray-700 */
}

.dark #strategy-modal-content h3 {
    color: #d1d5db;
    /* gray-300 */
}

#strategy-modal-content ul {
    list-style-position: inside;
    list-style-type: disc;
    margin-left: 0.5rem;
    margin-bottom: 1rem;
    line-height: 1.75;
}

#strategy-modal-content li {
    margin-bottom: 0.5rem;
}

#strategy-modal-content p {
    margin-bottom: 1rem;
}

#strategy-modal-content strong {
    color: #111827;
    /* gray-900 */
}

.dark #strategy-modal-content strong {
    color: #f3f4f6;
    /* gray-100 */
}

.carousel-logo-hover {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-logo-hover:hover {
    transform: scale(1.12);
    z-index: 2;
}

#ia-universal-slider .ia-slider-viewport {
    height: 370px;
    max-width: 100vw;
}

#ia-universal-slider .ia-slider-track {
    animation: ia-slider-scroll 32s linear infinite;
    min-width: 2000px;
}

@keyframes ia-slider-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

#ia-universal-slider .ia-slide {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 240px;
    margin-top: 8px;
    margin-bottom: 8px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#ia-universal-slider .ia-slide:hover {
    transform: scale(1.04);
    z-index: 2;
}

@media (max-width: 900px) {
    #ia-universal-slider .ia-slider-viewport {
        height: 320px;
    }

    #ia-universal-slider .ia-slide {
        height: auto;
        min-height: 260px;
        padding: 1.5rem;
    }
}

@media (max-width: 600px) {
    #ia-universal-slider .ia-slider-viewport {
        height: 280px;
    }

    #ia-universal-slider .ia-slide {
        height: auto;
        min-height: 220px;
        font-size: 0.9rem;
        padding: 1.25rem;
        line-height: 1.4;
    }
}

.ia-slider-viewport {
    position: relative;
}

.ia-slider-fade {
    position: absolute;
    top: 0;
    width: 60px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.ia-slider-fade-left {
    left: 0;
    background: linear-gradient(to right, var(--ia-fade-bg, #fff) 70%, transparent 100%);
}

.ia-slider-fade-right {
    right: 0;
    background: linear-gradient(to left, var(--ia-fade-bg, #fff) 70%, transparent 100%);
}

html.dark .ia-slider-fade-left {
    background: linear-gradient(to right, var(--ia-fade-bg-dark, #121826) 70%, transparent 100%);
}

html.dark .ia-slider-fade-right {
    background: linear-gradient(to left, var(--ia-fade-bg-dark, #121826) 70%, transparent 100%);
}

:root {
    --ia-fade-bg: #f7f8f9;
    --ia-fade-bg-dark: #121826;
}

/* Animaciones para los logos de colaboradores */
.logo-container {
    animation: fadeInUp 1s ease-out 0.5s both;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.logo-container:nth-child(3) {
    animation-delay: 0.7s;
}

.logo-card {
    position: relative;
    transform: translateY(0);
    animation: float 6s ease-in-out infinite;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

/* Ajustes para móviles */
@media (max-width: 768px) {
    .logo-container {
        animation: fadeInUp 1s ease-out 0.3s both;
        height: auto;
        min-height: 140px;
        justify-content: flex-start;
        width: 120px;
        flex-shrink: 0;
    }

    .logo-container:nth-child(3) {
        animation-delay: 0.5s;
    }

    .logo-card {
        animation: float 8s ease-in-out infinite;
        height: 70px !important;
        width: 120px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0;
        margin: 0 auto;
    }

    .logo-card img {
        max-height: 45px !important;
        max-width: 110px !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
        object-position: center !important;
    }

    /* Ajustar texto hacia abajo */
    .logo-container span {
        margin-top: 12px !important;
        text-align: center !important;
        width: 100%;
        padding: 0 5px;
        line-height: 1.2;
    }

    /* Reducir animaciones en móviles para mejor alineación */
    .logo-card:hover {
        transform: translateY(-4px) scale(1.05) !important;
        animation-play-state: paused !important;
    }

    .logo-clickable:hover {
        transform: translateY(-4px) scale(1.08) !important;
        animation-play-state: paused !important;
    }

    /* Asegurar que el separador tenga la altura correcta en móviles */
    .logo-container+div+.logo-container {
        height: auto;
        min-height: 140px;
        width: 120px;
    }
}

@media (max-width: 480px) {
    .logo-card {
        height: 60px !important;
        width: 90px;
    }

    .logo-card img {
        max-height: 40px !important;
        max-width: 80px !important;
    }

    .logo-container {
        min-height: 110px;
    }
}

.logo-card:nth-child(1) {
    animation-delay: 0s;
}

.logo-container:nth-child(3) .logo-card {
    animation-delay: 3s;
}

.logo-card:hover:not(.logo-clickable) {
    transform: translateY(-8px) scale(1.05);
    animation-play-state: paused;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Efecto de brillo sutil */
.logo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
    border-radius: 0.75rem;
}

.logo-card:hover::before {
    left: 100%;
}

/* Efecto específico para logos clickeables */
.logo-clickable {
    cursor: pointer;
}

.logo-clickable:hover {
    transform: translateY(-10px) scale(1.1);
    animation-play-state: paused;
}

/* Transición suave para el logo de FUSoft */
#fusoft-logo-img {
    transition: opacity 0.3s ease-in-out;
}

/* Ajustes específicos para el logo de FUSoft en modo oscuro */
.dark #fusoft-logo-container {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.dark #fusoft-logo-container:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.ai-advisor-btn.selected,
.ai-advisor-btn:focus {
    border-width: 3px;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: linear-gradient(90deg, #f3f4f6 60%, #e0e7ff 100%);
    outline: none;
}

.ai-advisor-btn.selected {
    filter: brightness(1.05);
    transform: scale(1.04);
    z-index: 2;
}

.affinity-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 1rem;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
    padding: 1.5rem 2rem;
    min-width: 120px;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
    user-select: none;
    position: relative;
}

.affinity-card:hover {
    box-shadow: 0 4px 24px 0 rgba(99, 102, 241, 0.10);
    border-color: #6366f1;
    transform: translateY(-2px) scale(1.04);
    z-index: 2;
}

.affinity-card.selected {
    border-width: 3px;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.10);
    background: linear-gradient(90deg, #f3f4f6 60%, #e0e7ff 100%);
    transform: scale(1.07);
    z-index: 3;
}

.affinity-card[data-affinity="gemini"].selected {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.10);
}

.affinity-card[data-affinity="claude"].selected {
    border-color: #f59e42;
    box-shadow: 0 0 0 4px rgba(245, 158, 66, 0.10);
}

.affinity-card[data-affinity="deepseek"].selected {
    border-color: #a78bfa;
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.10);
}

.affinity-card[data-affinity="ninguno"].selected {
    border-color: #6b7280;
    box-shadow: 0 0 0 4px rgba(107, 114, 128, 0.10);
}

/* Extracted from index.html */
.loader-circle {
    border-width: 4px;
    border-style: solid;
    border-radius: 9999px;
    border-color: #6366f1 #6366f1 #6366f1 transparent;
    width: 4rem;
    height: 4rem;
    animation: spin 1s linear infinite;
}

/* Estilos para el sidebar */
.sidebar-open #main-container {
    transform: translateX(-320px);
}

@media (max-width: 768px) {
    .sidebar-open #main-container {
        transform: translateX(-100%);
    }

    #profile-sidebar {
        width: 100% !important;
        max-width: 100% !important;
    }
}

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

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

.logo-scroller {
    -webkit-mask-image: linear-gradient(to right, transparent, white 20%, white 80%, transparent);
    mask-image: linear-gradient(to right, transparent, white 20%, white 80%, transparent);
    overflow: hidden;
    width: 100%;
}

.scroller-inner {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: scroll 60s linear infinite;
}

.scroller-inner[data-direction="right"] {
    animation-direction: reverse;
}

@keyframes scroll {
    to {
        transform: translate(calc(-50% - 0.5rem));
    }
}

.carousel-logo-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s, border-color 0.22s;
    position: relative;
    z-index: 1;
    cursor: pointer;
    border: none;
    overflow: visible;
    margin: 0.25rem;
}

.carousel-logo-card img {
    pointer-events: none;
    user-select: none;
    width: 40px;
    height: 40px;
}

.carousel-logo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    padding: 2px;
    background: conic-gradient(from 0deg, #ff8a00, #e83e8c, #ff8a00 100%);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    opacity: 0;
    transition: opacity 0.22s, filter 0.22s;
    filter: blur(0.5px);
    z-index: 2;
    pointer-events: none;
}

.carousel-logo-card:hover {
    transform: scale(1.12);
    box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.13), 0 8px 24px rgba(232, 62, 140, 0.10);
}

.carousel-logo-card:hover::before {
    opacity: 1;
    animation: border-spin 1.2s linear infinite;
}

@keyframes border-spin {
    0% {
        filter: hue-rotate(0deg);
        background: conic-gradient(from 0deg, #ff8a00, #e83e8c, #ff8a00 100%);
    }

    100% {
        filter: hue-rotate(360deg);
        background: conic-gradient(from 360deg, #ff8a00, #e83e8c, #ff8a00 100%);
    }
}

/* Estilos responsive para el contenido del modal */
#strategy-modal-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

#strategy-modal-content * {
    max-width: 100% !important;
    box-sizing: border-box;
}

#strategy-modal-content h1,
#strategy-modal-content h2,
#strategy-modal-content h3,
#strategy-modal-content h4,
#strategy-modal-content h5,
#strategy-modal-content h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

#strategy-modal-content p,
#strategy-modal-content li {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.6;
}

#strategy-modal-content ul,
#strategy-modal-content ol {
    margin-left: 1rem;
    margin-right: 1rem;
}

#strategy-modal-content img {
    max-width: 100%;
    height: auto;
}

#strategy-modal-content table {
    width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}

#strategy-modal-content pre {
    overflow-x: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
}

#strategy-modal-content code {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Responsive para el contenido de "Primeros pasos" */
#first-steps-result {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

#first-steps-result * {
    max-width: 100% !important;
    box-sizing: border-box;
}

/* Mejorar la legibilidad en móviles */
@media (max-width: 640px) {
    #strategy-modal-content {
        font-size: 14px;
        line-height: 1.5;
    }

    #strategy-modal-content h1 {
        font-size: 1.5rem;
    }

    #strategy-modal-content h2 {
        font-size: 1.25rem;
    }

    #strategy-modal-content h3 {
        font-size: 1.125rem;
    }

    #strategy-modal-content h4 {
        font-size: 1rem;
    }

    #strategy-modal-content ul,
    #strategy-modal-content ol {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }

    #strategy-modal-content li {
        margin-bottom: 0.5rem;
    }
}

/* Extracted from login.html */
body {
    font-family: 'Inter', sans-serif;
    background: #000;
    color: #fff;
}

.login-gradient-btn {
    background: linear-gradient(90deg, #3B82F6 0%, #14B8A6 100%);
    color: #fff;
    font-weight: 700;
    transition: all 0.3s;
}

.login-gradient-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

.login-gradient-btn:disabled {
    background: #555;
    cursor: not-allowed;
}

.login-panel {
    background: rgba(24, 24, 27, 0.95);
}

.login-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
}

.login-input:focus {
    border-color: #3B82F6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* Estilos para una animación fluida */
#form-panel,
#branding-panel {
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.5s ease-in-out,
        padding 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-section {
    position: absolute;
    inset: 0;
    padding: 2.5rem;
    /* Corresponde a p-10 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-section {
        padding: 1.5rem;
        /* Menos padding en móviles */
        justify-content: flex-start;
        overflow-y: auto;
    }

    #auth-container {
        margin: 0.5rem;
        max-width: none;
        min-height: calc(100vh - 1rem);
        height: auto;
    }

    /* Ocultar panel de branding en móviles */
    #branding-panel {
        display: none !important;
    }

    /* Formularios ocupan todo el ancho en móviles */
    #form-panel {
        width: 100% !important;
    }

    /* Contenedor interno adaptable */
    #form-panel>div {
        height: auto !important;
        min-height: calc(100vh - 2rem) !important;
    }
}

@media (max-width: 640px) {
    .form-section {
        padding: 1rem;
    }

    /* Hacer formularios scrolleables si es necesario */
    #auth-container {
        height: auto;
        min-height: calc(100vh - 1rem);
        max-height: calc(100vh - 1rem);
    }
}

/* Estado inicial de los formularios ocultos */
#register-section,
#complete-profile-section {
    opacity: 0;
    transform: translateX(30px);
    pointer-events: none;
}

/* Estado cuando se muestra el registro */
#auth-container.is-register-visible #form-panel {
    width: 100%;
}

#auth-container.is-register-visible #branding-panel {
    width: 0%;
    opacity: 0;
    padding: 0;
}

#auth-container.is-register-visible #login-section {
    opacity: 0;
    transform: translateX(-30px);
    pointer-events: none;
}

#auth-container.is-register-visible #register-section {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* Estado cuando se completa el perfil */
#auth-container.is-completing-profile #form-panel {
    width: 100%;
}

#auth-container.is-completing-profile #branding-panel {
    width: 0%;
    opacity: 0;
    padding: 0;
}

#auth-container.is-completing-profile #login-section,
#auth-container.is-completing-profile #register-section {
    opacity: 0;
    pointer-events: none;
}

#auth-container.is-completing-profile #complete-profile-section {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* Responsive states para tablets y móviles */
@media (max-width: 768px) {

    #auth-container.is-register-visible #form-panel,
    #auth-container.is-completing-profile #form-panel {
        width: 100% !important;
    }

    #auth-container.is-register-visible #branding-panel,
    #auth-container.is-completing-profile #branding-panel {
        display: none !important;
    }
}

/* Estilos para botón volver responsive */
.volver-btn {
    z-index: 30;
}

@media (max-width: 640px) {
    .volver-btn {
        top: 0.75rem;
        left: 0.75rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .volver-btn svg {
        width: 1rem;
        height: 1rem;
    }
}

a.volver-btn:hover,
a.volver-btn:hover span {
    color: #3B82F6 !important;
}

a.volver-btn:hover svg {
    stroke: #3B82F6 !important;
}

/* Mejoras responsive adicionales */
@media (max-width: 768px) {

    /* Títulos más pequeños en móviles */
    .form-section h2 {
        font-size: 1.875rem !important;
        /* text-3xl -> text-2xl */
        line-height: 2.25rem !important;
    }

    /* Logos más pequeños en móviles */
    .form-section svg {
        height: 2rem !important;
        width: 2rem !important;
    }

    /* Texto del logo más pequeño */
    .form-section .text-xl {
        font-size: 1.125rem !important;
    }

    /* Botones más accesibles */
    .login-gradient-btn,
    #google-login-btn,
    #google-register-btn {
        padding: 0.875rem 1rem !important;
        font-size: 0.875rem !important;
    }

    /* Inputs más cómodos */
    .login-input {
        padding: 0.875rem !important;
        font-size: 0.875rem !important;
    }

    /* Labels más pequeños */
    .form-section label {
        font-size: 0.875rem !important;
    }

    /* Espaciado del formulario */
    .form-section .space-y-4>*+* {
        margin-top: 0.75rem !important;
    }

    .form-section .space-y-3>*+* {
        margin-top: 0.5rem !important;
    }

    /* Grid responsive mejorado */
    .form-section .grid-cols-1.md\:grid-cols-2 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {

    /* Títulos aún más pequeños en móviles pequeños */
    .form-section h2 {
        font-size: 1.5rem !important;
        /* text-2xl -> text-xl */
        line-height: 2.25rem !important;
    }

    /* Párrafos más pequeños */
    .form-section p {
        font-size: 0.875rem !important;
    }

    /* Contenedor del formulario con más espacio */
    .form-section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* Altura fija para el contenedor principal */
    #auth-container {
        border-radius: 0.5rem !important;
    }

    /* Scroll suave para formularios largos */
    .form-section {
        scroll-behavior: smooth;
    }
}

/* Mejoras para tablets */
@media (min-width: 641px) and (max-width: 768px) {
    .form-section {
        padding: 2rem !important;
    }

    #auth-container {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
}

/* Estilos para pantallas muy pequeñas */
@media (max-width: 480px) {
    .form-section {
        padding: 0.75rem !important;
    }

    .form-section h2 {
        font-size: 1.25rem !important;
        line-height: 1.75rem !important;
    }

    .login-gradient-btn,
    #google-login-btn,
    #google-register-btn {
        padding: 0.75rem !important;
        font-size: 0.8125rem !important;
    }

    .login-input {
        padding: 0.75rem !important;
        font-size: 0.8125rem !important;
    }
}


/* Extracted from perfil.html */
body {
    font-family: 'Inter', sans-serif;
    background-color: black;
    /* bg-gray-900 */
    color: #f9fafb;
    /* text-gray-50 */
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #000000;
    /* bg-gray-900 */
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
    /* bg-gray-600 */
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
    /* bg-gray-500 */
}

/* Hero Section Animations */
@keyframes fade-in-down {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Nueva animación de movimiento para cada letra */
@keyframes letter-rise {
    0% {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.animate-letter-rise {
    display: inline-block;
    /* Necesario para aplicar transform */
    opacity: 0;
    /* Inicia oculto */
    animation: letter-rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    color: #ffffff;
    /* Blanco sólido */
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
    opacity: 0;
    /* Inicia transparente para que la animación funcione */
}

/* Sidebar styles */
#sidebar.collapsed {
    width: 0;
}

#sidebar.collapsed .nav-text {
    display: none;
}

/* Chat list item styles */
.chat-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    cursor: pointer;
    color: #e5e7eb;
}

.chat-list-item:hover {
    background-color: rgba(55, 65, 81, 0.5);
}

.chat-list-item.selected {
    background-color: rgb(55, 65, 81);
}

.chat-list-item .chat-content {
    display: flex;
    align-items: center;
    overflow: hidden;
    flex: 1;
}

.chat-list-item .chat-title {
    margin-left: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-list-item .chat-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.chat-list-item:hover .chat-actions {
    opacity: 1;
}

.chat-actions button {
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: colors 0.2s;
}

.chat-actions button:hover {
    background-color: rgba(75, 85, 99, 0.5);
}

.chat-actions .delete-btn:hover {
    color: #ef4444;
}

/* Tone buttons */
.tone-btn.selected {
    background-color: #dc2626;
    color: white;
}

/* Message styles */
.message {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    max-width: 48rem;
    margin: 0 auto 1.5rem auto;
    width: 100%;
}

.message.user {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

.message-avatar {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-avatar.ai {
    background-color: #dc2626;
}

.message-avatar.user {
    background-color: rgb(55, 65, 81);
}

.message-content {
    padding: 1rem;
    border-radius: 0.75rem;
    max-width: 70%;
    word-wrap: break-word;
}

.message-content.ai {
    background-color: rgb(55, 65, 81);
    color: white;
    border-bottom-left-radius: 0.25rem;
}

.message-content.user {
    background-color: #dc2626;
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.message-text {
    white-space: pre-wrap;
    line-height: 1.5;
    margin: 0;
}

/* Chat input centering */
#chat-input {
    line-height: 1.5;
    min-height: 44px;
    font-size: 1rem;
}