/* QuantaCorp Custom Styles */
:root {
    --quanta-primary: #0d1b2a;
    --quanta-secondary: #1b263b;
    --quanta-accent: #415a77;
    --quanta-light: #e0e1dd;
    --quanta-highlight: #778da9;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--quanta-light);
    line-height: 1.6;
    background-color: var(--quanta-primary);
}

/* Collaboration Banner */
.collab-banner {
    background: linear-gradient(135deg, #0d1b2a 0%, #1b263b 100%);
    color: white;
    padding: 30px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.collab-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHBhdHRlcm5UcmFuc2Zvcm09InJvdGF0ZSg0NSkiPjxyZWN0IHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjAzKSIvPjwvcGF0dGVybj48L2RlZnM+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNwYXR0ZXJuKSIvPjwvc3ZnPg==');
    opacity: 0.3;
}

.collab-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    width: 100%;
}

.collab-logos {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-shrink: 0;
}

.collab-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.collab-text {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.collab-headline-row {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.collab-headline-row h3 {
    flex-shrink: 0;
    max-width: 340px;
}

.collab-text h3 {
    font-weight: 700;
    margin-bottom: 0;
    position: relative;
    display: inline-block;
}

.collab-text h3::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 3px;
    background-color: var(--quanta-accent);
}

.collab-headline-row p {
    flex: 1;
    margin: 0;
}

@media (min-width: 768px) {
    .collab-content {
        justify-content: flex-start;
        gap: 50px;
    }
}

@media (max-width: 767px) {
    .collab-content {
        flex-direction: column;
        text-align: center;
    }
    .collab-text {
        text-align: center;
    }
    .collab-headline-row {
        flex-direction: column;
        gap: 15px;
    }
    .collab-headline-row h3 {
        max-width: none;
    }
    .collab-text h3 {
        margin-bottom: 0;
    }
    .collab-text h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

.collab-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.collab-divider::before, .collab-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.3);
}

.collab-badge {
    background-color: var(--quanta-accent);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 15px;
}

.navbar {
    background-color: var(--quanta-primary);
    padding: 15px 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    color: white !important;
}

.nav-link {
    color: var(--quanta-light) !important;
    font-weight: 500;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: white !important;
    transform: translateY(-2px);
}

.nav-divider {
    width: 1px;
    align-self: stretch;
    background: rgba(255,255,255,0.3);
    margin: 0 4px;
}

.nav-divider::before {
    content: "";
    display: block;
}

.btn-nav-icon,
.btn-nav-login {
    background: none !important;
    border: none !important;
    cursor: pointer;
    padding: 6px 12px !important;
    border-radius: 6px;
}

.btn-nav-icon:hover,
.btn-nav-login:hover {
    background: rgba(255,255,255,0.1) !important;
}

.btn-nav-login {
    color: var(--quanta-highlight) !important;
}

.btn-nav-login:hover {
    color: white !important;
}

.rusty-chat-toggle {
    color: #3b82f6 !important;
}

.rusty-chat-toggle:hover {
    color: #60a5fa !important;
}

/* Admin Login Modal */
.admin-login-modal {
    background: var(--quanta-secondary);
    border: 1px solid rgba(65, 90, 119, 0.4);
}

.admin-login-modal .modal-header {
    border-bottom-color: rgba(65, 90, 119, 0.4);
    background: var(--quanta-primary);
}

.admin-login-modal .modal-title {
    color: white;
}

.admin-login-modal .form-label {
    color: var(--quanta-light);
}

.admin-login-modal .form-control {
    background: rgba(27, 38, 59, 0.8);
    border-color: rgba(65, 90, 119, 0.5);
    color: var(--quanta-light);
}

.admin-login-modal .form-control:focus {
    background: rgba(27, 38, 59, 0.9);
    border-color: var(--quanta-accent);
    color: white;
}

.admin-login-modal .btn-primary {
    background: linear-gradient(135deg, var(--quanta-accent), var(--quanta-highlight));
    border: none;
}

.admin-login-modal .btn-primary:hover {
    background: linear-gradient(135deg, var(--quanta-highlight), var(--quanta-accent));
}

/* Create Project Modal */
.rusty-create-project-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rusty-create-project-modal.open {
    display: flex;
}

.rusty-create-project-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.rusty-create-project-dialog {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.4);
}

.rusty-create-project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.rusty-create-project-header h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.rusty-create-project-header-actions {
    display: flex;
    gap: 8px;
}

.rusty-create-project-btn-icon {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.rusty-create-project-btn-icon:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.rusty-create-project-body {
    padding: 24px;
}

.rusty-create-project-field {
    margin-bottom: 20px;
}

.rusty-create-project-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    margin-bottom: 8px;
}

.rusty-create-project-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 0 14px;
}

.rusty-create-project-input-wrap i {
    color: rgba(255,255,255,0.4);
    font-size: 0.9rem;
}

.rusty-create-project-input-wrap input {
    flex: 1;
    background: none;
    border: none;
    color: white;
    font-size: 0.95rem;
    padding: 12px 0;
    outline: none;
}

.rusty-create-project-input-wrap input::placeholder {
    color: rgba(255,255,255,0.35);
}

.rusty-create-project-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rusty-create-project-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rusty-create-project-cat:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

.rusty-create-project-cat.active {
    border-color: transparent;
}

