<div class="tab-navigation-container">
  <div class="tab-navigation-demo">
    <div class="demo-header">
      <h2>Tab Navigation</h2>
      <p>Smooth animated tab navigation</p>
    </div>
    
    <div class="tabs-wrapper">
      <div class="tab-navigation" id="tabNavigation">
        <div class="tab-bar">
          <button class="tab-btn active" data-tab="overview">Overview</button>
          <button class="tab-btn" data-tab="features">Features</button>
          <button class="tab-btn" data-tab="specifications">Specifications</button>
          <button class="tab-btn" data-tab="reviews">Reviews</button>
          <button class="tab-btn" data-tab="support">Support</button>
          <div class="tab-indicator" id="tabIndicator"></div>
        </div>
        
        <div class="tab-content">
          <div class="tab-pane active" id="overview">
            <h3>Product Overview</h3>
            <p>This premium product combines cutting-edge technology with elegant design to deliver an exceptional user experience. Crafted with precision and attention to detail, it offers unparalleled performance and reliability.</p>
            <div class="feature-highlights">
              <div class="highlight-item">
                <span class="highlight-icon">β‘</span>
                <span class="highlight-text">Lightning-fast performance</span>
              </div>
              <div class="highlight-item">
                <span class="highlight-icon">π‘οΈ</span>
                <span class="highlight-text">Military-grade security</span>
              </div>
              <div class="highlight-item">
                <span class="highlight-icon">πΏ</span>
                <span class="highlight-text">Eco-friendly materials</span>
              </div>
            </div>
          </div>
          
          <div class="tab-pane" id="features">
            <h3>Key Features</h3>
            <ul class="features-list">
              <li>Advanced AI-powered algorithms for optimal performance</li>
              <li>Seamless integration with popular platforms</li>
              <li>Real-time analytics and reporting dashboard</li>
              <li>Cross-platform compatibility and synchronization</li>
              <li>24/7 customer support with dedicated specialists</li>
              <li>Regular updates and feature enhancements</li>
            </ul>
          </div>
          
          <div class="tab-pane" id="specifications">
            <h3>Technical Specifications</h3>
            <div class="specs-grid">
              <div class="spec-item">
                <div class="spec-name">Dimensions</div>
                <div class="spec-value">150 Γ 100 Γ 25 mm</div>
              </div>
              <div class="spec-item">
                <div class="spec-name">Weight</div>
                <div class="spec-value">250 grams</div>
              </div>
              <div class="spec-item">
                <div class="spec-name">Battery Life</div>
                <div class="spec-value">Up to 48 hours</div>
              </div>
              <div class="spec-item">
                <div class="spec-name">Connectivity</div>
                <div class="spec-value">Bluetooth 5.2, Wi-Fi 6</div>
              </div>
              <div class="spec-item">
                <div class="spec-name">Processor</div>
                <div class="spec-value">Quad-core ARM Cortex-A76</div>
              </div>
              <div class="spec-item">
                <div class="spec-name">Memory</div>
                <div class="spec-value">8GB RAM, 256GB Storage</div>
              </div>
            </div>
          </div>
          
          <div class="tab-pane" id="reviews">
            <h3>Customer Reviews</h3>
            <div class="reviews-container">
              <div class="review-item">
                <div class="review-header">
                  <div class="reviewer-avatar">π€</div>
                  <div class="reviewer-info">
                    <div class="reviewer-name">Alex Johnson</div>
                    <div class="review-date">2 weeks ago</div>
                  </div>
                  <div class="review-rating">
                    <span class="star filled">β
</span>
                    <span class="star filled">β
</span>
                    <span class="star filled">β
</span>
                    <span class="star filled">β
</span>
                    <span class="star filled">β
</span>
                  </div>
                </div>
                <div class="review-content">
                  <p>"Absolutely love this product! The performance is outstanding and the build quality is exceptional. Worth every penny!"</p>
                </div>
              </div>
              
              <div class="review-item">
                <div class="review-header">
                  <div class="reviewer-avatar">π€</div>
                  <div class="reviewer-info">
                    <div class="reviewer-name">Sarah Williams</div>
                    <div class="review-date">1 month ago</div>
                  </div>
                  <div class="review-rating">
                    <span class="star filled">β
