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

body {
  background: #141414;
  color: #fff;
  font-family: 'Segoe UI', sans-serif;
  min-height: 100vh;
}

/* Header */
header {
  background: #1f1f1f;
  padding: 20px 16px;
  text-align: center;
  border-bottom: 3px solid #e50914;
  position: sticky;
  top: 0;
  z-index: 100;
}

header h1 {
  font-size: clamp(20px, 5vw, 36px);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 14px;
}

header h1 span {
  color: #e50914;
}

.search-bar {
  display: flex;
  gap: 8px;
  max-width: 550px;
  margin: 0 auto;
}

.search-bar input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 8px;
  border: 2px solid #333;
  background: #2a2a2a;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border 0.2s;
  min-width: 0;
}

.search-bar input:focus {
  border-color: #e50914;
}

.search-bar button {
  padding: 12px 18px;
  background: #e50914;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.search-bar button:active {
  background: #b2070f;
}

/* Main */
main {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 12px;
}

#status {
  text-align: center;
  font-size: 14px;
  color: #aaa;
  margin-bottom: 20px;
}

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

/* Card */
.card {
  background: #1f1f1f;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #2a2a2a;
  -webkit-tap-highlight-color: transparent;
}

.card:active {
  transform: scale(0.97);
}

.card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}

.card-info {
  padding: 8px;
}

.card-info h3 {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 3px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

.card-info p {
  font-size: 10px;
  color: #888;
}

.card-type {
  display: inline-block;
  background: #e50914;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
  text-transform: uppercase;
}

/* Detail View */
.hidden {
  display: none !important;
}

#detailView {
  padding: 16px 12px;
  max-width: 1100px;
  margin: 0 auto;
}

.detail-container > button {
  background: transparent;
  border: 2px solid #e50914;
  color: #e50914;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  display: block;
  transition: all 0.2s;
}

.detail-container > button:active {
  background: #e50914;
  color: #fff;
}

.detail-card {
  display: flex;
  flex-direction: column;
  background: #1f1f1f;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #2a2a2a;
  margin-bottom: 24px;
}

.detail-card img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  object-position: top;
  display: block;
}

.detail-info {
  padding: 18px;
  flex: 1;
}

.detail-info h2 {
  font-size: clamp(18px, 5vw, 28px);
  font-weight: 900;
  margin-bottom: 8px;
  line-height: 1.2;
}

.meta {
  color: #e50914;
  font-size: 13px;
  margin-bottom: 14px;
  font-weight: 600;
}

.plot {
  color: #bbb;
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 20px;
  border-left: 3px solid #e50914;
  padding-left: 12px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.label {
  font-size: 10px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.info-item span:last-child {
  font-size: 13px;
  color: #ddd;
  line-height: 1.4;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight