/* 头部标题 */
.custom-header {
  --background: linear-gradient(135deg, #3A5FE5 0%, #6A8EFF 100%);
  --border-width: 0;
  --box-shadow: 0 2px 10px rgba(58, 95, 229, 0.3);
  padding: 0 16px;
  
  .header-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    padding: 0 12px;
  }

  .search-button {
    --color: white;
    --background-hover: rgba(255, 255, 255, 0.1);
    --background-activated: rgba(255, 255, 255, 0.2);
    --border-radius: 50%;
    --padding-start: 8px;
    --padding-end: 8px;
    
    ion-icon {
      font-size: 1.4rem;
    }
  }

  
  /* 添加底部细线 */
  &:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
  }
}

//
.document-detail-container {
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 20px;
}

.document-header-card {
  text-align: center;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(var(--ion-color-primary-rgb), 0.1);
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(var(--ion-color-primary-rgb), 0.05) 0%, rgba(var(--ion-color-secondary-rgb), 0.05) 100%);
  border: 1px solid rgba(var(--ion-color-primary-rgb), 0.1);

  .icon-container {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    padding-top: 16px;
  }

  .document-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  }

  .document-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ion-color-primary);
    margin-bottom: 8px;
    padding: 0 16px;
  }

  .featured-badge {
    margin-top: 8px;
    margin-bottom: 16px;
    
    ion-chip {
      font-weight: 500;
      ion-icon {
        color: var(--ion-color-warning-contrast);
      }
    }
  }
}

.info-card {
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(var(--ion-color-medium-rgb), 0.1);
  
  .section-title {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ion-color-primary);
    margin-bottom: 16px;
    
    .title-icon {
      margin-right: 8px;
      font-size: 1.2rem;
    }
  }

  .document-description {
    line-height: 1.6;
    color: var(--ion-color-dark);
    margin-bottom: 16px;
    font-size: 0.95rem;
  }

  .meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    
    .meta-item {
      display: flex;
      align-items: center;
      font-size: 0.85rem;
      color: var(--ion-color-medium);
      
      ion-icon {
        margin-right: 6px;
        font-size: 1rem;
      }
    }
  }
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  
  ion-chip {
    font-weight: 500;
    --background: rgba(var(--ion-color-primary-rgb), 0.1);
    --color: var(--ion-color-primary);
  }
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  
  .action-button {
    --border-radius: 12px;
    height: 48px;
    font-weight: 500;
    font-size: 1rem;
    
    ion-icon {
      font-size: 1.2rem;
    }
  }
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 60vh;
  
  ion-spinner {
    width: 48px;
    height: 48px;
  }
  
  p {
    margin-top: 16px;
    color: var(--ion-color-medium);
    font-size: 0.95rem;
  }
}