.yps4-root,
.yps4-root * {
  box-sizing: border-box;
}

.yps4-root {
  --yps4-bg: #02040d;
  --yps4-panel: rgba(8, 14, 35, 0.72);
  --yps4-panel-strong: rgba(10, 20, 52, 0.88);
  --yps4-text: #f5fbff;
  --yps4-muted: #91a6c9;
  --yps4-cyan: #00f6ff;
  --yps4-blue: #2377ff;
  --yps4-violet: #8d3cff;
  --yps4-pink: #ff37d6;
  --yps4-border: rgba(0, 246, 255, 0.24);
  --yps4-shadow: rgba(0, 246, 255, 0.2);
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 100%;
  min-height: 720px;
  overflow-x: hidden;
  color: var(--yps4-text);
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 246, 255, 0.22), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(141, 60, 255, 0.24), transparent 30%),
    radial-gradient(circle at 60% 90%, rgba(255, 55, 214, 0.16), transparent 28%),
    var(--yps4-bg);
  border-radius: 28px;
}

.yps4-root[data-yps4-theme="light"] {
  --yps4-bg: #eef7ff;
  --yps4-panel: rgba(255, 255, 255, 0.78);
  --yps4-panel-strong: rgba(255, 255, 255, 0.94);
  --yps4-text: #051225;
  --yps4-muted: #4e627f;
  --yps4-cyan: #007aff;
  --yps4-blue: #245bff;
  --yps4-violet: #7635ff;
  --yps4-pink: #d615c7;
  --yps4-border: rgba(0, 88, 255, 0.22);
  --yps4-shadow: rgba(0, 88, 255, 0.18);
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 122, 255, 0.22), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(141, 60, 255, 0.18), transparent 30%),
    radial-gradient(circle at 60% 90%, rgba(255, 55, 214, 0.12), transparent 28%),
    var(--yps4-bg);
}

.yps4-grid-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 246, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 246, 255, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(141, 60, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141, 60, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px, 44px 44px, 11px 11px, 11px 11px;
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  animation: yps4Grid 18s linear infinite;
}

.yps4-orb {
  position: absolute;
  z-index: -2;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
}

.yps4-orb-a { width: 420px; height: 420px; background: var(--yps4-cyan); top: -120px; left: -120px; }
.yps4-orb-b { width: 520px; height: 520px; background: var(--yps4-violet); bottom: -180px; right: -130px; }
.yps4-orb-c { width: 320px; height: 320px; background: var(--yps4-pink); top: 42%; left: 54%; opacity: 0.25; }

.yps4-shell {
  position: relative;
  z-index: 1;
  width: min(1160px, 94%);
  max-width: 100%;
  margin: 0 auto;
  padding: 54px 0 80px;
}

.yps4-hero {
  position: relative;
  overflow: hidden;
  padding: 28px 28px 38px;
  border: 1px solid var(--yps4-border);
  border-radius: 34px;
  background: linear-gradient(145deg, var(--yps4-panel-strong), var(--yps4-panel));
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.35), inset 0 0 70px rgba(0, 246, 255, 0.05);
  backdrop-filter: blur(22px);
}

.yps4-hero::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(120deg, transparent 0%, rgba(0, 246, 255, 0.12) 30%, rgba(255, 55, 214, 0.1) 55%, transparent 78%);
  transform: translateX(-60%);
  animation: yps4Scan 7s ease-in-out infinite;
  pointer-events: none;
}

.yps4-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.yps4-logo-wrap { display: flex; align-items: center; }

.yps4-logo {
  width: min(300px, 58vw);
  max-height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 0 28px var(--yps4-shadow));
}

.yps4-theme-toggle,
.yps4-type-btn,
.yps4-submit {
  font-family: inherit;
}

.yps4-theme-toggle {
  border: 1px solid var(--yps4-border);
  background: rgba(255, 255, 255, 0.07);
  color: var(--yps4-text);
  padding: 11px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  backdrop-filter: blur(14px);
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.12);
}

