/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #000;
    --secondary-color: #333;
    --accent-color: #fff;
    --text-color: #fff;
    --border-color: #333;
    --hover-bg: #1a1a1a;
    --header-bg: #fff;
    --shadow: 0 2px 4px rgba(0,0,0,0.3);
    --grey-light: #666;
    --grey-dark: #1a1a1a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #000;
}

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

/* Header */
header {
    background: var(--header-bg);
    border-bottom: 2px solid var(--primary-color);
    padding: 2rem 0;
    box-shadow: var(--shadow);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.title-section h1 {
    font-size: 2rem;
    color: #000;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.subtitle {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

.tagline {
    font-size: 0.95rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Main Content */
main {
    padding: 2rem 0;
}

.stats-bar {
    background: var(--grey-dark);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

#filtered-count {
    color: var(--grey-light);
    font-weight: 500;
}

/* Table Container */
.table-container {
    background: #000;
    border-radius: 4px;
    box-shadow: var(--shadow);
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead {
    background: #000;
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid var(--border-color);
}

th {
    padding: 0;
    text-align: left;
    font-weight: 600;
    border-right: 1px solid rgba(255,255,255,0.1);
}

th:last-child {
    border-right: none;
}

.th-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.th-content:hover {
    background: rgba(255,255,255,0.1);
}

.th-label {
    font-weight: 600;
}

.sort-indicator {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.5;
}

.sort-indicator.active {
    opacity: 1;
}

.sort-indicator.asc::after {
    content: '↑';
}

.sort-indicator.desc::after {
    content: '↓';
}

/* Filter Selects */
.filter-select {
    width: 100%;
    padding: 0.4rem;
    margin-top: 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--grey-dark);
    color: var(--text-color);
    border-radius: 3px;
    font-size: 0.85rem;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--grey-light);
}

/* Table Body */
tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

tbody tr:hover {
    background-color: var(--hover-bg);
}

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

td {
    padding: 0.75rem;
    vertical-align: top;
}

td.loading {
    text-align: center;
    padding: 2rem;
    color: #999;
}

/* Column Specific Styles */
td:nth-child(1) { /* Creator */
    font-weight: 500;
    color: var(--text-color);
}

td:nth-child(2) { /* Category */
    max-width: 200px;
}

.tag {
    display: inline-block;
    background: var(--grey-light);
    color: #000;
    padding: 0.2rem 0.5rem;
    margin: 0.1rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
}

td:nth-child(3) { /* Summary */
    max-width: 400px;
    line-height: 1.5;
}

td:nth-child(4) { /* URL */
    max-width: 150px;
    word-break: break-all;
}

td:nth-child(4) a {
    color: var(--grey-light);
    text-decoration: none;
    font-size: 0.85rem;
}

td:nth-child(4) a:hover {
    text-decoration: underline;
    color: #fff;
}

td:nth-child(5) { /* License */
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--grey-light);
}

td:nth-child(6) { /* Trust */
    text-align: center;
    font-weight: 600;
    color: #fff;
}

.trust-stars::before {
    content: '⭐ ';
}

/* Footer */
footer {
    background: #000;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

footer p {
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    td:nth-child(3) { /* Summary */
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .logo {
        width: 60px;
        height: 60px;
    }
    
    .title-section h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .tagline {
        font-size: 0.85rem;
    }
    
    .table-container {
        overflow-x: scroll;
    }
    
    table {
        min-width: 900px;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--grey-light);
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
