/* Design tokens */
:root {
  --bg: #0d0e16;
  --bg-soft: #12141f;
  --surface: #171926;
  --surface-2: #1e2133;
  --border: #2a2d40;
  --text: #f1f2f7;
  --text-dim: #9396ad;
  --text-faint: #5b5e75;

  --accent: #ff3d71;
  /* femutsu coral-pink */
  --accent-ink: #2a0413;
  --accent-2: #7c5cff;
  /* violet, secondary */
  --accent-teal: #2bd9c9;
  /* rating badge */

  --grad-aurora: radial-gradient(60% 60% at 20% 20%, rgba(255, 61, 113, .35), transparent 60%),
    radial-gradient(50% 50% at 85% 15%, rgba(124, 92, 255, .30), transparent 60%),
    radial-gradient(60% 60% at 60% 90%, rgba(43, 217, 201, .16), transparent 60%);

  --radius-card: 14px;
  --radius-pill: 999px;

  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;

  --container: 1240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- petal clip shapes (signature element) ---------- */
.petal {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.petal-sm {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 14, 22, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .01em;
  color: var(--text);
  white-space: nowrap;
}

.logo-img {
  height: 34px;
  margin-right: 10px;
  vertical-align: middle;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.main-nav a {
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  transition: color .15s, background .15s;
}

.main-nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.main-nav a.active {
  color: var(--text);
  background: var(--surface-2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.btn-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 16px 9px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  white-space: nowrap;
}

.btn-signin:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn-signin .label {
  display: inline-block;
}

.btn-signin.avatar-state {
  padding: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-signin .avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .10);
  display: block;
}

.btn-signin.avatar-state .label {
  display: none;
}

/* Mobile-cloned header items inside mobile nav */
.mobile-cloned {
  display: flex;
  flex-direction: column;
}

.mobile-cloned .mobile-item,
.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

.mobile-cloned .mobile-item svg {
  margin-right: 6px;
}

.hamburger {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* mobile nav drawer */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 20px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  max-height: calc(100vh - 72px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav a {
  padding: 12px 8px;
  color: var(--text-dim);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav.open {
  display: flex;
}

/* end mobile nav */

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 40px 0 8px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 520px;
  background: var(--grad-aurora);
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -.01em;
  margin: 0 0 4px;
}

.section-eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--accent-teal);
  margin: 0 0 10px;
}

.section-head {
  margin-bottom: 20px;
}

/* carousel */
.carousel-row {
  position: relative;
}

.carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-btn {
  position: absolute;
  top: 40%;
  translate: 0 -50%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.carousel-btn.prev {
  left: -14px;
}

.carousel-btn.next {
  right: -14px;
}

@media (max-width:900px) {
  .carousel-btn {
    display: none;
  }

}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  flex: 0 0 168px;
  scroll-snap-align: start;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.card-cover {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--surface-2);
  margin-bottom: 10px;
  border: 1px solid var(--border);
  width: 220px;
}

.card-cover .cover-fill {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.15;
  color: rgba(255, 255, 255, .92);
}

.card-cover .cover-fill span {
  text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}

.rating-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent-teal);
  color: #04211d;
  font-weight: 800;
  font-size: 12px;
  padding: 3px 8px;
}

.card-title-en {
  font-size: 12px;
  color: var(--text-faint);
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-title-ru {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* grid cards (Новое на сайте) */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px 16px;
  justify-content: center;
}

.grid-cards .card {
  flex: auto;
  width: auto;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.card-meta {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 4px;
}

.watching-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.watch-card {
  display: block;
  min-width: 0;
}

.watch-card-cover {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  overflow: hidden;
  margin-bottom: 8px;
}

.watch-progress-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(13, 14, 22, .78);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.watch-card-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.watch-card-meta {
  margin: 0;
  color: var(--text-faint);
  font-size: 12px;
}

.watching-section .anime-placeholder {
  margin-top: 14px;
}

@media (max-width:1100px) {
  .grid-cards {
    grid-template-columns: repeat(3, 1fr);
    justify-content: center;
  }
}

@media (max-width:760px) {
  .grid-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 10px;
    justify-content: center;
  }

  .logo-text {
    display: none;
  }
}

@media (max-width:520px) {
  .grid-cards {
    grid-template-columns: repeat(1, 1fr);
    justify-content: center;
  }
    .logo-text {
    display: flex;
  }
}

.content-section {
  padding: 44px 0;
}

.content-section+.content-section {
  border-top: 1px solid var(--border);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  margin-top: 20px;
}

.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 13px;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-note {
  font-size: 13px;
  color: var(--text-faint);
}

.footer-contact a {
  color: var(--accent);
}

@media (max-width:640px) {
  .site-header .wrap {
    padding: 0 18px;
    gap: 14px;
  }
  .logo-text {
    display: flex;
  }
  .main-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .btn-signin span.label {
    display: none;
  }

  .wrap {
    padding: 0 18px;
  }

  .content-section {
    padding: 32px 0;
  }

  .section-title {
    font-size: 21px;
  }
}

/* ============================================================
   AUTH PAGE
   ============================================================ */
.auth-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  position: relative;
  overflow: hidden;
}

.auth-main::before {
  content: "";
  position: absolute;
  inset: -30% -10%;
  background: var(--grad-aurora);
  filter: blur(40px);
  z-index: 0;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px 32px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 22px;
}

.auth-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  text-align: center;
  margin: 0 0 8px;
}

