/* Pilot Fiber Mirror Theme */

@font-face {
  font-family: 'Maax';
  src: url('https://static.pilotfiber.com/fonts/Maax.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Maax';
  src: url('https://static.pilotfiber.com/fonts/Maax-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Regular Bold';
  src: url('https://static.pilotfiber.com/fonts/Regular-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Maax Mono';
  src: url('https://static.pilotfiber.com/fonts/MaaxMono.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --pilot-yellow: #FFE200;
  --pilot-navy: #18284F;
  --pilot-cyan: #6EDBE0;
  --pilot-red: #FC534E;
  --pilot-dark: #1F191A;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
}

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

body {
  font-family: 'Maax', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}

/* Header */
.header {
  background: var(--pilot-navy);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo svg {
  height: 28px;
  width: auto;
}

.logo svg path,
.logo svg polygon {
  fill: white;
}

.header-title {
  font-family: 'Regular Bold', 'Maax', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.01em;
}

.header-badge {
  background: var(--pilot-yellow);
  color: var(--pilot-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Main Content */
.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.breadcrumb {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 1.5rem;
  font-family: 'Maax Mono', monospace;
}

.breadcrumb a {
  color: var(--pilot-navy);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* File Listing */
#list {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* Table styles for fancyindex */
table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
}

thead th {
  padding: 0.875rem 1.25rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

thead th a {
  color: var(--gray-500);
  text-decoration: none;
}

thead th a:hover {
  color: var(--pilot-navy);
}

tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background-color 0.15s ease;
}

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

tbody tr:hover {
  background: var(--gray-50);
}

tbody td {
  padding: 1rem 1.25rem;
}

/* File/folder links */
tbody td a {
  color: var(--pilot-navy);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

tbody td a:hover {
  color: var(--pilot-dark);
  text-decoration: underline;
}

/* Directory icon */
tbody td a[href$="/"]::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFE200' stroke='%2318284F' stroke-width='1.5'%3E%3Cpath d='M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

/* File icon */
tbody td a:not([href$="/"])::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='1.5'%3E%3Cpath d='M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

/* Parent directory */
tbody td a[href="../"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E");
}

/* Size and date columns */
tbody td:nth-child(2),
tbody td:nth-child(3) {
  font-family: 'Maax Mono', monospace;
  font-size: 0.875rem;
  color: var(--gray-500);
  white-space: nowrap;
}

/* Footer */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 2rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo svg {
  height: 20px;
  width: auto;
}

.footer-logo svg path,
.footer-logo svg polygon {
  fill: var(--gray-400);
}

.footer-text {
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--gray-400);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--pilot-yellow);
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .header-left {
    flex-direction: column;
    gap: 0.75rem;
  }

  .content {
    padding: 1rem;
  }

  tbody td:nth-child(2),
  tbody td:nth-child(3) {
    font-size: 0.75rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}