.rusty-create-project-cat[data-category="investing"] { color: #22c55e; }
.rusty-create-project-cat[data-category="investing"].active { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.rusty-create-project-cat[data-category="homework"] { color: #3b82f6; }
.rusty-create-project-cat[data-category="homework"].active { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.rusty-create-project-cat[data-category="writing"] { color: #a855f7; }
.rusty-create-project-cat[data-category="writing"].active { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.rusty-create-project-cat[data-category="travel"] { color: #eab308; }
.rusty-create-project-cat[data-category="travel"].active { background: rgba(234, 179, 8, 0.2); color: #facc15; }

.rusty-create-project-info {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    margin-top: 20px;
}

.rusty-create-project-info i {
    color: rgba(234, 179, 8, 0.9);
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.rusty-create-project-info p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    margin: 0;
    line-height: 1.5;
}

.rusty-create-project-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: flex-end;
}

.rusty-create-project-submit {
    padding: 12px 24px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 10px;
    color: rgba(255,255,255,0.5);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.2s ease;
}

.rusty-create-project-submit:not(:disabled) {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    cursor: pointer;
}

.rusty-create-project-submit:not(:disabled):hover {
    opacity: 0.95;
}

/* Rusty - Sentient AI aesthetic */
@keyframes sentient-pulse {
    0%, 100% { opacity: 1; filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3)); }
    50% { opacity: 0.95; filter: drop-shadow(0 0 16px rgba(59, 130, 246, 0.5)); }
}

@keyframes sentient-pulse-strong {
    0%, 100% { opacity: 1; transform: scale(1); filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.4)); }
    50% { opacity: 0.9; transform: scale(1.03); filter: drop-shadow(0 0 24px rgba(59, 130, 246, 0.6)); }
}

@keyframes typing-dot {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes msg-emerge {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ambient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.rusty-chat-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #0f172a 100%);
    background-size: 200% 200%;
    animation: ambient-shift 15s ease infinite;
    display: none;
    flex-direction: column;
}

.rusty-chat-overlay.open {
    display: flex;
}

.rusty-chat-layout {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* Left Sidebar - Chat History */
.rusty-chat-sidebar {
    width: 260px;
    min-width: 260px;
    background: #1e293b;
    border-right: 1px solid rgba(148, 163, 184, 0.2);
    display: flex;
    flex-direction: column;
    transition: margin-left 0.2s ease, min-width 0.2s ease;
}

.rusty-chat-sidebar.collapsed {
    margin-left: -260px;
    min-width: 0;
    width: 0;
    overflow: hidden;
}

.rusty-sidebar-section {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.rusty-sidebar-section:last-of-type {
    border-bottom: none;
}

.rusty-sidebar-heading {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 8px;
    padding: 0 4px;
}

.rusty-search-chats {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 8px;
}

.rusty-search-chats i {
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
}

.rusty-search-input {
    flex: 1;
    background: none;
    border: none;
    color: white;
    font-size: 0.9rem;
    outline: none;
}

.rusty-search-input::placeholder {
    color: rgba(255,255,255,0.35);
}

.rusty-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: none;
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 8px;
    text-decoration: none;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
}

.rusty-sidebar-item:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

.rusty-sidebar-item i {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
}

.rusty-sidebar-item-active {
    background: rgba(59, 130, 246, 0.12);
    color: white;
}

.rusty-sidebar-item-active i {
    color: #3b82f6;
}

.rusty-capabilities .rusty-sidebar-item {
    padding: 8px 12px;
}

.rusty-project-folder {
    margin-bottom: 2px;
}

.rusty-project-item .rusty-project-chevron {
    width: 14px;
    margin-right: 4px;
    opacity: 0.7;
    font-size: 0.7rem;
}

.rusty-project-chats-dropdown {
    padding-left: 24px;
    margin-top: 2px;
    margin-bottom: 4px;
}

.rusty-project-chat-item {
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
}

.rusty-project-chat-item .title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rusty-project-chat-item .delete-chat {
    opacity: 0;
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.rusty-project-chat-item:hover .delete-chat {
    opacity: 1;
}

.rusty-project-chat-item .delete-chat:hover {
    color: #3b82f6;
}

.rusty-project-chat-item.active {
    background: rgba(59, 130, 246, 0.2);
}

.rusty-sidebar-chats {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.rusty-chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0 0;
}

.rusty-chat-history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    margin-bottom: 2px;
    transition: background 0.15s ease;
}

.rusty-chat-history-item:hover {
    background: rgba(255,255,255,0.08);
}

.rusty-chat-history-item.active {
    background: rgba(59, 130, 246, 0.2);
}

.rusty-chat-history-item i.fa-comment {
    color: #94a3b8;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.rusty-chat-history-item .title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rusty-chat-history-item .delete-chat {
    opacity: 0;
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.rusty-chat-history-item:hover .delete-chat {
    opacity: 1;
}

.rusty-chat-history-item .delete-chat:hover {
    color: #3b82f6;
}

.rusty-chat-history-empty {
    padding: 24px;
    color: rgba(255,255,255,0.4);
    font-size: 0.9rem;
    text-align: center;
}

.rusty-chat-main-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rusty-chat-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    gap: 12px;
    position: relative;
}

.rusty-chat-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.rusty-chat-logo i {
    color: #3b82f6;
}

.rusty-chat-new {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.9);
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-align: left;
}

.rusty-chat-new:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.3);
}

.rusty-chat-new i {
    color: rgba(255,255,255,0.6);
}

.rusty-chat-close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.rusty-chat-close:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.rusty-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rusty-chat-main-wrap.view-images .rusty-chat-main,
.rusty-chat-main-wrap.view-apps .rusty-chat-main,
.rusty-chat-main-wrap.view-deep-research .rusty-chat-main,
.rusty-chat-main-wrap.view-project .rusty-chat-main {
    display: none;
}

.rusty-chat-main-wrap.view-project .rusty-images-view,
.rusty-chat-main-wrap.view-project .rusty-apps-view,
.rusty-chat-main-wrap.view-project .rusty-deep-research-view {
    display: none;
}

.rusty-project-view {
    flex: 1;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.rusty-chat-main-wrap.view-project .rusty-project-view {
    display: flex;
}

.rusty-project-view-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 40px;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}

.rusty-project-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.rusty-project-header i {
    color: #3b82f6;
    font-size: 1.5rem;
}

.rusty-project-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.rusty-project-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    padding: 12px 16px;
    margin-bottom: 20px;
    transition: border-color 0.2s ease;
}

.rusty-project-input-wrap:focus-within {
    border-color: rgba(59, 130, 246, 0.5);
}

.rusty-project-input {
    flex: 1;
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    outline: none;
}

.rusty-project-input::placeholder {
    color: rgba(255,255,255,0.4);
}

.rusty-project-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
}

