/* general.css */

/* --- Base Styles & Typography --- */
body {
    font-family: 'Roboto', sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    padding-top: 20px;
    box-sizing: border-box;
    overflow-x: hidden;
    padding: 0;
}

h1,
h2,
h3 {
    color: #bd98e1;
    text-shadow: 0 0 10px rgba(138, 43, 226, 0.6);
}

h1 {
    margin-bottom: 25px;
    font-size: 2.2em;
}

h2 {
    font-size: 1.2em;
    margin: 0;
}

h3 {
    color: #9a4dff;
    margin-bottom: 10px;
}

p {
    color: #c0c0c0;
}

a {
    text-decoration: none;
    color: #c1c1c1;
}

a:hover {
    color: #fff;
}

li {
    list-style-type: none;
}

/* --- Utility Classes --- */
.hidden {
    display: none !important;
}

.text-danger {
    color: red;
}

.flash {
    padding: 20px;
    border: none;
}

.danger {
    background-color: red;
    color: white;
}

.success {
    background-color: green;
    color: white;
}

.text-success {
    color: green;
}

.bg-red {
    background-color: #d32f2f;
    color: #fff;
}

.bg-green {
    background-color: #005c2e;
    color: #fff;
}

.centered {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    padding: 10px;
    background-color: rgba(20, 20, 30, 0.9);
    border-radius: 10px;
    margin: 15px auto;
    box-shadow: 0 0 20px rgba(0, 100, 255, 0.2);
    border: 1px solid rgba(0, 100, 255, 0.1);
    color: #e0e0e0;
}

.centered > * {
    margin-bottom: 10px;
}

.centered > *:last-child {
    margin-bottom: 0;
}

.error-message {
    color: red;
    font-weight: bold;
}

/* --- Layout Containers --- */
.container {
    width: 95%;
    max-width: 800px;
    /* padding: 20px; */
    background-color: rgba(20, 20, 30, 0.9);
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(70, 0, 200, 0.4), 0 0 15px rgba(0, 100, 255, 0.3);
    text-align: center;
    border: 1px solid rgba(70, 0, 200, 0.2);
    margin: auto;
    margin-bottom: 20px;
}

.container-transacciones {
    max-width: 1200px;
    width: 95%;
}

/* --- Header & Navigation (Mobile-First) --- */
header {
    width: 100%;
    padding: 10px 20px;
    padding: 0 5px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(30, 30, 45, 0.9);
    box-shadow: 0 0 15px rgba(70, 0, 200, 0.2);
    border-radius: 8px;
    margin-bottom: 20px;
    box-sizing: border-box;
    margin-bottom: 0%;
}

nav {
    width: 100%;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    position: relative;
    /* background-color: #333; */
}

nav ul li a, nav ul li span {
    display: block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
}

nav ul li a:hover:not(.active), nav ul li span:hover {
    /* background-color: #0040675a; */
}

nav ul li a.active {
    background-color: #026db0;
}

nav ul li:first-child a {
    background-color: transparent;
}

/* Dropdown specific styles (mobile behavior) */
.dropdown {
    position: relative;
    overflow: hidden;
}

.dropdown .dropbtn {
    font-size: 16px;
    border: none;
    outline: none;
    color: white;
    padding: 14px 16px;
    background-color: inherit;
    font-family: inherit;
    margin: 0;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.dropdown-content {
    display: none;
    position: static;
    width: 100%;
    background-color: #444;
    box-shadow: none;
    border-radius: 0;
}

.dropdown-content a {
    float: none;
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.dropdown-content a:hover {
    background-color: #555;
}

/* New class for dropdown active state on mobile (toggled by JS) */
.dropdown.open-dropdown .dropdown-content {
    display: block;
}

/* Hamburger Menu Specific Styles */
.hamburger-menu {
    display: block;
    position: absolute;
    right: 10px;
    top: 3px;
    order: unset;
    /* background-color: #333; */
}

#hamburguerBtn { /* Styling for the hamburger icon itself */
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    display: block;
}

/* Hide all regular navigation items by default on mobile */
nav ul li:not(.logo-li):not(.hamburger-menu) {
    display: none;
    width: 100%;
    text-align: center;
}

/* Adjust logo positioning on mobile to always be visible */
.logo-li {
    width: auto;
    order: 1;
    margin-right: auto;
}

/* When the primaryNav is "open" (toggled by JS) */
#primaryNav.open {
    min-height: 100vh;
    align-items: center;
    padding-top: 50px;
    background-color: #333;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

#primaryNav.open li:not(.logo-li):not(.hamburger-menu) {
    display: block;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#primaryNav.open li:last-of-type {
    border-bottom: none;
}

