:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f4f7fb;
  color: #1b1f2a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  line-height: 1.5;
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 32px;
  background: linear-gradient(135deg, #4f5dca 0%, #1da1f2 100%);
  color: white;
  border-radius: 24px;
  margin-bottom: 24px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3vw, 3.2rem);
}

.hero p {
  margin: 0;
  max-width: 720px;
  opacity: 0.92;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.upload-card,
.gallery-card {
  background: white;
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(20, 30, 70, 0.08);
}

.upload-card h2,
.gallery-card h2 {
  margin-top: 0;
}

.upload-card form {
  display: grid;
  gap: 16px;
}

.upload-card input[type="file"] {
  padding: 12px 14px;
  border: 1px solid #d8e0ef;
  border-radius: 14px;
  background: #f8faff;
}

.upload-card button {
  width: fit-content;
  padding: 12px 24px;
  border: none;
  border-radius: 14px;
  background: #1da1f2;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.upload-card button:hover {
  background: #0f97d6;
  transform: translateY(-1px);
}

.gallery-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  overflow: hidden;
  border-radius: 18px;
  background: #f7f9ff;
  border: 1px solid #e9edf7;
  display: grid;
  grid-template-rows: auto auto;
}

.card-content {
  width: 100%;
  display: grid;
  place-items: center;
}

.card img,
.card video {
  width: 100%;
  display: block;
  object-fit: cover;
}

.card video {
  max-height: 360px;
}

.card-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  background: #ffffff;
  border-top: 1px solid #e9edf7;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  background: #1da1f2;
  color: white;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.download-button:hover {
  background: #0f97d6;
  transform: translateY(-1px);
}

.full-width {
  grid-column: span 2;
}

@media (max-width: 960px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .full-width {
    grid-column: span 1;
  }
}

@media (max-width: 680px) {
  .hero {
    padding: 24px;
    border-radius: 20px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .upload-card,
  .gallery-card {
    padding: 18px;
  }

  .upload-card button,
  .download-button {
    width: 100%;
  }
}