.rusty-project-tab {
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rusty-project-tab:hover {
    color: white;
    background: rgba(255,255,255,0.06);
}

.rusty-project-tab.active {
    background: rgba(255,255,255,0.12);
    color: white;
}

.rusty-project-empty {
    font-size: 1rem;
    color: rgba(255,255,255,0.5);
    margin: 0 0 8px;
}

.rusty-project-hint {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.6);
    margin: 0;
}

.rusty-project-chats-inner {
    max-height: 400px;
    overflow-y: auto;
}

.rusty-project-chats-inner .rusty-chat-msg {
    padding: 16px 0;
}

.rusty-images-view {
    flex: 1;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.rusty-chat-main-wrap.view-images .rusty-images-view {
    display: flex;
}

.rusty-apps-view {
    flex: 1;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.rusty-chat-main-wrap.view-apps .rusty-apps-view {
    display: flex;
}

.rusty-deep-research-view {
    flex: 1;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.rusty-chat-main-wrap.view-deep-research .rusty-deep-research-view {
    display: flex;
}

.rusty-deep-research-content {
    flex: 1;
    overflow-y: auto;
    padding: 48px 32px 40px;
    width: 60vw;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rusty-deep-research-icon {
    font-size: 2.5rem;
    color: rgba(59, 130, 246, 0.8);
    margin-bottom: 20px;
}

.rusty-deep-research-title {
    font-size: 2rem;
    font-weight: 600;
    color: white;
    margin: 0 0 8px;
    text-align: center;
}

.rusty-deep-research-subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,0.6);
    margin: 0 0 32px;
    text-align: center;
}

.rusty-deep-research-input-wrap {
    width: 100%;
    max-width: 640px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 32px;
}

.rusty-deep-research-input {
    width: 100%;
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    padding: 16px 20px;
    outline: none;
}

.rusty-deep-research-input::placeholder {
    color: rgba(255,255,255,0.4);
}

.rusty-deep-research-options {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-wrap: wrap;
}

.rusty-deep-research-mode {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.rusty-deep-research-mode:hover {
    color: white;
    background: rgba(255,255,255,0.08);
}

.rusty-deep-research-mode.active {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
}

.rusty-deep-research-mode i:first-child {
    font-size: 0.85rem;
}

.rusty-deep-research-suggestions {
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rusty-deep-research-suggestion {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 16px 18px;
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.rusty-deep-research-suggestion:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.rusty-deep-research-suggestion > i {
    color: rgba(255,255,255,0.4);
    font-size: 0.9rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.rusty-deep-research-suggestion .suggestion-text {
    font-size: 0.95rem;
    line-height: 1.5;
}

.rusty-deep-research-suggestion .suggestion-text strong {
    color: white;
}

.rusty-deep-research-sources-section {
    width: 100%;
    max-width: 640px;
    margin-bottom: 28px;
}

.rusty-deep-research-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rusty-deep-research-section-title i {
    color: #3b82f6;
}

.rusty-deep-research-section-hint {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin: 0 0 16px;
}

.rusty-deep-research-add-files {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px dashed rgba(59, 130, 246, 0.5);
    border-radius: 10px;
    color: #3b82f6;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.rusty-deep-research-add-files:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.7);
}

.rusty-deep-research-sources-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.rusty-deep-research-source-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 16px;
}

.rusty-deep-research-source-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.rusty-deep-research-source-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
}

.rusty-deep-research-source-name {
    flex: 1;
    font-weight: 600;
    color: white;
    font-size: 0.95rem;
}

.rusty-deep-research-source-remove {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.rusty-deep-research-source-remove:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.rusty-deep-research-source-desc {
    margin-bottom: 12px;
}

.rusty-deep-research-source-desc label,
.rusty-deep-research-ref-fields label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rusty-deep-research-source-desc textarea {
    width: 100%;
    min-height: 60px;
    padding: 10px 12px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    resize: vertical;
    outline: none;
}

.rusty-deep-research-source-desc textarea::placeholder {
    color: rgba(255,255,255,0.3);
}

.rusty-deep-research-refs {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.rusty-deep-research-refs-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin-bottom: 10px;
}

.rusty-deep-research-ref-row {
    display: grid;
    grid-template-columns: 80px 80px 90px 90px 1fr auto;
    gap: 8px;
    align-items: end;
    margin-bottom: 8px;
}

.rusty-deep-research-ref-row input {
    padding: 8px 10px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: white;
    font-size: 0.85rem;
    outline: none;
}

.rusty-deep-research-ref-row input::placeholder {
    color: rgba(255,255,255,0.3);
}

.rusty-deep-research-ref-remove {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
}

.rusty-deep-research-ref-remove:hover {
    color: #ef4444;
}

.rusty-deep-research-add-ref {
    margin-top: 8px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rusty-deep-research-add-ref:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

@media (max-width: 640px) {
    .rusty-deep-research-ref-row {
        grid-template-columns: 1fr 1fr 1fr auto;
    }
    .rusty-deep-research-ref-row input:nth-child(5) { grid-column: 1 / -2; }
}

.rusty-apps-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px 40px;
    width: 60vw;
    max-width: 100%;
    margin: 0 auto;
}

.rusty-apps-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 28px;
}

.rusty-apps-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: white;
    margin: 0 0 6px;
}

.rusty-apps-beta {
    font-size: 0.65rem;
    font-weight: 600;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

.rusty-apps-subtitle {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.6);
    margin: 0;
}

.rusty-apps-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 10px 14px;
    min-width: 200px;
}

.rusty-apps-search i {
    color: rgba(255,255,255,0.4);
    font-size: 0.9rem;
}

.rusty-apps-search-input {
    flex: 1;
    background: none;
    border: none;
    color: white;
    font-size: 0.9rem;
    outline: none;
}

.rusty-apps-search-input::placeholder {
    color: rgba(255,255,255,0.35);
}

.rusty-apps-featured {
    margin-bottom: 28px;
}

.rusty-apps-featured-card {
    display: flex;
    gap: 32px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(251, 191, 36, 0.15) 100%);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 28px;
    min-height: 180px;
}

.rusty-apps-featured-left {
    flex-shrink: 0;
}

.rusty-apps-featured-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.rusty-apps-featured-left h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin: 0 0 6px;
}

