:root {
  --font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --bg: linear-gradient(180deg, #f8fbff 0%, #eef2ff 40%, #ffffff 100%);
  --surface: #ffffff;
  --text-color: #1f2937;
  --muted: #6b7280;
  --primary: #6754f8;
  --primary-dark: #4f3ed6;
  --accent: #f97316;
  --border: rgba(15, 23, 42, 0.08);
  --card-border: rgba(103, 84, 248, 0.25);
  --shadow-soft: 0 24px 42px -28px rgba(15, 23, 42, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  margin: 0;
  min-height: 100vh;
  padding: 40px 18px 24px;
  background: var(--bg);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  gap: 0;
}

body button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  padding: 12px 28px;
  margin: 0 auto;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body button:hover,
body button:focus-visible {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 26px 44px -30px rgba(79, 70, 229, 0.7);
}

body button:active {
  transform: translateY(0);
  box-shadow: 0 16px 28px -24px rgba(79, 70, 229, 0.7);
}

main {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 64px;
}

section {
  width: min(1120px, 100%);
  margin: 0 auto;
}

section > h2 {
  font-size: clamp(1.8rem, 2.5vw, 2.1rem);
  margin-bottom: 28px;
}

code {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  background: rgba(15, 23, 42, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.85em;
}

#error {
  min-height: 24px;
  text-align: center;
  font-weight: 600;
  color: var(--accent);
}

.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  padding: 36px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.about__eyebrow {
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.3em;
  font-size: 0.78rem;
  margin: 0 0 12px;
}

.about__content h2 {
  margin-top: 0;
}

.about__copy {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.about__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.about__link {
  font-weight: 600;
  text-decoration: none;
  color: var(--primary);
}

.about__list {
  padding-left: 18px;
  color: var(--text-color);
  line-height: 1.5;
}

.about__panel {
  background: rgba(103, 84, 248, 0.08);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: inset 0 0 0 1px rgba(103, 84, 248, 0.18);
}

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

.about__stats article {
  background: rgba(103, 84, 248, 0.12);
  border-radius: 18px;
  padding: 16px;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(103, 84, 248, 0.22);
}

.about__stats h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

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

.about__details h3 {
  margin: 0;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-dark);
}

.about__details p {
  margin: 0 0 12px;
  color: var(--text-color);
}

.sectionHeading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.sectionHeading button {
  align-self: flex-end;
  margin: 0;
  margin-left: auto;
}

.randomCats__cards,
.favouriteCats__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  padding-top: 36px;
}

.catCard {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  height: 100%;
  padding: 26px 24px 34px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(239, 241, 255, 0.96));
  border: 1px solid var(--card-border);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.catCard:hover {
  transform: translateY(-6px);
  box-shadow: 0 34px 52px -34px rgba(15, 23, 42, 0.65);
}

.catCard__media {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 22px 34px -30px rgba(15, 23, 42, 0.55);
}

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

.catCard button {
  margin: auto 0 0;
  width: min(220px, 100%);
  align-self: center;
}

.uploadingCats {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 36px 32px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.uploadingCats h2 {
  margin-bottom: 0;
}

.uploadingForm {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.uploadingForm label {
  font-weight: 600;
  color: var(--text-color);
}

.uploadingForm input[type="file"] {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(103, 84, 248, 0.4);
  background: rgba(103, 84, 248, 0.06);
  color: var(--muted);
  cursor: pointer;
}

.uploadingForm input[type="file"]:hover {
  border-color: var(--primary-dark);
}

.emptyState {
  text-align: center;
  color: var(--muted);
  margin: 0 auto;
}

@media (max-width: 720px) {
  body {
    padding: 28px 12px 32px;
  }

  section {
    width: 100%;
  }

  body button {
    width: 100%;
  }

  .catCard {
    padding: 22px 18px 30px;
  }
}
