@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-deep: #020408;
    --glass-1: rgba(255, 255, 255, 0.03);
    --glass-2: rgba(255, 255, 255, 0.06);
    --glass-3: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-bright: rgba(255, 255, 255, 0.25);

    --q-cyan: #22d3ee;
    --q-blue: #3b82f6;
    --q-purple: #8b5cf6;
    --q-green: #4ade80;
    --q-yellow: #fbbf24;
    --q-red: #f87171;
    --q-orange: #fb923c;
    --q-white: #f8fafc;
    --q-dim: #64748b;

    --glow-cyan: rgba(34, 211, 238, 0.4);
    --glow-blue: rgba(59, 130, 246, 0.4);
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    font-family: var(--font-main);
    background: var(--bg-deep);
    color: var(--q-white);
    height: 100vh;
    overflow: hidden;
}

/* 🌌 Premium Glass Architecture */
.perpetual-container {
    display: flex;
    height: 100vh;
    background: radial-gradient(circle at top right, #0a1122 0%, #030712 100%);
}

.drive-sidebar {
    width: 280px;
    background: rgba(10, 15, 30, 0.6);
    backdrop-filter: blur(24px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 32px 20px;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
    padding-left: 12px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: var(--glass-2);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--q-cyan);
    font-size: 20px;
    filter: drop-shadow(0 0 8px var(--glow-cyan));
    animation: glow 3s infinite ease-in-out;
}

.brand-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #fff, var(--q-dim));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-group {
    margin-bottom: 40px;
}

.nav-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--q-dim);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    padding-left: 16px;
}

.nav-item {
    padding: 14px 18px;
    border-radius: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--q-dim);
    margin-bottom: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
    background: var(--glass-2);
    color: var(--q-white);
    transform: translateX(6px);
}

.nav-item.active {
    background: var(--glass-3);
    color: var(--q-cyan);
    border: 1px solid rgba(34, 211, 238, 0.15);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.06);
    position: relative;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--q-cyan);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 8px var(--glow-cyan);
}

.drive-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.drive-header {
    height: 80px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--glass-border);
    background: linear-gradient(to right, rgba(34, 211, 238, 0.05), transparent);
}

/* 🧊 Voxel Icon Expansion */
.voxel-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    image-rendering: pixelated;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5),
        -1px -1px 0px rgba(255, 255, 255, 0.1);
    filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 1));
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.voxel-icon:hover {
    transform: translate(-1px, -1px) scale(1.1);
    filter: drop-shadow(4px 4px 0px rgba(0, 0, 0, 0.8));
}

.brand-icon.voxel-icon {
    font-size: 24px;
    background: var(--glass-3);
    border: 2px solid var(--q-cyan);
    box-shadow: 4px 4px 0px var(--glow-cyan);
}