.rusty-apps-featured-left p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    margin: 0 0 16px;
}

.rusty-apps-view-btn {
    background: rgba(255,255,255,0.9);
    color: #0f172a;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.rusty-apps-view-btn:hover {
    background: white;
}

.rusty-apps-featured-right {
    flex: 1;
    min-width: 0;
}

.rusty-apps-featured-preview {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 16px;
}

.rusty-apps-chat-bubble {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.rusty-apps-preview-images {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.rusty-apps-preview-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.4);
}

.rusty-apps-preview-caption {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    margin: 0;
}

.rusty-apps-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.rusty-apps-tab {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.rusty-apps-tab:hover {
    color: white;
    background: rgba(255,255,255,0.08);
}

.rusty-apps-tab.active {
    background: rgba(255,255,255,0.12);
    color: white;
}

.rusty-apps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.rusty-app-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 14px 18px;
    color: inherit;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.rusty-app-card:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.rusty-app-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    font-weight: 600;
}

.rusty-app-info {
    flex: 1;
    min-width: 0;
}

.rusty-app-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    margin: 0 0 2px;
}

.rusty-app-info p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin: 0;
}

.rusty-app-arrow {
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
}

.rusty-app-card:hover .rusty-app-arrow {
    color: #3b82f6;
}

.rusty-images-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px 40px;
    width: 60vw;
    max-width: 100%;
    margin: 0 auto;
}

.rusty-images-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: white;
    margin: 0 0 24px;
}

.rusty-images-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    padding: 14px 20px;
    margin-bottom: 32px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rusty-images-input-wrapper:focus-within {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

.rusty-images-input {
    flex: 1;
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    outline: none;
}

.rusty-images-input::placeholder {
    color: rgba(255,255,255,0.35);
}

.rusty-images-section {
    margin-bottom: 36px;
}

.rusty-images-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    margin: 0 0 16px;
}

.rusty-discover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.rusty-discover-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 12px;
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.rusty-discover-card:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.rusty-discover-thumb {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    font-size: 1rem;
}

.rusty-discover-card span {
    font-size: 0.9rem;
    flex: 1;
}

.rusty-my-images {
    margin-bottom: 0;
}

.rusty-my-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.rusty-my-images-grid:not(:empty) + .rusty-my-images-empty {
    display: none;
}

.rusty-my-images-empty {
    padding: 40px 20px;
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 0.95rem;
}

.rusty-my-image-card {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    position: relative;
}

.rusty-my-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rusty-my-image-card .prompt {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rusty-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rusty-chat-welcome {
    text-align: center;
    padding: 80px 24px;
    max-width: 640px;
}

.rusty-chat-welcome-title {
    font-size: 2.25rem;
    font-weight: 500;
    color: rgba(255,255,255,0.95);
    margin: 0;
    letter-spacing: -0.02em;
}

.rusty-chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.rusty-suggestion {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9);
    padding: 12px 20px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.rusty-suggestion:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(59, 130, 246, 0.5);
}

.rusty-chat-messages-inner {
    width: 100%;
    max-width: 768px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 24px;
}