.auth-sub {
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
  margin: 0 0 26px;
  line-height: 1.5;
}

.auth-tabs {
  display: flex;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tabs button {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-weight: 700;
  font-size: 13.5px;
  padding: 9px 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background .15s, color .15s;
}

.auth-tabs button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.oauth-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  transition: transform .1s, border-color .15s, filter .15s;
}

.oauth-btn:hover {
  border-color: var(--text-faint);
}

.oauth-btn:active {
  transform: scale(.99);
}

.oauth-btn.google {
  background: #fff;
  color: #1f1f1f;
  border-color: #fff;
}

.oauth-btn.telegram {
  background: linear-gradient(135deg, #2fa9e8, #1f8fd6);
  color: #fff;
  border-color: transparent;
}

.oauth-btn svg {
  flex: none;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-faint);
  font-size: 12px;
  margin: 20px 0;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 7px;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-row a {
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 600;
}

.field input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

.field input:focus {
  border-color: var(--accent);
  outline: none;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 6px 0 22px;
  font-size: 13.5px;
  color: var(--text-dim);
}

.checkbox-row input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.btn-primary {
  width: 100%;
  padding: 13px 0;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #ff6b6b);
  color: #fff;
  font-weight: 800;
  font-size: 14.5px;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 8px 22px -8px rgba(255, 61, 113, .65);
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.auth-switch {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-dim);
  margin-top: 20px;
}

.auth-switch a {
  color: var(--accent);
  font-weight: 700;
}

.auth-foot-note {
  max-width: 420px;
  margin: 22px auto 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.auth-foot-note a {
  color: var(--accent-teal);
}

.tg-note {
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
  margin-top: -8px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}


/* =========================
   Modal
========================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: .25s;
  z-index: 999;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 100%;
  max-width: 500px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  /* Keep modal usable on small screens: limit height and allow scrolling */
  max-height: calc(100vh - 48px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  animation: modalPop .25s ease;
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(20px) scale(.96);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.modal h2 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 24px;
}

.modal p {
  color: var(--text-dim);
  line-height: 1.7;
  margin: 0 0 16px;
}

.modal ul {
  margin: 0 0 18px;
  padding-left: 20px;
  color: var(--text);
}

.modal li {
  margin: 8px 0;
}

.modal-note {
  font-size: 13px;
  color: var(--text-faint);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  transition: .15s;
}

.modal-close:hover {
  background: var(--accent);
}
/* =====================================================
   PROFILE
===================================================== */


.profile-page {
    position: relative;
    padding: 60px 0;
    overflow:hidden;
}


.profile-page::before {
    content:"";
    position:absolute;
    inset:-30% -10%;
    height:500px;
    background:var(--grad-aurora);
    filter:blur(45px);
    opacity:.7;
    pointer-events:none;
}


.profile-card,
.profile-box {
    position:relative;
    background:rgba(23,25,38,.75);
    backdrop-filter:blur(12px);
    border:1px solid var(--border);
    border-radius:var(--radius-card);
}



.profile-card {
    padding:35px;
    margin-bottom:24px;
}



.profile-top {
    display:flex;
    align-items:center;
    gap:30px;
}



.profile-avatar {

    width:120px;
    height:120px;
    border-radius:50%;
    object-fit:cover;

    border:3px solid var(--accent);

    box-shadow:
    0 0 30px rgba(255,61,113,.35);

}



.profile-info {
    display:flex;
    flex-direction:column;
    gap:14px;
}

.profile-info h1 {
    margin:0;
    font-family:var(--font-display);
    font-size:32px;
}

.profile-meta {
    display:flex;
    gap:16px;
    margin-top:2px;
}



.profile-meta div {

    background:var(--surface-2);

    border:1px solid var(--border);

    padding:12px 18px;

    border-radius:12px;

    min-width:150px;

}



.profile-meta span {

    display:block;

    color:var(--text-faint);

    font-size:12px;

    margin-bottom:4px;

}



.profile-meta strong {

    color:var(--text);

    font-size:14px;

}



.profile-grid {

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:24px;

}



.profile-box {

    padding:24px;

    min-height:220px;

}

.playback-settings-box {
    min-height: 0;
}

.playback-settings-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.playback-setting-row {
    margin: 0;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text);
}

.playback-setting-row input {
    width: 18px;
    height: 18px;
}

.playback-setting-row input:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.playback-settings-status {
    font-size: 12.5px;
    color: var(--accent-teal);
    min-height: 16px;
}



.box-header {

    display:flex;
    align-items:center;

    margin-bottom:20px;

}



.box-header h2 {

    margin:0;

    font-family:var(--font-display);

    font-size:20px;

}



.anime-placeholder {

    height:130px;

    border-radius:12px;

    background:var(--surface-2);

    border:1px dashed var(--border);

    display:flex;

    align-items:center;

    justify-content:center;

    color:var(--text-faint);

    font-size:14px;

}



.comments-box {

    margin-top:24px;

    min-height:200px;

}





@media(max-width:700px){


    .profile-page {

        padding:35px 0;

    }


    .profile-card {

        padding:24px;

    }


    .profile-top {

        flex-direction:column;

        text-align:center;

    }


    .profile-info h1 {

        font-size:24px;

    }


    .profile-meta {

        flex-direction:column;

        width:100%;

    }


    .profile-meta div {

        width:100%;

    }


    .profile-grid {

        grid-template-columns:1fr;

    }


}
.profile-roles {
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin:0;
}


[hidden] {
  display: none !important;
}
.role-badge {

    padding:5px 12px;

    border-radius:999px;

    font-size:12px;

    font-weight:800;

    text-transform:uppercase;

    letter-spacing:.05em;

    background:var(--surface-2);

    border:1px solid var(--border);

    color:var(--text-dim);

}



.role-badge.developer {

    color:#fff;

    background:linear-gradient(
        135deg,
        var(--accent-2),
        var(--accent)
    );

    border-color:transparent;

}



.role-badge.editor {

    color:#04211d;

    background:var(--accent-teal);

    border-color:transparent;

}



.role-badge.admin {

    color:white;

    background:linear-gradient(
        135deg,
        #ff3d71,
        #ffb347
    );

    border-color:transparent;

}
/* ============================================================
   PROFILE - liked / watched mini cards & comment list
   ============================================================ */
.mini-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 14px;
}