</span>
                    <span class="star filled">β
</span>
                    <span class="star filled">β
</span>
                    <span class="star filled">β
</span>
                    <span class="star">β
</span>
                  </div>
                </div>
                <div class="review-content">
                  <p>"Great product with a few minor issues. Customer support was very helpful in resolving them quickly."</p>
                </div>
              </div>
            </div>
          </div>
          
          <div class="tab-pane" id="support">
            <h3>Support Resources</h3>
            <div class="support-resources">
              <div class="resource-item">
                <div class="resource-icon">π</div>
                <div class="resource-content">
                  <h4>User Manual</h4>
                  <p>Complete guide to getting started and advanced features</p>
                  <a href="#" class="resource-link">Download PDF</a>
                </div>
              </div>
              
              <div class="resource-item">
                <div class="resource-icon">πΉ</div>
                <div class="resource-content">
                  <h4>Video Tutorials</h4>
                  <p>Step-by-step guides for common tasks and troubleshooting</p>
                  <a href="#" class="resource-link">Watch Videos</a>
                </div>
              </div>
              
              <div class="resource-item">
                <div class="resource-icon">π¬</div>
                <div class="resource-content">
                  <h4>Contact Support</h4>
                  <p>24/7 live chat and email support from our experts</p>
                  <a href="#" class="resource-link">Get Help</a>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
     .tab-navigation-container {
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  padding: 40px 20px;
  border-radius: 20px;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}
.tab-navigation-demo {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
}
.demo-header {
  text-align: center;
  margin-bottom: 30px;
}
.demo-header h2 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 2rem;
  font-weight: 700;
}
.demo-header p {
  color: #666;
  font-size: 1.1rem;
  margin: 0;
}
.tabs-wrapper {
  animation: fadeInUp 0.6s ease-out;
}
.tab-navigation {
  background: #f8fafc;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}
.tab-bar {
  display: flex;
  background: white;
  border-bottom: 2px solid #e2e8f0;
  position: relative;
}
.tab-btn {
  flex: 1;
  padding: 20px 15px;
  border: none;
  background: transparent;
  color: #666;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}
.tab-btn:hover {
  color: #333;
  background: rgba(102, 126, 234, 0.05);
}
.tab-btn.active {
  color: #667eea;
}
.tab-indicator {
  position: absolute;
  bottom: -2px;
  height: 3px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border-radius: 3px 3px 0 0;
}
.tab-content {
  padding: 30px;
  min-height: 300px;
}
.tab-pane {
  display: none;
  animation: fadeIn 0.5s ease-out;
}
.tab-pane.active {
  display: block;
}
.tab-pane h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 1.8rem;
  font-weight: 700;
}
.tab-pane p {
  color: #666;
  font-size: 1.1rem;
  line-height: 1.7;
  margin: 0 0 25px 0;
}
.feature-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 25px;
}
.highlight-item {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
  min-width: 200px;
  padding: 15px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}
