@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;600&family=Fraunces:opsz,wght@9..144,600&family=Space+Grotesk:wght@400;500;600&display=swap');

:root {
  --bg: #eef2f6;
  --bg-deep: #dfe8f2;
  --accent: #2a6df6;
  --accent-strong: #1f4fc6;
  --highlight: #33d6c2;
  --dark: #11131a;
  --muted: #5a6170;
  --card: #ffffff;
  --card-tint: rgba(255, 255, 255, 0.85);
  --shadow: 0 20px 50px rgba(12, 18, 30, 0.18);
  --shadow-soft: 0 10px 24px rgba(19, 29, 46, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Fira Sans', sans-serif;
  background: linear-gradient(140deg, var(--bg) 0%, #edf4ff 40%, var(--bg-deep) 100%);
  color: var(--dark);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(42, 109, 246, 0.18), transparent 45%),
    radial-gradient(circle at 82% 12%, rgba(51, 214, 194, 0.22), transparent 45%),
    radial-gradient(circle at 70% 80%, rgba(125, 160, 255, 0.22), transparent 55%);
  pointer-events: none;
  z-index: -1;
}

main {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: fade-up 0.6s ease both;
}

main.capture {
  padding: 12px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  gap: 12px;
  height: 100vh;
  height: 100dvh;
  min-height: auto;
  overflow: hidden;
}

.hero h1 {
  margin: 0 0 8px 0;
  font-family: 'Fraunces', serif;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.panel {
  background: var(--card-tint);
  padding: 18px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(8, 12, 10, 0.06);
  backdrop-filter: blur(8px);
  animation: fade-up 0.6s ease both;
}

.row {
  display: flex;
  gap: 12px;
}

.row input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(22, 26, 29, 0.14);
  font-size: 1rem;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(19, 111, 99, 0.16);
}

button {
  padding: 12px 20px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(11, 77, 68, 0.25);
  filter: saturate(1.1);
}

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

button:focus-visible, .cta:focus-visible, .google-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.heart-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.thumb {
  display: block;
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.thumb:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(20, 26, 30, 0.2);
}

.thumb img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.media-item {
  position: relative;
}

.media-item .thumb {
  margin: 0;
}

.delete-media-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 2;
  padding: 0;
  line-height: 1;
}

.media-item:hover .delete-media-btn {
  opacity: 1;
}

@media (hover: none) {
  .delete-media-btn, .hide-media-btn { opacity: 0.7; }
}

.delete-media-btn:hover {
  background: rgba(220, 38, 38, 0.9);
}

.hide-media-btn {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 2;
  padding: 0;
  line-height: 1;
}

.media-item:hover .hide-media-btn,
.hide-media-btn.active {
  opacity: 1;
}

.hide-media-btn:hover {
  background: rgba(245, 158, 11, 0.9);
}

.hide-media-btn.active {
  background: rgba(245, 158, 11, 0.85);
}

.media-item.hidden-from-tv {
  opacity: 0.4;
  filter: grayscale(0.5);
  transition: opacity 0.2s, filter 0.2s;
}

.media-item.hidden-from-tv:hover {
  opacity: 0.7;
}

.device-block-btn {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: rgba(0, 0, 0, 0.05);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: 8px;
  box-shadow: none;
  transition: background 0.2s, color 0.2s;
}

.device-block-btn:hover {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  transform: none;
  box-shadow: none;
}

.device-block-btn.active {
  background: rgba(220, 38, 38, 0.15);
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.3);
}

.device-blocked {
  text-decoration: line-through;
  opacity: 0.5;
}

.audio-item {
  position: relative;
}

.audio-item .delete-media-btn {
  top: 8px;
  right: 8px;
  opacity: 1;
}

.audio-item .hide-media-btn {
  top: 8px;
  left: 8px;
  opacity: 1;
}

.card {
  background: var(--card-tint);
  padding: 18px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(8, 12, 10, 0.06);
  animation: fade-up 0.6s ease both;
}

.card img {
  width: 100%;
  max-width: 220px;
  display: block;
  margin: 12px 0;
}

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

main.capture {
  align-items: center;
  text-align: center;
  justify-content: space-between;
}

.camera {
  width: min(90vw, 520px);
  max-height: 100%;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--card);
  border-radius: 24px;
  padding: 12px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(8, 12, 10, 0.06);
  animation: fade-up 0.6s ease both;
  position: relative;
  display: flex;
  flex-direction: column;
}

