body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, #e0e7ff 0%, #f0fdfa 100%);
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
em{
  font-style: normal;
  color: red;
  margin: 0 6px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 auto 18px auto;
  animation: fadeInUp 1.4s;
  width: 100%;
  max-width: 650px;
}


.tag_a {
  background: #fff;
  color: #6f55ff;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  margin: 0;
  box-shadow: 0 1px 4px rgba(124, 58, 237, 0.06);
  cursor: pointer;
  transition: box-shadow 0.18s, transform 0.18s, background 0.18s;
  user-select: none;
  white-space: nowrap;
}

.tag_a:hover {
  background: linear-gradient(90deg, #4f8cff 0%, #7c3aed 100%);
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(124,58,237,0.13);
  transform: translateY(-2px) scale(1.08);
}


.container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 75vh;
  padding: 24px 8px 0 8px;
}
.logo-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
  animation: fadeInDown 1s;
}
.logo-title img {
  width: 60px;
  height: 60px;
  margin-bottom: 4px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  margin-right: 12px;
}
.logo-title img:hover {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.logo-title h1 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: 2px;
  margin: 0;
  color: #6f55ff;
  transition: transform 0.3s ease, text-shadow 0.3s ease;
  cursor: pointer;
  user-select: none;
}
.logo-title h1:hover {
  transform: scale(1.05);
  text-shadow: 0 2px 10px rgba(111, 85, 255, 0.3);
}
.logo-title h1 .pro-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.5em;
  font-weight: 700;
  line-height: 1.5;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #4f8cff);
  border-radius: 8px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
  letter-spacing: 1px;
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.2);
  transition: all 0.3s ease;
  margin-left: 4px;
}
.search-box {
  position: relative;
  width: 100%;
  max-width: 600px;
  display: flex;
  align-items: center;
  margin-bottom: 28px;
  border-radius: 50px;
  padding: 2px;
  background: linear-gradient(-12deg, #6f55ff, #47fcff);
  box-shadow: 0 4px 20px rgba(111, 85, 255, 0.25);
  animation: fadeIn 1.2s;
}
.search-box-inner {
  display: flex;
  align-items: center;
  width: 100%;
  background-color: #fff;
  border-radius: 48px;
  padding: 4px;
}
.search-box input {
  flex: 1;
  padding: 12px 20px;
  font-size: 1.1rem;
  border: none;
  border-radius: 48px;
  outline: none;
  background: transparent;
  color: #000000;
}
.search-box input::placeholder {
  color: #9ca3af;
}
.search-box input:focus {
}
.search-buttons {
  display: flex;
  align-items: center;
}
.search-btn {
  padding: 10px 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, transform 0.2s;
  gap: 6px;
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
  margin: 0 10px;
}
.doc-btn {
  color: #3b82f6; /* Blue */
}
.pan-btn {
  color: #8b5cf6; /* Violet */
}
.search-btn:hover {
  opacity: 0.7;
  transform: scale(1.05);
}
.separator {
  color: #d1d5db; /* Gray */
  margin: 0 4px;
}
.tag-secondary {
  color: #6b7280;
  background: #f3f4f6;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
.tag-secondary:hover {
  color: #1f2937;
  background: #e5e7eb;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.footer {
  text-align: center;
  color: #8a76ff8a;
  font-size: 0.95rem;
  padding: 32px 0 16px 0;
  letter-spacing: 1px;
  background: none;
}
@media (max-width: 600px) {
  .container {
    justify-content: flex-start;
    padding-top: 15vh;
  }
  .logo-title {
    margin-top: 0;
    margin-bottom: 0;
  }
  .logo-title img {
    width: 40px;
    height: 40px;
    user-select: none;
    margin-right: 8px;
  }
  .logo-title h1 {
    font-size: 1.2rem;
  }
  .logo-title h1 .pro-badge {
  margin-left: 2px;
  border-radius: 4px;
  }
  .search-box {
    max-width: 95%;
  }
  .search-box-inner {
    padding: 2px;
  }
  .search-box input {
    font-size: 1rem;
    padding: 10px 15px;
  }
  .search-btn {
    padding: 8px;
    font-size: 0.8rem;
    font-weight: 500;
  }
  .separator {
    margin: 0;
  }
  .tags {
    gap: 8px;
    max-width: 95%;
    flex-wrap: wrap;
    overflow-y: scroll;
    justify-content: center;
    max-height: 8vh;
    padding: 5px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .tags::-webkit-scrollbar {
    display: none;
  }
  .tag {
    font-size: 0.88rem;
    padding: 4px 10px;
    border-radius: 16px;
  }
  .footer {
    font-size: 0.85rem;
    padding: 18px 0 8px 0;
  }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* General body and container setup */
body {
    font-family: 'Inter', sans-serif;
    color: #333;
}

.container {
    max-width: 1020px;
    margin: 0 auto;
    padding: 20px;
    width: 80vw;
}

/* Make logo clickable */
.logo-title a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}


/* Search header adjustments */
.search-header {
    width: 100%;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 25px; /* Add space below header */
}

/* Center the logo and search box on the search page, similar to index */
.search-header .logo-title {
    justify-content: center;
}
.search-header .search-box {
    margin: 20px auto;
}


/* Main results container */
.results-main-container {
    width: 100%;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Source filters section */
.source-filters {
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.filters-title-wrapper {
    position: relative;
    padding-left: 15px;
}

.filters-title-wrapper::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 100%;
    background-color: #6f55ff;
    border-radius: 2px;
}

.filters-title {
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: #ffffff;
    border: 1px solid #8977ff;
    border-radius: 20px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.filter-btn:hover {
    background-color: #e0e0e0;
    border-color: #ccc;
}

.filter-btn.active {
    background-color: #6f55ff45;
    color: #6f55ff;
    border-color: #6f55ff;
}

.filter-btn img {
    width: 68px;
    height: 20px;
}

/* Search results list */
.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 70vh;
}

.result-item {
    background-color: #fff;
    border: 1px solid #e9e9e9;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.result-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.item-main {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.item-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
}

.item-title a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
}

.item-title a:hover {
    color: #6f55ff;
}

.item-index {
    color: #888;
    margin-top: 2px;
}

.file-icon {
    width: 20px;
    height: 20px;
}

.tag-recommend {
    background-color: #ff4757;
    color: white;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 2px;
    font-weight: bold;
    white-space: nowrap;
}

.item-info {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #777;
}

.source-info {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 22px;
}

.source-icon {
    height: 20px;
    width: auto;
}

.item-actions {
    display: flex;
    flex-direction: row;
    gap: 12px;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.item-actions .action-btn {
    flex: 1;
    text-align: center;
}

.action-btn {
    border: 1px solid #ccc;
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}
.action-btn:hover {
    border-color: #6f55ff;
    color: #6f55ff;
}

.btn-goto {
    background-color: #6f55ff;
    color: white;
    border-color: #6f55ff;
}

.btn-goto:hover {
    background-color: #5844cc;
    border-color: #5844cc;
    color: white;
}

.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #ccc;
    font-size: 0.9em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        width: 92vw !important;
    }

    .search-header, .results-main-container {
        padding: 15px;
    }

    .search-box-inner button span {
        display: none;
    }

    .search-box-inner button svg {
        margin: 0 auto;
    }

    .search-box-inner button {
      width: 30px;
      padding: 0;
  }
    
    .filters {
        flex-wrap: wrap;
        justify-content: center;
    }

    .source-filters {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .result-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 15px;
    }

    .item-actions {
        padding-left: 0;
        justify-content: flex-end;
        border-top: 1px solid #f0f0f0;
        padding-top: 15px;
        margin-top: 5px;
    }

    .item-title {
        font-size: 1rem;
    }
    
    .item-info {
       flex-direction: column;
       align-items: flex-start;
       gap: 8px;
    }
}

@media (max-width: 480px) {
    .item-actions {
        flex-direction: column;
        gap: 8px;
    }

    .action-btn {
        width: 100%;
        text-align: center;
    }

    .item-title a {
        word-break: break-all;
    }
}

/* Added from search.html */
.results-main-container {
  position: relative;
}
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  align-items: center;
  z-index: 10;
}
.loader {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #8A2BE2;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.2));
  margin-top: 50px;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.scroll-loader-container {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
}
.item-details-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.item-title {
  display: flex;
  align-items: flex-start;
  overflow: hidden;
}
.item-title a {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-content {
  font-size: 0.9rem;
  color: #666;
  margin-top: 8px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-actions {
  white-space: nowrap;
  flex-shrink: 0;
}
.item-info {
  display: flex;
  align-items: center;
  margin-top: 14px;
}
.tag-new {
  background-color: #8874ff;
  color: white;
  padding: 3px 4px;
  font-size: 10px;
  border-radius: 3px;
  white-space: nowrap;
}

.item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-name {
  font-size: 0.85rem;
  color: #777;
}

@media (max-width: 768px) {
  .logo-title img {
    width: 40px;
    height: 40px;
  }

  .logo-title h1 {
    font-size: 24px;
  }
  
  .logo-title .pro-badge {
    font-size: 14px;
    padding: 4px 6px;
  }

  .item-index {
    display: none;
  }

  .item-title a {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .result-item {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
  }

  .item-actions {
    display: flex;
    flex-direction: row;
    gap: 12px;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
  }
} 