* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f8fafc;
  color: #20242b;
  font-family: "Kanit", Arial, sans-serif;
}

.bp-page {
  min-height: 100vh;
  padding: 24px 0 80px;
  background:
    radial-gradient(circle at top left, rgba(255, 193, 7, .07), transparent 28%),
    #f8fafc;
}

.bp-container {
  width: min(1380px, calc(100% - 40px));
  margin: 0 auto;
}

.bp-topbar {
  display: flex;
  justify-content: flex-end;
  min-height: 44px;
}

.bp-back {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 9px 17px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(15, 23, 42, .08);
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, color .2s ease;
}

.bp-back:hover {
  border-color: #f59e0b;
  color: #ea7a00;
  transform: translateY(-2px);
}

.bp-heading {
  margin: 5px 0 42px;
  text-align: center;
}

.bp-heading h1 {
  margin: 0;
  font-size: clamp(31px, 4vw, 45px);
  font-weight: 700;
  line-height: 1.2;
}

.bp-heading-line {
  display: block;
  width: 72px;
  height: 4px;
  margin: 15px auto 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #ff684f);
}

.bp-heading p {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
}

.bp-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 120px;
  color: #64748b;
}

.bp-status[hidden] { display: none; }

.bp-spinner {
  width: 25px;
  height: 25px;
  border: 3px solid #e2e8f0;
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: bp-spin .7s linear infinite;
}

@keyframes bp-spin { to { transform: rotate(360deg); } }

.bp-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 32px 34px;
}

.bp-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 15px 15px 17px;
  border: 1px solid rgba(226, 232, 240, .85);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 13px 30px rgba(15, 23, 42, .08);
  transition: transform .2s ease, box-shadow .2s ease;
}

.bp-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, .13);
}

.bp-poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5.55;
  overflow: hidden;
  border-radius: 14px;
  background: #eef2f7;
}

.bp-poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.bp-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  min-width: 132px;
  min-height: 39px;
  margin-top: 13px;
  padding: 8px 22px;
  border-radius: 999px;
  background: #9f9f9f;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}

.bp-open:hover { background: #f28a00; transform: translateY(-1px); }

.bp-empty, .bp-error {
  grid-column: 1 / -1;
  padding: 56px 20px;
  border-radius: 18px;
  background: #fff;
  color: #64748b;
  text-align: center;
}

.bp-error { color: #b91c1c; }

@media (max-width: 1050px) {
  .bp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .bp-container { width: min(100% - 28px, 640px); }
  .bp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
  .bp-heading { margin-bottom: 30px; }
  .bp-card { padding: 10px 10px 13px; border-radius: 16px; }
  .bp-open { min-width: 105px; min-height: 36px; padding: 8px 15px; font-size: 15px; }
}

@media (max-width: 430px) {
  .bp-container { width: min(100% - 24px, 360px); }
  .bp-grid { grid-template-columns: 1fr; }
  .bp-card { width: min(100%, 300px); margin: 0 auto; }
}
