* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #071863 0%, #051243 100%);
    min-height: 100vh;
    padding: 20px;
    color: #e5e7eb;
    transition: all 0.3s ease;
}

body.light-theme {
    background: linear-gradient(135deg, #071863 0%, #051243 100%);
    color: #1f2937;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.theme-toggle {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(1, 244, 223, 0.1);
    border: 2px solid #01f4df;
    border-radius: 50px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    z-index: 10;
}

.theme-toggle:hover {
    background: rgba(1, 244, 223, 0.2);
    transform: scale(1.05);
}

body.light-theme .theme-toggle {
    background: rgba(0, 253, 44, 0.1);
    border-color: #00fd2c;
}

.nav-back-button {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(1, 244, 223, 0.1);
    color: white;
    border: 2px solid #01f4df;
    border-radius: 50px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    z-index: 10;
}

.nav-back-button:hover {
    background: rgba(1, 244, 223, 0.2);
    transform: scale(1.05);
}

body.light-theme .nav-back-button {
    background: rgba(0, 253, 44, 0.1);
    border-color: #00fd2c;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    padding-top: 60px;
}

.header h1 {
    font-size: 2.7em;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

body.light-theme .header h1 {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.header p {
    font-size: 1.3em;
    color: #9ca3af;
    line-height: 1.6;
}

body.light-theme .header p {
    color: #e5e7eb;
}

.chat-container {
    background: rgba(15, 30, 100, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(1, 244, 223, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
}

body.light-theme .chat-container {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(7, 24, 99, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.form-panel {
    padding: 30px;
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

body.light-theme label {
    color: #071863;
}

textarea,
select,input[type="number"], input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    background: rgba(7, 24, 99, 0.6);
    border: 1px solid rgba(1, 244, 223, 0.3);
    border-radius: 10px;
    color: #e5e7eb;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
    resize: vertical;
}

textarea {
    min-height: 100px;
}

body.light-theme textarea,
body.light-theme select,
body.light-theme input[type="number"],
body.light-theme input[type="text"] {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #1f2937;
}

textarea:focus,
select:focus,
input[type="number"]:focus,
input[type="text"]:focus {
    border-color: #00fd2c;
    box-shadow: 0 0 0 3px rgba(0, 253, 44, 0.1);
    background: rgba(7, 24, 99, 0.8);
}

body.light-theme textarea:focus,
body.light-theme select:focus,
body.light-theme input[type="number"]:focus,
body.light-theme input[type="text"]:focus {
    border-color: #00fd2c;
    box-shadow: 0 0 0 3px rgba(0, 253, 44, 0.1);
    background: #ffffff;
}

textarea::placeholder {
    color: #6b7280;
}

body.light-theme textarea::placeholder {
    color: #9ca3af;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2301f4df' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

body.light-theme select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23071863' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

select option {
    background: #071863;
    color: #e5e7eb;
}

body.light-theme select option {
    background: #ffffff;
    color: #1f2937;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #00fd2c 0%, #00d624 100%);
    border: none;
    border-radius: 10px;
    color: #071863;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 253, 44, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 253, 44, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Style for when the button is disabled */
.submit-btn:disabled {
    background-color: #cccccc;
    /* Grey out the button */
    color: #666666;
    cursor: not-allowed;
    transform: none;
    /* Prevent hover animations */
    box-shadow: none;
}

.response-container {
    margin-top: 30px;
    padding: 0 30px 30px 30px;
    display: block;
}

.response-container.show {
    display: block;
}

.assistant-message {
    background: rgba(1, 244, 223, 0.1);

    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

body.light-theme .assistant-message {
    background: rgba(7, 24, 99, 0.05);

}

.assistant-label {
    font-size: 12px;
    font-weight: 600;
    color: #01f4df;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.light-theme .assistant-label {
    color: #071863;
}

.assistant-label::before {
    content: "✨";
    font-size: 14px;
}

.assistant-content {
    color: #e5e7eb;
    line-height: 1.7;
    font-size: 15px;
    white-space: pre-wrap;
}

body.light-theme .assistant-content {
    color: #1f2937;
}

.download-btn {
    width: 100%;
    padding: 14px;
    background: rgba(1, 244, 223, 0.1);
    border: 2px solid #01f4df;
    border-radius: 10px;
    color: #01f4df;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: rgba(1, 244, 223, 0.2);
    transform: translateY(-2px);
}

body.light-theme .download-btn {
    background: rgba(7, 24, 99, 0.05);
    border-color: #071863;
    color: #071863;
}

body.light-theme .download-btn:hover {
    background: rgba(7, 24, 99, 0.1);
}

.download-btn:active {
    transform: translateY(0);
}

/* Inicio Estilos Login */
.vista-login {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Pantalla completa */
    background-color: #f0f2f5;
    font-family: sans-serif;
}
.card-login {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
}
button.google-btn {
    background-color: #4285F4;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
}
button.google-btn:hover {
    background-color: #357ae8;
}

/*Fin Estilos Login*/

/* Mobile Responsive */
@media (max-width: 640px) {
    body {
        padding: 12px;
    }

    .theme-toggle {
        top: -10px;
        right: 0;
        padding: 6px 12px;
        font-size: 18px;
    }

    .header {
        padding-top: 50px;
    }

    .header h1 {
        font-size: 1.7em;
    }

    .header p {
        font-size: 1em;
    }

    .form-panel {
        padding: 20px;
    }

    .response-container {
        padding: 0 20px 20px 20px;
    }

    textarea,
    select {
        padding: 12px 14px;
        font-size: 14px;
    }

    textarea {
        min-height: 80px;
    }

    .submit-btn {
        padding: 14px;
        font-size: 15px;
    }

    .assistant-message {
        padding: 16px;
    }

    .form-group {
        margin-bottom: 20px;
    }
}

/* Loading state */
.submit-btn.loading {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    cursor: not-allowed;
    pointer-events: none;
}

.submit-btn.loading::after {
    content: "...";
    animation: dots 1.5s infinite;
}

@keyframes dots {

    0%,
    20% {
        content: ".";
    }

    40% {
        content: "..";
    }

    60%,
    100% {
        content: "...";
    }
}