#hamburguerBtn.open i.fa-bars:before {
    content: "\f00d";
}

/* --- Main Content & Sections (Mobile-First) --- */
.content-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1200px;
    align-items: center;
}

main {
    padding: 20px 0;
    display: flex;
    justify-content: center;
    width: 100%;
    flex-grow: 1;
    box-sizing: border-box;
}

.hero {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero picture {
    display: block;
    width: 100%;
    min-width: 300px;
    height: 80%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1400;
}

.hero picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.features {
    text-align: center;
    margin-top: 40px;
}

.feature {
    display: block;
    width: 90%;
    margin: 20px auto;
    vertical-align: top;
}

#analisisIA {
    display: block;
    width: 100%;
    margin: auto;
    margin-bottom: 10px;
}
.form-inputs {
    border: #cdcdcd 1px solid;
    padding: 10px;
    margin: 10px;
    border-radius: 15px;
}

.form-inputs > div {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.form-inputs label {
    text-align: left;
}

.form-inputs * {
    border-radius: 5px;
}

.form-inputs input,
.form-inputs select {
    padding: 8px;
    background-color: rgba(30, 30, 45, 0.7);
    border: 1px solid rgba(0, 100, 255, 0.4);
    color: #e0e0e0;
}

textarea {
    width: calc(100% - 20px);
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 100, 255, 0.4);
    border-radius: 8px;
    resize: vertical;
    min-height: 150px;
    font-size: 16px;
    box-sizing: border-box;
    background-color: rgba(30, 30, 45, 0.7);
    color: #e0e0e0;
}

/* --- Buttons --- */
button {
    background-color: #8a2be2;
    color: #fff;
    border: none;
    padding: 14px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 17px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.4);
}

button:hover {
    background-color: #6a0dad;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.8), 0 0 30px rgba(0, 100, 255, 0.6);
}

.cta-button {
    background-color: rgba(138, 43, 226, 0.3);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
}

.card button {
    padding: 10px 15px;
    margin-right: 5px;
    border: none;
    border-radius: 3px;
    background-color: rgba(138, 43, 226, 0.3);
    color: white;
    cursor: pointer;
    width: 100%;
}

.card button:hover {
    background-color: #0056b3;
}

#boton-actualizar-perfil {
    width: 100%;
}

/* --- Cards --- */
.card {
    border: 1px solid #ccc;
    padding: 20px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.card b {
    display: block;
    margin-bottom: 10px;
}

.card div {
    margin-bottom: 5px;
    width: 100%;
}

#perfil-completo {
    width: 85%;
    margin: auto;
}

.card label {
    display: block;
    text-align: left;
    margin-bottom: 5px;
}

.card input[type="text"],
.card input[type="number"] {
    width: calc(100% - 16px);
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* --- Tables --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: rgba(20, 20, 30, 0.8);
    box-shadow: 0 0 20px rgba(0, 100, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 100, 255, 0.1);
    font-size: 13px;
}

th,
td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(50, 50, 70, 0.7);
    color: #e0e0e0;
}

th {
    background-color: rgba(40, 40, 60, 0.9);
    font-weight: 600;
    color: #9a4dff;
}

tr:hover {
    background-color: rgba(50, 50, 70, 0.7);
}

.col {
    color: #00ffcc;
    font-weight: bold;
}

.colm {
    color: #ff6666;
    font-weight: bold;
}