.camera video {
  flex: 1 1 auto;
  min-height: 0;
  object-fit: cover;
}

video {
  width: 100%;
  border-radius: 16px;
  background: #111;
}

.video-mirror {
  transform: scaleX(-1);
}

.flip-camera {
  position: absolute;
  bottom: 22px;
  right: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background 0.2s ease;
  z-index: 2;
}

.flip-camera:hover {
  background: rgba(0, 0, 0, 0.65);
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.mode-toggle {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  padding: 3px;
  gap: 2px;
}

.mode-option {
  padding: 6px 18px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.mode-option:hover {
  transform: none;
  box-shadow: none;
}

.mode-option.active {
  background: #fff;
  color: var(--dark);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.mode-option:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.controls .capture-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #e53935, #b71c1c);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 6px 24px rgba(229, 57, 53, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.capture-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 28px rgba(229, 57, 53, 0.55);
  filter: none;
}

.capture-btn:active {
  transform: scale(0.92);
  box-shadow: 0 4px 16px rgba(229, 57, 53, 0.4);
}

.capture-btn.recording {
  animation: pulse-ring 1.2s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.5), 0 6px 24px rgba(229, 57, 53, 0.45); }
  50% { box-shadow: 0 0 0 12px rgba(229, 57, 53, 0), 0 6px 24px rgba(229, 57, 53, 0.45); }
}

.status {
  font-weight: 600;
  color: var(--accent-strong);
  flex-shrink: 0;
}

.thumb video {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  border-radius: 0;
  background: #000;
}


.device-list {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(42, 109, 246, 0.08);
}

.device-list summary {
  cursor: pointer;
  font-weight: 600;
}

.device-list ul {
  margin: 10px 0 0 18px;
  padding: 0;
}

.device-list li {
  margin: 4px 0;
}

.voice-overlay {
  width: min(90vw, 520px);
  background: var(--card);
  border-radius: 24px;
  padding: 48px 12px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(8, 12, 10, 0.06);
  animation: fade-up 0.6s ease both;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}

.mic-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
}

.voice-overlay .mic-icon {
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

.voice-overlay.recording .mic-icon {
  display: none;
}

.voice-canvas {
  width: 100%;
  height: 100%;
  display: none;
}

.voice-overlay.recording .voice-canvas {
  display: block;
}

.voice-label {
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
}


.audio-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.audio-thumb {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.audio-thumb audio {
  width: 100%;
}

.audio-thumb p {
  margin: 0;
  font-size: 0.8rem;
  word-break: break-all;
}

@media (max-width: 640px) {
  main {
    padding: 20px;
  }

  .row {
    flex-direction: column;
  }
}

.landing-body {
  font-family: 'Space Grotesk', sans-serif;
  background: radial-gradient(circle at top, #e8f2ff 0%, #eef3fb 40%, #dde8f5 100%);
  color: #1b1b1b;
}

.landing-body main {
  min-height: 100vh;
  padding: 24px clamp(20px, 4vw, 64px) 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 80px 24px;
  min-height: 70vh;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(234, 244, 255, 0.7));
  box-shadow: 0 30px 80px rgba(20, 30, 48, 0.18);
}

.landing-orbs .orb {
  position: absolute;
  border-radius: 999px;
  opacity: 0.6;
  filter: blur(0.5px);
  animation: float 12s ease-in-out infinite;
}

.orb-one {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, #ff9f6e 0%, rgba(255, 159, 110, 0) 70%);
  top: -40px;
  left: -40px;
}

.orb-two {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, #6bd3c5 0%, rgba(107, 211, 197, 0) 70%);
  bottom: -40px;
  right: 40px;
  animation-delay: -3s;
}

.orb-three {
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, #b7b4ff 0%, rgba(183, 180, 255, 0) 70%);
  top: 40%;
  right: -20px;
  animation-delay: -6s;
}

.landing-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 1;
  animation: rise 0.8s ease-out both;
  text-align: center;
  align-items: center;
  max-width: 700px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  font-weight: 600;
  color: #2a6df6;
}

.landing-content h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.5rem, 3.6vw, 4rem);
  margin: 0;
}

.landing-content .lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: #3a4050;
  max-width: 600px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta.primary {
  background: linear-gradient(135deg, #2a6df6, #1f4fc6);
  color: #fff;
  box-shadow: 0 12px 22px rgba(31, 79, 198, 0.35);
}

.cta.ghost {
  border: 1px solid #2a6df6;
  color: #2a6df6;
}

.cta:hover {
  transform: translateY(-2px);
}




.step-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  padding: 22px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 16px 32px rgba(15, 21, 19, 0.12);
  animation: rise 0.8s ease-out both;
}