.rusty-chat-messages-inner:not(:empty) {
    align-items: stretch;
}

.rusty-chat-typing {
    display: none;
    gap: 16px;
    padding: 20px 0;
    align-items: flex-start;
    animation: msg-emerge 0.3s ease;
}

.typing-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: sentient-pulse 2s ease-in-out infinite;
}

.typing-bubble {
    display: flex;
    gap: 6px;
    padding: 16px 20px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3b82f6;
    animation: typing-dot 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

.rusty-chat-msg {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    animation: msg-emerge 0.4s ease;
}

.rusty-chat-msg.user {
    flex-direction: row-reverse;
}

.rusty-chat-msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rusty-chat-msg.user .rusty-chat-msg-avatar {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.rusty-chat-msg.bot .rusty-chat-msg-avatar {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
    animation: sentient-pulse 4s ease-in-out infinite;
}

.rusty-chat-msg-content {
    flex: 1;
    padding-top: 4px;
}

.rusty-chat-msg.user .rusty-chat-msg-content {
    text-align: right;
}

.rusty-chat-msg.bot .rusty-chat-msg-content {
    padding: 14px 18px;
    background: rgba(59, 130, 246, 0.06);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    border-left: 2px solid rgba(59, 130, 246, 0.3);
}

.rusty-chat-msg-content p {
    color: rgba(255,255,255,0.95);
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
}

.rusty-chat-msg.user .rusty-chat-msg-content p {
    color: white;
}

.rusty-chat-input-area {
    padding: 20px 24px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rusty-chat-input-wrapper {
    width: 100%;
    max-width: 768px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    padding: 12px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rusty-chat-input-wrapper:focus-within {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 24px rgba(59, 130, 246, 0.15);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.rusty-chat-input-wrapper textarea {
    flex: 1;
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    resize: none;
    padding: 8px 0;
    min-height: 24px;
    max-height: 200px;
}

.rusty-chat-input-wrapper textarea::placeholder {
    color: rgba(255,255,255,0.4);
}

.rusty-chat-input-wrapper textarea:focus {
    outline: none;
}

.rusty-chat-icon-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s ease, background 0.2s ease;
}

.rusty-chat-icon-btn:hover {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.06);
}

.rusty-chat-send-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.rusty-chat-send-btn:hover {
    opacity: 0.95;
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .rusty-chat-sidebar {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 10;
        box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }
    .rusty-chat-sidebar.collapsed {
        margin-left: -260px;
    }
    .rusty-chat-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    .rusty-chat-welcome {
        padding: 40px 16px;
    }
    .rusty-chat-welcome h1 {
        font-size: 1.5rem;
    }
    .rusty-chat-suggestions {
        flex-direction: column;
    }
    .rusty-suggestion {
        width: 100%;
    }
}

/* Research Hero - DeepMind-style */
.research-hero {
    background: var(--quanta-primary);
    color: white;
    padding: 120px 0 100px;
    text-align: center;
}

.research-hero-title {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    font-weight: 500;
    line-height: 1.25;
    max-width: 900px;
    margin: 0 auto;
    letter-spacing: -0.02em;
}

/* Breakthroughs Section */
.breakthroughs-section {
    padding: 80px 0 100px;
    background: var(--quanta-primary);
}

.breakthroughs-section .container,
.latest-news-section .container,
.publications-section .container,
.from-the-lab-section .container {
    max-width: 1200px;
}

.breakthroughs-header {
    margin-bottom: 48px;
}

.breakthroughs-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--quanta-highlight);
    margin-bottom: 12px;
}

.breakthroughs-title {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--quanta-light);
    max-width: 600px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.btn-breakthroughs {
    display: inline-block;
    color: var(--quanta-highlight);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.btn-breakthroughs:hover {
    color: white;
}

.breakthroughs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.breakthrough-card {
    background: rgba(27, 38, 59, 0.6);
    border: 1px solid rgba(65, 90, 119, 0.3);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.breakthrough-card:hover {
    border-color: rgba(65, 90, 119, 0.6);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.breakthrough-card-featured {
    grid-column: span 1;
}

.breakthrough-media {
    aspect-ratio: 16/10;
    overflow: hidden;
    position: relative;
}

.breakthrough-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.breakthrough-content {
    padding: 24px;
}

.breakthrough-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
}

.breakthrough-content p {
    font-size: 0.95rem;
    color: rgba(224, 225, 221, 0.9);
    line-height: 1.5;
    margin-bottom: 16px;
}

.breakthrough-link {
    color: var(--quanta-highlight);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breakthrough-link:hover {
    color: white;
}

.breakthrough-card:not(.breakthrough-card-featured) .breakthrough-content {
    padding: 28px;
}

.breakthroughs-footer {
    margin-top: 48px;
    text-align: center;
}

/* Molecular Drug/Chemical Discovery Section */
.molecular-discovery-section {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--quanta-secondary) 0%, var(--quanta-primary) 100%);
    border-top: 1px solid rgba(65, 90, 119, 0.2);
}

.molecular-header {
    margin-bottom: 48px;
}

.molecular-title {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--quanta-light);
    max-width: 700px;
    margin-top: 12px;
    line-height: 1.6;
}

.molecular-video-card {
    height: 100%;
}

.molecular-content .lead {
    color: rgba(224, 225, 221, 0.95);
    font-size: 1.1rem;
    line-height: 1.7;
}

.molecular-pillar {
    background: rgba(27, 38, 59, 0.6);
    border: 1px solid rgba(65, 90, 119, 0.3);
    border-radius: 12px;
    padding: 24px;
    height: 100%;
    transition: all 0.3s ease;
}

.molecular-pillar:hover {
    border-color: rgba(65, 90, 119, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.molecular-pillar i {
    font-size: 1.5rem;
    color: var(--quanta-highlight);
    margin-bottom: 12px;
}

.molecular-pillar h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 10px;
}

.molecular-pillar p {
    color: rgba(224, 225, 221, 0.9);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.molecular-rusty-cta {
    margin-top: 48px;
    padding: 32px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 16px;
}

.molecular-rusty-cta p {
    color: var(--quanta-light);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.molecular-rusty-cta strong {
    color: white;
}

/* Latest News Section */
.latest-news-section {
    padding: 60px 0 80px;
    background: var(--quanta-secondary);
    border-top: 1px solid rgba(65, 90, 119, 0.2);
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--quanta-highlight);
    margin: 0;
}

.section-link {
    color: var(--quanta-highlight);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.section-link:hover {
    color: white;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.news-card {
    display: block;
    padding: 24px 0;
    border-bottom: 1px solid rgba(65, 90, 119, 0.3);
    text-decoration: none;
    transition: border-color 0.2s ease;
}

.news-card:hover {
    border-color: var(--quanta-highlight);
}

.news-card h4 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--quanta-light);
    margin: 0;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.news-card:hover h4 {
    color: white;
}

/* Publications Section */
.publications-section {
    padding: 60px 0 80px;
    background: var(--quanta-primary);
    border-top: 1px solid rgba(65, 90, 119, 0.2);
}

.publications-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.publication-card {
    display: block;
    padding: 24px 0;
    border-bottom: 1px solid rgba(65, 90, 119, 0.3);
    text-decoration: none;
    transition: border-color 0.2s ease;
}

.publication-card:hover {
    border-color: var(--quanta-highlight);
}

.publication-card h4 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--quanta-light);
    margin: 0;
    line-height: 1.5;
    transition: color 0.2s ease;
}

.publication-card:hover h4 {
    color: white;
}

/* From the Lab Section */
.from-the-lab-section {
    padding: 80px 0 100px;
    background: var(--quanta-secondary);
    border-top: 1px solid rgba(65, 90, 119, 0.2);
}

.lab-header {
    margin-bottom: 48px;
}

.lab-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--quanta-highlight);
    margin-bottom: 12px;
}

