/* Kin Technology Public Assets Directory Styles */

:root {
  --background: #f8fafc;
  --foreground: #18181b;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --border: #e5e7eb;
  --card: #fff;
  --shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.04);
  --radius: 12px;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  max-width: 700px;
  margin: 0 auto;
  padding: 32px 16px 64px 16px;
}

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

.logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  background: var(--card);
  padding: 8px;
  object-fit: contain;
  aspect-ratio: 1 / 1;
  display: block;
}

.title {
  margin: 0;
  color: var(--foreground);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.01em;
}

.breadcrumb {
  color: var(--muted);
  margin-bottom: 28px;
  font-size: 0.98rem;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

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

.directory,
.file {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 12px 0;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  transition:
    box-shadow 0.2s,
    border 0.2s;
}
.directory:hover,
.file:hover {
  box-shadow: 0 4px 16px 0 rgba(37, 99, 235, 0.08);
  border-color: var(--primary);
}

.directory a,
.file a {
  color: var(--primary);
  font-weight: 500;
  font-size: 1.08rem;
  text-decoration: none;
  margin-right: 8px;
}
.directory a:hover,
.file a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.size {
  color: var(--muted);
  font-size: 0.93rem;
  margin-left: 6px;
}

.file-buttons {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

button {
  font-size: 0.97em;
  padding: 4px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.18s,
    color 0.18s,
    border 0.18s;
  outline: none;
}
button:hover:enabled {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  body {
    padding: 1.5rem;
    max-width: 100vw;
  }
  .header {
    gap: 8px;
    margin-bottom: 18px;
  }
  .logo {
    width: 36px;
    height: 36px;
    padding: 2px;
  }
  .title {
    font-size: 1rem;
    text-align: left;
    word-break: break-word;
  }
  .breadcrumb {
    font-size: 0.92rem;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 2px;
  }
  .back-link {
    margin-bottom: 8px;
  }
  .directory,
  .file {
    padding: 10px 10px;
    font-size: 0.93rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    word-break: break-word;
  }
  .file-buttons {
    gap: 8px;
    margin-left: 0;
    margin-top: 8px;
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  button {
    width: auto;
    min-width: 90px;
    margin-bottom: 4px;
    font-size: 1em;
    padding: 8px 0;
  }
}

/* For very small screens, stack buttons vertically */
@media (max-width: 400px) {
  .file-buttons {
    flex-direction: column;
    gap: 4px;
  }
  button {
    width: 100%;
    min-width: 0;
  }
}
