*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f0f11;
  color: #f0f0f0;
  -webkit-tap-highlight-color: transparent;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  padding: 20px 16px 12px;
  text-align: center;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}

.version {
  font-size: 0.75rem;
  color: #636366;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 16px 24px;
}

.camera-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

#video {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  background: #1c1c1e;
  object-fit: cover;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.capture-btn {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, opacity 0.3s;
}

.capture-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.capture-btn:not(:disabled):active {
  transform: scale(0.92);
}

.capture-inner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ffffff;
  transition: background 0.2s;
}

.capture-btn:not(:disabled):hover .capture-inner {
  background: #e0e0e0;
}

.status-msg {
  font-size: 0.875rem;
  color: #8e8e93;
  text-align: center;
  min-height: 1.25em;
}

.gallery-section {
  margin-top: 32px;
}

.gallery-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #a0a0a5;
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-card {
  background: #1c1c1e;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease-out;
}

.gallery-card img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-card .timestamp {
  padding: 10px 14px;
  font-size: 0.8rem;
  color: #8e8e93;
  display: flex;
  align-items: center;
  gap: 6px;
}

.gallery-card .timestamp::before {
  content: "🕐";
  font-size: 0.85rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