.mini-card {
  display: block;
}

.mini-card-cover {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  margin-bottom: 6px;
}

.mini-card-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.profile-comment {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.profile-comment:last-child {
  border-bottom: none;
}

.profile-comment-anime {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
}

.profile-comment-text {
  margin: 6px 0;
  font-size: 14px;
  color: var(--text);
}

.profile-comment-time {
  color: var(--text-faint);
  font-size: 12px;
}

/* ============================================================
   HOMEPAGE SEARCH OVERLAY (full-page panel)
   ============================================================ */
.search-icon-btn {
  /* always visible, both desktop and mobile - not part of .func_buts
     so the hamburger-collapse logic in app.js never hides it */
}

.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 11, 17, .92);
  backdrop-filter: blur(6px);
  z-index: 200;
  overflow-y: auto;
  padding: 90px 20px 40px;
}

.search-overlay.open {
  display: block;
}

body.search-open {
  overflow: hidden;
}

.search-panel {
  max-width: 720px;
  margin: 0 auto;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 14px 20px;
  color: var(--text-faint);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .4);
}

.search-box svg {
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
}

.search-box input::placeholder {
  color: var(--text-faint);
}

.search-close {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  display: flex;
  padding: 4px;
  flex-shrink: 0;
}

.search-close:hover {
  color: var(--text);
}

.search-results {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@media (max-width: 640px) {
  .search-overlay {
    padding: 76px 14px 30px;
  }

  .search-box {
    padding: 12px 16px;
  }
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}

.search-result-item:hover {
  background: var(--surface-2);
}

.search-result-cover {
  flex: 0 0 40px;
  width: 40px;
  height: 56px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.search-result-info {
  min-width: 0;
}

.search-result-name {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-meta {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-faint);
}

.search-empty-note {
  color: var(--text-faint);
  font-size: 13px;
  padding: 10px 4px;
}

.role-badge.user {
  color: var(--text-dim);
  background: var(--surface-2);
}

.role-badge.supporter {
  color: #04211d;
  background: linear-gradient(135deg, #2bd9c9, #7c5cff33);
  border-color: transparent;
}

.role-badge.owner {
  color: #1a1204;
  background: linear-gradient(135deg, #ffd166, #ff9f1c);
  border-color: transparent;
}
