html, body {
  margin: 0;
  padding: 0;
  background: #0f0f0f;
  color: #f3f5f7;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  min-height: 100vh;
}

.app-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 14px 28px;
}

.topbar,
.list-head,
.quick-actions,
.player-actions,
.player-topbar {
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.list-head h2,
.player-heading h2 {
  margin: 0;
  font-weight: bold;
}

.subtle {
  color: #a8a8a8;
  margin: 6px 0 0;
  font-size: 14px;
}

.brand-badge {
  display: block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #ff0033;
  color: #ffffff;
  font-weight: bold;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
  border: 0;
  min-height: 0;
  line-height: 1.3;
  cursor: pointer;
}

.channel-status {
  margin-top: 8px;
}

.panel {
  background: #181818;
  border: 1px solid #272727;
  border-radius: 16px;
  padding: 14px;
  margin-top: 14px;
}

.panel-search {
  background: transparent;
  border: 0;
  padding: 0;
  margin-top: 10px;
}

.search-form {
  display: table;
  width: 100%;
}

.search-form-topbar {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.search-input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.search-form input,
.search-form button,
button {
  font: inherit;
  border-radius: 22px;
  border: 1px solid #303030;
  min-height: 48px;
}

.search-form input {
  display: table-cell;
  width: 100%;
  box-sizing: border-box;
  padding: 0 16px;
  background: #121212;
  color: #f3f5f7;
}

.search-form button {
  display: table-cell;
  width: 112px;
  margin-left: 8px;
  background: #ffffff;
  color: #111111;
}

.search-form-topbar input {
  display: block;
  min-height: 42px;
  width: 100%;
  padding-right: 42px;
}

.search-form-topbar .search-submit {
  width: 88px;
  min-height: 42px;
  flex: 0 0 auto;
}

.search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: #303030;
  color: #f3f5f7;
  line-height: 1;
  transform: translateY(-50%);
}

.quick-actions {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

button {
  box-sizing: border-box;
  padding: 0 14px;
  background: #ffffff;
  color: #111111;
}

.secondary {
  background: #272727;
  color: #f3f5f7;
}

.icon-button {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
  font-weight: bold;
  flex: 0 0 auto;
}

.small {
  min-height: 40px;
  padding: 0 12px;
}

.player-actions button {
  width: 32%;
  float: left;
}

.player-actions button + button {
  margin-left: 2%;
}

.cards {
  margin-top: 12px;
}

.list-footer {
  margin-top: 22px;
  text-align: center;
}

.list-footer button {
  min-width: 180px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 28px;
}

.card {
  min-height: 0;
  cursor: pointer;
  padding-bottom: 2px;
}

.thumb {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #0c1115;
  border-radius: 14px;
  margin-bottom: 10px;
}

.card .thumb {
  aspect-ratio: 16 / 9;
  height: auto;
}

.card-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.meta {
  margin: 0 0 12px;
  color: #a8a8a8;
  font-size: 14px;
  min-height: 34px;
}

.card-actions button {
  width: 100%;
  display: block;
  margin-top: 8px;
}

.card-actions {
  display: none;
}

.player-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #0f0f0f;
  padding: 12px 12px 16px;
}

.player-topbar {
  padding-bottom: 12px;
}

.player-heading {
  margin-left: 96px;
}

.player-wrap {
  background: #000000;
  border-radius: 0;
  overflow: hidden;
  margin-left: -12px;
  margin-right: -12px;
}

#video-player {
  display: block;
  width: 100%;
  min-height: 240px;
  max-height: 74vh;
  background: #000;
}

.player-actions {
  padding-top: 12px;
}

.hidden {
  display: none;
}

@media (max-width: 640px) {
  .app-shell {
    padding: 12px 10px 20px;
  }

  .topbar {
    gap: 8px;
  }

  .search-form-topbar .search-submit {
    width: 72px;
  }

  .search-form-topbar input {
    padding: 0 12px;
  }

  .quick-actions button,
  .player-actions button,
  .card-actions button {
    width: 100%;
    float: none;
    margin-left: 0;
    margin-top: 8px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .thumb {
    height: auto;
  }

  .player-heading {
    margin-left: 0;
    padding-top: 10px;
  }

  .player-wrap {
    margin-left: -10px;
    margin-right: -10px;
  }
}
