@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=Poppins:wght@400;700&display=swap');

:root {
  --bg: #f9fbfd;
  --card-bg: rgba(255,255,255,0.85);
  --accent: #38bdf8;
  --primary: #6366f1;
  --text: #181f2a;
  --shadow: 0 4px 32px 0 rgba(0,0,0,0.10);
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', 'Inter', 'Segoe UI', sans-serif;
  margin: 0;
}
.glass {
  background: var(--card-bg);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.04);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2.2rem;
  background: linear-gradient(to right, #f8fafd, #f0f4ff);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
  border-radius: 0 0 18px 18px;
  position: relative;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
}
.brand-title {
  font-family: 'Poppins', 'Inter', 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 1px;
  color: #3bb5f9;
  background: linear-gradient(90deg, #3bb5f9 60%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links {
  display: flex;
  gap: 1.3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: #111827;
  text-decoration: none;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border-radius: 5px;
  transition: background 0.2s, color 0.2s;
  position: relative;
  display: inline-block;
}
.nav-links a.active, .nav-links a:hover {
  color: #3bb5f9;
  background: rgba(59,181,249,0.08);
}
.nav-links a::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: #3bb5f9;
  transition: width 0.2s;
  border-radius: 2px;
  margin: 0 auto 0.1em auto;
}
.nav-links a:hover::after, .nav-links a.active::after {
  width: 80%;
}
#theme-toggle {
  background: #e0f0ff;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  margin-left: 1.5rem;
  color: #3bb5f9;
  border-radius: 50%;
  width: 2.3rem;
  height: 2.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