.yps4-pill {
  position: relative;
  z-index: 1;
  width: max-content;
  max-width: 100%;
  margin: 24px auto 20px;
  padding: 10px 18px;
  border: 1px solid var(--yps4-border);
  border-radius: 999px;
  color: var(--yps4-cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2.5px;
  background: rgba(0, 246, 255, 0.07);
  box-shadow: 0 0 28px rgba(0, 246, 255, 0.08);
}

.yps4-title {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: clamp(46px, 8vw, 104px);
  line-height: 0.95;
  letter-spacing: -4px;
  margin: 0 0 20px;
  color: var(--yps4-text);
}

.yps4-title span {
  display: block;
  background: linear-gradient(90deg, var(--yps4-cyan), var(--yps4-blue), var(--yps4-violet), var(--yps4-pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 34px rgba(0, 246, 255, 0.14);
}

.yps4-subtitle {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto 30px;
  text-align: center;
  color: var(--yps4-muted);
  font-size: 18px;
  line-height: 1.65;
}

.yps4-searchbar {
  position: relative;
  z-index: 1;
  max-width: 850px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 30px rgba(0, 246, 255, 0.03);
}

.yps4-search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  border-radius: 19px;
  padding: 19px 21px;
  background: rgba(0, 0, 0, 0.34);
  color: var(--yps4-text);
  font-size: 16px;
}

.yps4-root[data-yps4-theme="light"] .yps4-search-input {
  background: rgba(255, 255, 255, 0.86);
}

.yps4-submit {
  border: 0;
  border-radius: 19px;
  padding: 0 28px;
  cursor: pointer;
  color: white;
  font-weight: 950;
  background: linear-gradient(135deg, var(--yps4-cyan), var(--yps4-blue), var(--yps4-violet));
  box-shadow: 0 0 26px var(--yps4-shadow);
  transition: 0.22s;
}

.yps4-submit:hover,
.yps4-type-btn:hover,
.yps4-theme-toggle:hover {
  transform: translateY(-2px);
}

.yps4-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.yps4-search-types {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0 14px;
}

.yps4-type-btn {
  border: 1px solid var(--yps4-border);
  border-radius: 999px;
  padding: 11px 22px;
  cursor: pointer;
  color: var(--yps4-text);
  font-weight: 900;
  background: rgba(255, 255, 255, 0.07);
  transition: 0.22s;
}

.yps4-type-btn.yps4-active {
  color: #fff;
  background: linear-gradient(135deg, var(--yps4-cyan), var(--yps4-blue), var(--yps4-violet));
  box-shadow: 0 0 24px var(--yps4-shadow);
}

.yps4-options {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 16px;
  color: var(--yps4-muted);
  font-size: 14px;
}

.yps4-options input { accent-color: var(--yps4-cyan); }

.yps4-status {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-top: 20px;
  color: var(--yps4-cyan);
  font-weight: 800;
}

.yps4-meta {
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid var(--yps4-border);
  border-radius: 22px;
  background: var(--yps4-panel);
  color: var(--yps4-muted);
  backdrop-filter: blur(18px);
}

.yps4-hidden { display: none !important; }
.yps4-results { margin-top: 26px; }

.yps4-result-card {
  display: flex;
  gap: 18px;
  padding: 22px;
  margin-bottom: 16px;
  border: 1px solid rgba(0, 246, 255, 0.16);
  border-radius: 28px;
  background: linear-gradient(145deg, var(--yps4-panel), rgba(255, 255, 255, 0.045));
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.25);
  transition: 0.22s;
}

.yps4-result-card:hover {
  transform: translateY(-4px);
  border-color: var(--yps4-border);
  box-shadow: 0 0 34px var(--yps4-shadow);
}

.yps4-rank {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--yps4-cyan);
  font-weight: 950;
  border: 1px solid var(--yps4-border);
  background: rgba(0, 246, 255, 0.08);
}

.yps4-result-title {
  font-size: 21px;
  margin: 0 0 10px;
}

.yps4-result-content a,
.yps4-media-title a {
  color: var(--yps4-text);
  text-decoration: none;
}

.yps4-result-content a:hover,
.yps4-media-title a:hover {
  color: var(--yps4-cyan);
}

.yps4-result-description {
  color: var(--yps4-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.yps4-result-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--yps4-muted);
  font-size: 13px;
}

.yps4-result-footer span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yps4-result-footer strong {
  color: var(--yps4-cyan);
  white-space: nowrap;
}

.yps4-image-grid,
.yps4-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.yps4-media-card {
  overflow: hidden;
  border: 1px solid rgba(0, 246, 255, 0.18);
  border-radius: 26px;
  background: var(--yps4-panel);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
  transition: 0.22s;
}

.yps4-media-card:hover {
  transform: translateY(-4px);
  border-color: var(--yps4-border);
}

.yps4-media-card img {
  width: 100%;
  height: 175px;
  object-fit: cover;
  display: block;
  background: rgba(0, 0, 0, 0.18);
}

.yps4-media-card-content { padding: 15px; }
.yps4-media-title { font-size: 15px; line-height: 1.4; margin: 0; }

.yps4-empty {
  padding: 24px;
  text-align: center;
  color: var(--yps4-muted);
  border: 1px solid var(--yps4-border);
  border-radius: 24px;
  background: var(--yps4-panel);
}

@keyframes yps4Grid {
  from { background-position: 0 0, 0 0, 0 0, 0 0; }
  to { background-position: 44px 44px, 44px 44px, 11px 11px, 11px 11px; }
}

@keyframes yps4Scan {
  0%, 45% { transform: translateX(-65%); }
  70%, 100% { transform: translateX(65%); }
}

@media (max-width: 720px) {
  .yps4-root { border-radius: 20px; }
  .yps4-shell { width: 94%; padding-top: 24px; }
  .yps4-hero { padding: 20px 16px 28px; border-radius: 26px; }
  .yps4-topbar { flex-direction: column; }
  .yps4-searchbar { flex-direction: column; }
  .yps4-submit { padding: 17px; }
  .yps4-title { letter-spacing: -2px; }
  .yps4-result-card { flex-direction: column; }
  .yps4-result-footer { flex-direction: column; }
  .yps4-pill { font-size: 10px; letter-spacing: 1.5px; text-align: center; }
}
