:root {
  --bg-primary: #f4f1fa;
  --bg-secondary: #ffffff;
  --bg-footer: #eef2f7;
  --text-primary: #1e2a33;
  --text-muted: #5a6874;
  --heading-color: #194160;
  --border-color: #d5dde6;
  --link-color: #41637d;
  --link-hover: #0b3352;
  --quote-bg: #fff6b8;
  --card-bg: #ffffff;
  --card-text: #1e2a33;
  --input-bg: #ffffff;
  --nav-bg: #2c516f;
  --shadow-color: rgba(28, 48, 64, 0.08);
  --radius: 14px;
  --bs-body-bg: #f4f1fa;
  --bs-link-color: #41637d;
  --bs-link-hover-color: #0b3352;
}

[data-theme="dark"] {
  --bg-primary: #1b2a38;
  --bg-secondary: #243849;
  --bg-footer: #15202c;
  --text-primary: #d5e2ec;
  --text-muted: #8eabc0;
  --heading-color: #e6c37a;
  --border-color: #3d6d82;
  --link-color: #6eb4d6;
  --link-hover: #e6c37a;
  --quote-bg: #c9b85a;
  --card-bg: #243849;
  --card-text: #d5e2ec;
  --input-bg: #2c4154;
  --nav-bg: #2c516f;
  --shadow-color: rgba(0, 0, 0, 0.35);
  --bs-body-bg: #1b2a38;
  --bs-body-color: #d5e2ec;
  --bs-link-color: #6eb4d6;
  --bs-link-hover-color: #e6c37a;
  --bs-border-color: #3d6d82;
  --bs-tertiary-bg: #243849;
  --bs-secondary-color: #8eabc0;
}

html {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

a {
  color: var(--link-color);
}

a:hover {
  color: var(--link-hover);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
}

.dict-muted,
.text-muted {
  color: var(--text-muted) !important;
}

.color-bg-primary-0 {
  background-color: var(--nav-bg);
}

.site-search-bar {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

.word-card,
.site-section,
.site-panel {
  background-color: var(--card-bg);
  color: var(--card-text);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(28, 48, 64, 0.04), 0 12px 28px var(--shadow-color);
}

.word-card {
  padding: 2rem 1.35rem;
  margin-bottom: 1.75rem;
  border-left: 4px solid #c2985f;
}

.site-section {
  padding: 1.35rem 1.45rem;
  margin: 1.5rem 0;
  border-left: 4px solid #5b9bb8;
}

.site-panel {
  padding: 1.1rem 1.15rem;
  border-left: 4px solid #7a9e6a;
}

.site-section h3,
.site-panel h2 {
  margin-bottom: 0.85rem;
}

main h1 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0.4rem;
}

main h1 small {
  font-size: 1.7rem;
  font-weight: 600;
}

.okr-sub {
  color: var(--text-muted);
  font-weight: 500;
}

nav[aria-label="Okruszki"] .breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.navbar.color-bg-primary-0 {
  padding: 0.45rem 0.6rem;
  box-shadow: 0 6px 20px rgba(28, 48, 64, 0.18);
}

.navbar-brand img {
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
}

.navbar .nav-link {
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
}

.navbar .nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.navbar #search-data {
  border-radius: 999px;
  border: 0;
  height: 44px;
  background-color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.navbar #search-data:focus {
  border: 0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

a.btn.color-bg-primary-0 {
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.3rem;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(44, 81, 111, 0.22);
}

a.btn.color-bg-primary-0:hover {
  color: #fff !important;
  filter: brightness(1.08);
}

.jquery-accordion-menu {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 24px var(--shadow-color);
}

.site-section p a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.5rem;
  margin: 0 -0.5rem;
  border-radius: 8px;
}

.site-section p a:hover {
  background: rgba(44, 81, 111, 0.07);
  text-decoration: none;
}

.list-container {
  display: grid;
  gap: 0.4rem;
}

.list-item a:hover {
  text-decoration: none;
  color: var(--link-hover);
}

.btn-custom {
  border-radius: 8px;
}

hr {
  border: 0;
  border-top: 1px solid var(--border-color);
  opacity: 0.85;
  margin: 1.5rem 0;
}

