/* Enhanced Welcome Section - Simplified and moved up */
.welcome-section {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0; /* Removed padding */
}

.welcome-content {
    text-align: center;
    max-width: 400px;
    padding-top: 0; /* Removed top padding */
}

.welcome-icon {
    margin-bottom: 0.5rem; /* Reduced margin */
}

.welcome-icon i {
    font-size: 2.5rem;
    color: var(--viewer-color);
    animation: pulse 2s ease-in-out infinite;
}

.welcome-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem; /* Reduced margin */
}

.welcome-subtitle {
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1rem; /* Reduced margin */
    line-height: 1.5;
}

/* Remove feature highlights section */
.feature-highlights {
    display: none;
}

.scroll-invitation {
    margin-top: 1rem; /* Reduced margin */
}

.scroll-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--viewer-color);
    margin-bottom: 0.5rem; /* Reduced margin */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scroll-arrow-container {
    position: relative;
}

.scroll-arrow {
    font-size: 2rem;
    color: var(--viewer-color);
    animation: bounceArrow 2s ease-in-out infinite;
    cursor: pointer;
    transition: color 0.3s ease;
}

.scroll-arrow:hover {
    color: var(--chat-color);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes bounceArrow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Demo Section - Moved up */
.demo-section {
    margin-top: 2rem; /* Reduced margin-top from 4rem to 2rem */
    padding: 2rem; /* Padding uniforme en todos los lados */
    border-radius: 20px;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.demo-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.demo-header {
    text-align: center;
    margin-bottom: 6rem; /* Reduced margin from 3rem to 2rem */
}

.demo-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem; /* Reduced margin */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.demo-title i {
    color: var(--viewer-color);
    font-size: 2rem;
}

.demo-description {
    font-size: 1.1rem;
    color: var(--text-color);
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

/* Demo Components */
.demo-viewer {
    height: 300px;
    border: 3px solid var(--viewer-color);
    border-radius: 8px;
    background-color: var(--section-bg-color, #fafafa);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.viewer-placeholder {
    text-align: center;
    color: var(--text-color);
    opacity: 0.7;
}

.viewer-icon {
    font-size: 3rem;
    color: var(--viewer-color);
    margin-bottom: 1rem;
    display: block;
}

.demo-chat-container {
    height: 300px;
    border: 3px solid var(--chat-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.demo-chat-messages {
    flex: 1;
    padding: 1rem;
    background-color: var(--section-bg-color, #fafafa);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.demo-message {
    padding: 0.75rem 1rem;
    border-radius: 15px;
    max-width: 85%;
    animation: messageSlideIn 0.5s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.demo-message.user-message {
    background-color: var(--user-message-bg, #e3f2fd);
    color: var(--user-message-text, #0d47a1);
    align-self: flex-end;
    border-radius: 15px 15px 5px 15px;
}

.demo-message.system-message {
    background-color: var(--system-message-bg, #f1f8e9);
    color: var(--system-message-text, #33691e);
    align-self: flex-start;
    border-radius: 15px 15px 15px 5px;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-icon {
    font-size: 1rem;
    opacity: 0.8;
}

.structure-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.structure-btn {
    padding: 0.4rem 0.8rem;
    background-color: var(--viewer-color);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.structure-btn:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.structure-btn.selected {
    background-color: var(--chat-color);
    transform: scale(1.05);
}

.demo-chat-input {
    padding: 1rem;
    background-color: var(--section-bg-color, #fafafa);
    border-top: 1px solid var(--border-color, #eee);
}

.results-content {
    width: 100%;
    text-align: left;
}

.affinity-result {
    margin-bottom: 1rem;
    padding: 1rem 0;
}

.affinity-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.affinity-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--results-color);
}

.files-section {
    margin-top: 1rem;
}

.files-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

/* Simplified file list */
.files-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background-color: var(--card-bg-color);
    border-radius: 4px;
    border: 1px solid var(--border-color, #eee);
}

.file-icon {
    font-size: 1rem;
    color: var(--results-color);
    width: 16px;
    text-align: center;
}

.file-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

.demo-results-container {
    min-height: 200px;
    overflow-y: auto;
    border: 3px solid var(--results-color);
    border-radius: 8px;
    padding: 1.5rem;
    background-color: var(--section-bg-color, #fafafa);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

.results-placeholder {
    text-align: center;
    color: var(--text-color);
    opacity: 0.7;
}

.results-icon {
    font-size: 3rem;
    color: var(--results-color);
    margin-bottom: 1rem;
    display: block;
}

.demo-controls {
    text-align: center;
    margin-top: 2rem;
}

/* Restart button states */
.demo-controls .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.demo-controls .btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: var(--system-message-bg, #f1f8e9);
    color: var(--system-message-text, #33691e);
    border-radius: 15px 15px 15px 5px;
    max-width: 85%;
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--chat-color);
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.experiment-running {
    text-align: center;
    color: var(--text-color);
}

.experiment-running i {
    font-size: 3rem;
    color: var(--viewer-color);
    margin-bottom: 1rem;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .welcome-title {
        font-size: 2rem;
    }
    
    .welcome-subtitle {
        font-size: 1rem;
    }
    
    .demo-title {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .demo-viewer,
    .demo-chat-container {
        height: 250px;
    }
    
    .demo-results-container {
        height: 180px;
    }
}

/* Dark theme specific adjustments */
[data-theme="dark"] {
    --section-bg-color: #1e1e1e;
    --user-message-bg: #1a3a5f;
    --user-message-text: #bbdefb;
    --system-message-bg: #1b3a20;
    --system-message-text: #c8e6c9;
}

/* Molecular Visualization Styles */
.molecular-visualization {
    text-align: center;
    color: var(--text-color);
    padding: 1rem;
}

.molecular-visualization i {
    font-size: 2.5rem;
    color: var(--viewer-color);
    margin-bottom: 1rem;
    display: block;
}

.molecule-complex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.molecule {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 0.8rem;
}

.protein {
    background: linear-gradient(135deg, var(--viewer-color), #1976d2);
}

.drug {
    background: linear-gradient(135deg, var(--chat-color), #388e3c);
}

.binding-line {
    width: 40px;
    height: 3px;
    background: var(--results-color);
    position: relative;
}

.binding-line::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--results-color);
    border-radius: 50%;
}
