.theme-switcher {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--color-text-primary);
  z-index: 100;
  transition: transform 0.3s ease;
}

.theme-switcher:hover {
  transform: scale(1.1);
}

body {
  font-family: var(--font-family-main);
  background: var(--color-background);
  color: var(--color-text-primary);
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  padding: 2rem;
  transition: background 0.3s ease, color 0.3s ease;
  height: fit-content;
}

#container {
  background: var(--color-content-bg);
  max-width: 600px;
  width: 100%;
  border-radius: var(--border-radius-main);
  box-shadow: var(--box-shadow-main);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease;
  height: fit-content;
  align-self: center;
}

#content {
  padding: 2rem 3rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

header {
  text-align: center;
  /* margin-bottom: 2rem; */
}

.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.logo {
  width: 80px;
  height: auto;
  margin-bottom: 1rem;
}

h1 {
  font-size: var(--font-size-h1);
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

h2 {
  font-size: var(--font-size-h2);
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

header p {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-bold);
}

main .wrapper {
  display: flex;
  justify-content: center;
}

nav#converters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

nav#converters .button {
  background-color: var(--color-button-bg);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius-button);
  text-decoration: none;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-button);
  box-shadow: 0 4px 8px var(--color-button-shadow);
  transition: all 0.3s ease;
}

nav#converters .button:hover,
nav#converters .button:focus {
  background-color: var(--color-button-hover);
  box-shadow: 0 6px 12px var(--color-button-hover-shadow);
  transform: translateY(-2px);
  outline: none;
}

nav#converters .button:active {
  transform: translateY(0);
  box-shadow: 0 4px 8px rgba(41, 128, 185, 0.4);
}

footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-footer-text);
  border-top: 1px solid var(--color-border);
}

.dark-logo {
  display: none;
}

.light-logo {
  display: block;
}

[data-theme="dark"] .dark-logo {
  display: block;
}

[data-theme="dark"] .light-logo {
  display: none;
}

[data-theme="dark"] #container {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] nav#converters .button {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] nav#converters .button:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Responsive adjustments */
@media (max-width: 480px) {
  body {
    padding: 1rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  header p {
    font-size: 1.03rem;
  }


  #content {
    padding: 1.5rem 1.5rem;
  }

  nav#converters {
    gap: 0.75rem;
  }

  nav#converters .button {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  h1 {
    font-size: 2rem;
  }
}

/* X (Twitter) & Facebook Share Buttons - Theme Aware */
.social-share {
  display: flex;
  gap: 12px;
  margin: 1.5rem 0 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.share-x,
.share-facebook {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: var(--social-shadow);
  border: 1px solid transparent;
}

/* X (Twitter) Button - Updated for X branding */
.share-x {
  background-color: #000000;
  /* X's black color */
  color: white;
}

.share-x:hover {
  background-color: #1a1a1a;
  /* Slightly lighter black */
  transform: translateY(-1px);
  box-shadow: var(--social-hover-shadow-x);
}

/* Facebook Button */
.share-facebook {
  background-color: #4267B2;
  color: white;
}

.share-facebook:hover {
  background-color: #3b5a9a;
  transform: translateY(-1px);
  box-shadow: var(--social-hover-shadow-facebook);
}

/* Icons - Updated X logo */
.share-x::before,
.share-facebook::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: brightness(0) invert(1);
  /* Ensure icons stay white */
}

.share-x::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E");
}

.share-facebook::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22.675 0H1.325C.593 0 0 .593 0 1.325v21.351C0 23.407.593 24 1.325 24H12.82v-9.294H9.692v-3.622h3.128V8.413c0-3.1 1.893-4.788 4.659-4.788 1.325 0 2.463.099 2.795.143v3.24l-1.918.001c-1.504 0-1.795.715-1.795 1.763v2.313h3.587l-.467 3.622h-3.12V24h6.116c.73 0 1.323-.593 1.323-1.325V1.325C24 .593 23.407 0 22.675 0z'/%3E%3C/svg%3E");
}

/* Share Prompt - Theme Aware */
.share-prompt {
  margin-top: 1rem;
  text-align: center;
  animation: pulse 2s infinite;
  color: var(--share-prompt-color);
  background-color: var(--share-prompt-bg);
  padding: 0.5rem;
  border-radius: 4px;
}

@keyframes pulse {
  0% {
    opacity: 0.8;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.8;
  }
}

.share-prompt a {
  color: var(--share-prompt-color);
  font-weight: 600;
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

.share-prompt a:hover {
  opacity: 0.8;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .social-share {
    flex-direction: column;
    align-items: center;
  }

  .share-x,
  .share-facebook {
    width: 100%;
    max-width: 220px;
    padding: 0.7rem;
  }

  .share-prompt {
    padding: 0.5rem 0.2rem;
  }
}

/* Smooth theme transition */
.share-x,
.share-facebook,
.share-prompt {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}