:root {
    --bg-dark: #0a0a1a;
    --card-bg: #12121f;
    --accent-purple: #6c5ce7;
    --accent-blue: #0984e3;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --border: #2a2a3a;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: var(--card-bg);
    border-bottom: 2px solid var(--accent-purple);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.8rem;
    color: var(--accent-purple);
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent-purple);
}

/* Landing View */
.landing-view {
    text-align: center;
    padding: 3rem 0;
}

.drop-zone {
    background: var(--card-bg);
    border: 3px dashed var(--border);
    border-radius: 12px;
    padding: 4rem 2rem;
    margin: 2rem auto;
    max-width: 600px;
    cursor: pointer;
    transition: all 0.3s;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent-purple);
    background: rgba(108, 92, 231, 0.1);
}

.drop-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.drop-zone h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.drop-zone p {
    color: var(--text-secondary);
}

.format-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.badge {
    background: var(--card-bg);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
}

.sample-btn {
    background: var(--accent-purple);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.sample-btn:hover {
    background: #5b4bc7;
}

/* Report View */
.report-view {
    animation: fadeIn 0.3s;
}

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

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

.report-header h2 {
    font-size: 1.5rem;
    color: var(--accent-blue);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: white;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.tab-btn {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent-purple);
    border-bottom-color: var(--accent-purple);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.card-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.card-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-blue);
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}

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

th {
    background: rgba(108, 92, 231, 0.2);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
}

td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border);
}

tr:hover {
    background: rgba(108, 92, 231, 0.05);
}

/* Preview Controls */
.preview-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

#search-input {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 1rem;
    flex: 1;
    max-width: 300px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#page-info {
    color: var(--text-secondary);
    min-width: 80px;
    text-align: center;
}

/* Statistics */
#stats-container {
    display: grid;
    gap: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.stat-card h4 {
    color: var(--accent-purple);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.stat-item-value {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 500;
}

.chart-container {
    height: 300px;
    margin-top: 1rem;
}

/* Structure */
#batches-info, #schema-metadata, #column-details {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

#batches-info pre, #schema-metadata pre, #column-details pre {
    background: var(--bg-dark);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-secondary);
}

footer a {
    color: var(--accent-purple);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }

    nav a {
        margin-left: 1rem;
    }

    .summary-cards {
        grid-template-columns: 1fr 1fr;
    }

    .preview-controls {
        flex-direction: column;
        align-items: stretch;
    }

    #search-input {
        max-width: 100%;
    }

    .tabs {
        overflow-x: auto;
    }

    .tab-btn {
        white-space: nowrap;
    }
}
