body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    background: #f7f9fb;
    color: #333;
    padding: 40px 20px;
  }

  h1 {
    text-align: center;
    margin-bottom: 40px;
    color: #1f2937;
  }

  .qpaper-tree {
    max-width: 1200px;
    margin: 0 auto;
  }

.qpaper-tree .container {
  max-width: 900px; /* increase to 900px or even 100% */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 30px;
}






.qpaper-tree .block {
  width: 100%;       /* full width of the container */
  max-width: 100%;   /* prevent it from exceeding container width */
}


  .qpaper-tree .block-header {
    background-color: #1e3a8a;
    color: #fff;
    padding: 15px 20px;
    font-size: 1.3em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
  }

  .qpaper-tree .block-header:hover {
    background-color: #1d4ed8;
  }

  .qpaper-tree .block-content {
    display: none;
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .qpaper-tree ul {
    list-style: none;
    padding-left: 20px;
    margin: 0;
    border-left: 2px solid #e5e7eb;
  }

  .qpaper-tree li {
    margin: 6px 0;
    position: relative;
  }

  .qpaper-tree li::before {
    content: '';
    position: absolute;
    top: 10px;
    left: -14px;
    width: 10px;
    height: 2px;
    background: #e5e7eb;
  }

  .qpaper-tree .folder, 
  .qpaper-tree .pdf {
    display: flex;
    align-items: center;
    cursor: pointer;
    background-color: #f3f4f6;
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
  }

  .qpaper-tree .folder:hover, 
  .qpaper-tree .pdf:hover {
    background-color: #e0e7ff;
  }

  .qpaper-tree .folder i {
    color: #f59e0b;
  }

  .qpaper-tree .pdf i {
    color: #ef4444;
  }

  .qpaper-tree .folder span, 
  .qpaper-tree .pdf span {
    margin-left: 8px;
  }

  .qpaper-tree a {
    color: #2563eb;
    text-decoration: none;
  }

  .qpaper-tree a:hover {
    text-decoration: underline;
  }

.hdname{padding:20px;}
  .qpaper-tree .hidden { display: none; }

@media (max-width: 768px) {
  .qpaper-tree .block {
    min-width: 100%; /* same behavior for smaller screens */
  }
}

.folder {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* keep everything aligned to the left */
  gap: 10px; /* space between icon, name, and count */
  background-color: #f3f4f6;
  padding: 6px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.folder i {
  color: #f59e0b;
}

.folder-name {
  margin-left: 5px;
  flex: 0 0 auto; /* prevent it from stretching */
}

.folder-count {
  color: #555;
  font-weight: bold;
  margin-left: auto; /* pushes count slightly right but stays in line */
  text-align: right;!important;
}
.folder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #f3f4f6;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left !important; /* 🔥 override any center alignment */
}

.folder-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.folder i {
  color: #f59e0b;
  flex-shrink: 0;
}

.folder-name {
  text-align: left;
  flex: 1;
}

.folder-count {
  color: #333;
  font-weight: bold;
  font-size: 0.95em;
  background: #e5e7eb;
  padding: 2px 8px;
  border-radius: 12px;
  flex-shrink: 0;
}

