/* ====== Base & Layout ====== */
html, body {
    height: 100%;
  }
  body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background: #fff;
    color: #181818;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 17px;
    line-height: 1.6;
  }

  /* ====== Header ====== */
  header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 16px 24px;
    background: #fff;
  }
  header h1 {
    font-size: 2.3rem;
    font-weight: 700;
    color: #181818;
    margin-bottom: 8px;
    letter-spacing: -1px;
    line-height: 1.1;
  }
  header p {
    color: #444;
    font-size: 1.08rem;
    font-weight: 400;
    margin: 0 0 4px 0;
  }

  /* ====== Search Bar & Container ====== */
  .search-container, .result-list {
    max-width: 700px;
    margin: 0 auto;
    margin-bottom: 40px;
    padding: 0 20px;
    width: 100%;
  }
  .search-bar {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 28px 0 16px;
    flex-wrap: wrap;
  }
  .search-bar input {
    flex: 1 1 260px;
    max-width: 420px;
    min-width: 0;
    padding: 15px 20px;
    border: 1.5px solid #d0d7de;
    border-radius: 16px;
    font-size: 1.05rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: border 0.2s, box-shadow 0.2s;
    outline: none;
  }
  .search-bar input:focus {
    border: 1.5px solid #888;
    box-shadow: none;
  }
  .search-bar select {
    padding: 13px 18px;
    background: #ffffff;
    border: 1.5px solid #d0d7de;
    border-radius: 16px;
    font-size: 1.05rem;
    cursor: pointer;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: border 0.2s, box-shadow 0.2s;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
  }
  .search-bar select:focus, .search-bar select:active {
    border: 1.5px solid #d0d7de;
    box-shadow: none;
    outline: none;
  }

  /* ====== Results List & Cards ====== */
  .result-list {
    /* Already styled with .search-container */
  }
  .result-card {
    background: #fff;
    border-radius: 18px;
    border: 1.5px solid #f0f0f0;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    padding: 20px 28px;
    margin-bottom: 14px;
    cursor: pointer;
    user-select: none;
    transition: box-shadow 0.22s cubic-bezier(.4,0,.2,1), border 0.18s;
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .result-card:hover {
    box-shadow: 0 8px 32px rgba(60,60,60,0.10);
    border: 1.5px solid #d0d7de;
  }
  .result-title {
    font-size: 1.13rem;
    font-weight: 600;
    margin-bottom: 0;
    color: #181818;
    word-break: break-word;
  }
  .result-meta {
    color: #666;
    font-size: 0.97rem;
    margin-top: 8px;
    margin-bottom: 2px;
    word-break: break-word;
  }
  .abstract-content {
    max-height: 0;
    opacity: 0;
    display: block;
    font-size: 0.99rem;
    color: #333;
    line-height: 1.7;
    transition: max-height 0.3s cubic-bezier(.4,0,.2,1), opacity 0.2s;
    overflow: hidden;
  }
  .result-card.expanded .abstract-content {
    max-height: 500px;
    opacity: 1;
    transition: max-height 0.4s cubic-bezier(.4,0,.2,1), opacity 0.2s;
  }
  .abstract-content p {
    margin: 10px 0;
  }

  /* ====== Abstract Buttons ====== */
  .abstract-buttons {
    margin-left: 0;
    display: flex;
    gap: 6px;
    align-items: flex-start;
  }
  .abstract-buttons a {
    text-decoration: none;
    background-color: #fff;
    color: #222;
    padding: 5px 15px;
    border-radius: 8px;
    border: 1.5px solid #d0d7de;
    font-size: 15px;
    transition: background 0.15s, border 0.15s, color 0.15s;
    display: inline-block;
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  }
  .abstract-buttons a:hover {
    background-color: #f0f0f0;
    color: #222;
    border: 1.5px solid #888;
  }

  /* Skeleton loader styles */
  .skeleton-card {
    background: #f3f3f3;
    border-radius: 8px;
    margin-bottom: 14px;
    padding: 20px 28px;
    position: relative;
    overflow: hidden;
    min-height: 70px;
    filter: blur(0.5px);
    animation: skeleton-loading 1s infinite linear alternate;
  }
  .skeleton-title, .skeleton-meta, .skeleton-buttons {
    background: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 10px;
  }
  .skeleton-title {
    width: 60%;
    height: 18px;
  }
  .skeleton-meta {
    width: 40%;
    height: 13px;
  }
  .skeleton-buttons {
    width: 80px;
    height: 28px;
    margin-top: 8px;
  }
  @keyframes skeleton-loading {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
  }

  /* ====== Responsive ====== */
  @media (max-width: 700px) {
    .search-container, .result-list {
      padding: 0 4vw;
    }
    .result-card {
      padding: 13px 8px 10px 10px;
    }
    .abstract-buttons {
      top: 12px;
      right: 10px;
    }
    .result-title {
      font-size: 1rem;
    }
    .result-meta {
      font-size: 0.92rem;
    }
    .abstract-buttons a {
      font-size: 13px;
      padding: 3px 10px;
    }
  }
  @media (max-width: 600px) {
    header {
      padding: 32px 8px 16px;
    }
    header h1 {
      font-size: 1.5rem;
    }
    header p {
      font-size: 1rem;
    }
    footer {
      font-size: 12px;
      padding: 12px 2px 10px 2px;
      border-radius: 12px 12px 0 0;
    }
  }
  @media (max-width: 480px) {
    .search-container, .result-list {
      padding: 0 1vw;
    }
    .result-card {
      padding: 9px 2px 8px 5px;
    }
    .abstract-buttons {
      top: 8px;
      right: 4px;
    }
    .result-title {
      font-size: 0.95rem;
    }
    .result-meta {
      font-size: 0.85rem;
    }
    .abstract-buttons a {
      font-size: 12px;
      padding: 2px 7px;
    }
  }

  /* ====== Footer ====== */
  footer {
    text-align: center;
    color: #888;
    font-size: 14px;
    padding: 18px 8px 16px 8px;
    background: #fff;
    margin-top: auto;
    border-radius: 18px 18px 0 0;
    letter-spacing: 0.01em;
  }
  footer a {
    color: inherit;
  }
  .result-title-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 12px;
    width: 100%;
  }
  