.step-card:nth-child(2) { animation-delay: 0.08s; }
.step-card:nth-child(3) { animation-delay: 0.16s; }

.step-card h3 {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
}

.step-card p {
  margin: 0;
  color: #4a4a4a;
}


.admin-link {
  margin-top: 18px;
  font-size: 0.85rem;
  opacity: 0.75;
}

.admin-link a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  padding-bottom: 2px;
  opacity: 0.85;
}

.admin-link a:hover {
  opacity: 1;
}

/* Landing page sections */
.landing-section {
  padding: 80px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.landing-section.dark {
  background: linear-gradient(135deg, #101827 0%, #1a2744 100%);
  border-radius: 32px;
  color: #e8edf5;
  margin: 40px auto;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #2a6df6;
  margin: 0 0 12px 0;
}

.landing-section.dark .section-eyebrow {
  color: #6b9fff;
}

.section-header h2 {
  font-size: 2rem;
  margin: 0 0 12px 0;
  color: #1a2233;
}

.landing-section.dark .section-header h2 {
  color: #fff;
}

.section-lead {
  font-size: 1.1rem;
  color: #5a6375;
  max-width: 600px;
  margin: 0 auto;
}

.landing-section.dark .section-lead {
  color: #a8b5cc;
}

/* Steps grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.steps-grid .step-card {
  text-align: center;
  padding: 32px 24px;
  position: relative;
}

.step-number {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #2a6df6, #1f4fc6);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon {
  width: 56px;
  height: 56px;
  margin: 12px auto 16px;
  background: rgba(42, 109, 246, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon svg {
  width: 28px;
  height: 28px;
  color: #2a6df6;
}

.steps-grid .step-card h3 {
  font-size: 1.1rem;
  margin: 0 0 8px 0;
}

.steps-grid .step-card p {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Modes grid */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.mode-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
}

.mode-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mode-icon svg {
  width: 32px;
  height: 32px;
}

.mode-icon.photo {
  background: linear-gradient(135deg, #2a6df6, #1f4fc6);
  color: #fff;
}

.mode-icon.video {
  background: linear-gradient(135deg, #e53935, #c62828);
  color: #fff;
}

.mode-icon.voice {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #fff;
}

.mode-card h3 {
  margin: 0 0 8px 0;
  font-size: 1.15rem;
  color: #fff;
}

.mode-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #a8b5cc;
  line-height: 1.5;
}

/* Use cases grid */
.usecases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.usecase-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(15, 21, 35, 0.08);
  animation: rise 0.8s ease-out both;
}

.usecase-card:nth-child(2) { animation-delay: 0.05s; }
.usecase-card:nth-child(3) { animation-delay: 0.1s; }
.usecase-card:nth-child(4) { animation-delay: 0.15s; }
.usecase-card:nth-child(5) { animation-delay: 0.2s; }
.usecase-card:nth-child(6) { animation-delay: 0.25s; }

.usecase-emoji {
  font-size: 2rem;
  margin-bottom: 12px;
}

.usecase-card h3 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  color: #1a2233;
}

.usecase-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #5a6375;
  line-height: 1.5;
}

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  color: #6b9fff;
}

.feature-item h4 {
  margin: 0 0 4px 0;
  font-size: 1rem;
  color: #fff;
}

.feature-item p {
  margin: 0;
  font-size: 0.9rem;
  color: #a8b5cc;
  line-height: 1.5;
}

/* CTA section */
.cta-section {
  text-align: center;
  padding: 60px 24px;
}

.cta-card {
  background: linear-gradient(135deg, #101827 0%, #1a2744 100%);
  border-radius: 28px;
  padding: 48px 32px;
  color: #fff;
}

.cta-card h2 {
  margin: 0 0 12px 0;
  font-size: 1.8rem;
}

.cta-card p {
  margin: 0 0 24px 0;
  color: #a8b5cc;
  font-size: 1.1rem;
}

.cta-section .cta-row {
  justify-content: center;
}

.cta-section .admin-link {
  margin-top: 24px;
}

/* Responsive for new sections */
@media (max-width: 900px) {
  .steps-grid,
  .modes-grid,
  .usecases-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 600px) {
  .landing-section {
    padding: 48px 20px;
  }

  .steps-grid,
  .modes-grid,
  .usecases-grid {
    grid-template-columns: 1fr;
  }

  .section-header h2 {
    font-size: 1.6rem;
  }

  .cta-card {
    padding: 32px 20px;
  }

  .cta-card h2 {
    font-size: 1.5rem;
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(16px); }
}

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

@keyframes scan {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 1; }
  50% { transform: translateY(84px); opacity: 1; }
  80% { opacity: 0; }
  100% { transform: translateY(110px); opacity: 0; }
}

