*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--jdd-text);
  background: var(--jdd-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input {
  font: inherit;
}

.jdd-container {
  width: min(100% - 32px, var(--jdd-container));
  margin-inline: auto;
}

.jdd-section {
  margin-block: 24px;
}

.jdd-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.jdd-section__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.jdd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--jdd-radius-pill);
  background: var(--jdd-accent);
  color: #052e1f;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.jdd-btn:hover {
  background: var(--jdd-accent-hover);
}

.jdd-btn--ghost {
  background: transparent;
  color: var(--jdd-accent);
  border: 1px solid var(--jdd-accent);
}

.jdd-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--jdd-radius-pill);
  font-size: 11px;
  background: var(--jdd-primary);
  color: var(--jdd-accent);
}

.jdd-badge--live {
  background: var(--jdd-live);
  color: #fff;
}

.jdd-badge--ad {
  background: var(--jdd-accent-dim);
  color: var(--jdd-accent);
  border: 1px solid var(--jdd-accent-glow);
}

.jdd-grid {
  display: grid;
  gap: var(--jdd-poster-gap);
  grid-template-columns: repeat(auto-fill, minmax(var(--jdd-poster-w), 1fr));
}

html.jdd-tv .jdd-grid {
  gap: 16px;
}

html.jdd-tv body {
  font-size: 18px;
}

.jdd-only-mobile { display: none; }
.jdd-only-desktop { display: none; }
.jdd-only-tv { display: none; }

@media (max-width: 639px) {
  .jdd-only-mobile { display: block; }
  .jdd-hide-mobile { display: none !important; }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .jdd-only-tablet { display: block; }
}

@media (min-width: 1024px) {
  .jdd-only-desktop { display: block; }
  .jdd-hide-desktop { display: none !important; }
}

html.jdd-tv .jdd-only-tv { display: block; }
html.jdd-tv .jdd-hide-tv { display: none !important; }
