* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  transition: background 0.4s ease, color 0.4s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  margin: 0;
  scroll-behavior: smooth;
}
.dark body, .dark {
  background: radial-gradient(circle at 20% 10%, #0b0f1c, #020617 80%);
}
.light body, .light {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 50%, #f8fafc 100%);
}
.header-wrapper {
  width: 100%;
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 0.5rem 1rem 0.5rem;
  transition: all 0.3s ease;
}
.footer-wrapper {
  width: 100%;
  max-width: 90rem;
  margin: 0 auto;
  padding: 1rem 0.5rem 0 0.5rem;
  transition: all 0.3s ease;
}
.main-wrapper {
  width: 100%;
  max-width: 90rem;
  margin: auto;
  transition: all 0.3s ease;
  border-radius: 3.5rem;
  padding: 1.5rem;
}
.dark .main-wrapper {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(56, 189, 248, 0.12);
  box-shadow: 0 25px 50px -12px rgba(0, 180, 255, 0.15);
}
.light .main-wrapper {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 100, 200, 0.15);
  box-shadow: 0 25px 50px -12px rgba(0, 80, 180, 0.1);
}
.glass-card {
  backdrop-filter: blur(16px);
  transition: all 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.dark .glass-card {
  background: rgba(30, 41, 59, 0.45);
}
.light .glass-card {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(0, 0, 0, 0.06);
}
.tool-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}
.tool-card:hover {
  transform: translateY(-6px);
  border-color: #3b82f6 !important;
  box-shadow: 0 20px 35px -10px rgba(59, 130, 246, 0.25);
}
.badge {
  padding: 0.5rem 1.25rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.dark .badge {
  background: rgba(59, 130, 246, 0.15);
  color: #93bbfd;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.light .badge {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.2);
}
.lang-menu {
  position: absolute;
  right: 0;
  top: 110%;
  z-index: 50;
  display: none;
  min-width: 220px;
  border-radius: 1.8rem;
  padding: 0.5rem;
  margin-top: 0.5rem;
  max-height: 380px;
  overflow-y: auto;
  box-shadow: 0 30px 50px -15px rgba(0,0,0,0.4);
  left: auto;
}
@media (max-width: 768px) {
  .lang-menu {
    left: 0;
  }
}
.lang-menu.show {
  display: block;
}
.dark .lang-menu {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.35);
}
.light .lang-menu {
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.08);
}
.lang-menu button {
  transition: all 0.2s;
  color: inherit;
}
.dark .lang-menu button {
  color: #e0f2fe;
}
.light .lang-menu button {
  color: #0f172a;
}
.lang-menu button:hover {
  background-color: #3b82f6 !important;
  color: white !important;
}
.dark .text-muted { color: #94a3b8; }
.light .text-muted { color: #475569; }
.dark .heading { color: #f1f5f9; }
.light .heading { color: #0f172a; }
.rtl { direction: rtl; }
.back-button-wrapper {
  width: 100%;
  max-width: 90rem;
  margin: 0 auto 1rem auto;
  padding: 0 0.5rem;
}
/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(128, 128, 128, 0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(128, 128, 128, 0.5);
}
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(128, 128, 128, 0.3) transparent;
}
select {
  appearance: none;
  background-image: none;
  color: inherit;
}
.dark select,
.dark select option {
  background-color: #1e293b;
  color: #e2e8f0;
  border-color: rgba(71, 85, 105, 0.6);
}
.light select,
.light select option {
  background-color: #ffffff;
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.2);
}
.dark option:checked,
.dark option:hover {
  background-color: #3b82f6 !important;
  color: white !important;
}
.result-card {
  background: linear-gradient(135deg, rgba(59,130,246,0.04), rgba(6,182,212,0.04));
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 2rem;
  padding: 2rem 1.5rem;
  text-align: center;
  margin-top: 1.8rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.03);
  transition: all 0.3s ease;
}
.light .result-card {
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(6,182,212,0.12));
  border-color: rgba(56,189,248,0.45);
  box-shadow: 0 12px 30px rgba(0,180,255,0.08);
}
.result-value {
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0.5rem 0;
}
.result-label {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #e0f2fe;
  text-transform: uppercase;
}
.light .result-label {
  color: #0f172a;
}
.result-icon {
  font-size: 2.8rem;
  margin-bottom: 0.4rem;
}
