:root {
    --bg-color: #0b0f19;
    --glass-bg: rgba(22, 27, 43, 0.7);
    --glass-bg-hover: rgba(32, 38, 59, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f4f8;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6;
    --accent-color-hover: #60a5fa;
    --accent-gradient: linear-gradient(135deg, #3b82f6, #ec4899);
    --price-color: #10b981;
    --border-radius: 16px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    /* Rich background */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.08), transparent 25%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Glassmorphism Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color); 
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2); 
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.4); 
}

/* Layout */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Topbar */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    margin: 16px 24px 0;
    border-radius: var(--border-radius);
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.25rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo ion-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
    -webkit-text-fill-color: initial;
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 30px;
    width: 400px;
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.search-bar ion-icon {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-right: 8px;
}

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

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    padding: 24px;
    gap: 24px;
}

/* Filters */
.filters-panel {
    width: 280px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.filters-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.clear-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.clear-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group select {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 12px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2394a3b8%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: 10px auto;
}

.filter-group select:focus, .filter-group select:hover {
    border-color: var(--accent-color);
    background-color: rgba(59, 130, 246, 0.05);
}

.filter-group select option {
    background: var(--bg-color);
    color: var(--text-primary);
}

/* Data Table Panel */
.data-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 16px;
}

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

.stats {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stats strong {
    color: var(--text-primary);
    font-weight: 600;
}

.table-container {
    flex: 1;
    overflow: auto;
    border-radius: var(--border-radius);
    padding: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}

th {
    position: sticky;
    top: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 16px;
    border-bottom: 1px solid var(--glass-border);
    z-index: 2;
}

td {
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.95rem;
    transition: var(--transition);
}

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

tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* Column specific styles */
.col-spec {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-right {
    text-align: right;
}

.price {
    font-weight: 700;
    color: var(--price-color);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.badge.brand {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.badge.class {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 8px 0;
}

.page-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.page-btn:hover:not(:disabled) {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

#pageInfo {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        padding: 16px;
    }
    .filters-panel {
        width: 100%;
        flex-direction: column;
        max-height: none;
        padding: 16px;
        overflow: visible;
    }
}

@media (max-width: 768px) {
    .topbar {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
        margin: 12px 12px 0;
    }
    .main-content {
        padding: 12px;
        gap: 16px;
    }
    .search-bar {
        width: 100%;
        max-width: none;
    }
    .logo {
        width: 100%;
        justify-content: center;
        font-size: 1.1rem;
        text-align: center;
    }
    .avatar {
        display: none; /* Hide profile icon on small screens for space */
    }
    .table-container {
        border-radius: 8px;
    }
    th, td {
        padding: 12px;
        font-size: 0.85rem;
    }
}
