body {
  background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 50%, #1f1f1f 100%);
  color: white;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
}


.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.header {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.search {
  background: #2f3640;
  border-radius: 40px;
  padding: 6px 6px 6px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 400px;
}

.search-input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  color: white;
  font-size: 16px;
  line-height: 1;
  min-width: 0;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.search-button {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #1a4a8a;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
}

.search-button:hover {
  background: #153d75;
}

@media screen and (max-width: 620px) {
  .search {
    width: 100%;
  }
}

.movie-list,
.shelf__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #2f3640;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.card__poster-wrapper {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #1a1a1a;
  overflow: hidden;
}

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

.card__poster--placeholder,
.card__poster-wrapper.card__poster--placeholder {
  background: #3a3a3a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='1.5'%3E%3Crect x='2' y='2' width='20' height='20' rx='3'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='m21 15-5-5L5 21'/%3E%3C/svg%3E") center / 48px no-repeat;
}

.card__info {
  padding: 10px 12px 12px;
}

.card__type {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.45);
}

.card__title {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card details tooltip */
.card__details {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 15, 0.93);
  backdrop-filter: blur(4px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.card__details[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.card__details-loading {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.card__details-plot {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.card__details-meta {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card__details-meta li {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  gap: 8px;
}

.card__details-meta li > span:first-child {
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.card__details-meta li > span:last-child {
  text-align: right;
  font-weight: 500;
}

.shelves {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.shelf__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

[hidden] {
  display: none !important;
}
