/* Photo card app – blue & white only, no gradients */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --bg-blue: #e8f0fe;
  --text: #1a365d;
  --text-muted: #5a7a9e;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #dbeafe;
  --success: #1a365d;
  --error: #1a365d;
  --radius: 16px;
  --shadow: 0 2px 12px rgba(26, 54, 93, 0.08);
  --border: #c7d9f0;
}

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

body {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

::placeholder {
  font-family: inherit;
}

/* ----- Photo view page ----- */
.photo-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
}

.photo-view #card {
  max-width: 90vw;
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.photo-view #card[hidden] {
  display: none !important;
}

.photo-view .media {
  width: 100%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 120px;
}

.photo-view .media img {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  vertical-align: middle;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.photo-view .media.placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  min-height: 200px;
  background: var(--bg);
}

.photo-view .media.loading::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 40px;
  border: 3px solid var(--accent);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.photo-view .caption-box {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-top: 1rem;
  padding: 1.25rem 1.5rem;
}

.photo-view .caption {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-muted);
  text-align: center;
}

.photo-view .error-message {
  text-align: center;
  max-width: 90vw;
  width: 100%;
  max-width: 420px;
  padding: 2rem 0.5rem;
}

.photo-view .error-message #error-text {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
