body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #111;
  color: #f1f1f1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  user-select: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  flex: 1;
  box-sizing: border-box;
}

header.main-header {
  background: #1a1a1a;
  padding: 20px 0;
  border-bottom: 2px solid #444;
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo a {
  font-size: 26px;
  color: #00ff99;
  font-weight: bold;
  text-decoration: none;
  user-select: text;
}

nav.nav a {
  color: inherit;
  text-decoration: none;
  position: relative;
  user-select: none;
  cursor: pointer;
}

nav.nav a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: #00ff99;
  transition: 0.3s ease;
}

nav.nav a:hover::after {
  width: 0;
}

h1 {
  margin: 40px 0 20px;
  text-align: center;
  font-size: 1.5rem;
}

#search {
  margin-bottom: 20px;
  padding: 12px;
  font-size: 16px;
  border-radius: 5px;
  border: none;
  background: #1e1e1e;
  color: #fff;
  width: 100%;
  box-sizing: border-box;
  user-select: text;
}

ul#file-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

ul#file-list li {
  background: #1e1e1e;
  padding: 15px 20px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, background 0.3s;
  word-break: break-word;
  user-select: none;
}

ul#file-list li:hover {
  background: #2b2b2b;
  transform: translateY(-2px);
}

#file-list a {
  color: #00ff99 !important;
  text-decoration: none !important;
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 8px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
}

#file-list a:hover,
#file-list a:focus,
#file-list a:active {
  color: #f1f1f1 !important;
  text-decoration: none !important;
  outline: none;
}

.meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #aaa;
  user-select: none;
}

footer.main-footer {
  background: #1a1a1a;
  text-align: center;
  padding: 20px 0;
  border-top: 2px solid #444;
}

.main-footer p {
  margin: 5px 0;
  color: #777;
  user-select: none;
}

.main-footer a {
  color: inherit;
  text-decoration: none;
  user-select: none;
}

.main-footer a:hover {
  color: inherit;
}

/* Адаптив */
@media (max-width: 768px) {
  .header-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  ul#file-list {
    grid-template-columns: 1fr;
  }

  .meta {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 4px;
  }

  h1 {
    font-size: 1.3rem;
  }
}
