:root {
    --primary: #6C5CE7;
    --primary-hover: #5A4BDE;
    --secondary: #A29BFE;
    --secondary-hover: #8F86FA;
    --accent: #81ECEC;
    --bg-dark: #0F0A1A;
    --bg-surface: #1B152B;
    --bg-surface-hover: #231C35;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --border: #2D2342;
    --radius: 12px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    margin-bottom: 32px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff;
}

.logo h2 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
}

.nav-item.active {
    background-color: rgba(108, 92, 231, 0.15);
    color: var(--secondary);
}

.upload-zone {
    margin: 24px;
    padding: 24px 16px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    transition: var(--transition);
    background: rgba(0, 0, 0, 0.2);
}

.upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.1);
}

.upload-zone p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.upload-zone p span {
    color: var(--secondary);
    font-weight: 500;
}

/* Buttons */
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    width: 100%;
}

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

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
}

/* Main Content */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background: radial-gradient(circle at top right, rgba(108, 92, 231, 0.05), transparent 50%);
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    border-bottom: 1px solid var(--border);
    background: rgba(15, 10, 26, 0.8);
    backdrop-filter: blur(12px);
    z-index: 5;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 20px;
    width: 300px;
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.2);
}

.search-bar svg {
    color: var(--text-muted);
}

.search-bar input {
    background: none;
    border: none;
    color: var(--text-main);
    outline: none;
    width: 100%;
    font-family: inherit;
}

/* Tabs */
.tab-content {
    display: none;
    padding: 32px;
    flex: 1;
    overflow-y: auto;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

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

.welcome-state {
    text-align: center;
    margin-top: 100px;
}

.welcome-state h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.welcome-state p {
    color: var(--text-muted);
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0.5;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

/* Catalog Grid */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.catalog-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.catalog-header h4 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.catalog-header h4::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent);
}

.package-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.package-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font-size: 0.9rem;
}

.package-name {
    font-weight: 500;
    color: var(--secondary);
}

.package-version {
    color: var(--text-muted);
    font-family: monospace;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Table */
.table-container {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

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

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

.data-table th {
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tr:last-child td {
    border-bottom: none;
}

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

.status-ok {
    color: var(--accent);
    background: rgba(129, 236, 236, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Analysis */
.mt-20 {
    margin-top: 20px;
}

.analysis-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.analysis-card h4 {
    margin-bottom: 16px;
    color: var(--secondary);
}

.suggestion-list {
    list-style: none;
}

.suggestion-list li {
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid var(--primary);
    margin-bottom: 8px;
    border-radius: 0 4px 4px 0;
    font-size: 0.95rem;
}

.suggestion-list li code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
    color: var(--accent);
}

.mock-graph {
    height: 150px;
    position: relative;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    border: 1px dashed var(--border);
}

.node {
    position: absolute;
    background: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.node.central {
    top: 20%;
    left: 50%;
}

.edges {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}