/* iOS 10 Safari: flexbox yes, CSS grid no, no CSS variables. */

* { -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0,0,0,0); }

html, body {
  margin: 0;
  padding: 0;
  background: #12131a;
  color: #e8e9ee;
  font-family: -apple-system, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 15px;
  min-height: 100%;
}

.bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  padding: 0 14px;
  background: #1b1d27;
  border-bottom: 1px solid #2b2e3b;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  z-index: 30;
}

.brand { font-size: 19px; font-weight: 600; letter-spacing: .3px; margin-right: 18px; }
.brand span { color: #7c8cff; }

.tabs {
  display: -webkit-box; display: -webkit-flex; display: flex;
  -webkit-box-flex: 1; -webkit-flex: 1; flex: 1;
}

.tab {
  -webkit-appearance: none; appearance: none;
  border: 0; background: none; color: #9a9fb0;
  font-size: 15px; font-family: inherit;
  padding: 10px 12px; margin-right: 4px;
  border-radius: 6px;
}
.tab.is-active { background: #2a2e3d; color: #fff; }

main { padding: 66px 14px 30px; }

.view { display: none; }
.view.is-active { display: block; }

.switch { margin: 0 0 14px; }
.chip {
  -webkit-appearance: none; appearance: none;
  border: 1px solid #333747; background: #1e2130; color: #b9bed0;
  font-family: inherit; font-size: 14px;
  padding: 7px 14px; border-radius: 16px; margin-right: 8px;
}
.chip.is-active { background: #39415c; border-color: #4d5878; color: #fff; }

.grid { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; margin: 0 -5px; }

.card {
  -webkit-flex: 1 1 auto; flex: 1 1 auto;
  width: 132px; min-width: 108px; max-width: 168px;
  margin: 5px;
  background: #1b1d27;
  border: 1px solid #262a36;
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
}
.card .poster {
  width: 100%; height: 198px;
  display: block; background: #232633;
  -o-object-fit: cover; object-fit: cover;
}
.card .meta { padding: 7px 8px 9px; }
.card .t { font-size: 13px; line-height: 1.25; display: block; }
.card .y { font-size: 12px; color: #8b90a0; display: block; margin-top: 3px; }

.searchbar { display: -webkit-flex; display: flex; margin-bottom: 12px; }
input[type="search"], input[type="text"] {
  -webkit-appearance: none; appearance: none;
  -webkit-box-flex: 1; -webkit-flex: 1; flex: 1;
  background: #1e2130; border: 1px solid #333747; color: #e8e9ee;
  font-family: inherit; font-size: 15px;
  padding: 10px 12px; border-radius: 8px;
}

.btn {
  -webkit-appearance: none; appearance: none;
  border: 1px solid #3a4052; background: #262b39; color: #e8e9ee;
  font-family: inherit; font-size: 15px;
  padding: 10px 16px; border-radius: 8px; margin-left: 8px;
}
.btn-primary { background: #4b5bd6; border-color: #5b6ae0; color: #fff; }
.btn-small { font-size: 13px; padding: 6px 10px; }

.panel {
  background: #1b1d27; border: 1px solid #262a36; border-radius: 10px;
  padding: 14px; margin-bottom: 14px;
}
.panel h2 { font-size: 16px; margin: 0 0 8px; }
.panel input { margin-top: 4px; }
.row { margin-top: 10px; }
.hint { color: #9298a8; font-size: 13px; line-height: 1.5; }
.hint code { background: #262b39; padding: 1px 5px; border-radius: 4px; }
.hint ul { margin: 6px 0 0; padding-left: 18px; }
.empty { color: #767c8c; font-size: 14px; }

/* ---- detail sheet ---- */
.sheet {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.72);
  display: none; z-index: 40; overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.sheet.is-open { display: block; }
.sheet-inner {
  background: #1b1d27; min-height: 100%;
  padding: 14px 14px 40px;
}
.close {
  -webkit-appearance: none; appearance: none;
  border: 1px solid #3a4052; background: #262b39; color: #e8e9ee;
  font-family: inherit; font-size: 14px;
  padding: 8px 14px; border-radius: 8px; margin-bottom: 12px;
}
.detail-top { display: -webkit-flex; display: flex; }
.detail-top img {
  width: 132px; height: 198px; border-radius: 8px; background: #232633; margin-right: 14px;
  -o-object-fit: cover; object-fit: cover;
}
.detail-title { font-size: 21px; font-weight: 600; margin: 0 0 4px; }
.detail-sub { color: #8b90a0; font-size: 13px; margin: 0 0 8px; }
.detail-overview { color: #b6bbc9; font-size: 14px; line-height: 1.5; margin: 8px 0 0; }
.actions { margin-top: 12px; }
.actions .btn { margin: 0 8px 8px 0; }

.seasonrow { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; margin-bottom: 10px; }
.eplist { list-style: none; margin: 0; padding: 0; }
.eplist li {
  border-bottom: 1px solid #262a36; padding: 10px 0;
  display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center;
}
.eplist .epno { color: #7c8cff; font-size: 13px; width: 42px; }
.eplist .epname { -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; font-size: 14px; }
.status { font-size: 13px; padding: 8px 10px; border-radius: 8px; margin-top: 10px; }
.status.ok { background: #1f3324; color: #92d8a3; }
.status.bad { background: #35211f; color: #e2988f; }

/* ---- player ---- */
.player {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: #000; display: none; z-index: 50;
}
.player.is-open { display: block; }
.player-top {
  height: 48px; padding: 0 12px;
  display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center;
  background: #14161e; border-bottom: 1px solid #262a36;
}
.player-top #player-title {
  -webkit-box-flex: 1; -webkit-flex: 1; flex: 1;
  font-size: 14px; padding: 0 10px; color: #d5d9e4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-stage { position: absolute; top: 48px; left: 0; right: 0; bottom: 0; }
#video-holder { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
#video-holder video {
  width: 100%; height: 100%; background: #000; display: block;
}
.player-error {
  position: absolute; left: 16px; right: 16px; top: 40%;
  color: #e2988f; font-size: 14px; text-align: center;
}
.source-panel {
  position: absolute; top: 48px; right: 0; width: 300px; bottom: 0;
  background: #1b1d27; border-left: 1px solid #262a36;
  padding: 12px; overflow: auto; display: none;
  -webkit-overflow-scrolling: touch;
}
.source-panel.is-open { display: block; }
.source-panel h3 { margin: 0 0 10px; font-size: 15px; }
.src {
  display: block; width: 100%; text-align: left;
  -webkit-appearance: none; appearance: none;
  background: #232838; border: 1px solid #333a4c; color: #e8e9ee;
  font-family: inherit; font-size: 13px;
  padding: 9px 10px; border-radius: 7px; margin-bottom: 8px;
}
.src.is-active { border-color: #5b6ae0; background: #2c3550; }
.src .u { display: block; color: #8b90a0; font-size: 11px; margin-top: 3px; word-break: break-all; }
