body {
  margin: 0 auto;
  font-family: 'Roboto', sans-serif;
  background-color: #121212;
  color: #ffffff;
  display: flex;
  justify-content: center;
}

.container {
  width: 100%;
  /*
  max-width: 1200px;*/
  padding: 32px;
  transition: all 0.3s ease-in-out;
}

.top-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  /* чтобы на маленьких экранах не ломалось */
  margin-bottom: 24px;
  flex-direction: column;
}

.top-bar h1 {
  flex-shrink: 0;
  margin: 0;
  font-weight: 500;
  white-space: nowrap;
  /* не переносить заголовок */
}

.top-bar p {
  opacity: 0.8;
  margin: 0 auto;
  flex-grow: 1;
  text-align: center;
}

#auth {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

#upload-form {
  gap: 10px;
  align-items: center;
  margin: 0;
  flex-shrink: 0;
}

#status {

  font-size: 14px;
  color: #90caf9;
  height: 20px;
  align-self: center;
  flex-shrink: 0;
}

h1,
h2 {
  text-align: center;
  margin: 0 auto;
  color: #ffffff;
  font-weight: 500;
}

button {
  background-color: #3f51b5;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
  background-color: #303f9f;
  transform: translateY(-1px);
}

input[type="file"] {
  background-color: #2c2c2c;
  color: white;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #555;
  margin-right: 12px;
}

#uploads {
  display: flex;
  flex-wrap: wrap;
  margin: 0 auto;
  justify-content: center;
}

#uploads-wrapper,
#upload-section,
#public-uploads-wrapper {
  padding-bottom: 150px;
  flex-direction: column;
  align-items: center;
}

.grid-item {
  flex: 0 0 220px;
  max-width: 260px;
  margin: 7px;
  /* половина gutter'а */
  background-color: #2b2b2b;
  padding: 8px;
  border-radius: 10px;
  transition: transform 0.2s ease;
  text-align: center;
  word-break: break-word;
}

.grid-item {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.grid-item.loaded {
  visibility: visible;
  opacity: 1;
}

.loader {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: #555;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none;
}

.image-link.highlight {
  background-color: #3f51b5;
  transition: background-color 0.3s ease;
}



.grid-item:hover {
  transform: scale(1.03);
}

.grid-item img {
  width: 100%;
  border-radius: 6px;
  object-fit: cover;
  margin-bottom: 6px;
  cursor: pointer;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.highlighted {
  box-shadow: 0 0 10px 4px #ff0033;
  transition: box-shadow 0.3s ease;
}

.hidden {
  display: none !important;
}


#ad-section {
  margin-top: 40px;
  background: #2a2a2a;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
}

#ad-section p {
  margin: 0;
  color: #aaa;
}

footer {
  position: fixed;
  bottom: 0;
  z-index: 10;
  pointer-events: none;
  width: calc(100% - 60px);
  left: 0;
  background-color: #12121291;
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: #888;
  border-radius: 20px 20px 0 0;
  margin: 10px 10px 0px 10px;
  -webkit-backdrop-filter: blur(11px);
  backdrop-filter: blur(16px);
  outline: 1px solid rgba(255, 255, 255, 0.2);
}

footer a {
  color: #6aa3ff;
  text-decoration: underline;
}

footer p {
  margin: 0;
}

.footer-copy {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.6;
}