/* 🚀 Component Styles */
.glass {
    background: var(--glass-1);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass:hover {
    border-color: var(--glass-border-bright);
}

.view-container {
    flex: 1;
    overflow-y: auto;
    padding: 32px 40px;
}

.app-view {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.app-view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

/* 🧠 Infinity Inference & Chat */
.inference-container,
.chat-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.inference-log,
.chat-messages {
    height: 400px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 24px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 13px;
    border: 1px solid var(--glass-border);
}

.action-btn {
    background: var(--q-cyan);
    color: var(--bg-deep);
    border: none;
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
    box-shadow: 0 0 20px var(--glow-cyan);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ⛰️ Orb Management */
.orb-card {
    background: var(--glass-1);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.orb-card:hover {
    background: var(--glass-2);
    border-color: var(--q-cyan);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(34, 211, 238, 0.1);
}

.orb-card:active {
    transform: translateY(-2px) scale(0.98);
}

.orb-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: var(--glass-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--q-cyan);
}

.orb-info .name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.orb-info .meta {
    font-size: 11px;
    color: var(--q-dim);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 📊 HUD Components */
.hud-metric {
    position: relative;
    overflow: hidden;
}

.hud-metric::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: scan 3s infinite linear;
}

@keyframes scan {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========================================
   WORLD-CLASS ENHANCEMENTS
   ======================================== */

/* --- Animation Keyframes --- */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
    }

    50% {
        box-shadow: 0 0 0 5px rgba(34, 211, 238, 0.2);
    }
}

@keyframes popIn {
    from {
        transform: scale(0.92) translateY(10px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes rippleEffect {
    from {
        transform: scale(0);
        opacity: 0.5;
    }

    to {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes progressPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes slideInBottom {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --- Enhanced View Transitions --- */
.app-view {
    display: none;
}

.app-view.active {
    display: block;
    animation: viewEnter 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes viewEnter {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Input Focus States --- */
input:focus,
textarea:focus,
select:focus {
    border-color: var(--q-cyan) !important;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12), 0 0 20px rgba(34, 211, 238, 0.06);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.action-btn:focus-visible,
.nav-item:focus-visible {
    outline: 2px solid var(--q-cyan);
    outline-offset: 2px;
}

/* --- Enhanced Button States --- */
.action-btn {
    position: relative;
    overflow: hidden;
    font-family: var(--font-main);
}

.action-btn:active {
    transform: scale(0.97);
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
}

.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: rippleEffect 0.6s ease-out forwards;
    pointer-events: none;
}

/* --- Glass Card Enhancements --- */
.glass {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass:hover {
    border-color: var(--glass-border-bright);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* --- Skeleton Loaders --- */
.skeleton {
    background: linear-gradient(90deg, var(--glass-1) 25%, var(--glass-2) 50%, var(--glass-1) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.8s ease-in-out infinite;
    border-radius: 8px;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 10px;
    border-radius: 6px;
    width: 80%;
}

.skeleton-text:nth-child(2) {
    width: 60%;
}

.skeleton-text:nth-child(3) {
    width: 70%;
}

.skeleton-card {
    height: 120px;
    border-radius: 20px;
}

.skeleton-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

/* --- Drag & Drop Zones --- */
.drop-zone {
    border: 2px dashed var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.drop-zone:hover {
    border-color: rgba(34, 211, 238, 0.3);
    background: rgba(34, 211, 238, 0.02);
}

.drop-zone.drag-over {
    border-color: var(--q-cyan);
    background: rgba(34, 211, 238, 0.06);
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.1);
    transform: scale(1.01);
}

.drop-zone.drop-success {
    border-color: var(--q-green);
    background: rgba(74, 222, 128, 0.06);
}

.drop-zone-text {
    font-size: 13px;
    color: var(--q-dim);
    margin-top: 12px;
    font-weight: 600;
}

.drop-zone-icon {
    font-size: 48px;
    color: var(--q-dim);
    margin-bottom: 12px;
    transition: color 0.3s, transform 0.3s;
}

.drop-zone:hover .drop-zone-icon,
.drop-zone.drag-over .drop-zone-icon {
    color: var(--q-cyan);
    transform: scale(1.1);
}

/* --- Modal / Confirmation Dialog --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 5, 15, 0.8);
    backdrop-filter: blur(8px);
    z-index: 6000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.visible {
    display: flex;
}

.modal-content {
    background: rgba(15, 20, 40, 0.95);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 36px;
    max-width: 440px;
    width: 90%;
    animation: popIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 20px;
}

.modal-icon.danger {
    background: rgba(248, 113, 113, 0.15);
    color: var(--q-red);
}

.modal-icon.info {
    background: rgba(34, 211, 238, 0.15);
    color: var(--q-cyan);
}

.modal-icon.warning {
    background: rgba(251, 191, 36, 0.15);
    color: var(--q-yellow);
}

.modal-title {
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 12px;
}

.modal-message {
    font-size: 14px;
    color: var(--q-dim);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 28px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-actions .action-btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 14px;
}

.modal-actions .btn-cancel {
    background: var(--glass-2);
    color: var(--q-white);
    border: 1px solid var(--glass-border);
}

.modal-actions .btn-cancel:hover {
    background: var(--glass-3);
    box-shadow: none;
}

.modal-actions .btn-danger {
    background: var(--q-red);
}

/* --- Chat Typing Indicator --- */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 0;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--q-cyan);
    animation: typing 1.4s infinite ease-in-out;
}

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

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

/* --- Chat Message Enhancements --- */
.chat-message {
    padding: 14px 18px;
    margin-bottom: 12px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    animation: slideInBottom 0.3s ease-out;
    position: relative;
}

.chat-message.user {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.15);
}

.chat-message.assistant {
    background: var(--glass-1);
}

.chat-message .msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.chat-message .msg-sender {
    font-size: 11px;
    color: var(--q-dim);
    font-weight: 800;
}

.chat-message .msg-time {
    font-size: 10px;
    color: var(--q-dim);
    opacity: 0.6;
}

.chat-message .msg-body {
    font-size: 13.5px;
    line-height: 1.65;
}

.chat-message .msg-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    opacity: 0;
    transition: opacity 0.2s;
}

.chat-message:hover .msg-actions {
    opacity: 1;
}

.msg-action-btn {
    background: var(--glass-2);
    border: 1px solid var(--glass-border);
    color: var(--q-dim);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-main);
    display: flex;
    align-items: center;
    gap: 4px;
}

.msg-action-btn:hover {
    color: var(--q-cyan);
    border-color: rgba(34, 211, 238, 0.3);
    background: rgba(34, 211, 238, 0.08);
}

/* --- Tooltip System --- */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(15, 20, 40, 0.95);
    border: 1px solid var(--glass-border);
    color: var(--q-white);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 9999;
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- Global Search Bar --- */
.search-bar {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-bar input {
    width: 100%;
    background: var(--glass-1);
    border: 1px solid var(--glass-border);
    padding: 10px 16px 10px 40px;
    border-radius: 14px;
    color: var(--q-white);
    font-size: 13px;
    font-family: var(--font-main);
    font-weight: 500;
    transition: all 0.2s;
}

.search-bar input::placeholder {
    color: var(--q-dim);
    font-weight: 500;
}

.search-bar .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--q-dim);
    font-size: 13px;
    pointer-events: none;
}

.search-bar .search-hint {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--glass-2);
    border: 1px solid var(--glass-border);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    color: var(--q-dim);
    font-weight: 700;
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(15, 20, 40, 0.98);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    max-height: 360px;
    overflow-y: auto;
    z-index: 5000;
    display: none;
    animation: popIn 0.2s ease-out;
}

.search-results.visible {
    display: block;
}

.search-results-category {
    padding: 10px 16px 6px;
    font-size: 10px;
    font-weight: 800;
    color: var(--q-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.search-result-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.15s;
    font-size: 13px;
}

.search-result-item:hover {
    background: var(--glass-2);
}

.search-result-item i {
    color: var(--q-dim);
    width: 20px;
    text-align: center;
}

.search-result-item .result-text {
    flex: 1;
    font-weight: 600;
}

.search-result-item .result-meta {
    font-size: 11px;
    color: var(--q-dim);
}

.search-no-results {
    padding: 24px;
    text-align: center;
    color: var(--q-dim);
    font-size: 13px;
}

/* --- Toast / Notification Stack --- */
.toast-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast-item {
    padding: 14px 20px;
    border-radius: 14px;
    color: white;
    font-weight: 600;
    font-size: 13px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    font-family: var(--font-main);
}

.toast-item.success {
    background: rgba(74, 222, 128, 0.92);
}

.toast-item.error {
    background: rgba(248, 113, 113, 0.92);
}

.toast-item.info {
    background: rgba(59, 130, 246, 0.92);
}

.toast-item.warning {
    background: rgba(251, 191, 36, 0.92);
    color: #1a1a1a;
}

.toast-item .toast-close {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    margin-left: auto;
    font-size: 16px;
    background: none;
    border: none;
    color: inherit;
}

.toast-item .toast-close:hover {
    opacity: 1;
}

.toast-item .toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 0 0 14px 14px;
    animation: toastCountdown 3s linear forwards;
}

@keyframes toastCountdown {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

.toast-exit {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* --- Activity Feed --- */
.activity-feed {
    max-height: 280px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    animation: slideInBottom 0.3s ease-out;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--glass-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-text {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-time {
    font-size: 11px;
    color: var(--q-dim);
}

/* --- Badge Pulse --- */
.badge-pulse {
    animation: badgePulse 2s infinite ease-in-out;
}

/* --- Sidebar Overlay (Mobile) --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.visible {
    display: block;
    opacity: 1;
}

/* --- Mobile Toggle --- */
.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--glass-2);
    border: 1px solid var(--glass-border);
    color: var(--q-white);
    font-size: 18px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.mobile-toggle:hover {
    background: var(--glass-3);
}

/* --- Vault Search & Filter --- */
.vault-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.vault-controls input {
    flex: 1;
    background: var(--glass-1);
    border: 1px solid var(--glass-border);
    padding: 10px 16px;
    border-radius: 12px;
    color: #fff;
    font-family: var(--font-main);
    font-size: 13px;
}

.vault-controls select {
    background: var(--glass-1);
    border: 1px solid var(--glass-border);
    padding: 10px 16px;
    border-radius: 12px;
    color: #fff;
    font-family: var(--font-main);
    font-size: 13px;
    min-width: 140px;
}

.vault-result-count {
    font-size: 12px;
    color: var(--q-dim);
    margin-bottom: 12px;
    font-weight: 600;
}

/* --- Chat Textarea Auto-Grow --- */
.chat-input-auto {
    min-height: 50px;
    max-height: 150px;
    overflow-y: auto;
    resize: none;
    transition: height 0.15s ease;
}

/* --- Staggered Card Entrance --- */
.stagger-enter>*:nth-child(1) {
    animation-delay: 0s;
}

.stagger-enter>*:nth-child(2) {
    animation-delay: 0.06s;
}

.stagger-enter>*:nth-child(3) {
    animation-delay: 0.12s;
}

.stagger-enter>*:nth-child(4) {
    animation-delay: 0.18s;
}

.stagger-enter>*:nth-child(5) {
    animation-delay: 0.24s;
}

.stagger-enter>*:nth-child(6) {
    animation-delay: 0.30s;
}

.stagger-enter>* {
    animation: cardEntrance 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* --- Drop Zone Idle Pulse Hint --- */
.drop-zone .drop-zone-icon {
    animation: pulse 3s infinite ease-in-out;
}

.drop-zone:hover .drop-zone-icon {
    animation: none;
}

/* --- Scrollbar enhancement for dark theme --- */
::-webkit-scrollbar-track {
    background: transparent;
}

.view-container::-webkit-scrollbar-thumb {
    background: rgba(34, 211, 238, 0.15);
}

.view-container::-webkit-scrollbar-thumb:hover {
    background: rgba(34, 211, 238, 0.25);
}

/* --- Enhanced HUD shimmer --- */
.hud-container {
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.15), 0 0 120px rgba(59, 130, 246, 0.08);
}

/* --- Status LED pulse --- */
#inject-status-led {
    transition: all 0.3s ease;
}

/* --- NEW badge styling --- */
.nav-item div[style*="display: inline-block"] {
    animation: badgePulse 3s infinite ease-in-out;
    font-family: var(--font-mono);
}

/* --- Keyboard Shortcuts Dialog --- */
.shortcuts-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 5, 15, 0.8);
    backdrop-filter: blur(8px);
    z-index: 7000;
    align-items: center;
    justify-content: center;
}

.shortcuts-overlay.visible {
    display: flex;
}

.shortcuts-content {
    background: rgba(15, 20, 40, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 36px;
    max-width: 500px;
    width: 90%;
    animation: popIn 0.3s ease;
}

.shortcut-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.shortcut-row:last-child {
    border-bottom: none;
}

.shortcut-keys {
    display: flex;
    gap: 4px;
}

.shortcut-key {
    background: var(--glass-2);
    border: 1px solid var(--glass-border);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--q-cyan);
}

.shortcut-label {
    font-size: 13px;
    color: var(--q-dim);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .drive-sidebar {
        width: 220px;
        padding: 24px 14px;
    }

    .sidebar-brand {
        margin-bottom: 32px;
    }

    .nav-item {
        padding: 12px 14px;
        font-size: 13px;
        gap: 12px;
    }

    .drive-header {
        padding: 0 24px;
    }

    .view-container {
        padding: 24px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .drive-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        width: 280px;
        z-index: 2000;
        transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 24px 16px;
    }

    .drive-sidebar.open {
        left: 0;
    }

    .mobile-toggle {
        display: flex;
    }

    .drive-header {
        padding: 0 16px;
        height: 64px;
        gap: 12px;
    }

    .view-container {
        padding: 16px;
    }

    .nav-item {
        min-height: 48px;
        padding: 12px 16px;
    }

    .search-bar {
        max-width: none;
    }

    .search-bar .search-hint {
        display: none;
    }

    #mesh-id-display {
        display: none !important;
    }

    .chat-messages,
    .inference-log {
        height: 300px;
    }

    .modal-content {
        margin: 16px;
        max-width: none;
    }

    .toast-stack {
        left: 16px;
        right: 16px;
        max-width: none;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .view-container {
        padding: 12px;
    }

    .drive-header {
        padding: 0 12px;
        height: 56px;
    }

    .glass {
        border-radius: 18px;
    }
}

/* Large Desktop */
@media (min-width: 1441px) {
    .view-container {
        /* Removed max-width constraint for full-screen utilization */
        padding: 40px 48px;
    }
}

/* ========================================
   FINAL POLISH
   ======================================== */

/* --- Selection color --- */
::selection {
    background: rgba(34, 211, 238, 0.25);
    color: var(--q-white);
}

/* --- Smooth scroll --- */
html {
    scroll-behavior: smooth;
}

/* --- Focus ring for accessibility --- */
*:focus-visible {
    outline: 2px solid var(--q-cyan);
    outline-offset: 2px;
}

/* --- Reduced motion preference --- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- Neural Seed Model Studio --- */
.seed-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    max-height: 340px;
    overflow-y: auto;
    padding: 4px;
}

.seed-selector-grid::-webkit-scrollbar {
    width: 6px;
}

.seed-selector-grid::-webkit-scrollbar-track {
    background: transparent;
}

.seed-selector-grid::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 3px;
}

.seed-card-selectable {
    position: relative;
    padding: 14px;
    background: var(--glass-1);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.seed-card-selectable:hover {
    background: var(--glass-2);
    border-color: var(--q-purple);
    transform: translateY(-1px);
}

.seed-card-selectable.selected {
    border-color: var(--q-cyan);
    background: rgba(34, 211, 238, 0.08);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.15), inset 0 0 8px rgba(34, 211, 238, 0.05);
}

.seed-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #000;
    font-size: 10px;
}

.seed-card-selectable.selected .seed-check {
    border-color: var(--q-cyan);
    background: var(--q-cyan);
}

#generate-from-seeds:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

#generate-from-seeds:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* --- File Management Actions --- */
.action-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--glass-1);
    color: var(--q-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.action-icon-btn:hover {
    background: var(--glass-2);
    color: var(--q-cyan);
    border-color: var(--q-cyan);
}

.action-icon-btn.delete:hover {
    color: var(--q-red);
    border-color: var(--q-red);
    background: rgba(239, 68, 68, 0.1);
}

.orb-select-btn {
    width: 100%;
    border: 1px solid var(--glass-border);
    background: var(--glass-1);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.orb-select-btn:hover {
    background: var(--glass-2);
    border-color: var(--q-purple);
    transform: translateX(4px);
}