const tabs = document.querySelectorAll('.tabs input[type="radio"]');
const tabContents = document.querySelectorAll('.tab-content');

function showTab(tabIndex) {
  tabContents.forEach(content => {
    content.classList.remove('active');
  });
  tabs[tabIndex].checked = true;
  tabContents[tabIndex].classList.add('active');
}

tabs.forEach((tab, index) => {
  tab.addEventListener('click', () => {
    showTab(index);
  });
});

// Show initial tab
showTab(0);