/* =========================================================================
   LANDING PAGE
   =========================================================================
   Extraido de app/Views/landing.php

   Estaba en un bloque <style> dentro de la vista: no se podia cachear y
   viajaba de nuevo en cada carga de pagina.
   ========================================================================= */

/* Desktops */
        @media (min-width: 992px) {

            .mobile-auth-buttons,
            .mobile-controls,
            .mobile-toggle,
            .mobile-theme-toggle {
                display: none !important;
            }
        }

        /* Mobiles/Tablets */
        @media (max-width: 991px) {
            .desktop-only {
                display: none !important;
            }

            /* Ensure nav actions (theme toggle) are hidden or adjusted if needed */
            .nav-actions .theme-toggle {
                display: none !important;
            }

            .nav-links {
                display: none;
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                width: 100%;
                background: rgba(15, 15, 20, 0.98);
                backdrop-filter: blur(20px);
                -webkit-backdrop-filter: blur(20px);
                flex-direction: column;
                padding: 1.5rem;
                gap: 1.5rem;
                border-bottom: 1px solid rgba(255, 255, 255, 0.1);
                box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
                z-index: 1000;
            }

            .nav-links.active {
                display: flex !important;
            }

            .nav-links a {
                width: 100%;
                display: block;
                padding: 10px 0;
                border-bottom: 1px solid rgba(255, 255, 255, 0.05);
                text-align: center;
            }

            .mobile-auth-buttons {
                display: flex !important;
                flex-direction: column;
                gap: 10px;
                margin-top: 15px;
                width: 100%;
            }

            .mobile-controls {
                display: flex !important;
                align-items: center !important;
                justify-content: flex-end;
                gap: 12px;
                height: 100%;
            }

            .mobile-theme-toggle {
                display: flex !important;
                align-items: center;
                justify-content: center;
                width: 36px;
                height: 36px;
                border-radius: 50%;
                background: rgba(255, 255, 255, 0.05);
                /* Subtle background for touch target */
                color: var(--text-primary);
                padding: 0 !important;
                margin: 0 !important;
            }

            .mobile-theme-toggle i {
                font-size: 1.1rem;
                line-height: 1;
            }

            .mobile-toggle {
                display: flex !important;
                align-items: center;
                justify-content: center;
                width: 36px;
                height: 36px;
                padding: 0 !important;
                margin: 0 !important;
                border: none;
                background: transparent;
                color: var(--text-primary);
                font-size: 1.5rem;
            }
        }

        /* =========================================
           TAROT DEMO STYLES 
           ========================================= */
        .tarot-wrapper {
            display: none;
            flex-direction: column;
            height: 100%;
            overflow: hidden;
        }

        .tarot-wrapper.active {
            display: flex;
        }

        .tarot-container {
            flex: 1;
            overflow-y: auto;
            padding: 1rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            background-image: radial-gradient(circle at center, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
        }

        .tarot-header {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            width: 100%;
        }

        .tarot-grid {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 10px;
            max-width: 100%;
            padding-bottom: 20px;
        }

        .tarot-card-wrapper {
            width: 80px;
            height: 130px;
            perspective: 1000px;
            cursor: pointer;
        }

        .tarot-card {
            position: relative;
            width: 100%;
            height: 100%;
            transition: transform 0.6s;
            transform-style: preserve-3d;
        }

        .tarot-card.flipped {
            transform: rotateY(180deg);
        }

        .tarot-front,
        .tarot-back {
            position: absolute;
            width: 100%;
            height: 100%;
            backface-visibility: hidden;
            border-radius: 6px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }

        .tarot-back {
            background-color: #2a0a4d;
            transform: rotateY(0deg);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .tarot-back img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 6px;
            opacity: 0.8;
        }

        .tarot-front {
            transform: rotateY(180deg);
            background-color: white;
        }

        .tarot-front img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 6px;
        }

        .selected-cards-mini {
            display: flex;
            gap: 10px;
            margin-bottom: 1rem;
            padding: 10px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 12px;
            justify-content: center;
        }

        .selected-cards-mini img {
            width: 40px;
            height: 65px;
            border-radius: 4px;
            border: 1px solid var(--primary);
        }

        /* Demo Chat Message Spacing */
        .demo-chat-messages .message {
            margin-bottom: 15px;
        }

        /* Typing Effect Cursor */
        .typing-cursor::after {
            content: '|';
            animation: blink 1s step-start infinite;
        }

        @keyframes blink {
            50% {
                opacity: 0;
            }
        }

        /* =========================================
           MODERN THEME TOGGLE STYLES 
           ========================================= */
        .landing-theme-toggle {
            position: relative;
            cursor: pointer;
            padding: 4px;
            border-radius: 50px;
            transition: all 0.3s ease;
        }

        .landing-theme-toggle:hover .toggle-track {
            border-color: var(--primary, #8b5cf6);
            box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
        }

        .toggle-track {
            position: relative;
            width: 56px;
            height: 28px;
            background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
            border: 1px solid rgba(139, 92, 246, 0.3);
            border-radius: 50px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 6px;
            transition: all 0.3s ease;
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .toggle-icon-dark,
        .toggle-icon-light {
            font-size: 0.75rem;
            transition: all 0.3s ease;
            z-index: 1;
        }

        .toggle-icon-dark {
            color: #a78bfa;
            opacity: 1;
        }

        .toggle-icon-light {
            color: #fbbf24;
            opacity: 0.4;
        }

        .toggle-thumb {
            position: absolute;
            left: 3px;
            width: 22px;
            height: 22px;
            background: linear-gradient(135deg, #8b5cf6, #a855f7);
            border-radius: 50%;
            transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
        }

        /* Light Mode State */
        [data-theme="light"] .toggle-track {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(241, 245, 249, 0.95));
            border-color: rgba(139, 92, 246, 0.4);
        }

        [data-theme="light"] .toggle-icon-dark {
            opacity: 0.4;
        }

        [data-theme="light"] .toggle-icon-light {
            opacity: 1;
        }

        [data-theme="light"] .toggle-thumb {
            left: calc(100% - 25px);
            background: linear-gradient(135deg, #fbbf24, #f59e0b);
            box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
        }

        /* Mobile Toggle Adjustments */
        .mobile-theme-toggle-new {
            display: none !important;
        }

        @media (max-width: 991px) {
            .mobile-theme-toggle-new {
                display: block !important;
            }

            .landing-theme-toggle:not(.mobile-theme-toggle-new) {
                display: none !important;
            }

            .mobile-theme-toggle-new .toggle-track {
                width: 48px;
                height: 24px;
            }

            .mobile-theme-toggle-new .toggle-thumb {
                width: 18px;
                height: 18px;
            }

            .mobile-theme-toggle-new .toggle-icon-dark,
            .mobile-theme-toggle-new .toggle-icon-light {
                font-size: 0.65rem;
            }

            [data-theme="light"] .mobile-theme-toggle-new .toggle-thumb {
                left: calc(100% - 21px);
            }
        }

        @media (min-width: 992px) {
            .mobile-theme-toggle-new {
                display: none !important;
            }

            .landing-theme-toggle:not(.mobile-theme-toggle-new) {
                display: block !important;
            }
        }
