:root {
    --primary: #4F46E5; 
    --primary-hover: #4338CA;
    --bg-kiosk: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%);
    --chat-bg: rgba(255, 255, 255, 0.1);
    --bot-msg: rgba(255, 255, 255, 0.9);
    --user-msg: #4F46E5;
    --text-dark: #1F2937;
    --text-light: #E5E7EB;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Outfit', 'Inter', -apple-system, sans-serif; 
}

body { 
    background: var(--bg-kiosk); 
    width: 100vw; 
    height: 100vh; 
    overflow: hidden; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    color: white;
}

/* IMPORT GOOGLE FONTS */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;500;700&display=swap');

/* WRAPPER KIOSK Responsive Target */
.kiosk-wrapper {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* SECTIONS */
.screen-section {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
}
.screen-section.active {
    opacity: 1;
    pointer-events: all;
    z-index: 10;
}
.screen-section.hidden {
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

/* TITLES */
.main-title {
    text-align: center;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    margin-top: 2vh; /* Aún más arriba */
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    letter-spacing: 2px;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 500;
    margin-top: clamp(20px, 5vh, 80px);
    margin-bottom: clamp(20px, 4vh, 40px);
    flex-shrink: 0;
}

/* HOME MENU LAYOUT */
.kiosk-content {
    display: flex;
    flex: 1;
    padding: clamp(20px, 5vh, 50px) clamp(20px, 5vw, 100px);
    align-items: center;
    justify-content: flex-start; /* Todo hacia la izquierda */
    padding: clamp(10px, 3vh, 30px) 5vw;
    gap: 4rem;
    margin-top: -6vh; /* Aún más arriba */
}

.avatar-column {
    flex: 0 1 auto;
    display: flex;
    justify-content: flex-start;
    align-items: center; /* Subido al centro */
    height: 100%;
    margin-left: 5vw;
}

.avatar-standing {
    max-height: min(900px, 82vh);
    margin-top: -12vh; /* Empuja el personaje hacia arriba considerablemente */
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4));
}

/* BRAIN GRID (4 Parts) */
.brain-column {
    flex: 0 1 auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.brain-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 30px;
    width: 100%;
    max-width: 650px; /* Reducido para equilibrio */
    aspect-ratio: 1 / 1;
}

.brain-part {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    box-shadow: var(--shadow);
    text-align: center;
    padding: 20px;
}

/* Simulate Brain Hemispheres visually by tweaking borders */
.brain-part.top-left { border-top-left-radius: 20%; }
.brain-part.top-right { border-top-right-radius: 20%; }
.brain-part.bottom-left { border-bottom-left-radius: 20%; }
.brain-part.bottom-right { border-bottom-right-radius: 20%; }

.brain-part i {
    font-size: clamp(3.5rem, 9vw, 6rem); /* Reducido un poco */
    color: #A5B4FC;
}

.brain-part span {
    font-size: clamp(1.1rem, 3vw, 1.7rem); /* Reducido un poco */
    font-weight: 600;
}

.brain-part:hover {
    transform: scale(1.05);
    background: rgba(79, 70, 229, 0.8);
    border-color: #A5B4FC;
}

.brain-part:hover i {
    color: white;
}

/* BACK BUTTON */
.back-btn {
    position: absolute;
    top: clamp(10px, 2vh, 40px);
    left: clamp(10px, 2vw, 40px);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    padding: clamp(8px, 1.5vh, 15px) clamp(15px, 3vw, 30px);
    border-radius: 50px;
    font-size: clamp(1rem, 2vw, 1.5rem);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    z-index: 100;
}
.back-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* CARDS BRAND MENU */
.cards-container {
    display: flex;
    justify-content: center;
    align-content: flex-start;
    gap: clamp(20px, 3vw, 40px);
    flex-wrap: wrap;
    padding: 20px clamp(20px, 5vw, 100px) clamp(40px, 10vh, 100px);
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}
/* hide scrollbar for better kiosk look */
.cards-container::-webkit-scrollbar {
    width: 8px;
}
.cards-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
}

.brand-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    width: clamp(200px, 40vw, 300px);
    height: clamp(200px, 40vh, 350px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: clamp(15px, 2vh, 30px);
    cursor: pointer;
    transition: all 0.4s;
    box-shadow: var(--shadow);
}
.brand-card i {
    font-size: clamp(4rem, 8vw, 7rem);
    color: white;
}
.brand-card span {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 500;
}
.brand-card:hover {
    transform: translateY(-10px) scale(1.05);
    background: rgba(255,255,255,0.25);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.cards-container.small-cards .brand-card {
    width: clamp(200px, 30vw, 250px);
    height: clamp(80px, 15vh, 120px);
    flex-direction: row;
    padding: 20px;
    gap: 15px;
    border-radius: 20px;
}

.cards-container.small-cards .brand-card i {
    font-size: clamp(2rem, 4vw, 3rem);
}

.cards-container.small-cards .brand-card span {
    font-size: clamp(1rem, 2vw, 1.5rem);
}

/* CHAT AREA RE-STYLED FOR KIOSK */
.chat-container {
    width: 90vw;
    max-width: 1000px;
    height: 85vh;
    max-height: 800px;
    margin: auto;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: clamp(20px, 3vw, 40px); 
    box-shadow: var(--shadow);
    display: flex; 
    flex-direction: column; 
    overflow: hidden;
}

.header {
    background: rgba(0,0,0,0.2); 
    border-bottom: 1px solid var(--glass-border); 
    padding: clamp(15px, 2vh, 25px) clamp(20px, 3vw, 40px);
    display: flex; justify-content: space-between; align-items: center; z-index: 10;
}

.brand { display: flex; align-items: center; gap: 20px; }
.avatar-header img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; }
.status-dot { 
    width: 18px; height: 18px; background: #10B981; border-radius: 50%; 
    position: absolute; bottom: 5px; right: 5px; border: 3px solid rgba(0,0,0,0.2); 
}
.brand-info h2 { font-size: 1.8rem; color: white; }
.brand-info p { font-size: 1.2rem; color: #A5B4FC; }

.control-btn { background: none; border: none; cursor: pointer; color: white; transition: color 0.3s; margin-left:20px;}
.control-btn .material-icons { font-size: clamp(1.5rem, 6vw, 2.5rem); }
.control-btn:hover { color: var(--primary-hover); }

/* CHAT BOX */
.chat-box { flex: 1; padding: clamp(20px, 4vw, 40px); overflow-y: auto; display: flex; flex-direction: column; gap: clamp(15px, 3vh, 30px); }
.chat-box::-webkit-scrollbar { width: 8px; }
.chat-box::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 10px; }


