/* Base variables and global rules */
.navbar > * {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

:root {
  --bg-color: var(--saved-bg, #e5ecfb);
  --btn-color: var(--saved-btn, #b12c2c);
  --btn-font-color: var(--saved-btn-font, #fff);
  --correct-color: #4caf50;
  --wrong-color: #c62828;
  --base-font: 18px;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg-color);
  color: #111;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-size: var(--base-font);
}

.navbar {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0;
  background: var(--btn-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

main {
  padding: 0.25rem 0 1rem;
}

* {
  box-sizing: border-box;
}

.container {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

.pill-btn {
  display: inline-block;
  padding: 0.6em 0.8em;
  margin: 0.25rem;
  border: none;
  border-radius: 2rem;
  background: var(--btn-color);
  color: var(--btn-font-color);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgb(80 0 80 / 0.10);
  transition: box-shadow 0.2s, transform 0.12s, background 0.2s, filter 0.18s;
  white-space: normal;
}

/* Enhanced Buttons & Inputs */
.pill-btn,
input[type="text"],
input[type="search"],
input[type="number"] {
  border-radius: 2rem !important;
  box-shadow: 0 2px 8px rgb(80 0 80 / 0.10);
  transition: box-shadow 0.2s, transform 0.12s, background 0.2s, filter 0.18s;
}

input[type="text"],
input[type="search"],
input[type="number"] {
  padding: 0.6em 1.2em !important;
  border: 1.5px solid #b9a1ce !important;
  font-size: 1rem;
}

.pill-btn:focus,
input[type="text"]:focus,
input[type="search"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px #cebae9, 0 2px 8px rgb(80 0 80 / 0.15);
  filter: brightness(1.08);
  transform: scale(1.04);
}

.pill-btn:hover {
  filter: brightness(1.13) drop-shadow(0 1px 6px #c5b8e2);
  box-shadow: 0 4px 16px rgb(70 50 130 / 0.16);
  cursor: pointer;
  transform: scale(1.05);
}

/* Mobile-specific button optimizations */
@media (hover: none) and (pointer: coarse) {
  .pill-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  
  .pill-btn:hover {
    /* Disable hover effects on touch devices */
    filter: none;
    box-shadow: 0 2px 8px rgb(80 0 80 / 0.10);
    transform: none;
  }
  
  .pill-btn:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
  
  input[type="text"],
  input[type="search"],
  input[type="number"] {
    min-height: 44px;
    font-size: 16px; /* Prevent zoom on iOS */
  }
}

.logo {
  max-width: 350px;
  width: 100%;
  min-width: 120px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.nav-btn {
  background: none !important;
  border: none !important;
  color: inherit !important;
  font-size: 1.25rem !important;
  cursor: pointer !important;
  padding: 0;
  margin: 0;
  outline: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 0.3em;
  font-family: inherit;
  transition: text-decoration 0.2s;
}

.icon {
  font-size: 1.875rem;
}

.nav-btn:focus,
.nav-btn:hover {
  text-decoration: none;
}
