/* rem tabanlı tipografi — tarayıcı %90 zoom görünümüne yakın */
html {
  font-size: 90%;
}

/* Sağ üst: bayraklar + giriş — tüm sayfalar */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 0.65rem 2rem;
  max-width: 72rem;
  margin: 0 auto;
  box-sizing: border-box;
}

.site-header .site-logo {
  font-size: 1rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  padding-top: 0.15rem;
}

.site-header .site-logo:hover {
  text-decoration: underline;
}

.site-header-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  flex-shrink: 0;
}

.lang-flags {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.lang-flag {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.35rem;
  border-radius: 6px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.6);
}

.lang-flag:hover {
  transform: scale(1.05);
}

.lang-flag.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
  background: #fff;
}

.lang-flag-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.lang-flag-svg {
  display: block;
  width: 1.65rem;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.site-auth {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem 1.35rem;
  font-size: 0.9rem;
  line-height: 1.35;
  max-width: 100%;
}

.site-auth-user {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.65rem;
}

.site-auth-user > * + * {
  margin-left: 0;
}

.site-auth-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem 1.15rem;
  max-width: 100%;
}

.site-auth-links > * {
  flex-shrink: 0;
}

.site-auth a,
.site-auth .site-mailbox-link,
.site-auth-links a,
.site-auth-links .site-mailbox-link {
  display: inline-flex;
  align-items: center;
  margin: 0;
  line-height: 1.35;
  white-space: nowrap;
}

.site-auth a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.site-learning-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.site-learning-label {
  white-space: nowrap;
}

.site-learning-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  background: #8b5cf6;
  color: #fff;
  flex-shrink: 0;
}

.site-auth .site-admin-link {
  color: #7c3aed;
  font-weight: 600;
}

.site-auth a:hover {
  text-decoration: underline;
}

.site-auth .user-nick {
  color: #475569;
  font-weight: 600;
}

.site-auth .user-score-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  line-height: 1.2;
}

.site-auth .user-pts {
  color: #1d4ed8;
  font-size: 0.88rem;
  font-weight: 700;
}

/* Neler yeni — theme toggle solunda */
.whats-new-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--theme-text-secondary, #475569);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.2rem 0.35rem 0.2rem 0.15rem;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
  max-width: 9.5rem;
}

.whats-new-nav-link:hover {
  color: var(--theme-link, #2563eb);
  background: rgba(37, 99, 235, 0.08);
  text-decoration: none;
}

.whats-new-nav-burst {
  width: 1.85rem;
  height: 1.85rem;
  flex-shrink: 0;
  animation: whats-new-nav-burst-pulse 1.6s ease-in-out infinite;
}

.whats-new-nav-burst svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 1px 3px rgba(220, 38, 38, 0.22));
}

.whats-new-nav-burst polygon {
  fill: #ef4444;
  stroke: #b91c1c;
  stroke-width: 1.5;
}

.whats-new-nav-burst text {
  fill: #fff;
  font-size: 11px;
  font-weight: 800;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0.03em;
}

.whats-new-nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes whats-new-nav-burst-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.05);
  }
}

html[data-theme="dark"] .whats-new-nav-burst polygon {
  fill: #f87171;
  stroke: #dc2626;
}

@media (max-width: 640px) {
  .whats-new-nav-label {
    display: none;
  }

  .whats-new-nav-link {
    max-width: none;
    padding: 0.2rem;
  }
}

.site-auth .user-rank {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

@media (max-width: 600px) {
  .site-header {
    padding: 0.75rem 1rem;
  }
}
