.site-header{
  position:sticky;
  top:0;
  z-index:900;
  background:var(--color-header-bg);
  border-bottom:1px solid var(--color-header-border);
  backdrop-filter: blur(12px);
}
.site-footer{
  position:relative;
  z-index:1;
}

main:not(.legal--guide){
  position:relative;
}
main:not(.legal--guide)::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 18% 12%, rgba(255,143,184,0.16), transparent 42%),
    radial-gradient(circle at 78% 18%, rgba(255,241,247,0.08), transparent 40%),
    linear-gradient(120deg, rgba(255,255,255,0.03), transparent 45%);
  opacity:0.7;
  pointer-events:none;
  z-index:-1;
}
main:not(.legal--guide)::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.02), rgba(255,255,255,0.02) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.015), rgba(255,255,255,0.015) 1px, transparent 1px, transparent 5px);
  opacity:0.25;
  pointer-events:none;
  z-index:-1;
  mix-blend-mode:screen;
}
main:not(.legal--guide) > *{
  position:relative;
}
.site-header__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px 0;
}
.brand{
  display:inline-flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
  font-weight:900;
  letter-spacing:0.2px;
  text-decoration:none;
}
.brand:hover{text-decoration:none;}
.brand__name{font-size:1.15rem;}
.brand__tagline{font-size:0.95rem;color:var(--color-muted);font-weight:700;}
.brand__badge{
  font-size:0.72rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:0.08em;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(var(--color-accent-rgb), 0.14);
  border:1px solid rgba(var(--color-accent-rgb), 0.42);
  color:var(--color-text);
}

.site-nav{
  display:none;
  align-items:center;
  gap:14px;
}
.site-nav a{
  color:var(--color-muted);
  font-weight:800;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid transparent;
  background:rgba(255,255,255,0.03);
}
.site-nav a:hover{
  color:var(--color-text);
  text-decoration:none;
  background:rgba(255,255,255,0.06);
  border-color:rgba(255,255,255,0.10);
}
.site-nav a .nav-link__title,
.site-nav a .nav-link__subtitle{
  display:block;
  line-height:1.1;
}
.site-nav a .nav-link__title{
  font-size:0.70rem;
  letter-spacing:0.10em;
  text-transform:uppercase;
}
.site-nav a .nav-link__subtitle{
  font-size:0.92rem;
  letter-spacing:0;
}
.site-nav a.is-active{
  color:var(--color-text);
  position:relative;
}
.site-nav a.is-active::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-6px;
  height:2px;
  border-radius:999px;
  background:linear-gradient(90deg, var(--color-accent), var(--color-primary-dark));
}
.site-nav a.is-highlight{
  color:var(--color-accent-2);
}

[data-theme="clear-mode"] .site-nav a{
  background:rgba(255,255,255,0.70);
  border-color:rgba(18, 20, 27, 0.08);
}

[data-theme="clear-mode"] .site-nav a:hover{
  background:rgba(255,255,255,0.92);
  border-color:rgba(var(--color-accent-rgb), 0.20);
}

.site-header__actions{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;justify-content:flex-end;}
.site-header__actions .btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}
.site-header__actions .btn i,
.site-header__actions .btn svg{
  width:18px;
  height:18px;
}
.site-header__actions .btn--explore{
  box-shadow:0 8px 20px rgba(var(--color-accent-rgb), 0.25);
}
.site-header__actions .btn--signup{
  border-color:transparent;
}
.site-header__actions .btn-login{
  font-size:13px;
  opacity:1;
  border:1px solid rgba(var(--color-accent-rgb), 0.45);
  background:rgba(var(--color-accent-rgb), 0.14);
  color:var(--color-text);
  box-shadow:0 6px 18px rgba(var(--color-accent-rgb), 0.22);
}
.site-header__actions .btn-login:hover{
  opacity:1;
  border-color:rgba(var(--color-accent-rgb), 0.7);
  background:rgba(var(--color-accent-rgb), 0.22);
}

.site-header__actions .btn--icon{
  width:40px;
  height:40px;
  padding:0;
  justify-content:center;
  border-radius:14px;
}

.site-header__avatar-link{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}
.site-header__avatar-link img{
  width:36px;
  height:36px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid rgba(var(--color-accent-rgb), 0.35);
  transition:border-color 0.2s;
}
.site-header__avatar-link:hover img{
  border-color:var(--color-accent);
}

/* Avatar dropdown wrapper */
.site-header__avatar-wrapper{
  position:relative;
  display:flex;
  align-items:center;
  flex-shrink:0;
}
.site-header__avatar-img{
  width:36px;
  height:36px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid rgba(var(--color-accent-rgb), 0.35);
  transition:border-color 0.2s;
  cursor:pointer;
}
.site-header__avatar-wrapper:hover .site-header__avatar-img{
  border-color:var(--color-accent);
}

