@font-face {
  font-family: 'Poppins';
  src: url('/font/poppins.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

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

/* Base */
html,
body {
  margin: 0;
  padding: 0;
  background-color: #020617; /* fallback, ciemne tło */
  color: #e5e7eb;
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Ogólna typografia */
p,
a,
label {
  margin: 0;
  padding: 0;
  font-size: 1rem;
  color: #e5e7eb;
}

/* Improve contrast for text-muted in dark mode */
.text-muted {
  color: #9ca3af !important;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* Nagłówki */
h1,
h2 {
  text-align: center;
  color: #f9fafb;
  margin: 25px 0;
  font-weight: 600;
}

h1 {
  font-size: 1.75em;
  letter-spacing: 0.03em;
}

h2 {
  font-size: 1.5em;
}

/* Podkreślenie przycisku "Sign up" (used on marketing CTA buttons, e.g. index.php hero) */
.m-btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #f9fafb;
  opacity: 1;
}

.m-btn-primary:hover,
.m-btn-primary:focus-visible {
  background: linear-gradient(135deg, #38bdf8, #3b82f6);
}

/* =====================
   SIDEBAR NAVIGATION
   ===================== */

html.has-sidebar body {
  padding-left: 220px;
}

.cf-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background: #161826;
  border-right: 1px solid rgba(233, 233, 237, 0.16);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: 'Inter', 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.cf-sidebar-logo {
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(233, 233, 237, 0.16);
  flex-shrink: 0;
}

.cf-sidebar-logo img {
  display: block;
}

.cf-sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 12px 8px;
  gap: 2px;
  flex: 1;
}

.cf-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 8px;
  color: #b2b6ca;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.cf-nav-item i {
  width: 18px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.cf-nav-item:hover {
  background: rgba(233, 233, 237, 0.07);
  color: #cfd3e5;
  text-decoration: none;
}

.cf-nav-item.cf-nav-active {
  color: #d2cefd;
  background: #2b2741;
}

.cf-nav-item.cf-nav-active i {
  color: #d2cefd;
}

/* Logged-out sidebar footer (language switcher, log in, sign up) */
.cf-sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 8px;
  border-top: 1px solid rgba(233, 233, 237, 0.16);
  flex-shrink: 0;
}

.cf-nav-item.cf-nav-cta {
  background: linear-gradient(135deg, #9184d9, #796cbf);
  color: #f3f5fe;
  margin-top: 4px;
}

.cf-nav-item.cf-nav-cta i {
  color: #f3f5fe;
}

.cf-nav-item.cf-nav-cta:hover {
  background: linear-gradient(135deg, #a7a1db, #9184d9);
  color: #f3f5fe;
}

/* Disabled / coming soon */
.cf-nav-item.cf-nav-soon {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
  position: relative;
}

.cf-soon-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 600;
  background: rgba(233, 233, 237, 0.15);
  color: #cfd3e5;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

#nav-friends-badge {
  background-color: #ef4444 !important;
  color: #ffffff !important;
  font-size: 0.72rem;
  padding: 3px 6px;
  font-weight: 700;
  border-radius: 99px;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
  animation: pulse-glow 2s infinite;
}

#nav-friends-badge:empty {
  display: none !important;
}

/* Global utility fallback for pages not loading Bootstrap */
.d-none {
  display: none !important;
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  }
  70% {
    box-shadow: 0 0 8px 3px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* Więcej toggle */
.cf-nav-more-toggle {
  position: relative;
}

/* Więcej submenu */
.cf-more-submenu {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 4px 8px;
  margin: 0 0 4px 0;
}

.cf-more-submenu.cf-more-open {
  display: flex;
}

.cf-more-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #b2b6ca;
  font-size: 0.875rem;
  font-weight: 400;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.cf-more-item i {
  width: 16px;
  text-align: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.cf-more-item:hover {
  background: rgba(233, 233, 237, 0.07);
  color: #cfd3e5;
  text-decoration: none;
}

.cf-more-item.active {
  color: #d2cefd;
}

.cf-more-logout {
  margin-top: 4px;
  color: #ef4444;
  opacity: 0.75;
}

/* Language switcher */
.cf-lang-form {
  display: inline-flex;
  margin: 0;
}

.cf-lang-select {
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0;
}

.cf-lang-select:focus-visible {
  outline: 1px solid #9184d9;
}

.cf-more-lang .cf-lang-select option {
  color: #0f172a;
}

.cf-more-logout:hover {
  color: #ef4444;
  opacity: 1;
  background: rgba(239, 68, 68, 0.08);
}

.cf-lang-form,
.cf-lang-select {
  flex-shrink: 0;
}

.cf-lang-select {
  -webkit-appearance: none;
  appearance: none;
  max-width: 7.5rem;
}

/* Engine Eval Preview (Settings) */
#eval-style-preview .ot-assist-eval-value {
  font-weight: 800;
  font-size: 1.1rem;
  padding: 2px 8px;
  border-radius: 6px;
}
#eval-style-preview:not(.eval-style-classic) .ot-assist-eval-value {
  background: rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}
#eval-style-preview:not(.eval-style-classic) .ot-assist-eval-value.eval-white {
  color: #38bdf8;
}
#eval-style-preview:not(.eval-style-classic) .ot-assist-eval-value.eval-black {
  color: #f87171;
}
#eval-style-preview.eval-style-classic .ot-assist-eval-value.eval-white {
  background: #f1f5f9;
  color: #0f172a;
}
#eval-style-preview.eval-style-classic .ot-assist-eval-value.eval-black {
  background: #0f172a;
  color: #f1f5f9;
  border: 1px solid #334155;
}
