/* Readability spacing for page and tool content */
main p {
  margin-top: .75rem;
  margin-bottom: .75rem;
  line-height: 1.7
}

main ul,
main ol {
  margin-top: .75rem;
  margin-bottom: 1rem;
  padding-left: 1.25rem
}

main h1,
main h2,
main h3,
main h4 {
  margin-top: 1.25rem;
  margin-bottom: .5rem
}

/* Comprehensive styling for tool page content */
.prose {
  color: #374151;
  line-height: 1.7;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  color: #111827;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.prose h1 {
  font-size: 2.25rem;
}

.prose h2 {
  font-size: 1.875rem;
}

.prose h3 {
  font-size: 1.5rem;
}

.prose h4 {
  font-size: 1.25rem;
}

.prose h5 {
  font-size: 1.125rem;
}

.prose h6 {
  font-size: 1rem;
}

.prose p {
  margin-top: 1rem;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.prose ul,
.prose ol {
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.prose ul li {
  list-style-type: disc;
}

.prose ol li {
  list-style-type: decimal;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #d1d5db;
}

.prose th,
.prose td {
  border: 1px solid #d1d5db;
}

.prose strong {
  font-weight: 600;
}

.prose em {
  font-style: italic;
}

.prose blockquote {
  border-left: 4px solid #e5e7eb;
  padding-left: 1rem;
  margin: 1rem 0;
  font-style: italic;
  color: #6b7280;
}

.prose code {
  background-color: #f3f4f6;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
}

.prose pre {
  background-color: #f3f4f6;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.prose pre code {
  background-color: transparent;
  padding: 0;
}

/* Additional Styles from header.php */
.glass {
  backdrop-filter: saturate(180%) blur(10px);
}

.mask-fade {
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent);
  mask-image: linear-gradient(to bottom, black 60%, transparent);
}

/* Animations removed for performance */
.container-tight {
  max-width: 1120px;
}

.prose a {
  color: rgb(42 140 255);
  text-decoration: underline;
}

/* Content-visibility helper for below-the-fold sections */
.cv-auto {
  content-visibility: auto;
  contain-intrinsic-size: 1px 1000px;
}

/* Fallback button style to ensure visibility even if Tailwind fails */
.btn-primary {
  background-image: linear-gradient(90deg, #186fde 0%, #2a8cff 100%);
  color: #ffffff;
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  filter: brightness(0.97);
}

.btn-fallback {
  background-color: #186fde;
  color: #ffffff;
}

.btn-fallback:hover {
  background-color: #1358b1;
}

/* Custom dropdown styles */
.group:hover .group-hover\:opacity-100 {
  opacity: 1;
}

.group:hover .group-hover\:visible {
  visibility: visible;
}

/* Default dropdown state */
.dropdown-menu {
  display: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease-in-out;
}

/* Dropdown visible on hover */
.group:hover .dropdown-menu {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

/* Portal Gaming inspired dropdown styling */
.dropdown-menu {
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: translateY(-8px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced dropdown visible state */
.group:hover .dropdown-menu {
  transform: translateY(0) scale(1);
}

/* Portal Gaming style submenu items */
.dropdown-menu li a {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  margin: 4px 12px;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.dropdown-menu li a:hover {
  transform: translateX(8px) scale(1.02);
  box-shadow: 0 8px 25px -8px rgba(59, 130, 246, 0.3);
}

/* Modern arrow indicator for parent items */
.group.has-children>a::after {
  content: '→';
  font-size: 12px;
  margin-left: 8px;
  opacity: 0.7;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

.group:hover.has-children>a::after {
  transform: translateX(4px) rotate(90deg);
  opacity: 1;
}

/* Portal Gaming style main menu items */
.menu li a {
  position: relative;
  font-weight: 500;
  letter-spacing: 0.025em;
  font-size: 0.95rem;
}

.menu li a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}

.menu li a:hover::before {
  width: 100%;
}

.menu li a:hover {
  transform: translateY(-2px);
}

/* Mobile menu specific styles */
#mobileMenu {
  transition: all 0.3s ease-in-out;
}

#mobileMenu:not(.hidden) {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#mobileMenu.hidden {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Ensure mobile menu is above other content */
#mobileMenu {
  z-index: 9999 !important;
}

/* Marquee Animation */
.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  margin-bottom: 1rem;
}

.marquee-content {
  display: flex;
  animation: marquee 60s linear infinite;
  width: max-content;
  animation-delay: 0.5s;
}

.marquee-content:hover {
  animation-play-state: paused;
}

.marquee-item:hover {
  transform: scale(1.02);
  z-index: 20;
  animation-play-state: paused;
}

/* Card size controls */
.marquee-content a {
  min-width: 280px !important;
  max-width: 300px !important;
  padding: 1rem !important;
  border-radius: 1rem !important;
  margin-right: 0.75rem !important;
}

/* Ensure last card has proper spacing */
.marquee-content a:last-child {
  margin-right: 0 !important;
}

/* Reduce icon size */
.marquee-content .h-16 {
  height: 3rem !important;
  width: 3rem !important;
}

.marquee-content .h-8 {
  height: 1.5rem !important;
  width: 1.5rem !important;
}

/* Reduce text sizes */
.marquee-content .text-lg {
  font-size: 1rem !important;
}

.marquee-content .text-sm {
  font-size: 0.875rem !important;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .marquee-content {
    animation-duration: 40s;
  }

  .marquee-content a {
    min-width: 260px !important;
    max-width: 280px !important;
    margin-right: 0.5rem !important;
  }
}

/* New Pill Navbar Styles */
.navbar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #0a1a3f;
  /* dark techie blue */
  padding: 15px 30px;
  width: 85%;
  max-width: 1200px;
  border-radius: 50px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Dark-to-light mode for desktop only */
@media (min-width: 769px) {
  .navbar.light {
    background-color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    width: 78%;
    padding: 12px 30px;
    transform: translateX(-50%) scale(0.98);
  }

  .navbar.light .logo img,
  .navbar.light .nav-links a,
  .navbar.light .search-icon,
  .navbar.light .dropdown-content a,
  .navbar.light .subscribe-btn {
    color: #0a1a3f;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .navbar.light .dropdown-content {
    background: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  }

  .navbar.light .logo {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .navbar.light .nav-links a {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .navbar.light .subscribe-btn {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #0a1a3f;
    color: #fff;
  }

  .navbar.light .subscribe-btn:hover {
    background: #1a2a4f;
    transform: translateY(-1px);
  }
}

.navbar .logo {
  display: flex;
  align-items: center;
  font-size: 22px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar .logo:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: 25px;
  align-items: center;
}

.right-elements {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 8px 12px;
  border-radius: 8px;
}

/* Desktop hover effect with glow */
@media (min-width: 769px) {
  .nav-links a:hover {
    color: white;
    text-shadow: 0 0 12px rgba(37, 99, 235, 0.9);
    transform: translateY(-2px) scale(1.05);
    background: rgba(255, 255, 255, 0.1);
  }
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: #0a1a3f;
  border-radius: 8px;
  overflow: hidden;
  min-width: 150px;
  z-index: 1000;
}

.dropdown-content a {
  display: block;
  padding: 10px;
  color: white;
  transition: background 0.3s;
}

.dropdown-content a:hover {
  background: rgba(37, 99, 235, 0.2);
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Search Bar */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: transparent;
  border-radius: 20px;
}

.search-input {
  width: 0;
  opacity: 0;
  transition: width 0.4s ease, opacity 0.4s ease;
  padding: 6px 10px;
  border-radius: 20px;
  border: none;
  outline: none;
}

.search-icon {
  color: white;
  cursor: pointer;
  margin-left: 8px;
  transition: color 0.3s;
}

.search-container:hover .search-input {
  width: 200px;
  opacity: 1;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-input:focus {
  width: 200px !important;
  opacity: 1 !important;
  background: #fff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  outline: none;
}

/* Subscribe button */
.subscribe-btn {
  background: #2563eb;
  color: white;
  padding: 10px 18px;
  border-radius: 25px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.subscribe-btn:hover {
  background: #1d4ed8;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* Mobile */
.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
  color: white;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 8px;
  border-radius: 8px;
}

.menu-toggle:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  .navbar {
    border-radius: 0;
    width: 100%;
  }

  .nav-links {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: #0a1a3f;
    flex-direction: column;
    display: none;
    padding: 15px 0;
  }

  .nav-links a {
    padding: 10px;
  }

  .nav-links .dropdown-content {
    position: static;
    background: #0a1a3f;
    display: none;
    width: 100%;
  }

  .nav-links .dropdown.open .dropdown-content {
    display: block;
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  /* Show search in mobile menu */
  .nav-links .search-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
  }

  /* Show mobile subscribe button in mobile menu */
  .subscribe-btn.mobile-only {
    display: block !important;
    margin: 15px auto;
    text-align: center;
    width: fit-content;
  }

  /* Hide desktop subscribe button on mobile */
  .subscribe-btn.desktop-only {
    display: none;
  }

  margin-bottom: 0.75rem;
}

.card-desc {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: #3b82f6;
  transition: all 0.2s;
}

.card-link svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.5rem;
  transition: transform 0.2s;
}

.card-premium:hover .card-link svg {
  transform: translateX(4px);
}

.card-premium:hover .card-link {
  color: #2563eb;
}

/* Icon Colors */
.icon-blue {
  background: #eff6ff;
  color: #3b82f6;
}

.icon-purple {
  background: #f5f3ff;
  color: #8b5cf6;
}

.icon-emerald {
  background: #ecfdf5;
  color: #10b981;
}

.icon-orange {
  background: #fff7ed;
  color: #f97316;
}

.icon-rose {
  background: #fff1f2;
  color: #f43f5e;
}

.icon-cyan {
  background: #ecfeff;
  color: #06b6d4;
}

/* Logo switching for dark/light themes */
.logo-dark {
  display: block !important;
}

.logo-light {
  display: none !important;
}

.navbar.light .logo-dark {
  display: none !important;
}

.navbar.light .logo-light {
  display: block !important;
}

/* FlexiTheme Card Design */
:root {
  --fx-bg: #f6f7fb;
  --fx-card-bg: #ffffff;
  --fx-border-soft: #e4e6f3;
  --fx-primary: #4f5dff;
  --fx-primary-soft: rgba(79, 93, 255, 0.12);
  --fx-radius-card: 22px;
}

.fx-tools-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 16px 52px;
  font-family: system-ui, sans-serif;
}

.fx-tools-header h2 {
  margin: 0 0 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fx-tools-header p {
  margin: 0 0 20px;
  font-size: 0.95rem;
  color: #6b7280;
}

.fx-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.fx-card {
  position: relative;
  padding: 24px;
  border-radius: var(--fx-radius-card);
  background: var(--fx-card-bg);
  border: 1px solid var(--fx-border-soft);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease;
}

.fx-card:hover {
  transform: translateY(-2px);
}

.fx-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--fx-radius-card);
  background: radial-gradient(circle at top right,
      rgba(0, 132, 255, 0.07),
      rgba(79, 93, 255, 0.05) 40%,
      transparent 70%);
  opacity: 0;
  transition: opacity .35s ease;
}

.fx-card:hover::before {
  opacity: 1;
}

.fx-icon-wrap {
  display: inline-flex;
  margin-bottom: 14px;
}

.fx-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #eef0ff;
  display: flex;

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  /* Show search in mobile menu */
  .nav-links .search-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
  }

  /* Show mobile subscribe button in mobile menu */
  .subscribe-btn.mobile-only {
    display: block !important;
    margin: 15px auto;
    text-align: center;
    width: fit-content;
  }

  /* Hide desktop subscribe button on mobile */
  .subscribe-btn.desktop-only {
    display: none;
  }

  margin-bottom: 0.75rem;
}

.card-desc {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: #3b82f6;
  transition: all 0.2s;
}

.card-link svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.5rem;
  transition: transform 0.2s;
}

