:root {
    --bg-dark: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #10b981;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background animated mesh */
.background-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
    filter: blur(100px);
    animation: pulse 10s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.1); }
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.hidden {
    display: none !important;
}

/* Auth Overlay */
.auth-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.auth-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.auth-panel {
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-overlay.active .auth-panel {
    transform: translateY(0);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 2rem;
}

.logo-icon {
    font-size: 2rem;
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 1rem;
}

.auth-form.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

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

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--accent);
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.primary-btn {
    background: var(--accent);
    color: white;
}
.primary-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.secondary-btn {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid var(--glass-border);
}
.secondary-btn:hover {
    background: rgba(255,255,255,0.2);
}

.text-btn {
    background: transparent;
    color: var(--text-muted);
}
.text-btn:hover {
    color: var(--text-main);
}

.message {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--danger);
}
.message.success {
    color: var(--success);
}

/* Dashboard */
.dashboard {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.glass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
}
.search-bar input {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.25rem;
    width: 100%;
    outline: none;
}

.content-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: start;
}

.timeline-panel {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.timeline-list {
    list-style: none;
    margin-top: 1rem;
}

.timeline-item {
    padding: 1rem;
    border-left: 2px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: background 0.2s;
}

.timeline-item:hover, .timeline-item.active {
    background: rgba(255,255,255,0.05);
}
.timeline-item:hover::before, .timeline-item.active::before {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.results-panel {
    padding: 1.5rem;
    min-width: 0;
    overflow: hidden;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.badge {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 600;
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.data-table th {
    color: var(--text-muted);
    font-weight: 600;
}

.data-table tr:hover {
    background: rgba(255,255,255,0.03);
}

.btn-extract {
    padding: 6px 12px;
    font-size: 0.875rem;
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.5);
}
.btn-extract:hover {
    background: var(--success);
    color: white;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.modal-panel {
    padding: 2rem;
    text-align: center;
    max-width: 400px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* File Explorer Breadcrumbs */
.breadcrumb-nav {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 16px;
    border-radius: 8px;
}

.breadcrumb-item {
    background: transparent;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
}

.breadcrumb-item:hover {
    color: var(--text-main);
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* File/Folder Table Styles */
.file-row {
    cursor: default;
}
.folder-row {
    cursor: pointer;
}
.folder-row:hover td {
    color: var(--accent);
}

.icon-col {
    width: 40px;
    font-size: 1.2rem;
    text-align: center;
}
.file-name-col {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Time Warp Animation */
.time-warp {
    animation: warpEffect 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes warpEffect {
    0% {
        filter: blur(10px) brightness(1.5);
        transform: scale(0.95);
        opacity: 0.5;
    }
    100% {
        filter: blur(0) brightness(1);
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    .timeline-panel {
        max-height: 200px;
    }
}

/* V2 Columns Layout (Finder Style) */
.columns-container {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    height: 500px;
    gap: 0;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    scroll-behavior: smooth;
}

.finder-column {
    min-width: 250px;
    max-width: 250px;
    flex-shrink: 0;
    height: 100%;
    border-right: 1px solid var(--glass-border);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.02);
}
.finder-column:last-child {
    border-right: none;
}

.column-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.1s;
}

.column-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.column-item.active {
    background: var(--accent);
    color: white;
}

.column-item .item-name {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.column-item .item-arrow {
    color: var(--text-muted);
    font-size: 0.8rem;
}
.column-item.active .item-arrow {
    color: white;
}

.file-preview-column {
    min-width: 300px;
    flex-shrink: 0;
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.3);
}

.file-preview-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.file-preview-name {
    font-size: 1.2rem;
    font-weight: 600;
    word-break: break-all;
}

.file-preview-size {
    color: var(--text-muted);
}