/* --- Modals --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: rgba(30, 30, 45, 0.95);
    margin: 5% auto;
    border: 1px solid rgba(70, 0, 200, 0.4);
    width: 95%;
    max-width: 700px;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(70, 0, 200, 0.6), 0 0 20px rgba(0, 100, 255, 0.4);
    color: #e0e0e0;
    position: relative;
    animation-name: animatetop;
    animation-duration: 0.4s;
}

#contenido-resumen {
    padding: 20px;
}

.close-button {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 15px;
}

.close-button:hover,
.close-button:focus {
    color: #fff;
    text-decoration: none;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    outline: none;
}

/* Specific Modal: Informe Texto */
#informeTextoModal > div > p {
    margin-top: 20px;
    font-size: 1em;
    padding: 0 5px;
}

/* Specific Modal: Swap Accounts */
#swapAccountsModal .modal-content {
    width: 95%;
    padding: 20px;
    margin: 5% auto;
}

#swapAccountsModal h2 {
    font-size: 2em;
}

#swapAccountsModal .modal-fields {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    margin-top: 20px;
}

#swapAccountsModal .modal-field-group {
    flex: 1;
    margin: 10px 0;
}

#swapAccountsModal select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid rgba(0, 100, 255, 0.4);
    border-radius: 8px;
    background-color: rgba(30, 30, 45, 0.7);
    color: #e0e0e0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20512%22%3E%3Cpath%20fill%3D%22%23e0e0e0%22%20d%3D%22M192%20256L64%20128v256l128-128z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

#swapAccountsModal select:focus {
    outline: none;
    border-color: #00ccff;
    box-shadow: 0 0 10px rgba(0, 204, 255, 0.6);
}

#swapAccountsModal #confirmSwapButton {
    display: block;
    margin: auto;
    margin-top: 20px;
}

/* W3 Modal (consider consolidating with .modal if possible) */
.w3-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.w3-modal-content {
    background-color: rgba(30, 30, 45, 0.95);
    margin: 5% auto;
    padding: 20px;
    border: 1px solid rgba(70, 0, 200, 0.4);
    width: 95%;
    max-width: 600px;
    box-shadow: 0 0 40px rgba(70, 0, 200, 0.6), 0 0 20px rgba(0, 100, 255, 0.4);
    animation-name: animatetop;
    animation-duration: 0.4s;
    border-radius: 12px;
    color: #e0e0e0;
}

.w3-button.w3-display-topright {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.w3-button.w3-display-topright:hover,
.w3-button.w3-display-topright:focus {
    color: #fff;
    text-decoration: none;
    background-color: transparent;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}


/* --- Chatbot Components --- */
.chatbot-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
    height: 500px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 999;
    transform: translateY(100vh);
    transition: transform 0.3s ease-in-out;
}

.chatbot-container.show {
    transform: translateY(0);
}

.chatbot-header {
    background-color: rgba(90, 7, 168, 0.911);
    color: white;
    padding: 15px;
    text-align: center;
    position: relative;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: flex;
    justify-content: space-between;
}

.close-chatbot {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5em;
    cursor: pointer;
    line-height: 1;
}

.chatbot-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
    color: #333;
}

.chatbot-messages p {
    background-color: #e2e6ea;
    padding: 8px 12px;
    border-radius: 15px;
    margin-bottom: 10px;
    max-width: 80%;
    word-wrap: break-word;
    text-align: left;
}

.chatbot-messages p.user-message {
    background-color: #d1e7dd;
    margin-left: auto;
    text-align: right;
}

.user-input {
    justify-self: right;
}

.chatbot-input {
    padding: 15px;
    display: flex;
    border-top: 1px solid #eee;
    position: relative;
}

.chatbot-input input[type="text"] {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    margin-right: 10px;
    font-size: 1em;
    padding-right: 45px;
}