.card-premium:hover .card-link svg {
  transform: translateX(4px);
}

.card-premium:hover .card-link {
  color: #2563eb;
}

/* Icon Colors */
.icon-blue {
  background: #eff6ff;
  color: #3b82f6;
}

.icon-purple {
  background: #f5f3ff;
  color: #8b5cf6;
}

.icon-emerald {
  background: #ecfdf5;
  color: #10b981;
}

.icon-orange {
  background: #fff7ed;
  color: #f97316;
}

.icon-rose {
  background: #fff1f2;
  color: #f43f5e;
}

.icon-cyan {
  background: #ecfeff;
  color: #06b6d4;
}

/* Logo switching for dark/light themes */
.logo-dark {
  display: block !important;
}

.logo-light {
  display: none !important;
}

.navbar.light .logo-dark {
  display: none !important;
}

.navbar.light .logo-light {
  display: block !important;
}

/* FlexiTheme Card Design */
:root {
  --fx-bg: #f6f7fb;
  --fx-card-bg: #ffffff;
  --fx-border-soft: #e4e6f3;
  --fx-primary: #4f5dff;
  --fx-primary-soft: rgba(79, 93, 255, 0.12);
  --fx-radius-card: 22px;
}

.fx-tools-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 16px 52px;
  font-family: system-ui, sans-serif;
}

