:root{
  --cute-bg-1:#fff7fc;
  --cute-bg-2:#f4fff7;
  --cute-bg-3:#f2f7ff;
  --cute-text:#3f4a63;
  --cute-muted:#7b88a8;
  --cute-pink:#ff77b7;
  --cute-blue:#7cc7ff;
  --cute-mint:#72d6bb;
}

body{
  color:var(--cute-text);
  background:
    radial-gradient(circle at 8% 8%, #ffd9ee 0 6%, transparent 7%),
    radial-gradient(circle at 92% 12%, #d9eeff 0 7%, transparent 8%),
    radial-gradient(circle at 86% 92%, #d8ffe6 0 7%, transparent 8%),
    linear-gradient(135deg,var(--cute-bg-1),var(--cute-bg-2) 46%,var(--cute-bg-3));
}

.search-shell{
  width:100%;
  max-width:1180px;
  margin:0 auto 28px;
  padding:0 14px 20px;
  box-sizing:border-box;
}

section.search{
  margin:22px 0 24px;
}

.search-hero{
  position:relative;
  overflow:hidden;
  border-radius:24px;
  padding:24px 22px;
  background:linear-gradient(120deg,#ffffffd9,#fff0f8d9,#ecf9ffd9);
  border:1px solid rgba(255,255,255,.92);
  box-shadow:0 16px 34px rgba(92,112,156,.14);
  backdrop-filter:blur(6px);
}

.search-hero::before,
.search-hero::after{
  content:"";
  position:absolute;
  border-radius:999px;
  opacity:.34;
  background:linear-gradient(135deg,#ffc3e4,#bfeaff);
  z-index:0;
}

.search-hero::before{width:180px;height:180px;right:-45px;top:-45px}
.search-hero::after{width:120px;height:120px;left:-28px;bottom:-35px}

.search-hero h1,
.search-hero p,
.search-chip-row{
  position:relative;
  z-index:1;
}

.search-hero h1{
  margin:0 0 8px;
  font-size:34px;
  line-height:1.18;
  font-weight:900;
  letter-spacing:0;
  color:#2f3c5a;
  text-shadow:0 3px 0 rgba(255,255,255,.9);
}

.search-hero p{
  margin:0;
  max-width:720px;
  color:var(--cute-muted);
  line-height:1.75;
}

.search-chip-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
}

.search-chip{
  border-radius:999px;
  padding:6px 12px;
  font-size:13px;
  font-weight:800;
  color:#6a4f77;
  border:1px solid #ffd8ea;
  background:linear-gradient(90deg,#fff8fc,#eef8ff);
  box-shadow:0 6px 14px rgba(104,126,175,.14);
}

.search-container{
  margin:14px 0 18px;
  padding:16px;
  border-radius:20px;
  border:1px solid #e9eefc;
  background:linear-gradient(135deg,#ffffffd1,#f7faffd1,#f7fff8d1);
  box-shadow:0 14px 30px rgba(77,96,142,.1);
}

#searchInput{
  width:100%;
  min-height:50px;
  box-sizing:border-box;
  padding:12px 14px !important;
  margin:0;
  border:1px solid #dde6fb;
  border-radius:16px;
  background:#ffffffea;
  color:#344462;
  font-size:16px;
  line-height:1.4;
  text-align:left;
  box-shadow:inset 0 2px 4px rgba(73,96,143,.05);
  outline:none;
  transition:border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

#searchInput:focus{
  border-color:#9bd4ff;
  background:#fff;
  box-shadow:0 0 0 4px rgba(124,199,255,.22);
}

#searchInput::placeholder,
#searchInput::-webkit-input-placeholder{
  color:#8d9abd;
  font-size:15px;
}

.search-actions{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-top:12px;
}

#cardTemplateSelect,
#searchButton{
  min-height:42px;
  border-radius:14px;
  font-size:15px;
  font-weight:800;
}

#cardTemplateSelect{
  min-width:148px;
  padding:0 38px 0 12px;
  border:1px solid #dde6fb;
  color:#516286;
  background:#fff;
}

#searchButton{
  min-width:128px;
  padding:0 18px;
  border:1px solid rgba(255,255,255,.68);
  color:#fff;
  background:linear-gradient(140deg,#95abff,#86d1ff 52%,#a7c5ff);
  box-shadow:0 12px 24px rgba(84,102,145,.16);
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease;
}

#searchButton:hover{
  transform:translateY(-2px);
  box-shadow:0 16px 28px rgba(84,102,145,.2);
}

.result-info{
  min-height:22px;
  margin-top:12px;
  color:#5c6f96;
  font-size:14px;
  font-weight:700;
  text-align:center;
}

.search-error{
  color:red;
}

.search .container{
  width:100%;
  max-width:none;
  padding:0;
  margin:0;
}

#content.actor-list,
.search-results,
.container > #content.actor-list{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:14px;
  align-items:start;
  width:100%;
  box-sizing:border-box;
  padding:0;
  margin:0;
}

#content.actor-list > a.card,
#content.actor-list > li .card,
#content.actor-list > li a,
#content.actor-list > .card{
  border-radius:18px;
  border:1px solid #e8eefb;
  background:linear-gradient(135deg,#fff,#fff8fc,#f2f8ff);
  box-shadow:0 12px 26px rgba(73,96,143,.11);
  transition:transform .2s ease, box-shadow .2s ease;
}

#content.actor-list > a.card:hover,
#content.actor-list > li .card:hover,
#content.actor-list > li a:hover,
#content.actor-list > .card:hover{
  transform:translateY(-5px) rotate(-.2deg);
  box-shadow:0 18px 34px rgba(73,96,143,.17);
}

#content.actor-list img,
.search-results img{
  max-width:100%;
  height:auto;
  display:block;
  border-radius:12px;
}

.no-results{
  grid-column:1 / -1;
  border-radius:18px;
  border:1px solid #e8eefb;
  background:linear-gradient(120deg,#fff,#fff7fc,#f3f9ff);
  color:#6f7fa1;
  box-shadow:0 10px 22px rgba(79,102,151,.09);
  padding:20px;
  text-align:center;
  font-weight:800;
}

#friend-links{
  margin-top:18px;
  border-radius:16px;
  border:1px solid #e8eefb;
  background:#ffffffcf;
  box-shadow:0 10px 24px rgba(82,103,148,.08);
  padding:12px 14px;
}

#friend-links h3{
  margin:0 0 8px;
  color:#2f3c5a;
  font-weight:800;
}

.result-info:focus,
#resultInfo:focus{
  outline:none;
  box-shadow:none;
}

@media (max-width:768px){
  .search-shell{padding:0 10px 18px}
  section.search{margin:14px 0 20px}
  .search-hero{padding:18px 14px;border-radius:18px}
  .search-hero h1{font-size:26px}
  .search-container{padding:12px;border-radius:16px}
  .search-actions{align-items:stretch}
  #cardTemplateSelect{flex:1;min-width:0}
  #searchButton{min-width:100px}
  #searchInput::placeholder,
  #searchInput::-webkit-input-placeholder{
    font-size:13px;
  }
}

@media (max-width:600px){
  #content.actor-list,
  .search-results{
    grid-template-columns:repeat(2,1fr) !important;
    gap:10px;
  }
}

@media (max-width:420px){
  .search-actions{flex-direction:column}
  #searchButton{width:100%}
}

@media (max-width:360px){
  #content.actor-list,
  .search-results{
    grid-template-columns:1fr !important;
  }
}