[data-theme="dark"] h1 {
  color: #e6c37a;
}

[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: #9ec9e4;
}

[data-theme="dark"] .word-card {
  border-left: 4px solid #c2985f;
  background: #243849;
}

[data-theme="dark"] .site-section {
  border-left: 4px solid #5b9bb8;
}

[data-theme="dark"] .site-panel {
  border-left: 4px solid #7a9e6a;
}

[data-theme="dark"] .site-footer {
  border-top-color: #c2985f;
}

[data-theme="dark"] .color-primary-0,
[data-theme="dark"] .color-primary-1,
[data-theme="dark"] .color-primary-2,
[data-theme="dark"] .color-primary-3,
[data-theme="dark"] .color-primary-4 {
  color: #9ec9e4 !important;
}

[data-theme="dark"] .color-complement-0,
[data-theme="dark"] .color-complement-1,
[data-theme="dark"] .color-complement-2,
[data-theme="dark"] .color-complement-3,
[data-theme="dark"] .color-complement-4 {
  color: #e6c37a !important;
}

[data-theme="dark"] .word-card span[style*="color:#333"] {
  color: #b7c9d6 !important;
}

[data-theme="dark"] .breadcrumb {
  --bs-breadcrumb-divider-color: #8eabc0;
  --bs-breadcrumb-item-active-color: #d5e2ec;
}

[data-theme="dark"] .sister-edefinicje { color: #e39a4a !important; }
[data-theme="dark"] .sister-eodmiany { color: #e07088 !important; }
[data-theme="dark"] .sister-esylaby { color: #c98ad6 !important; }
[data-theme="dark"] .sister-ehasla { color: #6ea4ef !important; }
[data-theme="dark"] .sister-esynonimy { color: #d4b04a !important; }
[data-theme="dark"] .sister-eanagramy { color: #5cbf78 !important; }

.note.yellow {
  background: var(--quote-bg);
  color: #212529;
  border-radius: 10px;
  padding: 1rem 1.1rem 0.8rem;
  transform: rotate(0.5deg);
  box-shadow: 0 12px 24px rgba(28, 48, 64, 0.12);
}

.theme-button {
  flex-shrink: 0;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.theme-button:hover,
.theme-button:focus {
  background-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.site-footer {
  background: var(--bg-footer);
  color: var(--text-primary);
  border-top: 4px solid #c2985f;
  padding: 2.75rem 0 1.5rem;
  margin-top: 1.25rem;
}

.site-footer-brand {
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

.site-footer-lead {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.site-footer-links,
.site-footer-sites {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer-links li {
  margin-bottom: 0.45rem;
}

.site-footer-sites li {
  margin-bottom: 0.85rem;
}

.site-footer-sites a {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: inherit;
  font-weight: 400;
}

.site-footer-sites a:hover {
  text-decoration: none;
}

.site-footer-sites img {
  width: 24px;
  height: 24px;
  margin-top: 0.15rem;
}

.site-footer-site-name {
  display: block;
  font-weight: 700;
}

.site-footer-site-desc {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

.site-footer-copy {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.esl-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.esl-share-label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-right: 0.25rem;
  color: var(--text-primary);
}

.esl-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #fff !important;
  text-decoration: none !important;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.esl-share-btn:hover {
  transform: scale(1.08);
  color: #fff !important;
  opacity: 0.92;
}

.esl-share-native { background: #2c516f; }
.esl-share-facebook { background: #1877f2; }
.esl-share-x { background: #111; }
.esl-share-whatsapp { background: #25d366; }
.esl-share-telegram { background: #26a5e4; }
.esl-share-linkedin { background: #0a66c2; }
.esl-share-pinterest { background: #e60023; }
.esl-share-reddit { background: #ff4500; }
.esl-share-instagram { background: #e4405f; }
.esl-share-tiktok { background: #111; }
.esl-share-mail { background: #5b768c; }
.esl-share-copy { background: #2c516f; }

#esl-share-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(12px);
  background: #194160;
  color: #fff;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  z-index: 1080;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#esl-share-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 576px) {
  .theme-button {
    width: 36px;
    height: 36px;
  }

  #search-data:focus {
    width: 180px;
  }
}