.fx-tools-header h2 {
  margin: 0 0 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fx-tools-header p {
  margin: 0 0 20px;
  font-size: 0.95rem;
  color: #6b7280;
}

.fx-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.fx-card {
  position: relative;
  padding: 24px;
  border-radius: var(--fx-radius-card);
  background: var(--fx-card-bg);
  border: 1px solid var(--fx-border-soft);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease;
}

.fx-card:hover {
  transform: translateY(-2px);
}

.fx-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--fx-radius-card);
  background: radial-gradient(circle at top right,
      rgba(0, 132, 255, 0.07),
      rgba(79, 93, 255, 0.05) 40%,
      transparent 70%);
  opacity: 0;
  transition: opacity .35s ease;
}

.fx-card:hover::before {
  opacity: 1;
}

.fx-icon-wrap {
  display: inline-flex;
  margin-bottom: 14px;
}

.fx-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #eef0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .35s ease;
}

.fx-icon svg,
.fx-icon img {
  width: 26px;
  height: 26px;
  stroke: #4f5dff;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .35s ease, transform .35s ease;
  object-fit: contain;
}

.fx-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: #111;
  position: relative;
  overflow: hidden;
  font-weight: 600;
}

.fx-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: #4f5dff;
  transform: translateX(-100%);
  transition: transform .45s ease;
}

