@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
  font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  color: #102a43;
  background: #eef4ff;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #cbd5e1;
  --primary: #2563eb;
  --primary-soft: #dbeafe;
  --secondary: #334155;
  --text-muted: #64748b;
  --danger: #ef4444;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 24%),
              radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.12), transparent 30%),
              var(--surface-soft);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.narrow {
  width: min(720px, calc(100% - 32px));
}

h1 {
  margin: 0 0 0.4em;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.muted {
  color: var(--text-muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  margin: 22px 0;
  box-shadow: var(--shadow);
}

.stack {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 10px;
  font-weight: 600;
  color: #1e293b;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  font: inherit;
  color: #0f172a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border: none;
  border-radius: 16px;
  background: var(--primary);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  box-shadow: 0 16px 30px rgba(59, 130, 246, 0.15);
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

button.danger {
  background: var(--danger);
  box-shadow: 0 16px 30px rgba(239, 68, 68, 0.2);
}

.album-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid #e2e8f0;
}

.album-row:last-child {
  border-bottom: 0;
}

.album-header {
  text-align: center;
  margin: 48px 0 36px;
}

.album-header h1 {
  color: var(--primary);
}

.upload-card {
  text-align: center;
}

.add-button {
  width: 100%;
  max-width: 240px;
  min-height: 240px;
  background: rgba(59, 130, 246, 0.08);
  color: #1e293b;
  border: 1px dashed rgba(37, 99, 235, 0.45);
  border-radius: 24px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.plus {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
}

.upload-list {
  max-width: 720px;
  margin: 24px auto 0;
  text-align: left;
}

.upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 48px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
}

.upload-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.media-card {
  background: var(--surface-soft);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.media-card img,
.media-card video {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #0f172a;
}

.download-link {
  display: block;
  padding: 10px 14px;
  text-align: center;
  color: var(--primary);
}

.qr {
  width: min(280px, 100%);
  display: block;
  margin: 18px auto;
}

.check {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.check input {
  width: auto;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-form input {
  min-width: 0;
  flex: 1;
}

.error {
  color: var(--danger);
  font-weight: 700;
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, 1120px);
    padding-top: 22px;
  }

  .album-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .inline-form {
    width: 100%;
  }

  .upload-row {
    grid-template-columns: minmax(0, 1fr) 50px;
  }
}