.lab-title {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--quanta-light);
    max-width: 600px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.btn-lab {
    display: inline-block;
    color: var(--quanta-highlight);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.btn-lab:hover {
    color: white;
}

.lab-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.lab-card {
    background: rgba(13, 27, 42, 0.5);
    border: 1px solid rgba(65, 90, 119, 0.3);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.lab-card:hover {
    border-color: rgba(65, 90, 119, 0.6);
}

.lab-card-featured {
    grid-column: span 2;
}

.lab-card-media {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.lab-card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lab-card-content {
    padding: 24px;
}

.lab-card-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.lab-card-content p {
    font-size: 0.9rem;
    color: rgba(224, 225, 221, 0.85);
    line-height: 1.5;
    margin: 0;
}

/* AGI Research Landing Section (legacy - kept for compatibility) */
.agi-hero {
    background: linear-gradient(135deg, var(--quanta-primary) 0%, #0a1628 50%, var(--quanta-secondary) 100%);
    color: white;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.agi-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 20% 50%, rgba(65, 90, 119, 0.2) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 50%, rgba(119, 141, 169, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.agi-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCIgdmlld0JveD0iMCAwIDYwIDYwIj48ZyBmaWxsPSJub25lIiBzdHJva2U9InJnYmEoMjU1LDI1NSwyNTUsMC4wMykiIHN0cm9rZS13aWR0aD0iMSI+PGNpcmNsZSBjeD0iMzAiIGN5PSIzMCIgcj0iMjUiLz48Y2lyY2xlIGN4PSIzMCIgY3k9IjMwIiByPSIxNSIvPjxjaXJjbGUgY3g9IjMwIiBjeT0iMzAiIHI9IjUiLz48L2c+PC9zdmc+');
    opacity: 0.6;
    pointer-events: none;
}

.agi-hero-content {
    position: relative;
    z-index: 2;
}

.agi-badge {
    display: inline-block;
    background: linear-gradient(90deg, var(--quanta-accent), var(--quanta-highlight));
    color: white;
    padding: 8px 24px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 24px;
}

.agi-hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.agi-hero-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    max-width: 720px;
    margin: 0 auto;
    opacity: 0.95;
    line-height: 1.7;
}

.agi-videos-section {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--quanta-secondary) 0%, var(--quanta-primary) 100%);
}

.agi-video-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(65, 90, 119, 0.3);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.agi-video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(65, 90, 119, 0.2);
}

.agi-video-wrapper {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.agi-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agi-video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(13, 27, 42, 0.7), transparent);
    pointer-events: none;
}

.agi-video-label {
    position: absolute;
    bottom: 20px;
    left: 24px;
    right: 24px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    z-index: 3;
}

.agi-research-cta .lead {
    color: var(--quanta-light);
    font-weight: 500;
    opacity: 0.95;
}

