    /* Global Styles */
    :root {
      --primary-color: #3498db;
      --secondary-color: #2980b9;
      --accent-color: #e74c3c;
      --text-color: #333;
      --bg-color: #f5f7fa;
      --card-bg: #ffffff;
      --border-color: #e0e0e0;
      --shadow: 0 4px 6px rgba(0,0,0,0.1);
      --hover-shadow: 0 6px 12px rgba(0,0,0,0.15);
      --nav-width: 250px;
    }
    
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    
    body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      line-height: 1.6;
      color: var(--text-color);
      background: linear-gradient(135deg, var(--bg-color) 0%, #c3cfe2 100%);
      padding: 20px;
      transition: background 0.3s ease;
      position: relative;
    }
    
    .container {
      max-width: 1200px;
      margin: 0 auto;
      transition: margin-left 0.3s ease;
    }
    
    h1 {
      text-align: center;
      margin: 30px 0;
      color: #2c3e50;
      font-size: 2.5rem;
      text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
      position: relative;
      display: inline-block;
      width: 100%;
    }
    
    h1::after {
      content: '';
      position: absolute;
      bottom: -10px;
      left: 50%;
      transform: translateX(-50%);
      width: 100px;
      height: 4px;
      background: var(--primary-color);
      border-radius: 2px;
    }
    
    h2 {
      margin: 20px 0 10px;
      color: #2c3e50;
      border-bottom: 2px solid;
      padding-bottom: 5px;
    }
    
    /* Section Styling */
    section {
      background: var(--card-bg);
      border-radius: 10px;
      box-shadow: var(--shadow);
      padding: 20px;
      margin: 25px 0;
      transition: transform 0.3s ease, box-shadow 0.3s ease;
      position: relative;
      overflow: hidden;
    }
    
    section::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 5px;
      height: 100%;
      background: var(--primary-color);
    }
    
    section:hover {
      transform: translateY(-5px);
      box-shadow: var(--hover-shadow);
    }
    
    /* Element box styling */
    .element-box { 
      background: var(--card-bg); 
      border: 2px solid var(--border-color); 
      padding: 15px; 
      margin: 20px 0; 
      border-radius: 10px; 
      box-shadow: var(--shadow);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .element-box:hover {
      transform: translateY(-3px);
      box-shadow: var(--hover-shadow);
    }
    
    .element-box h2 { 
      margin-top: 0; 
    }
    
    /* Color coding for different element categories */
    .structure-element::before { background: #007BFF; } /* Blue for structure */
    .sectioning-element::before { background: #28a745; } /* Green for sectioning */
    .text-element::before { background: #FF9800; } /* Orange for text elements */
    .list-table-element::before { background: #9C27B0; } /* Purple for list elements */
    .form-element::before { background: #FF5722; } /* Deep Orange for form elements */
    .media-element::before { background: #4CAF50; } /* Green for media elements */
    .semantic-element::before { background: #E91E63; } /* Pink for semantic elements */
    .metadata-element::before { background: #3F51B5; } /* Indigo for metadata elements */
    .deprecated-element::before { background: #795548; } /* Brown for deprecated elements */
    
    /* Element content styling */
    .element-description {
      margin: 15px 0;
      font-size: 1.1rem;
      color: #555;
    }
    
    .element-example {
      background: #f8f9fa;
      border: 1px solid #e9ecef;
      border-radius: 5px;
      padding: 15px;
      margin: 15px 0;
      font-family: 'Courier New', monospace;
    }
    
    .element-demo {
      background: #f0f8ff;
      border: 1px dashed #3498db;
      border-radius: 5px;
      padding: 15px;
      margin: 15px 0;
    }
    
    code {
      background: #f1f1f1;
      padding: 2px 6px;
      border-radius: 3px;
      font-family: 'Courier New', monospace;
      color: #c7254e;
    }
    
    /* Navigation */
    .menu-toggle {
      position: fixed;
      top: 20px;
      left: 20px;
      background: var(--primary-color);
      color: white;
      border: none;
      border-radius: 50%;
      width: 50px;
      height: 50px;
      font-size: 1.5rem;
      cursor: pointer;
      box-shadow: var(--shadow);
      z-index: 1001;
      transition: all 0.3s ease;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    .menu-toggle:hover {
      background: var(--secondary-color);
      transform: rotate(90deg);
    }
    
    .nav-container {
      position: fixed;
      top: 0;
      left: 0;
      width: var(--nav-width);
      height: 100vh;
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(10px);
      padding: 80px 20px 20px;
      border-radius: 0 10px 10px 0;
      box-shadow: var(--shadow);
      z-index: 1000;
      transform: translateX(-100%);
      transition: transform 0.3s ease;
      overflow-y: auto;
    }
    
    .nav-container.active {
      transform: translateX(0);
    }
    
    .nav-links {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    
    .nav-link {
      padding: 12px 15px;
      background: var(--primary-color);
      color: white;
      border-radius: 8px;
      text-decoration: none;
      font-weight: bold;
      transition: all 0.3s ease;
      text-align: center;
      position: relative;
      overflow: hidden;
    }
    
    .nav-link::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: rgba(255, 255, 255, 0.2);
      transition: left 0.3s ease;
    }
    
    .nav-link:hover::before {
      left: 0;
    }
    
    .nav-link:hover {
      background: var(--secondary-color);
      transform: translateX(5px);
    }
    
    /* Dark mode toggle */
    .dark-mode-toggle {
      position: fixed;
      top: 20px;
      right: 20px;
      background: var(--primary-color);
      color: white;
      border: none;
      border-radius: 50%;
      width: 50px;
      height: 50px;
      font-size: 1.5rem;
      cursor: pointer;
      box-shadow: var(--shadow);
      z-index: 1000;
      transition: all 0.3s ease;
    }
    
    .dark-mode-toggle:hover {
      background: var(--secondary-color);
      transform: rotate(180deg);
    }
    
    /* Dark mode styles */
    body.dark-mode {
      --text-color: #f5f5f5;
      --bg-color: #1a1a2e;
      --card-bg: #16213e;
      --border-color: #0f3460;
      --shadow: 0 4px 6px rgba(0,0,0,0.3);
      --hover-shadow: 0 6px 12px rgba(0,0,0,0.4);
    }
    
    body.dark-mode .nav-container {
      background: rgba(22, 33, 62, 0.95);
    }
    
    body.dark-mode .element-box, 
    body.dark-mode section {
      background: var(--card-bg);
      border-color: var(--border-color);
    }
    
    body.dark-mode .element-example {
      background: #0f3460;
      border-color: #16213e;
    }
    
    body.dark-mode .element-demo {
      background: #0f3460;
      border-color: #3498db;
    }
    
    body.dark-mode code {
      background: #0f3460;
      color: #ff7979;
    }
    
    /* Responsive design */
    @media (max-width: 768px) {
      body {
        padding: 10px;
      }
      
      h1 {
        font-size: 2rem;
      }
      
      .nav-container {
        width: 80%;
        max-width: 300px;
      }
      
      .dark-mode-toggle {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
      }
      
      .menu-toggle {
        top: 10px;
        left: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
      }
    }
    
    /* Back to top button */
    .back-to-top {
      position: fixed;
      bottom: 20px;
      right: 20px;
      background: var(--primary-color);
      color: white;
      border: none;
      border-radius: 50%;
      width: 50px;
      height: 50px;
      font-size: 1.5rem;
      cursor: pointer;
      box-shadow: var(--shadow);
      display: none;
      transition: all 0.3s ease;
      z-index: 999;
    }
    
    .back-to-top:hover {
      background: var(--secondary-color);
      transform: translateY(-5px);
    }
    
   /* HTML Compiler Section */
.compiler-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.compiler-panel {
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 500px; /* Fixed height for both panels */
}

.compiler-header {
  background: var(--primary-color);
  color: white;
  padding: 10px 15px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.compiler-body {
  padding: 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#htmlCode {
  width: 100%;
  height: 100%;
  border: none;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 5px;
  resize: none;
  flex: 1;
}

#preview {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
  border-radius: 5px;
  flex: 1;
}

/* For smaller screens, stack the panels */
@media (max-width: 768px) {
  .compiler-container {
    grid-template-columns: 1fr;
  }
  
  .compiler-panel {
    height: 400px;
  }
}
    
    /* Animations */
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(20px); }
      to { opacity: 1; transform: translateY(0); }
    }
    
    section {
      animation: fadeIn 0.5s ease forwards;
    }
    
    /* Section specific animations */
    section:nth-child(2) { animation-delay: 0.1s; }
    section:nth-child(3) { animation-delay: 0.2s; }
    section:nth-child(4) { animation-delay: 0.3s; }
    section:nth-child(5) { animation-delay: 0.4s; }
    section:nth-child(6) { animation-delay: 0.5s; }
    section:nth-child(7) { animation-delay: 0.6s; }
    section:nth-child(8) { animation-delay: 0.7s; }
    section:nth-child(9) { animation-delay: 0.8s; }
    section:nth-child(10) { animation-delay: 0.9s; }
    
    /* Overlay for sidebar */
    .overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      z-index: 999;
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
    }
    
    .overlay.active {
      opacity: 1;
      visibility: visible;
    }

    /* Autocomplete styles */
.autocomplete-container {
  position: relative;
  width: 100%;
}

.autocomplete-suggestions {
  position: absolute;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

body.dark-mode .autocomplete-suggestions {
  background: #2c3e50;
  border-color: #34495e;
}

.autocomplete-suggestion {
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.autocomplete-suggestion:hover, .autocomplete-suggestion.selected {
  background-color: #f0f0f0;
}

body.dark-mode .autocomplete-suggestion:hover, 
body.dark-mode .autocomplete-suggestion.selected {
  background-color: #34495e;
}