/* Base */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.5;
  background: #fafafa;
  color: #111;
  padding-bottom: 140px; /* space for fixed footer */
}

/* ===== Flexbox layout helpers (optional) ===== */
.flex {
  display: flex;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-wrap {
  flex-wrap: wrap;
}

/* Page layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header__title {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-header h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.site-header__subtitle {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
}

.btn:hover {
  background: #f6f6f6;
}

/* Card */
.card {
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  padding: 16px;
  background: #fff;
}

/* Flexbox gallery */
.gallery {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
}

.thumb {
  flex: 1 1 180px;
  max-width: 240px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e1e1e1;
  background: #fff;
}

.thumb img {
  width: 100%;
  height: auto;
  display: block;
}

/* Footer upload bar */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: #fff;
  border-top: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 10px;
  transform: translateY(0);
  transition: transform 180ms ease;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.06);
}

.footer--hidden {
  transform: translateY(110%);
}

.upload-btn {
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: #111;
  color: #fff;
}

.upload-btn:hover {
  background: #333;
}

#msg {
  margin: 0;
  font-size: 13px;
  color: #444;
}

/* Mobile */
@media (max-width: 520px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .thumb {
    flex: 1 1 46%;
    max-width: none;
  }
}