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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  line-height: 1.5;
  min-height: 100vh;
}

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

header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
  padding: 28px 32px;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

header h1 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.btn-about {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.btn-about:hover {
  background: rgba(255, 255, 255, 0.25);
}

#table-wrapper {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow-x: auto;
}

#data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

#data-table thead th {
  background: #f8f9fa;
  color: #495057;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.8px;
  padding: 14px 16px;
  border-bottom: 2px solid #dee2e6;
  text-align: left;
  white-space: nowrap;
}

.col-num { width: 60px; }
.col-name { min-width: 400px; }
.col-doc { width: 200px; text-align: center; }

#data-table thead .col-doc {
  text-align: center;
}

#data-table tbody tr {
  transition: background 0.15s ease;
}

#data-table tbody tr:hover {
  background: #f1f3ff;
}

#data-table tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
}

/* Folder rows */
tr.folder-row td {
  background: #f8f9fa;
  font-weight: 600;
  color: #0f3460;
}

tr.folder-row:hover td {
  background: #edf2ff;
}

tr.folder-row .col-name {
  position: relative;
}

tr.folder-row .col-name::before {
  content: "\1F4C1";
  margin-right: 8px;
  font-size: 16px;
}

/* Subfolder rows */
tr.subfolder-row td {
  background: #fcfcfd;
  font-weight: 500;
  color: #2c3e50;
}

tr.subfolder-row:hover td {
  background: #f0f4ff;
}

tr.subfolder-row .col-name {
  position: relative;
}

tr.subfolder-row .col-name::before {
  content: "\1F4C2";
  margin-right: 8px;
  font-size: 14px;
}

/* File rows */
tr.file-row td {
  color: #333;
}

tr.file-row .col-name {
  position: relative;
}

tr.file-row .col-name::before {
  content: "\1F4C4";
  margin-right: 8px;
  font-size: 14px;
  opacity: 0.7;
}

/* Button */
.btn-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: #0f3460;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-open:hover {
  background: #1a4a7a;
  transform: translateY(-1px);
}

.btn-open:active {
  transform: translateY(0);
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 16px;
  padding: 40px 48px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #333;
}

.modal-logo {
  width: 128px;
  height: 128px;
  margin-bottom: 20px;
}

.modal-text {
  font-size: 18px;
  font-weight: 500;
  color: #1a1a2e;
}

@media (max-width: 768px) {
  .container {
    padding: 12px;
  }

  header {
    padding: 20px;
  }

  header h1 {
    font-size: 18px;
  }

  #data-table {
    font-size: 12px;
  }

  .col-name {
    min-width: 200px;
  }

  #data-table tbody td,
  #data-table thead th {
    padding: 8px 10px;
  }

  .btn-open {
    padding: 6px 12px;
    font-size: 11px;
  }
}
