/* Общий стиль FunPyCode: шапка, подвал, базовая типографика */

:root {
  --fp-teal: #0d9488;
  --fp-teal-dark: #0f766e;
  --fp-teal-light: #ccfbf1;
  --fp-ink: #0f172a;
  --fp-muted: #64748b;
  --fp-cream: #fffbeb;
  --fp-surface: #f8fafc;
}

body.site-body {
  font-family: "Nunito", system-ui, sans-serif;
  background-color: var(--fp-surface);
  color: var(--fp-ink);
}

/* —— Header —— */
.site-nav {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 0 rgba(15, 118, 110, 0.06);
}

.site-nav__inner {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
}

@media (min-width: 768px) {
  .site-nav__inner {
    padding: 0.75rem 2rem;
  }
}

.site-nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--fp-teal-dark);
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.site-logo:hover {
  color: var(--fp-teal);
}

.site-logo img {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 0.5rem;
}

.site-footer__brand img {
  object-fit: contain;
  border-radius: 0.5rem;
}

.site-nav__burger {
  display: flex;
  padding: 0.5rem;
  border-radius: 0.65rem;
  color: var(--fp-muted);
  border: none;
  background: transparent;
  cursor: pointer;
}

.site-nav__burger:hover {
  background: #f1f5f9;
  color: var(--fp-teal-dark);
}

@media (min-width: 768px) {
  .site-nav__burger {
    display: none;
  }
}

.site-nav__desktop {
  display: none;
  align-items: center;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .site-nav__desktop {
    display: flex;
  }
}

.site-nav__link {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--fp-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-nav__link:hover {
  color: var(--fp-teal);
}

.site-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.site-chip--xp {
  background: var(--fp-teal-light);
  color: var(--fp-teal-dark);
}

.site-chip--coins {
  background: #fffbeb;
  color: #b45309;
}

.site-chip svg {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}

.site-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 0.75rem;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.site-btn:hover {
  transform: translateY(-1px);
}

.site-btn--primary {
  background: var(--fp-teal);
  color: #fff;
}

.site-btn--primary:hover {
  background: var(--fp-teal-dark);
}

.site-user {
  position: relative;
}

.site-user__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--fp-ink);
}

.site-user__toggle:hover {
  border-color: var(--fp-teal);
  color: var(--fp-teal-dark);
}

.site-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
}

.site-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fp-teal-light);
  color: var(--fp-teal-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.site-user__caret {
  font-size: 0.65rem;
  color: var(--fp-muted);
  margin-left: 0.1rem;
}

.site-user__menu {
  position: absolute;
  right: 0;
  margin-top: 0.5rem;
  width: 12rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
  border: 1px solid #e2e8f0;
  padding: 0.35rem 0;
  z-index: 50;
}

.site-user__menu a,
.site-user__menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fp-ink);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.site-user__menu a:hover,
.site-user__menu button:hover {
  background: #f0fdfa;
  color: var(--fp-teal-dark);
}

.site-user__menu hr {
  margin: 0.35rem 0;
  border: none;
  border-top: 1px solid #f1f5f9;
}

/* Mobile menu */
.site-nav__mobile {
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
}

@media (min-width: 768px) {
  .site-nav__mobile {
    display: none !important;
  }
}

.site-nav__mobile .site-nav__link {
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: 0.65rem;
}

.site-nav__mobile .site-nav__link:hover {
  background: #f0fdfa;
}

.site-nav__mobile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
}

/* —— Footer —— */
.site-footer {
  margin-top: 3rem;
  background: linear-gradient(160deg, #042f2e 0%, #0f766e 100%);
  color: rgba(255, 255, 255, 0.9);
}

.site-footer__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 2rem;
}

.site-footer__top {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .site-footer__top {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #fff;
  font-weight: 900;
  font-size: 1.15rem;
}

.site-footer__brand img {
  width: 2rem;
  height: 2rem;
}

.site-footer__tagline {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 20rem;
  line-height: 1.5;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.site-footer__links a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

.site-footer__links a:hover {
  color: #fde68a;
}

.site-footer__bottom {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

@media (min-width: 768px) {
  .site-footer__bottom {
    text-align: left;
  }
}
