/* Base Styles */
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  line-height: 1.6;
  background-color: #fdfdfd;
  color: #222;
}

main {
  padding: 2rem;
  max-width: 960px;
  margin: 0 auto;
}

section {
  margin-bottom: 3rem;
}

h2 {
  color: #2c3e50;
  border-bottom: 2px solid #eee;
  padding-bottom: 0.25rem;
}

/* Navbar */
.navbar {
  background-color: #121212 !important;
  color: white;
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 999;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.navbar-logo {
  font-size: 1.2rem;
  font-weight: bold;
}

.navbar-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.navbar-links li {
  position: relative;
  display: flex;
  align-items: center;
}

.navbar-links a {
  text-decoration: none;
  color: white;
  font-weight: 500;
}

.navbar-links a:hover {
  text-decoration: underline;
}

/* Dropdown Parent */
.dropdown {
  position: relative;
}

/* Dropdown Menu */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 2rem;
  left: 0;
  background-color: #222;
  color: white;
  list-style: none;
  padding: 0.5rem 0;
  min-width: 150px;
  border: 1px solid #444;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 1000;
}

.dropdown-menu li {
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

.dropdown-menu li a {
  color: white;
  text-decoration: none;
  display: block;
}

.dropdown-menu li:hover {
  background-color: #444;
}

/* Trigger Dropdown on Hover */
.dropdown:hover .dropdown-menu,
.dropdown-label:hover + .dropdown-menu,
.dropdown-menu:hover {
  display: block;
}

/* Dropdown Label */
.dropdown-label {
  color: white;
  font-weight: 500;
  padding: 0.5rem 0;
  display: inline-block;
  cursor: pointer;
}

/* Homepage Fullscreen Fix */
body.homepage {
  background-color: #121212 !important;
  background-image: none !important;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  margin: 0;
  padding: 0;
}

body.homepage .hero {
  background-color: #121212;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  margin: 0;
  padding: 0;
  overflow: visible;
  flex-direction: column;
}

.hero-logo {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

body.dark-theme {
  background-color: #121212;
  color: #f2f2f2;
}

body.dark-theme .nav-link:hover {
  color: #cccccc !important;
}

body:not(.dark-theme) .nav-link:hover {
  color: #dddddd !important;
}

body.dark-theme .navbar {
  background-color: #121212 !important;
}

body.dark-theme a {
  color: #89c4f4;
}

body.dark-theme .dropdown-menu {
  background-color: #2b2b2b;
  color: #fff;
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3 {
  color: #fff !important;
}

body.dark-theme pre,
body.dark-theme code {
  background-color: #1e1e1e !important;
  color: #f8f8f2 !important;
  border-radius: 5px;
  padding: 0.75em;
  display: block;
  overflow-x: auto;
  font-family: Consolas, Monaco, 'Courier New', monospace;
}

body:not(.dark-theme) pre,
body:not(.dark-theme) code {
  background-color: #f4f4f4;
  color: #333;
}

body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
}

.spacer {
  height: 300px;
  background-color: #121212;
  width: 100%;
}

/* .language-selector {
  position: absolute;
  top: 15px;
  right: 20px;
  z-index: 1000;
}

#language-dropdown {
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 14px;
} */

nav.navbar {
  position: fixed !important;
  top: 0;
  width: 100%;
  z-index: 1050;
}

.navbar-custom {
  background-color: #121212 !important;
}

body.homepage main {
  padding: 0;
  margin: 0;
  background-color: #121212 !important;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  flex-direction: column;
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='white' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
body.homepage .hero {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

body.homepage .hero-logo {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.navbar-dark .navbar-nav .nav-link {
  color: #ffffff !important;
  font-weight: 500;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: #cccccc !important;
}

.dropdown-menu-dark .dropdown-item {
  color: #ffffff;
}

.dropdown-menu-dark .dropdown-item:hover {
  background-color: #343a40;
  color: #cccccc;
}
.navbar a,
.navbar .dropdown-label {
  color: white !important;
}

body.dark-theme .navbar a,
body.dark-theme .dropdown-label {
  color: white !important;
}
.navbar .nav-link,
.navbar .dropdown-label {
  color: #ffffff !important;
}
body.dark-theme .navbar .nav-link {
  color: #ffffff !important;
}
body.pdf-page main {
  padding-top: 80px;
}
.nav-tabs .nav-link.active {
  color: #0d6efd !important;         /* Bootstrap primary blue */
  background-color: transparent !important;
  border: none !important;
  border-bottom: 3px solid #0d6efd !important;  /* Blue underline only */
  font-weight: 600;
}

/* Fix for missing text color inside <main> in dark mode */
body.dark-theme main,
body.dark-theme main p,
body.dark-theme main a,
body.dark-theme main li {
  color: #f2f2f2 !important;
}


main {
  background: white;
  color: #222;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.05);
  max-width: 850px;
  margin: auto;
}

body.dark-theme main {
  background-color: #1f1f1f;
  color: #f2f2f2;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.05);
  border: none;
}


body.dark-theme .wallet-panel,
body.dark-theme .custom-container {
  background-color: rgba(0, 0, 0, 0.85) !important;
  color: #f2f2f2 !important;
}

body.dark-theme .custom-container h2,
body.dark-theme .custom-container label,
body.dark-theme .custom-container input,
body.dark-theme .custom-container textarea,
body.dark-theme .custom-container select,
body.dark-theme .custom-container button {
  color: #f2f2f2 !important;
  background-color: #222 !important;
  border-color: #555 !important;
}

body.dark-theme .wallet-page {
    background-color: #1f1f1f;
    color: #f2f2f2;
}

body.dark-theme .wallet-page h1,
body.dark-theme .wallet-page h2,
body.dark-theme .wallet-page p,
body.dark-theme .wallet-page a {
    color: #f2f2f2 !important;
}

body.dark-theme .wallet-page * {
  color: #f2f2f2 !important;
  background-color: transparent !important;
  border-color: #888 !important;
}
/* === Wallet page dark-mode hardening === */

/* Ensure the wallet container itself flips to dark */
body.dark-theme .wallet-page,
body.dark-theme .custom-container,
body.dark-theme .wallet-section {
  background-color: #1f1f1f !important;
  color: #f2f2f2 !important;
}

/* Make *all* text inside the wallet section readable */
body.dark-theme .wallet-section,
body.dark-theme .wallet-section * {
  color: #f2f2f2 !important;
}

/* Buttons & links inside wallet section */
body.dark-theme .wallet-section a,
body.dark-theme .wallet-section .button-link,
body.dark-theme .wallet-section .btn {
  background-color: #444 !important;
  color: #fff !important;
  border-color: #666 !important;
}
body.dark-theme .wallet-section a:hover,
body.dark-theme .wallet-section .button-link:hover,
body.dark-theme .wallet-section .btn:hover {
  background-color: #555 !important;
  color: #fff !important;
}

/* Inputs, selects, textareas */
body.dark-theme .wallet-section input,
body.dark-theme .wallet-section select,
body.dark-theme .wallet-section textarea {
  background-color: #222 !important;
  color: #f2f2f2 !important;
  border-color: #555 !important;
}

/* Horizontal rules and subtle dividers */
body.dark-theme .wallet-section hr,
body.dark-theme .wallet-section .border,
body.dark-theme .wallet-section .border-bottom {
  border-color: #444 !important;
}

/* Light-mode baseline for wallet section (prevents accidental translucency) */
.wallet-section {
  background: #fff;            /* keep light look in light mode */
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0,0,0,.05);
}

/* If Bootstrap ‘muted’ text is used, make it readable in dark mode */
body.dark-theme .wallet-section .text-muted,
body.dark-theme .wallet-section .lead {
  color: #cfd6dc !important;
}

/* Wallet page card */
.wallet-page .wallet-section {
  width: min(1100px, 92%);
  margin: 4rem auto;
  padding: 2rem;
  background: var(--lemni-card-bg);
  border-radius: 12px;
  box-shadow: var(--lemni-card-shadow);
}

/* Light theme (default) */
:root {
  --lemni-card-bg: #ffffff;
  --lemni-card-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Dark theme */
[data-bs-theme="dark"] {
  --lemni-card-bg: rgba(20, 24, 28, 0.85);  /* subtle translucent card */
  --lemni-card-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

/* Optional polish, matches your good second screenshot */
.wallet-page h1 { 
  font-size: clamp(2rem, 3.5vw, 3rem); 
  font-weight: 700; 
  margin-bottom: 1rem;
}
.wallet-page p { max-width: 70ch; }
