:root {
  --bg: #0f1e2b;
  --card-bg: #16273a;
  --accent: #7ec8e3;
  --accent-warm: #ff9d4d;
  --text: #e8f1f5;
  --muted: #9fb3c2;
}

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

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background:
    linear-gradient(180deg, rgba(10, 22, 32, 0.75) 0%, rgba(15, 30, 45, 0.82) 40%, rgba(20, 42, 61, 0.88) 100%),
    url('../images/bg.jpg') no-repeat center center / cover fixed;
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

header {
  text-align: center;
  padding: 60px 20px 30px;
  border-bottom: 1px solid #24405a;
}

header h1 {
  font-size: 2.6em;
  color: var(--accent);
  letter-spacing: 1px;
}

header p {
  color: var(--muted);
  margin-top: 10px;
  font-size: 1.1em;
  font-style: italic;
}

/* --- Expanding Search (kinetics: width 0.4s glide) --- */
.search-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 56px;
  height: 44px;
  padding: 0 14px;
  border-radius: 100px;
  background: var(--card-bg);
  border: 1px solid #24405a;
  overflow: hidden;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.search:hover,
.search:focus-within {
  width: 260px;
}

.search-icon {
  flex-shrink: 0;
  opacity: 0.8;
}

.search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95em;
  width: 100%;
}

.search input::placeholder {
  color: var(--muted);
}

nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 22px 18px;
  background: rgba(0, 0, 0, 0.2);
  flex-wrap: wrap;
}

nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95em;
  padding: 8px 16px;
  border: 1px solid #24405a;
  border-radius: 100px;
}

/* --- Squish Button (kinetics: scale 0.88 spring) --- */
.btn-squish {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
}

.btn-squish:hover {
  background: rgba(126, 200, 227, 0.08);
}

.btn-squish:active {
  transform: scale(0.88);
  transition: transform 0.08s ease-out;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

section {
  margin-bottom: 70px;
}

section h2 {
  font-size: 1.8em;
  color: var(--accent);
  border-left: 4px solid var(--accent);
  padding-left: 14px;
  margin-bottom: 20px;
}

.card {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  gap: 24px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  margin-bottom: 30px;
}

.card img {
  width: 320px;
  height: 230px;
  object-fit: cover;
  flex-shrink: 0;
}

.card .info {
  padding: 20px 20px 20px 0;
  flex: 1;
}

.card .info h3 {
  color: var(--text);
  font-size: 1.3em;
  margin-bottom: 8px;
}

.card .info .latin {
  color: var(--muted);
  font-size: 0.85em;
  font-style: italic;
  display: block;
  margin-bottom: 10px;
}

.card .info p {
  color: var(--muted);
  font-size: 0.98em;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

/* --- Like Burst heart button (kinetics: burst(heart)) --- */
.like-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95em;
  overflow: visible;
}

.like-btn .heart {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.like-btn.pop .heart {
  transform: scale(1.35);
}

.like-btn.liked .heart {
  fill: var(--accent-warm);
  stroke: var(--accent-warm);
}

.like-btn.liked {
  color: var(--accent-warm);
}

.particle {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-warm);
  animation: fly 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
}

@keyframes fly {
  to {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

/* --- Ripple Feedback button (kinetics: decay(600ms)) --- */
.btn-ripple {
  position: relative;
  overflow: hidden;
  background: var(--accent);
  color: #0f1e2b;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-family: inherit;
  font-size: 0.95em;
  cursor: pointer;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: scale(0);
  animation: ripple-out 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-out {
  to {
    transform: scale(3);
    opacity: 0;
  }
}

.facts {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 24px 30px;
  color: var(--muted);
}

.facts ul {
  padding-left: 20px;
}

.facts li {
  margin-bottom: 10px;
}

footer {
  text-align: center;
  padding: 30px;
  color: var(--muted);
  font-size: 0.85em;
  border-top: 1px solid #24405a;
}

@media (max-width: 700px) {
  .card {
    flex-direction: column;
  }

  .card img {
    width: 100%;
    height: 220px;
  }

  .card .info {
    padding: 16px;
  }
}