.highlight-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.highlight-icon {
  font-size: 1.8rem;
}
.highlight-text {
  font-weight: 600;
  color: #333;
  font-size: 1.1rem;
}
.features-list {
  padding: 0;
  margin: 0 0 25px 0;
  list-style: none;
}
.features-list li {
  padding: 15px 0 15px 30px;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  color: #666;
  font-size: 1.1rem;
}
.features-list li:last-child {
  border-bottom: none;
}
.features-list li::before {
  content: "β";
  position: absolute;
  left: 0;
  color: #27ae60;
  font-weight: 700;
  font-size: 1.2rem;
}
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}
.spec-item {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}
.spec-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.spec-name {
  font-weight: 700;
  color: #333;
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.spec-value {
  color: #666;
  font-size: 1rem;
}
.reviews-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
}
.review-item {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}
.review-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}
.reviewer-avatar {
  width: 50px;
  height: 50px;
  background: #667eea;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}
.reviewer-info {
  flex: 1;
}
.reviewer-name {
  font-weight: 700;
  color: #333;
  font-size: 1.1rem;
  margin-bottom: 5px;
}
.review-date {
  color: #999;
  font-size: 0.9rem;
}
.review-rating {
  display: flex;
  gap: 3px;
}
.star {
  font-size: 1.2rem;
  color: #ddd;
}
.star.filled {
  color: #ffd700;
}
.review-content p {
  color: #666;
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
}
.support-resources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
}
.resource-item {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  text-align: center;
}
.resource-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.resource-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}
.resource-content h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 1.3rem;
  font-weight: 700;
}
.resource-content p {
  color: #666;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 20px 0;
}
.resource-link {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
.resource-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}
/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.tab-pane h3 {
  animation: slideInLeft 0.6s ease-out;
}
.tab-pane p {
  animation: fadeIn 0.6s ease-out 0.2s both;
}
/* Responsive */
@media (max-width: 768px) {
  .tab-navigation-container {
    padding: 30px 15px;
  }
  
  .tab-navigation-demo {
    padding: 25px;
  }
  
  .demo-header h2 {
    font-size: 1.7rem;
  }
  
  .tab-bar {
    flex-wrap: wrap;
  }
  
  .tab-btn {
    flex: 1 1 33%;
    padding: 15px 10px;
    font-size: 0.9rem;
  }
  
  .tab-content {
    padding: 25px;
  }
  
  .tab-pane h3 {
    font-size: 1.5rem;
  }
  
  .tab-pane p {
    font-size: 1rem;
  }
  
  .feature-highlights {
    gap: 15px;
  }
  
  .highlight-item {
    padding: 12px;
    min-width: 150px;
  }
  
  .highlight-text {
    font-size: 0.9rem;
  }
  
  .features-list li {
    padding: 12px 0 12px 25px;
    font-size: 1rem;
  }
  
  .specs-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .spec-item {
    padding: 15px;
  }
  
  .reviews-container {
    gap: 20px;
  }
  
  .review-item {
    padding: 20px;
  }
  
  .review-header {
    gap: 12px;
  }
  
  .reviewer-avatar {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .reviewer-name {
    font-size: 1rem;
  }
  
  .review-content p {
    font-size: 0.95rem;
  }
  
  .support-resources {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .resource-item {
    padding: 20px;
  }
  
  .resource-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
  }
  
  .resource-content h4 {
    font-size: 1.2rem;
  }
  
  .resource-content p {
    font-size: 0.95rem;
  }
  
  .resource-link {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}
@media (max-width: 480px) {
  .tab-btn {
    flex: 1 1 50%;
    padding: 12px 8px;
    font-size: 0.85rem;
  }
  
  .tab-content {
    padding: 20px 15px;
  }
  
  .feature-highlights {
    flex-direction: column;
  }
  
  .highlight-item {
    width: 100%;
  }
  
  .review-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .review-rating {
    align-self: flex-end;
  }
}
     document.addEventListener('DOMContentLoaded', function() {
  // Get DOM elements
  const tabButtons = document.querySelectorAll('.tab-btn');
  const tabPanes = document.querySelectorAll('.tab-pane');
  const tabIndicator = document.getElementById('tabIndicator');
  const tabNavigation = document.getElementById('tabNavigation');
  
  // Initialize tabs
  function initTabs() {
    setupEventListeners();
    updateTabIndicator();
  }
  
  // Setup event listeners
  function setupEventListeners() {
    // Tab button click events
    tabButtons.forEach(button => {
      button.addEventListener('click', function() {
        const tabId = this.getAttribute('data-tab');
        activateTab(tabId);
        
        // Add ripple effect
        addRippleEffect(this);
      });
    });
    
    // Keyboard navigation
    tabButtons.forEach(button => {
      button.addEventListener('keydown', function(e) {
        if (e.key === 'Enter' || e.key === ' ') {
          e.preventDefault();
          const tabId = this.getAttribute('data-tab');
          activateTab(tabId);
        }
      });
    });
    
    // Window resize event
    window.addEventListener('resize', updateTabIndicator);
  }
  
  // Activate tab
  function activateTab(tabId) {
    // Remove active class from all buttons and panes
    tabButtons.forEach(btn => btn.classList.remove('active'));
    tabPanes.forEach(pane => pane.classList.remove('active'));
    
    // Add active class to clicked button
    const activeButton = document.querySelector(`.tab-btn[data-tab="${tabId}"]`);
    if (activeButton) {
      activeButton.classList.add('active');
      
      // Show corresponding pane
      const activePane = document.getElementById(tabId);
      if (activePane) {
        activePane.classList.add('active');
        
        // Add animation to pane content
        animatePaneContent(activePane);
      }
      
      // Update tab indicator
      updateTabIndicator();
    }
  }
  
  // Update tab indicator position
  function updateTabIndicator() {
    const activeButton = document.querySelector('.tab-btn.active');
    if (activeButton && tabIndicator) {
      const buttonRect = activeButton.getBoundingClientRect();
      const tabBarRect = activeButton.parentElement.getBoundingClientRect();
      
      tabIndicator.style.width = `${buttonRect.width}px`;
      tabIndicator.style.left = `${buttonRect.left - tabBarRect.left}px`;
    }
  }
  
  // Add ripple effect
  function addRippleEffect(button) {
    const ripple = document.createElement('span');
    ripple.classList.add('ripple');
    ripple.style.cssText = `
      position: absolute;
      border-radius: 50%;
      background: rgba(102, 126, 234, 0.3);
      transform: scale(0);
      animation: ripple 0.6s linear;
      width: 20px;
      height: 20px;
      margin-top: -10px;
      margin-left: -10px;
      pointer-events: none;
    `;
    
    button.style.position = 'relative';
    button.appendChild(ripple);
    
    setTimeout(() => {
      ripple.remove();
    }, 600);
  }
  
  // Animate pane content
  function animatePaneContent(pane) {
    const elements = pane.querySelectorAll('h3, p, ul, div');
    elements.forEach((element, index) => {
      element.style.animation = `fadeIn 0.5s ease-out ${index * 0.1}s both`;
    });
  }
  
  // Add smooth scrolling to resource links
  const resourceLinks = document.querySelectorAll('.resource-link');
  resourceLinks.forEach(link => {
    link.addEventListener('click', function(e) {
      e.preventDefault();
      // In a real implementation, this would navigate to the resource
      alert('Navigating to resource...');
    });
  });
  
  // Add hover effects to feature highlights
  const highlightItems = document.querySelectorAll('.highlight-item');
  highlightItems.forEach(item => {
    item.addEventListener('mouseenter', function() {
      this.style.transform = 'translateY(-5px)';
      this.style.boxShadow = '0 8px 25px rgba(0, 0, 0, 0.1)';
    });
    
    item.addEventListener('mouseleave', function() {
      this.style.transform = 'translateY(0)';
      this.style.boxShadow = '0 5px 15px rgba(0, 0, 0, 0.05)';
    });
  });
  
  // Add hover effects to spec items
  const specItems = document.querySelectorAll('.spec-item');
  specItems.forEach(item => {
    item.addEventListener('mouseenter', function() {
      this.style.transform = 'translateY(-5px)';
      this.style.boxShadow = '0 8px 25px rgba(0, 0, 0, 0.1)';
    });
    
    item.addEventListener('mouseleave', function() {
      this.style.transform = 'translateY(0)';
      this.style.boxShadow = '0 5px 15px rgba(0, 0, 0, 0.05)';
    });
  });
  
  // Add hover effects to resource items
  const resourceItems = document.querySelectorAll('.resource-item');
  resourceItems.forEach(item => {
    item.addEventListener('mouseenter', function() {
      this.style.transform = 'translateY(-5px)';
      this.style.boxShadow = '0 8px 25px rgba(0, 0, 0, 0.1)';
    });
    
    item.addEventListener('mouseleave', function() {
      this.style.transform = 'translateY(0)';
      this.style.boxShadow = '0 5px 15px rgba(0, 0, 0, 0.05)';
    });
  });
  
  // Add CSS for ripple animation
  const style = document.createElement('style');
  style.textContent = `
    @keyframes ripple {
      to {
        transform: scale(4);
        opacity: 0;
      }
    }
  `;
  document.head.appendChild(style);
  
  // Initialize the tabs
  initTabs();
});