:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --card-bg: rgba(255, 255, 255, 0.8);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

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

body {
    background: var(--bg-gradient);
    min-height: 100vh;
    padding: 2rem;
    color: var(--text-main);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

header {
    margin-bottom: 2rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-muted);
}

.file-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.file-table th {
    text-align: left;
    padding: 1.25rem 1.5rem;
    background: rgba(241, 245, 249, 0.5);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.file-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

.file-table tr:hover td {
    background: rgba(248, 250, 252, 0.8);
}

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

.thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 0.75rem;
    object-fit: cover;
    background: #f1f5f9;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.file-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 0.75rem;
    color: var(--text-muted);
    font-weight: bold;
    font-size: 1.5rem; /* Increased for better emoji/icon visibility */
    text-transform: uppercase;
    flex-shrink: 0;
}

.file-icon span {
    font-size: 0.75rem; /* Smaller for text-based icons */
}

.file-name {
    font-weight: 600;
    color: var(--text-main);
    display: block;
    margin-bottom: 0.25rem;
}

.file-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.action-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: #f1f5f9;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
    cursor: pointer;
}

.btn-preview:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-download:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.empty-state {
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-image { background: #dcfce7; color: #16a34a; }
.badge-doc { background: #dbeafe; color: #2563eb; }
.badge-archive { background: #fef3c7; color: #d97706; }
.badge-default { background: #f1f5f9; color: #64748b; }

@media (max-width: 768px) {
    .file-table th:nth-child(2),
    .file-table td:nth-child(2),
    .file-table th:nth-child(3),
    .file-table td:nth-child(3),
    .file-table th:nth-child(4),
    .file-table td:nth-child(4) {
        display: none;
    }
}