#theme-toggle:hover {
  background: #c7e6ff;
  color: #7c3aed;
  box-shadow: 0 4px 8px rgba(59,181,249,0.08);
}
.hero {
  text-align: center; margin: 2rem 0; padding: 2rem;
}
.gradient {
  background: linear-gradient(90deg, #38bdf8, #6366f1); -webkit-background-clip: text; color: transparent;
}
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; margin: 2rem;
}
.card {
  padding: 2rem; text-decoration: none; color: inherit; transition: box-shadow .2s;
}
.card:hover { box-shadow: 0 8px 32px 0 rgba(56,189,248,0.15); }
.footer {
  margin-top: 2rem; text-align: center; font-size: 1rem;
}
body.dark {
  --bg: #1e1e2f;
  --card-bg: rgba(30,30,47,0.92);
  --text: #f1f5f9;
  background: var(--bg);
  color: var(--text);
}
body.dark .navbar {
  background: linear-gradient(to right, #1e1e2f, #111827);
  box-shadow: 0 4px 12px rgba(30,30,47,0.18);
}
body.dark .nav-links a {
  color: #f1f5f9;
  background: none;
}
body.dark .nav-links a.active, body.dark .nav-links a:hover {
  color: #7dd3fc;
  background: rgba(59,181,249,0.10);
  box-shadow: 0 2px 8px 0 #2563eb22;
}
body.dark .nav-links a::after {
  background: #7dd3fc;
}
body.dark .brand-title {
  background: linear-gradient(90deg, #7dd3fc 60%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body.dark #theme-toggle {
  background: #232344;
  color: #7dd3fc;
  box-shadow: 0 2px 8px 0 #2563eb22;
}
body.dark #theme-toggle:hover {
  background: #2563eb;
  color: #fff;
}
body.dark button {
  background: #232344;
  color: #f1f5f9;
}
body.dark button:hover, body.dark button:focus {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 2px 8px 0 #2563eb44;
}
body.dark .nav-links a.cta, body.dark .nav-links a.cta:active, body.dark .nav-links a.cta:focus {
  background: #2563eb !important;
  color: #fff !important;
  box-shadow: 0 2px 8px 0 #2563eb44;
}
#regex-result {
  color: #111827;
  background: #fff;
  font-weight: bold;
  font-size: 2em;
  letter-spacing: 1px;
  padding: 0.7em 1.2em;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(56,189,248,0.10);
  margin: 1em 0;
  display: inline-block;
}
body.dark #regex-result {
  color: #38bdf8;
  background: #181f2a;
}
#regex-result::selection, #regex-result *::selection {
  background: #38bdf8;
  color: #fff;
}
button {
  background: #e0f0ff;
  color: #003f5c;
  font-family: 'Segoe UI', sans-serif;
  font-size: 15px;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  outline: none;
  margin: 0.2em 0.3em;
}
button:hover, button:focus {
  background: #c7e6ff;
  transform: translateY(-2px);
}
.custom-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  background: rgba(255,255,255,0.10);
  box-shadow: 0 4px 16px 0 rgba(30,30,47,0.10);
  border-radius: 18px 18px 0 0;
  padding: 1.5rem 1.2rem;
  font-size: 1rem;
  font-family: 'Poppins', 'Inter', 'Segoe UI', sans-serif;
  font-weight: 500;
  color: #111827;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.footer-text {
  font-size: 0.98rem;
  font-weight: 500;
  opacity: 0.92;
}
.footer-icons {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.footer-icon-link {
  display: flex;
  align-items: center;
  color: #64748b;
  transition: color 0.2s;
}
.footer-icon-link:hover, .footer-icon-link:focus {
  color: #3bb5f9;
}
.footer-icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
}
body.dark .custom-footer {
  background: rgba(30,30,47,0.60);
  color: #f1f5f9;
  box-shadow: 0 4px 16px 0 rgba(30,30,47,0.18);
}
body.dark .footer-icon-link {
  color: #e5e7eb;
}
body.dark .footer-icon-link:hover, body.dark .footer-icon-link:focus {
  color: #7dd3fc;
}
@media (max-width: 900px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.2rem;
    border-radius: 0 0 14px 14px;
  }
  .nav-links {
    gap: 0.7rem;
    margin-top: 0.7rem;
    flex-wrap: wrap;
  }
}
@media (max-width: 700px) {
  .navbar {
    flex-direction: column;
    align-items: stretch;
    padding: 0.7rem 0.5rem;
    border-radius: 0 0 10px 10px;
  }
  .brand {
    justify-content: center;
    width: 100%;
    margin-bottom: 0.5rem;
  }
  .brand-title {
    font-size: 1.1rem;
    text-align: center;
    width: 100%;
  }
  .nav-links {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 0.2rem;
    margin-top: 0.3rem;
  }
  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 0.7rem 0;
    font-size: 1.08rem;
    border-radius: 7px;
  }
  #theme-toggle {
    margin: 0.7rem auto 0 auto;
    display: block;
  }
  button {
    width: 100%;
    box-sizing: border-box;
    margin: 0.3em 0;
  }
  .custom-footer {
    flex-direction: column;
    gap: 0.7rem;
    padding: 1.2rem 0.5rem;
    font-size: 0.97rem;
    border-radius: 12px 12px 0 0;
  }
  .footer-icons {
    gap: 0.7rem;
  }
} 
.cards .card {
  opacity: 0;
  transform: translateX(-40px);
  animation: slideInLeftLoop 1.6s ease-out infinite;
}
@keyframes slideInLeftLoop {
  0% {
    opacity: 0;
    transform: translateX(-40px);
  }
  10% {
    opacity: 1;
    transform: translateX(0);
  }
  80% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-40px);
  }
}
.cards .card:nth-child(1) { animation-delay: 0s; }
.cards .card:nth-child(2) { animation-delay: 0.2s; }
.cards .card:nth-child(3) { animation-delay: 0.4s; }
.cards .card:nth-child(4) { animation-delay: 0.6s; }
.cards .card:nth-child(5) { animation-delay: 0.8s; }
.cards .card:nth-child(6) { animation-delay: 1.0s; }
.cards .card:nth-child(7) { animation-delay: 1.2s; }
.cards .card:nth-child(8) { animation-delay: 1.4s; }
.cards .card:nth-child(9) { animation-delay: 1.6s; }
.cards .card:nth-child(10) { animation-delay: 1.8s; } 
.nav-item-link {
  display: flex;
  align-items: center;
  gap: 0.3em;
  text-decoration: none;
  color: inherit;
}
.nav-label {
  font-size: 1.05rem;
  font-weight: 500;
  white-space: nowrap;
}
.nav-arrow {
  font-size: 1.2em;
  margin: 0 0.1em;
  display: flex;
  align-items: center;
} 
.canvas-container {
  max-height: 400px;
  overflow-y: auto;
} 
.regex-label {
  color: #000;
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 0.5em;
  display: block;
}
body.dark .regex-label {
  color: #000;
} 