@keyframes glow {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.8; }
}

@keyframes flash {
  0%, 60% { opacity: 0; }
  64% { opacity: 0.9; }
  70% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.5); opacity: 1; }
}

@keyframes grow {
  0%, 100% { transform: scaleY(0.8); }
  50% { transform: scaleY(1.2); }
}

@media (max-width: 720px) {
  .landing-hero {
    padding: 48px 20px;
    min-height: auto;
  }

  .landing-content h1 {
    font-size: 2rem;
  }

  .landing-content .lead {
    font-size: 1.1rem;
  }

}

/* Google Sign-in Button */
.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.google-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  background: #f8f9fa;
}

.google-btn .google-icon {
  flex-shrink: 0;
}


/* User Navigation */
.user-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 12px 0;
  margin-bottom: 8px;
}

.user-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  transition: background 0.2s ease;
}

.user-nav-link:hover {
  background: rgba(255, 255, 255, 1);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

.user-name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-nav-logout {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.user-nav-logout:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--dark);
}

/* Countdown styles */
.countdown {
  font-size: 0.85em;
  margin-top: 4px;
}

.countdown-normal {
  color: #666;
}

.countdown-warning {
  color: #f59e0b;
}

.countdown-urgent {
  color: #ef4444;
  font-weight: 600;
}

/* Camera filter styles */
.filter-toggle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 8px;
}

.filter-option {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #ffecd2, #fcb69f);
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.filter-option:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.filter-option.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.filter-option[data-filter="none"] {
  background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
}

.filter-option[data-filter="bw"] {
  background: linear-gradient(135deg, #333, #888);
}

.filter-option[data-filter="vintage"] {
  background: linear-gradient(135deg, #d4a574, #8b6914);
}

/* Mobile capture page optimizations */
@media (max-height: 700px) {
  main.capture {
    padding: 8px;
    gap: 8px;
  }

  .camera {
    border-radius: 16px;
    padding: 8px;
  }

  .controls .capture-btn {
    width: 64px;
    height: 64px;
  }

  .capture-btn svg {
    width: 24px;
    height: 24px;
  }

  .filter-option {
    width: 36px;
    height: 36px;
  }

  .filter-toggle {
    gap: 6px;
    margin-bottom: 4px;
  }

  .mode-option {
    padding: 5px 14px;
    font-size: 0.8rem;
  }

  .status {
    font-size: 0.85rem;
  }
}

@media (max-height: 600px) {
  main.capture {
    padding: 6px;
    gap: 6px;
  }

  .controls .capture-btn {
    width: 56px;
    height: 56px;
  }

  .filter-option {
    width: 32px;
    height: 32px;
  }

  .mode-option {
    padding: 4px 12px;
    font-size: 0.75rem;
  }
}

/* Gallery panel (capture page) */
.gallery-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: var(--bg-deep, #dfe8f2);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: max(120px, env(safe-area-inset-bottom));
}


.gallery-close-btn {
  position: fixed;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  padding: 12px 32px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--accent, #2a6df6), var(--accent-strong, #1f4fc6));
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.gallery-close-btn:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

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

@media (min-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
}

@media (min-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 399px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card, #fff);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.heart-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
}

.heart-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: transform 0.15s ease, color 0.15s ease;
}

.heart-btn:hover {
  transform: scale(1.15);
  box-shadow: none;
  filter: none;
}

.heart-btn:active {
  transform: scale(0.9);
}

.heart-btn.hearted {
  color: #ff4d6a;
  background: rgba(255, 77, 106, 0.2);
}

.heart-btn:disabled {
  opacity: 1;
}

.heart-btn.own-heart {
  color: rgba(255, 255, 255, 0.5);
  cursor: default;
  background: transparent;
  pointer-events: none;
}

.heart-count {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  min-width: 12px;
  text-align: center;
}

.gallery-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted, #5a6170);
  padding: 48px 12px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
