/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f5f5f5;
  --bg-card: #ffffff;
  --bg-header: #ffffffdd;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --accent: #2563eb;
  --radius: 12px;
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-header: #0f172add;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.4), 0 4px 6px rgba(0, 0, 0, 0.3);
  --accent: #60a5fa;
}

html {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background var(--transition), color var(--transition);
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

.header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header__title {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header__logo {
  height: 36px;
  width: auto;
}

.header__title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.theme-switch {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.theme-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-switch-pill {
  position: relative;
  display: flex;
  align-items: center;
  width: 56px;
  height: 28px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: background var(--transition), border-color var(--transition);
}

.theme-switch-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--text-muted);
  transition: color var(--transition);
}

.theme-switch-moon {
  flex: 0 0 auto;
}

.theme-switch-sun {
  flex: 0 0 auto;
}

.theme-switch-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background var(--transition);
  z-index: 0;
}

.theme-switch input:not(:checked) ~ .theme-switch-pill .theme-switch-moon {
  color: var(--accent);
}

.theme-switch input:checked ~ .theme-switch-pill .theme-switch-sun {
  color: #f59e0b;
}

.theme-switch input:checked ~ .theme-switch-pill .theme-switch-slider {
  transform: translateX(28px);
}

.theme-switch input:focus-visible ~ .theme-switch-pill {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[data-theme="dark"] .theme-switch-pill {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .theme-switch-slider {
  background: #0f172a;
}

[data-theme="light"] .theme-switch-pill {
  background: #f5f5f5;
  border-color: #e5e7eb;
}

[data-theme="light"] .theme-switch-slider {
  background: #ffffff;
}

/* ===== Main ===== */
.main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
  width: 100%;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

/* ===== Camera Card ===== */
.camera-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.camera-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--accent);
}

.camera-card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--border);
}

.camera-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.camera-card:hover .camera-card__image img {
  transform: scale(1.03);
}



/* ===== Footer ===== */
.footer {
  padding: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  transition: all var(--transition);
}



/* ===== Responsive ===== */
@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .header__title {
    font-size: 1.5rem;
  }

  .header__logo {
    height: 40px;
  }
}

@media (min-width: 1024px) {
  .main {
    padding: 2rem 1.5rem 3rem;
  }

  .grid {
    gap: 1.5rem;
  }
}