/* Avatar dropdown menu */
.site-header__avatar-dropdown{
  display:none;
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  min-width:200px;
  background:var(--color-surface, #fff);
  border:1px solid var(--color-border, rgba(18,20,27,0.12));
  border-radius:var(--radius-md, 12px);
  box-shadow:0 12px 32px rgba(0,0,0,0.18);
  padding:6px 0;
  z-index:1000;
  flex-direction:column;
}
.site-header__avatar-dropdown.is-open{
  display:flex;
}
.pub-dropdown-user{
  padding:10px 14px;
  border-bottom:1px solid var(--color-border, rgba(18,20,27,0.08));
  font-size:0.88rem;
}
.pub-dropdown-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 14px;
  font-size:0.84rem;
  color:var(--color-text, #1e293b);
  text-decoration:none;
  transition:background 0.15s;
}
.pub-dropdown-item:hover{
  background:rgba(var(--color-accent-rgb, 142,36,170), 0.08);
}
.pub-dropdown-item svg{
  width:16px;
  height:16px;
  flex-shrink:0;
  opacity:0.7;
}
.pub-dropdown-divider{
  height:1px;
  background:var(--color-border, rgba(18,20,27,0.08));
  margin:4px 0;
}
.pub-dropdown-logout{
  color:#ef4444;
}
.pub-dropdown-logout:hover{
  background:rgba(239,68,68,0.08);
}

.site-header__msg-link{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius:14px;
  color:var(--color-text);
  opacity:0.85;
  transition:opacity 0.2s;
}
.site-header__msg-link:hover{
  opacity:1;
}
.site-header__msg-link i,
.site-header__msg-link svg{
  width:20px;
  height:20px;
}
.site-header__msg-badge{
  position:absolute;
  top:4px;
  right:4px;
  min-width:16px;
  height:16px;
  padding:0 4px;
  border-radius:999px;
  background:var(--color-accent);
  color:#fff;
  font-size:0.65rem;
  font-weight:800;
  line-height:16px;
  text-align:center;
}

.guide-spotlight .card{
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
  background:linear-gradient(135deg, rgba(var(--color-accent-rgb), 0.16), rgba(255,255,255,0.04));
  border:1px solid rgba(255,255,255,0.10);
  overflow:hidden;
}
.guide-spotlight__media{
  border-radius:16px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.04);
  box-shadow:0 14px 30px rgba(0,0,0,0.35);
}
.guide-spotlight__media img{
  width:100%;
  height:100%;
  aspect-ratio:3 / 4;
  object-fit:cover;
  display:block;
}
.guide-spotlight__label{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:0.75rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:0.08em;
  color:var(--color-accent-2);
}
.guide-spotlight__content{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.guide-spotlight__actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;}

@media (min-width: 980px){
  .guide-spotlight .card{
    grid-template-columns:minmax(220px, 0.6fr) 1fr;
    align-items:center;
  }
}

.site-footer{
  margin-top:60px;
  border-top:1px solid var(--color-footer-border);
  background:var(--color-footer-bg);
}
.site-footer__inner{
  padding:26px 0;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.footer-links{display:flex;flex-wrap:wrap;gap:14px;}
.footer-links a{color:var(--color-muted);font-weight:800;text-decoration:none;}
.footer-links a:hover{color:var(--color-text);text-decoration:none;}

@media (min-width: 980px){
  .site-nav{display:flex;}
  .site-footer__inner{flex-direction:row;align-items:center;justify-content:space-between;}
}

@media (max-width: 720px){
  .site-header__inner{
    flex-direction:column;
    align-items:flex-start;
  }
  .site-header__actions{
    width:100%;
    justify-content:flex-start;
    flex-wrap:wrap;
  }
  .site-header__actions .btn__label{
    display:none;
  }
  .site-header__actions .btn-login{
    width:40px;
    height:40px;
    padding:0;
    justify-content:center;
    border-radius:14px;
    border:1px solid rgba(var(--color-accent-rgb), 0.65);
    background:rgba(var(--color-accent-rgb), 0.18);
  }
  .site-header__actions .btn--signup{
    padding:10px 18px;
    border-radius:14px;
    font-weight:700;
    font-size:14px;
    box-shadow:0 6px 16px rgba(var(--color-accent-rgb), 0.35);
  }
  .site-header__actions .btn--signup .btn__label{
    display:inline;
  }
  .site-header__actions .btn--signup i,
  .site-header__actions .btn--signup svg{
    width:20px;
    height:20px;
  }
}

/* Share Module */
.share-module {
  margin: 40px 0 0;
  background: linear-gradient(135deg, rgba(var(--color-accent-rgb), 0.12), rgba(15, 23, 42, 0.2));
  border: 1px solid rgba(var(--color-accent-rgb), 0.25);
  border-radius: 20px;
  padding: 24px;
}

.share-module--sticky{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:950;
  width:min(360px, calc(100% - 32px));
  margin:0;
  box-shadow:0 18px 42px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
}

@media (max-width: 1024px){
  .share-module--sticky{
    right:12px;
    bottom:16px;
  }
}

@media (max-width: 768px){
  .share-module--sticky{
    right:14px;
    bottom:14px;
    width:calc(100% - 28px);
    padding:18px;
  }
  .share-module--sticky .share-module__actions{
    gap:10px;
  }
  .share-module--sticky .share-module__btn{
    padding:9px 12px;
  }
}

.share-module__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.share-module__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.share-module__content h3 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  color: var(--color-text);
}

.share-module__content p {
  margin: 0;
  color: var(--color-muted);
}

.share-module__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.share-module__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.6);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.share-module__btn:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--color-accent-rgb), 0.6);
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="clear-mode"] .share-module {
  background: linear-gradient(135deg, rgba(var(--color-accent-rgb), 0.10), rgba(255, 255, 255, 0.65));
  border-color: rgba(var(--color-accent-rgb), 0.22);
}

[data-theme="clear-mode"] .share-module--sticky{
  box-shadow: 0 18px 42px rgba(18, 20, 27, 0.16);
}

[data-theme="clear-mode"] .share-module__btn {
  border: 1px solid rgba(var(--color-accent-rgb), 0.18);
  background: rgba(255, 255, 255, 0.86);
  color: var(--color-text);
}

[data-theme="clear-mode"] .share-module__btn:hover {
  border-color: rgba(var(--color-accent-rgb), 0.40);
  background: rgba(var(--color-accent-rgb), 0.08);
}

@media (max-width: 768px) {
  .share-module {
    padding: 20px;
  }

  .share-module__inner {
    align-items: flex-start;
  }
}