.message-row { display: flex; align-items: flex-end; gap: 15px; }
.message-row.user { justify-content: flex-end; }
.message-row.bot { justify-content: flex-start; }

.avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

.message { 
    max-width: 80%; padding: clamp(10px, 2vw, 20px) clamp(15px, 3vw, 25px); border-radius: 25px; 
    font-size: clamp(1rem, 2vw, 1.4rem); line-height: 1.5; box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
    white-space: pre-wrap; 
}
.bot .message { background: var(--bot-msg); color: var(--text-dark); border-bottom-left-radius: 5px; }
.user .message { background: var(--primary); color: white; border-bottom-right-radius: 5px; }

/* TYPING */
.typing { display: flex; gap: 8px; align-items: center; padding: 20px 25px !important; }
.dot { width: 12px; height: 12px; background: #9CA3AF; border-radius: 50%; }

/* INPUT */
.input-area { padding: clamp(15px, 3vh, 25px) clamp(20px, 4vw, 40px); background: rgba(0,0,0,0.2); display: flex; gap: clamp(10px, 2vw, 20px); align-items: center; border-top: 1px solid var(--glass-border); }
input { 
    flex: 1; padding: clamp(10px, 2vh, 20px) clamp(15px, 3vw, 30px); 
    border: 1px solid rgba(255,255,255,0.3); border-radius: 35px; 
    outline: none; font-size: clamp(1rem, 2vw, 1.4rem); 
    background: rgba(255,255,255,0.9); transition: border 0.3s; 
    color: var(--text-dark);
}
input:focus { border-color: var(--primary); background: white; }

button.send-btn, button.mic-btn { 
    width: clamp(45px, 12vw, 70px); height: clamp(45px, 12vw, 70px); 
    border-radius: 50%; border: none; 
    cursor: pointer; display: flex; justify-content: center; align-items: center; 
    transition: all 0.3s; 
    flex-shrink: 0;
}
button.send-btn .material-icons, button.mic-btn .material-icons { font-size: clamp(1.2rem, 5vw, 2rem); }
button.send-btn { background: var(--primary); color: white; }
button.send-btn:hover { background: var(--primary-hover); }

button.mic-btn { background: rgba(255,255,255,0.8); color: var(--text-dark); }
button.mic-btn:hover { background: white; }
button.mic-btn.recording { background: #EF4444; color: white; }

/* SPLIT SCREEN LAYOUT */
.split-layout {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 100%;
    height: 80vh;
    gap: 30px;
    padding: 20px 50px;
}

.actions-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.avatar-small-container {
    height: 15vh;
}

.avatar-standing-small {
    height: 100%;
    object-fit: contain;
    animation: floatAvatar 6s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4));
}

.chat-column {
    flex: 1.5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-container.inline {
    width: 100%;
    height: 100%;
    max-height: none;
    transform: none;
    top: auto;
    position: relative;
    margin: 0;
}

/* CHECKBOX LIST STYLES */
.checklist-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px auto;
    width: 100%;
    max-width: 550px;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 40px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.checklist-item {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 1.5rem;
    font-weight: 500;
    padding: 18px 25px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid transparent;
    user-select: none;
    box-sizing: border-box;
}

.item-text {
    display: flex;
    align-items: center;
    gap: 20px;
    pointer-events: none;
}

.checklist-item input[type="checkbox"] {
    width: 25px;
    height: 25px;
    cursor: pointer;
    accent-color: #10B981;
    transform: scale(1.3);
    margin-left: 20px;
}

.checklist-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.checklist-item input[type="checkbox"] {
    width: 25px;
    height: 25px;
    cursor: pointer;
    accent-color: #10B981;
    transform: scale(1.3);
}

.submit-btn {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.submit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.4);
}

/* IA ASSISTANT BUTTON REPOSITIONED (FIXED) */
.ia-assist-btn-container {
    position: absolute;
    bottom: 40px;
    right: 40px;
    z-index: 100;
}

.ia-assist-btn {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.ia-assist-btn:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.5);
}

.ia-assist-btn i {
    font-size: 1.8rem;
}