.chatbot-input button {
    background-color: rgba(90, 7, 168, 0.911);
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.chatbot-input button:hover {
    background-color: #0056b3;
}

.chatbot-input button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.chatbot-button {
    background-color: rgba(90, 7, 168, 0.911);
    color: white;
    border: none;
    padding: 8px 12px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.chatbot-button:hover {
    background-color: #0056b3;
}

.json-message {
    background-color: #e6e6e6;
    border-left: 3px solid rgba(90, 7, 168, 0.911);
    padding: 10px;
    margin-top: 5px;
    white-space: pre-wrap;
    font-family: monospace;
}

/* --- Support Bot Floating Button --- */
.support-bot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(90, 7, 168, 0.911);
    color: white;
    border-radius: 30px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.support-bot-container:hover {
    transform: translateY(-5px);
}

.support-bot-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    position: relative;
}

.support-bot-icon img {
    width: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.online-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background-color: #28a745;
    border-radius: 50%;
    border: 2px solid white;
}

.support-bot-text .title {
    font-weight: bold;
    display: block;
}

.support-bot-text .status {
    font-size: 0.8em;
    opacity: 0.9;
}

/* --- Microphone Icon & Recording --- */
.microphone-icon {
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background-color: #555;
    border-radius: 5px 5px 15px 15px / 5px 5px 10px 10px;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    align-self: center;
}

.microphone-icon::before {
    content: '';
    position: absolute;
    bottom: 0;
    width: 6px;
    height: 10px;
    background-color: #555;
    border-radius: 0 0 3px 3px;
}

.microphone-icon::after {
    content: '';
    position: absolute;
    bottom: -3px;
    width: 15px;
    height: 3px;
    background-color: #555;
    border-radius: 50%;
}

.microphone-icon:hover {
    background-color: rgba(90, 7, 168, 0.911);
}

.microphone-icon.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.microphone-icon.recording {
    background-color: #dc3545;
}

#micIcon {
    cursor: pointer;
    font-size: 1.5em;
    color: #333;
    transition: color 0.3s ease;
    align-self: center;
}

#micIcon.recording {
    color: #dc3545;
    animation: pulse 1s infinite alternate;
}

#micIcon.hidden {
    display: none;
}

@keyframes pulse {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

/* --- Indicator Dots --- */
.indicator-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 8px;
    vertical-align: middle;
    border: 1px solid #ccc;
    align-self: center;
}

.dot-green {
    background-color: #28a745;
}

.dot-red {
    background-color: #dc3545;
}

.dot-blue {
    background-color: #007bff;
}

/* --- Misc. Elements --- */
.container-logo {
    display: flex;
    height: 100%;
    justify-content: center;
    align-items: center;
    order: 1;
}

.logo {
    width: 60px;
}

.pieChart-large {
    width: 100%;
    max-width: 700px;
}

#response {
    margin-top: 25px;
    padding: 20px;
    border: 1px solid rgba(0, 100, 255, 0.3);
    border-radius: 8px;
    background-color: rgba(30, 30, 45, 0.7);
    text-align: left;
    min-height: 50px;
    color: #c0c0c0;
}

#response.error {
    background-color: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.5);
    color: #ffcccc;
}

.ai-assistant {
    background-color: rgba(50, 50, 70, 0.8);
    margin-bottom: 20px;
    padding: 15px;
    max-width: 96%;
    border-radius: 10px;
    border: 1px solid rgba(0, 100, 255, 0.3);
}

.status-message {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}

.status-message.error {
    color: red;
    font-weight: bold;
}

.cuenta {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cuenta li {
    padding: 10px;
    border-bottom: 1px solid rgba(50, 50, 70, 0.7);
}

.cuenta li:last-child {
    border-bottom: none;
}

.cuenta li:hover {
    background-color: rgba(138, 43, 226, 0.3);
    scale: 1.02;
    transition: background-color 0.3s ease, scale 0.3s ease;
}

/* Search Bar */
#busqueda {
    width: calc(100% - 16px);
    padding: 8px;
    margin-bottom: 20px;
    border-radius: 5px;
    background-color: rgba(30, 30, 45, 0.7);
    border: 1px solid rgba(0, 100, 255, 0.4);
    color: #e0e0e0;
}

.search-bar {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 15px;
}

