@scope (#original-content) {

    :scope {
      --primary: #8e44ad;
      --secondary: #3498db;
      --dark: #121212;
      --card-bg: rgba(30, 30, 40, 0.6);
      --text: #e0e0e0;
      --text-secondary: #aaa;
      --border-radius: 12px;
      --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    
    body, #math-formula-explorer {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
      background: linear-gradient(135deg, #121212, #1e1e2f);
      color: var(--text);
      min-height: 100vh;
      overflow-x: hidden;
    }
    
    .formula-container {
      width: 100%;
      max-width: 1400px;
      margin: 0 auto;
      padding: 2rem;
      border-radius: 
      position: relative;
    }
    
    .bg-shapes {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: -1;
      overflow: hidden;
    }
    
    .bg-shape {
      position: absolute;
      border-radius: 50%;
      filter: blur(80px);
      opacity: 0.15;
    }
    
    .shape-1 {
      background: var(--primary);
      width: 500px;
      height: 500px;
      top: -200px;
      left: -200px;
    }
    
    .shape-2 {
      background: var(--secondary);
      width: 400px;
      height: 400px;
      bottom: -150px;
      right: -150px;
    }
    
    .shape-3 {
      background: #2ecc71;
      width: 300px;
      height: 300px;
      top: 40%;
      right: 20%;
    }
    
    .header {
      text-align: center;
      margin-bottom: 3rem;
      position: relative;
    }
    
    .header h1 {
      font-size: 2.8rem;
      font-weight: 800;
      margin-bottom: 1rem;
      background: linear-gradient(to right, var(--primary), var(--secondary));
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      letter-spacing: -0.5px;
    }
    
    .header p {
      font-size: 1.1rem;
      color: var(--text-secondary);
      max-width: 600px;
      margin: 0 auto 1.5rem;
    }
    
    .search-container {
      display: flex;
      justify-content: center;
      margin-bottom: 2rem;
      border-radius:10px;
    }
    
    .search-box {
      display: flex;
      align-items: center;
      width: 100%;
      max-width: 600px;
      background: var(--card-bg);
      border-radius: var(--border-radius);
      border-radius:20px;
      padding: 0.75rem 1.25rem;
      backdrop-filter: blur(8px);
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }
    
    .search-icon {
      margin-right: 10px;
      color: var(--text-secondary);
    }
    
    #formula-search {
      flex: 1;
      background: transparent;
      border: none;
      color: var(--text);
      font-size: 1.1rem;
      outline: none;
    }
    
    #formula-search::placeholder {
      color: var(--text-secondary);
    }
    
    .filter-tabs {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 0.5rem;
      margin-bottom: 2rem;
    }
    
    .filter-tab {
      background: var(--card-bg);
      color: var(--text);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 100px;
      padding: 0.6rem 1.2rem;
      cursor: pointer;
      font-size: 0.9rem;
      transition: var(--transition);
      backdrop-filter: blur(8px);
    }
    
    .filter-tab:hover {
      background: rgba(40, 40, 50, 0.8);
      transform: translateY(-2px);
    }
    
    .filter-tab.active {
      background: linear-gradient(to right, var(--primary), var(--secondary));
      border-color: transparent;
      box-shadow: 0 5px 15px rgba(142, 68, 173, 0.3);
    }
    
    .formula-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 1.5rem;
      margin-top: 2rem;
      perspective: 1000px;
    }
    
    .formula-card {
      background: var(--card-bg);
      border-radius: var(--border-radius);
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.1);
      transition: var(--transition);
      backdrop-filter: blur(8px);
      transform-style: preserve-3d;
      transform: translateZ(0);
      cursor: pointer;
    }
    
    .formula-card:hover {
      transform: translateY(-5px) rotateX(2deg) rotateY(2deg);
      box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
      border-color: rgba(255, 255, 255, 0.15);
    }
    
    .formula-card-header {
      padding: 1.25rem;
      border-bottom: 1px solid rgba(255, 255, 255, 0.05);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    
    .formula-title {
      font-size: 1.15rem;
      font-weight: 600;
    }
    
    .formula-icon {
      color: var(--primary);
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      background: rgba(142, 68, 173, 0.1);
    }
    
    .formula-content {
      padding: 1.25rem;
    }
    
    .formula-description {
      color: var(--text-secondary);
      font-size: 0.95rem;
      margin-bottom: 1rem;
      line-height: 1.5;
    }
    
    .formula-example {
      background: rgba(0, 0, 0, 0.2);
      padding: 1rem;
      border-radius: 8px;
      font-family: 'Courier New', monospace;
      margin-bottom: 1rem;
      overflow-x: auto;
    }
    
    .formula-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
    }
    
    .formula-tag {
      background: rgba(255, 255, 255, 0.1);
      color: var(--text-secondary);
      font-size: 0.75rem;
      padding: 0.25rem 0.75rem;
      border-radius: 100px;
    }
    
    .scroll-top {
      position: fixed;
      bottom: 2rem;
      right: 2rem;
      width: 50px;
      height: 50px;
      background: var(--primary);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      opacity: 0;
      transform: translateY(20px);
      transition: var(--transition);
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
      z-index: 100;
    }
    
    .scroll-top.visible {
      opacity: 1;
      transform: translateY(0);
    }
    
    .scroll-top svg {
      width: 20px;
      height: 20px;
      color: white;
    }
    
    .no-results {
      text-align: center;
      grid-column: 1 / -1;
      padding: 3rem;
      color: var(--text-secondary);
    }
    
    @media (max-width: 768px) {
      .header h1 {
        font-size: 2.2rem;
      }
      
      .formula-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
      }
      
      .formula-container {
        padding: 1.5rem;
      }
    }
    
    /* Loading animation */
    .loading {
      display: flex;
      justify-content: center;
      padding: 3rem;
      grid-column: 1 / -1;
    }
    
    .loading-dots {
      display: flex;
      gap: 8px;
    }
    
    .loading-dot {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: var(--primary);
      animation: dot-pulse 1.5s infinite ease-in-out;
    }
    
    .loading-dot:nth-child(2) {
      animation-delay: 0.2s;
      background: var(--secondary);
    }
    
    .loading-dot:nth-child(3) {
      animation-delay: 0.4s;
    }
    
    @keyframes dot-pulse {
      0%, 100% {
        transform: scale(0.8);
        opacity: 0.6;
      }
      50% {
        transform: scale(1.2);
        opacity: 1;
      }
    }
  
}

#original-content #formula-grid .formula-card[hidden] { display: none; }