.btn-agi-primary {
    background: linear-gradient(135deg, var(--quanta-primary), var(--quanta-secondary));
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-agi-primary:hover {
    background: linear-gradient(135deg, var(--quanta-secondary), var(--quanta-accent));
    color: white;
    transform: translateY(-2px);
}

.hero-section {
    background: linear-gradient(135deg, var(--quanta-primary) 0%, var(--quanta-secondary) 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHBhdHRlcm5UcmFuc2Zvcm09InJvdGF0ZSg0NSkiPjxyZWN0IHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjAzKSIvPjwvcGF0dGVybj48L2RlZnM+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNwYXR0ZXJuKSIvPjwvc3ZnPg==');
    opacity: 0.3;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    position: relative;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 30px;
    max-width: 700px;
}

.section-title {
    font-weight: 700;
    color: white;
    margin-bottom: 40px;
    position: relative;
}

.section-title.text-dark {
    color: var(--quanta-primary);
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--quanta-accent), var(--quanta-highlight));
}

.section-title.text-dark::after {
    left: 0;
    transform: none;
}

.about-section, .research-section, .solutions-section, .devices-section, .saas-section, .location-section, .industries-section, .blog-section, .contact-section {
    padding: 80px 0;
}

.about-section {
    background: linear-gradient(180deg, var(--quanta-primary) 0%, var(--quanta-secondary) 100%);
    color: var(--quanta-light);
}

.about-section .lead,
.about-section p {
    color: rgba(224, 225, 221, 0.95);
}

.card {
    border: 1px solid rgba(65, 90, 119, 0.3);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 30px;
    height: 100%;
    background: rgba(27, 38, 59, 0.6);
    color: var(--quanta-light);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 30px rgba(65, 90, 119, 0.15);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--quanta-highlight);
    margin-bottom: 20px;
}

.card-title {
    font-weight: 700;
    color: white;
}

.card p {
    color: rgba(224, 225, 221, 0.9);
}

.blog-card .card-img-top {
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.blog-date {
    font-size: 0.9rem;
    color: var(--quanta-highlight);
}

.contact-section {
    background: linear-gradient(180deg, var(--quanta-secondary) 0%, var(--quanta-primary) 100%);
    color: white;
}

.contact-section .form-control {
    background: rgba(27, 38, 59, 0.8);
    border-color: rgba(65, 90, 119, 0.5);
    color: var(--quanta-light);
}

.contact-section .form-control::placeholder {
    color: rgba(224, 225, 221, 0.5);
}

.contact-section .form-control:focus {
    background: rgba(27, 38, 59, 0.9);
    border-color: var(--quanta-accent);
    color: var(--quanta-light);
}

.contact-section .btn-light {
    background: linear-gradient(135deg, var(--quanta-accent), var(--quanta-highlight));
    border: none;
    color: white;
}

.contact-section .btn-light:hover {
    background: linear-gradient(135deg, var(--quanta-highlight), var(--quanta-accent));
    color: white;
}

.contact-section .section-title {
    color: white;
}

.contact-section .section-title::after {
    background-color: var(--quanta-light);
}

.contact-info {
    margin-bottom: 30px;
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--quanta-light);
    margin-right: 15px;
}

/* Location Badge */
.location-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

/* Location Section */
.location-section {
    background: linear-gradient(180deg, var(--quanta-secondary) 0%, var(--quanta-primary) 100%);
    color: var(--quanta-light);
}

.location-content h3 {
    color: white;
    font-weight: 700;
    margin-bottom: 10px;
}

.location-content h4 {
    font-weight: 600;
    color: var(--quanta-highlight);
}

.location-content p,
.location-content .lead {
    color: rgba(224, 225, 221, 0.95);
}

.location-section .text-primary {
    color: var(--quanta-highlight) !important;
}

.location-image {
    height: 100%;
    min-height: 100%;
}

.location-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border: 1px solid rgba(65, 90, 119, 0.3);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-radius: 0.375rem;
}

.location-image img:hover {
    transform: scale(1.02);
}

.feature-item {
    font-weight: 500;
    color: var(--quanta-light);
}

/* SaaS Section Styles */
.saas-section {
    background: linear-gradient(180deg, var(--quanta-primary) 0%, var(--quanta-secondary) 100%);
}

.saas-section .lead {
    color: rgba(224, 225, 221, 0.95);
}