.search-bar input {
    padding: 8px;
    border-radius: 5px;
    margin: 5px 0;
    background-color: rgba(30, 30, 45, 0.7);
    border: 1px solid rgba(0, 100, 255, 0.4);
    color: #e0e0e0;
}

.search-bar input[type="number"] {
    width: calc(100% - 10px);
}

.search-bar input[type="submit"] {
    width: 100%;
    background-color: rgba(138, 43, 226, 0.3);
    color: #fff;
    border: none;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.4);
    margin-top: 10px;
}

.search-bar input[type="submit"]:hover {
    background-color: #0056b3;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.8);
}


/* --- Tooltips --- */
.icon-button {
    position: relative;
    overflow: hidden;
    margin: 10px;
}

.icon-button i {
    font-size: 1.2em;
}

.tooltip {
    visibility: hidden;
    width: auto;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    border-radius: 3px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.icon-button:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 10px 0;
    width: 100%;
    margin-top: auto;
}

.logo-li {
    /* background-color: #333!important; */
}

.user-message, .bot-message {
    color: #4f4f4f;
}

.cta-button {
    background-color: var(--color-accent);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    transition: background-color 0.3s ease;
}
.cta-button:hover {
    background-color: var(--color-accent-dark);
}

/* --- Animations --- */
@keyframes animatetop {
    from {
        top: -300px;
        opacity: 0;
    }
    to {
        top: 5%;
        opacity: 1;
    }
}

/* Basic Spinner Styles */
.spinner {
    margin: 20px auto;
    width: 70px;
    text-align: center;
}

.spinner > div {
    width: 18px;
    height: 18px;
    background-color: #333; /* Dark gray for the dots */
    border-radius: 100%;
    display: inline-block;
    -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
    animation: sk-bouncedelay 1.4s infinite ease-in-out both;
}

.spinner .dot2 {
    -webkit-animation-delay: -0.32s;
    animation-delay: -0.32s;
}

.spinner .dot3 {
    -webkit-animation-delay: -0.16s;
    animation-delay: -0.16s;
}

@-webkit-keyframes sk-bouncedelay {
    0%, 80%, 100% { -webkit-transform: scale(0) }
    40% { -webkit-transform: scale(1.0) }
}

@keyframes sk-bouncedelay {
    0%, 80%, 100% {
        -webkit-transform: scale(0);
        transform: scale(0);
    } 40% {
        -webkit-transform: scale(1.0);
        transform: scale(1.0);
    }
}

#loadingSpinner {
    background-color: transparent;
    height: 50px;
}

/* Basic CSS for the above HTML structure */
.results-form {
    display: flex;
    flex-direction: column; /* Stacks elements vertically */
    gap: 15px; /* Spacing between elements */
    max-width: 300px; /* Constrain form width */
    margin: 20px 0; /* Example margin */
}

.form-group {
    display: flex;
    flex-direction: column; /* Stack label and input within their group */
    gap: 8px; /* Spacing between label and input */
}

.form-label {
    font-weight: bold;
    color: #f0f0f0; /* Adjust to your dark theme */
    font-size: 1.1em;
}

.form-input {
    padding: 10px 12px;
    border: 1px solid #555; /* Softer border for dark theme */
    border-radius: 6px;
    background-color: #333; /* Darker background */
    color: #eee; /* Light text color */
    font-size: 1em;
    width: 100%; /* Make input take full width of its container */
    box-sizing: border-box; /* Include padding and border in width */
}

.form-input:focus {
    outline: none;
    border-color: #8a2be2; /* Purple highlight on focus */
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.3);
}

.form-button {
    padding: 12px 20px;
    background-color: #8a2be2; /* Purple button */
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.2s ease, transform 0.1s ease;
    width: 100%; /* Make button take full width */
    box-sizing: border-box;
}

.form-button:hover {
    background-color: #9933ff; /* Slightly lighter purple on hover */
    transform: translateY(-1px); /* Subtle lift effect */
}

.form-button:active {
    background-color: #7a1ee0; /* Darker purple on click */
    transform: translateY(0);
}


.centered-form {
    margin: 10px auto;
}

.main-content {
    max-width: 100%;
}

