:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --primary: #2563eb;
    --border: #e2e8f0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 2rem 1rem;
}

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

header {
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-main);
}

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

/* Nginx FancyIndex Table Styling */
#list {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

th, td {
    padding: 1rem;
    text-align: left;
}

th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

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

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

a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
}

footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}
/* Custom File Icons td.indexcolname a */
#list tbody td.link a::before {
    content: "📄"; /* Default file icon */
    margin-right: 10px;
    display: inline-block;
    font-size: 1.1rem;
}

/* Parent Directory Link Icon */
#list tbody td.link a[href^="../"]::before {
    content: "📁";
}

/* Folder Icon */
#list tbody td.link a[href$="/"]::before {
    content: "📁";
}

/* Zip/Archive Files */
#list tbody td.link a[href$=".zip"]::before,
#list tbody td.link a[href$=".tar.gz"]::before,
#list tbody td.link a[href$=".rar"]::before,
#list tbody td.link a[href$=".7z"]::before {
    content: "📦";
}

/* PDF Files */
#list tbody td.link a[href$=".pdf"]::before {
    content: "📕";
}

/* Image Files */
#list tbody td.link a[href$=".jpg"]::before,
#list tbody td.link a[href$=".jpeg"]::before,
#list tbody td.link a[href$=".png"]::before,
#list tbody td.link a[href$=".gif"]::before {
    content: "🖼️";
}

/* Audio & Video Files */
#list tbody td.link a[href$=".mp4"]::before,
#list tbody td.link a[href$=".mkv"]::before,
#list tbody td.link a[href$=".mp3"]::before {
    content: "🎬";
}

/* Executable/Installer Files */
#list tbody td.link a[href$=".exe"]::before,
#list tbody td.link a[href$=".dmg"]::before {
    content: "⚙️";
}
/* Search Box Styling */
.search-container {
    margin-bottom: 1.5rem;
    width: 100%;
}

#fileSearch {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-sizing: border-box;
    outline: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: border-color 0.2s, box-shadow 0.2s;
}

#fileSearch:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
