.desktop-search-page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  min-width: 0;
  background: var(--wydsp-background, #010406) !important;
  color: #f5f5f5;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.desktop-search-main {
  flex: 1 0 auto;
  min-height: calc(100vh - 310px);
  padding: 24px 0 64px;
  background: var(--wydsp-background, #010406);
}

.desktop-search-panel.layout-section {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.desktop-search-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.desktop-search-form {
  display: flex;
  align-items: center;
  width: 829px;
  max-width: 100%;
  height: 44px;
  margin: 0 auto 24px;
  gap: 24px;
}

.desktop-search-field {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--wydsp-accent, #EC237F);
  border-radius: 1000px;
  background: #282828;
}

.desktop-search-icon {
  display: block;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  flex: 0 0 20px;
}

.desktop-search-field input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: rgba(255, 255, 255, .9);
  font: 400 16px/22px "PingFang SC", "Microsoft YaHei", sans-serif;
}

.desktop-search-field input:-webkit-autofill,
.desktop-search-field input:-webkit-autofill:hover,
.desktop-search-field input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #282828 inset;
  -webkit-text-fill-color: rgba(255, 255, 255, .9);
  caret-color: #fff;
}

.desktop-search-field input::placeholder { color: rgba(255, 255, 255, .55); }

.desktop-search-field input::-webkit-search-cancel-button { display: none; }

.desktop-search-form .desktop-search-clear {
  display: none;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.desktop-search-form .desktop-search-clear.is-visible { display: inline-flex; }
.desktop-search-clear img {
  width: 15px;
  height: 15px;
  filter: brightness(0) invert(1);
}

@media (hover: hover) and (pointer: fine) {
  .desktop-search-form .desktop-search-clear.is-visible {
    opacity: 0;
    pointer-events: none;
  }

  .desktop-search-field:hover .desktop-search-clear.is-visible,
  .desktop-search-form .desktop-search-clear.is-visible:focus-visible {
    opacity: 1;
    pointer-events: auto;
  }
}

.desktop-search-form button[type="submit"] {
  width: 96px;
  flex: 0 0 96px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--wydsp-accent, #EC237F);
  color: #fff;
  font: 400 16px/22px "PingFang SC", "Microsoft YaHei", sans-serif;
  cursor: pointer;
  transition: opacity .18s ease, transform .18s ease;
}

.desktop-search-form:focus-within button[type="submit"],
.desktop-search-form:has(input:not(:placeholder-shown)) button[type="submit"] { opacity: 1; }
@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
  .desktop-search-form button[type="submit"]:not(:disabled):not([aria-disabled="true"]):hover {
    filter: brightness(1.12);
  }

  .desktop-search-field:hover,
  .desktop-search-field:focus-within {
    box-shadow: 0 0 0 2px rgba(236, 35, 127, .2);
  }

  .desktop-search-tabs a:not(.is-active):not([aria-disabled="true"]):hover {
    color: var(--wydsp-accent, #EC237F);
  }
}
.desktop-search-form button[type="submit"]:not(:disabled):active { transform: scale(.97); }
.desktop-search-form button[type="submit"]:disabled {
  background: #292b2d;
  color: #777b80;
  cursor: not-allowed;
  filter: none;
}

.desktop-search-hot { margin-bottom: 24px; }
.desktop-search-hot h2 {
  height: 28px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, .9);
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
}

.desktop-search-hot__tags { display: flex; min-height: 36px; flex-wrap: wrap; gap: 12px; }
.desktop-search-hot__tags a {
  box-sizing: border-box;
  flex: 0 0 100px;
  width: 100px;
  height: 36px;
  padding: 8px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .9);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color .2s ease, background .2s ease;
}
.desktop-search-hot__tags a:hover,
.desktop-search-hot__tags a.is-active { background: rgba(236, 35, 127, .16); color: var(--wydsp-accent, #EC237F); }

.desktop-search-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  margin-bottom: 24px;
}
.desktop-search-tabs a {
  position: relative;
  display: inline-flex;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 24px;
  color: rgba(255, 255, 255, .55);
  font-size: 18px;
  line-height: 24px;
}
.desktop-search-tabs a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: transparent;
  transform: translateX(-50%);
}
.desktop-search-tabs a.is-active { color: rgba(255, 255, 255, .9); font-weight: 500; }
.desktop-search-tabs a.is-active::after { background: var(--wydsp-accent, #EC237F); }

.desktop-search-result-head {
  display: flex;
  min-height: 40px;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.desktop-search-result-head .desktop-search-tabs { margin-bottom: 0; }
.desktop-search-result-head .desktop-search-tabs a.is-active { font-weight: 600; }

.desktop-search-result-count {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  color: rgba(255, 255, 255, .55);
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
  overflow-wrap: anywhere;
}

.desktop-search-result-count strong {
  color: var(--wydsp-accent, #EC237F);
  font: inherit;
}

.desktop-search-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px 16px;
}

.desktop-search-grid--short,
.desktop-search-grid--drama {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 26px 12px;
}

.desktop-search-empty,
.desktop-search-message {
  min-height: 300px;
  padding-top: 100px;
  color: #7d8186;
  text-align: center;
}
.desktop-search-empty strong { color: #d2d2d2; font-size: 20px; }
.desktop-search-empty p { margin-top: 12px; font-size: 14px; }

.desktop-search-no-result {
  display: flex;
  flex-direction: column;
}

.desktop-search-no-result .desktop-search-empty {
  display: flex;
  min-height: 0;
  padding: 0;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  color: rgba(255, 255, 255, .55);
}

.desktop-search-no-result .desktop-search-empty > img {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.desktop-search-empty__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.desktop-search-no-result .desktop-search-empty strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, .9);
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.desktop-search-no-result .desktop-search-empty strong::before,
.desktop-search-no-result .desktop-search-empty strong::after {
  content: "";
  display: block;
  flex: none;
  width: 10px;
  height: 10px;
  background: url('/static/images/wydsp/search-star-left-gold.png') center / contain no-repeat;
}

.desktop-search-no-result .desktop-search-empty strong::after {
  background-image: url('/static/images/wydsp/search-star-right-gold.png');
}

.desktop-search-no-result .desktop-search-empty p {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
}

.desktop-search-recommendations { margin-top: 24px; }
.desktop-search-recommendations h2 {
  height: 28px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, .9);
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
}

.desktop-search-grid--recommendations {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.desktop-search-panel > .pc-pagination { margin-top: 12px; }

.desktop-search-form button:focus-visible,
.desktop-search-hot__tags a:focus-visible,
.desktop-search-tabs a:focus-visible { outline: 2px solid var(--wydsp-accent, #EC237F); outline-offset: 3px; }

.desktop-search-result-head .desktop-search-tabs { flex: none; }

@media (min-width: 769px) and (max-width: 1000px) {
  .desktop-search-grid--video { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .desktop-search-grid--short,
  .desktop-search-grid--drama,
  .desktop-search-grid--recommendations { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .desktop-search-result-count { font-size: 18px; line-height: 24px; }
  .desktop-search-tabs a { padding-right: 16px; padding-left: 16px; }
}

@media (max-width: 768px) {
  .desktop-search-panel.layout-section { width: calc(100% - 32px); }
  .desktop-search-form { gap: 12px; }
  .desktop-search-form button[type="submit"] { width: 72px; flex-basis: 72px; }
  .desktop-search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desktop-search-result-head { align-items: flex-start; flex-direction: column; gap: 12px; }
}