.fx-desc {
  margin: 0 0 16px;
  font-size: .9rem;
  color: #444;
  opacity: .8;
  transition: opacity .35s ease;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fx-btn {
  display: inline-block;
  padding: 8px 16px;
  font-size: .86rem;
  color: #fff !important;
  background: #4f5dff;
  border-radius: 999px;
  text-decoration: none;
  transition: background .25s ease, letter-spacing .25s ease;
}

.fx-card:hover .fx-title::after {
  transform: translateX(0);
}

.fx-card:hover .fx-desc {
  opacity: 1;
}

.fx-card:hover .fx-btn {
  background: #3e4deb;
  letter-spacing: .4px;
}

.trace-border,
.trace-glow {
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: var(--fx-radius-card);
  border: 2px solid transparent;
}

.trace-glow {
  filter: blur(6px);
}

.fx-card:hover .trace-border {
  border-color: #7b86ff;
  animation: fx-border 1.1s linear forwards;
}

.fx-card:hover .trace-glow {
  border-color: rgba(123, 134, 255, 0.6);
  animation: fx-border 1.1s linear forwards;
}

@keyframes fx-border {
  0% {
    clip-path: inset(0 100% 100% 0);
  }

  25% {
    clip-path: inset(0 0 100% 0);
  }

  50% {
    clip-path: inset(0 0 0 100%);
  }

  75% {
    clip-path: inset(0 0 0 0);
  }

  100% {
    clip-path: inset(0 0 0 0);
  }
}