/* --- Page Specific Styles for Analisis IA --- */

/* Page Container - adjust width and padding for a full page */
.page-container {
    padding: 30px 20px; /* More internal padding for a full page */
    max-width: 900px; /* A good max-width for content readability */
    margin: 20px auto; /* Center the container on the page */
}

.page-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.8em; /* Make the main title larger */
    color: #bd98e1;
    text-shadow: 0 0 15px rgba(138, 43, 226, 0.8), 0 0 25px rgba(0, 100, 255, 0.6);
}

/* Card titles within the page */
.card-title {
    font-size: 1.8em; /* Larger headings for sections */
    margin-bottom: 20px;
    color: #9a4dff;
    text-shadow: 0 0 8px rgba(154, 77, 255, 0.5);
}

/* General button styling (from your existing 'button' rule, applied consistently) */
.action-button {
    background-color: #8a2be2;
    color: #fff;
    border: none;
    padding: 14px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 17px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.4);
    width: 100%; /* Make buttons full width by default in cards */
    margin-bottom: 10px; /* Space between stacked buttons */
}

.action-button:hover {
    background-color: #6a0dad;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.8), 0 0 30px rgba(0, 100, 255, 0.6);
}

.action-button:last-child {
    margin-bottom: 0; /* Remove margin for the last button in a group */
}

/* Button groups for better layout */
.button-group {
    display: flex;
    flex-direction: column; /* Stack buttons by default on small screens */
    gap: 15px; /* Spacing between buttons */
    margin-top: 15px; /* Space from title */
    margin-bottom: 10px; /* Space before next element/card */
}

/* Full width button for specific cases */
.full-width-button {
    width: 100%;
}

/* Profile status message (text above "Actualizar Perfil" button) */
.profile-status-message {
    color: #c0c0c0;
    margin-bottom: 15px;
    font-size: 1.1em;
}

/* Form Grid for "Configuración de Perfil" */
.form-grid {
    display: grid;
    gap: 20px; /* Spacing between form groups */
    grid-template-columns: 1fr; /* Single column on mobile */
    margin-top: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column; /* Stack label and input */
    gap: 8px; /* Space between label and input */
}

.form-label {
    font-weight: bold;
    color: #f0f0f0;
    font-size: 1em; /* Adjust label size */
    text-align: left; /* Ensure labels align left */
}

.form-input,
.form-textarea {
    width: 100%; /* Make inputs/textareas take full width of their grid cell */
    padding: 12px;
    border: 1px solid rgba(0, 100, 255, 0.4);
    border-radius: 8px; /* Consistent border-radius */
    background-color: rgba(30, 30, 45, 0.7);
    color: #e0e0e0;
    font-size: 1em;
    box-sizing: border-box; /* Include padding and border in width */
    resize: vertical; /* Allow vertical resizing for textareas */
    min-height: 40px; /* Default height for inputs */
}

.form-textarea {
    min-height: 100px; /* Taller default for textareas */
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #8a2be2;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.3);
}

/* Specific class for a field that should span full width in a grid */
.full-width-field {
    grid-column: 1 / -1; /* Spans all columns available in the grid */
}

/* Adjustments for the existing .card styling */
.card {
    border: 1px solid rgba(70, 0, 200, 0.2); /* Use a more integrated border color */
    background-color: rgba(20, 20, 30, 0.9); /* Your existing container background */
    padding: 25px; /* More padding for a section feel */
    margin-bottom: 30px; /* More space between cards */
    border-radius: 12px; /* Consistent border-radius with container */
    box-shadow: 0 0 20px rgba(70, 0, 200, 0.3); /* Softer card shadow */
    text-align: center; /* Center content within cards by default */
}

.error-message-inline {
    display: none; /* Por defecto, oculto */
    color: #ff6666; /* Rojo claro para el error */
    font-weight: bold;
    margin-bottom: 15px; /* Espacio debajo del mensaje */
    padding: 10px;
    border: 1px solid #ff6666;
    background-color: rgba(255, 102, 102, 0.1);
    border-radius: 8px;
    text-align: center;
}