.saas-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.saas-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.saas-image {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.saas-image img {
    height: 120px;
    width: auto;
    object-fit: contain;
    max-width: 200px;
    min-height: 120px;
    max-height: 120px;
}

/* Ensure all SaaS logos are consistently sized */
.saas-card .saas-image img {
    height: 120px !important;
    max-height: 120px !important;
    min-height: 120px !important;
    width: auto;
    object-fit: contain;
    max-width: 200px;
}

.saas-content {
    padding: 30px;
}

.saas-content h3 {
    color: var(--quanta-primary);
    font-weight: 700;
    margin-bottom: 10px;
}

.saas-content h6 {
    font-weight: 600;
    margin-bottom: 15px;
    color: #6c757d;
}

.saas-content p {
    color: #333;
}

.saas-section .text-muted {
    color: #6c757d !important;
}

.saas-section .btn-outline-primary {
    border-color: var(--quanta-accent);
    color: var(--quanta-primary);
}

.saas-section .btn-outline-primary:hover {
    background: var(--quanta-primary);
    border-color: var(--quanta-primary);
    color: white;
}

.saas-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.saas-features li {
    padding: 8px 0;
    color: var(--quanta-primary);
    font-weight: 500;
}

.saas-features li i {
    color: var(--quanta-accent);
}

.devices-section .text-muted {
    color: var(--quanta-highlight) !important;
}

.tsmc-collaboration-highlight {
    background: linear-gradient(135deg, var(--quanta-primary) 0%, var(--quanta-secondary) 100%);
    color: white;
    padding: 40px;
    border-radius: 15px;
    margin-top: 30px;
}

.tsmc-collaboration-highlight h4 {
    color: white;
    font-weight: 700;
}

.tsmc-collaboration-highlight .lead {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

/* Devices Section Styles */
.devices-section {
    background: linear-gradient(180deg, var(--quanta-secondary) 0%, var(--quanta-primary) 100%);
}

.devices-section .lead {
    color: rgba(224, 225, 221, 0.95);
}

.device-card {
    background: rgba(27, 38, 59, 0.7);
    border: 1px solid rgba(65, 90, 119, 0.3);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 40px 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.device-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 40px rgba(65, 90, 119, 0.15);
}

.device-icon {
    color: var(--quanta-highlight);
    margin-bottom: 25px;
}

.device-content h3 {
    color: white;
    font-weight: 700;
    margin-bottom: 10px;
}

.device-content h6 {
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--quanta-highlight);
}

.device-content p {
    color: rgba(224, 225, 221, 0.9);
}

.device-features {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.device-features li {
    padding: 8px 0;
    color: rgba(224, 225, 221, 0.95);
    font-weight: 500;
}

.device-features li i {
    color: var(--quanta-highlight);
}

.tsmc-device-highlight {
    background: linear-gradient(135deg, var(--quanta-primary) 0%, var(--quanta-secondary) 100%);
    color: white;
    padding: 50px 40px;
    border-radius: 20px;
    margin-top: 40px;
}

.tsmc-device-highlight h4 {
    color: white;
    font-weight: 700;
}

.tsmc-device-highlight .lead {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.tech-feature {
    color: white;
    text-align: center;
    padding: 20px 10px;
}

.tech-feature i {
    color: var(--quanta-accent);
}

.tech-feature h6 {
    color: white;
    font-weight: 600;
    margin-bottom: 10px;
}

.tech-feature p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Chatbot styles */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.chatbot-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--quanta-accent);
    color: white;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.chatbot-btn:hover {
    background-color: var(--quanta-highlight);
    transform: scale(1.1);
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.chatbot-header {
    background-color: var(--quanta-primary);
    color: white;
    padding: 15px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.chatbot-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
}

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

.chatbot-input input {
    flex-grow: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    margin-right: 10px;
}

.chatbot-input button {
    background-color: var(--quanta-accent);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.message {
    margin-bottom: 15px;
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    line-height: 1.4;
}

.bot-message {
    background-color: #f0f0f0;
    border-bottom-left-radius: 5px;
    align-self: flex-start;
}

.user-message {
    background-color: var(--quanta-accent);
    color: white;
    border-bottom-right-radius: 5px;
    align-self: flex-end;
    margin-left: auto;
}

/* New Footer Styles */
.footer {
    background-color: var(--quanta-secondary);
    color: white;
    padding-top: 80px;
    padding-bottom: 40px;
}

.footer .text-muted {
    color: #e0e1dd !important; /* Use a light color for muted text in the footer */
}

.footer a.hover-white:hover {
    color: white !important;
    transition: all 0.3s ease;
}

.footer .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.footer .social-icons a:hover {
    background-color: var(--quanta-accent);
    transform: translateY(-3px);
}

.back-to-top {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.footer-divider {
    border-color: rgba(255,255,255,0.1);
}

.footer-links-title {
    color: white;
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.footer-links-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--quanta-accent);
}

.footer-contact-icon {
    color: var(--quanta-accent);
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

@media (max-width: 992px) {
    .breakthroughs-grid {
        grid-template-columns: 1fr;
    }
    
    .breakthrough-card-featured {
        grid-column: span 1;
    }
    
    .lab-grid {
        grid-template-columns: 1fr;
    }
    
    .lab-card-featured {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .research-hero {
        padding: 80px 0 60px;
    }
    
    .research-hero-title {
        font-size: 1.75rem;
    }
    
    .news-grid,
    .publications-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .agi-hero {
        padding: 60px 0 50px;
    }
    
    .agi-hero-title {
        font-size: 2.2rem;
    }
    
    .agi-hero-subtitle {
        font-size: 1rem;
    }
    
    .agi-videos-section {
        padding: 50px 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .chatbot-window {
        width: 300px;
        height: 400px;
    }
    
    .footer {
        padding-top: 60px;
        text-align: center;
    }
    
    .footer-links-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Index marketing landing: body.qc-adyen-landing colors/fonts come from landing-fintech.css (loaded after this file). */
body.qc-adyen-landing .rusty-chat-overlay,
body.qc-adyen-landing .rusty-create-project-modal {
    font-family: inherit;
}

/* Landing header: beat legacy .btn-nav-login / nav-link colors */
body.qc-adyen-landing .qc-ft-header .btn-nav-login {
    color: var(--qc-ft-ink, #0c111d) !important;
}

body.qc-adyen-landing .qc-ft-header #rustyChatToggle {
    color: #fff !important;
}
