  :root {
    --green: #0a7c41;
    --green-light: #12a356;
    --yellow: #f5c518;
    --red: #e53935;
    --blue: #1a73e8;
    --bg: #f8f9e8;
    --card: #ffffff;
    --text: #202124;
    --muted: #70757a;
    --border: #dfe1e5;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    font-family: 'Hind Siliguri', sans-serif;
    background: var(--bg);
    min-height: 100vh;
    color: var(--text);
  }

  /* ===== HOME PAGE ===== */
  #home-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: hidden;
  }

  #home-page::before {
    content: '';
    position: absolute;
    top: -100px; left: -100px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(10,124,65,0.08), transparent 70%);
    pointer-events: none;
  }

  .logo-area {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeDown 0.6s ease;
  }

  .logo-leaf {
    font-size: 60px;
    display: block;
    animation: sway 3s ease-in-out infinite;
  }

  @keyframes sway {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
  }

  .logo-text {
    font-family: 'Tiro Bangla', serif;
    font-size: 52px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1;
  }

  .logo-text span:nth-child(1) { color: #1a73e8; }
  .logo-text span:nth-child(2) { color: #ea4335; }
  .logo-text span:nth-child(3) { color: #fbbc04; }
  .logo-text span:nth-child(4) { color: var(--green); }
  .logo-text span:nth-child(5) { color: #1a73e8; }
  .logo-text span:nth-child(6) { color: #ea4335; }
  .logo-text span:nth-child(7) { color: var(--green); }

  .logo-sub {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
    font-style: italic;
  }

  .search-box-wrapper {
    width: 100%;
    max-width: 580px;
    position: relative;
    animation: fadeUp 0.6s ease 0.2s both;
  }

  .search-input {
    width: 100%;
    padding: 16px 60px 16px 24px;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 18px;
    font-family: 'Hind Siliguri', sans-serif;
    outline: none;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s;
    color: var(--text);
  }

  .search-input:focus {
    border-color: var(--green);
    box-shadow: 0 4px 20px rgba(10,124,65,0.15);
  }

  .search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    cursor: pointer;
    transition: transform 0.2s;
  }

  .search-icon:hover { transform: translateY(-50%) scale(1.2); }

  .search-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 18px;
    animation: fadeUp 0.6s ease 0.35s both;
  }

  .search-btns button {
    padding: 10px 22px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f8f9fa;
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
  }

  .search-btns button:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #ccc;
  }

  .lucky-msg {
    display: none;
    margin-top: 14px;
    padding: 12px 20px;
    background: #fff9e6;
    border: 1px solid var(--yellow);
    border-radius: 12px;
    font-size: 15px;
    color: #7a5c00;
    text-align: center;
    max-width: 500px;
    animation: pop 0.3s ease;
  }

  @keyframes pop {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
  }

  .trending {
    margin-top: 35px;
    text-align: center;
    animation: fadeUp 0.6s ease 0.5s both;
  }

  .trending-title {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 10px;
  }

  .trending-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 500px;
  }

  .tag {
    padding: 6px 14px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
  }

  .tag:hover {
    background: var(--green);
    color: white;
    border-color: var(--green);
  }

  /* ===== RESULTS PAGE ===== */
  #results-page {
    display: none;
    min-height: 100vh;
  }

  /* ===== RESULTS HEADER ===== */
  .results-header {
    position: sticky;
    top: 0;
    background: white;
    border-bottom: 1px solid var(--border);
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }

  /* Desktop: single row */
  .header-top-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
  }

  .header-logo {
    font-family: 'Tiro Bangla', serif;
    font-size: 26px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
  }

  .header-logo span:nth-child(1) { color: #1a73e8; }
  .header-logo span:nth-child(2) { color: #ea4335; }
  .header-logo span:nth-child(3) { color: #fbbc04; }
  .header-logo span:nth-child(4) { color: var(--green); }
  .header-logo span:nth-child(5) { color: #1a73e8; }
  .header-logo span:nth-child(6) { color: #ea4335; }
  .header-logo span:nth-child(7) { color: var(--green); }

  .header-search {
    flex: 1;
    max-width: 600px;
    position: relative;
  }

  .header-search input {
    width: 100%;
    padding: 10px 44px 10px 18px;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 16px;
    font-family: 'Hind Siliguri', sans-serif;
    outline: none;
    transition: all 0.3s;
  }

  .header-search input:focus {
    border-color: var(--green);
    box-shadow: 0 2px 10px rgba(10,124,65,0.12);
  }

  .header-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
  }

  /* Desktop-only icons */
  .header-icons { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
  .header-icon-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
  }
  .header-icon-btn:hover { background: #f1f3f4; }
  .header-avatar {
    width: 32px; height: 32px;
    background: var(--green);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: white; font-weight: 700;
    cursor: pointer; flex-shrink: 0;
  }

  /* ===== MOBILE HEADER (Google style) ===== */
  @media (max-width: 640px) {
    .header-top-row {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      padding: 10px 14px 6px;
      gap: 0;
    }

    /* On mobile, hide the inline search — show row 2 instead */
    .header-search { display: none; }

    .header-logo {
      font-size: 22px;
      grid-column: 2;
      justify-self: center;
    }

    .header-left-icons {
      grid-column: 1;
      display: flex;
      justify-content: flex-start;
    }

    .header-right-icons {
      grid-column: 3;
      display: flex;
      justify-content: flex-end;
      align-items: center;
      gap: 6px;
    }

    /* Mobile search row below logo row */
    .header-search-row {
      display: flex !important;
      align-items: center;
      margin: 4px 14px 10px;
      border: 1px solid var(--border);
      border-radius: 50px;
      background: #f1f3f4;
      padding: 8px 14px;
      gap: 10px;
    }

    .header-search-row input {
      flex: 1;
      border: none;
      background: transparent;
      font-size: 16px;
      font-family: 'Hind Siliguri', sans-serif;
      outline: none;
      color: var(--text);
    }

    .header-search-row .sr-icon {
      font-size: 17px;
      flex-shrink: 0;
      cursor: pointer;
    }
  }

  /* Desktop: hide mobile-only elements */
  .header-left-icons,
  .header-right-icons,
  .header-search-row { display: none; }


  .results-body {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 20px 60px;
  }

  .results-stats {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
  }

  .result-card {
    margin-bottom: 28px;
    animation: fadeUp 0.4s ease both;
  }

  .result-card:nth-child(1) { animation-delay: 0.05s; }
  .result-card:nth-child(2) { animation-delay: 0.1s; }
  .result-card:nth-child(3) { animation-delay: 0.15s; }
  .result-card:nth-child(4) { animation-delay: 0.2s; }
  .result-card:nth-child(5) { animation-delay: 0.25s; }

  .result-url {
    font-size: 12px;
    color: var(--green);
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .result-favicon {
    width: 16px;
    height: 16px;
    background: var(--green-light);
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: white;
  }

  .result-title {
    font-size: 20px;
    color: var(--blue);
    cursor: pointer;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
  }

  .result-title:hover { text-decoration: underline; }

  .result-desc {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin-top: 4px;
  }

  .result-desc .highlight {
    color: var(--text);
    font-weight: 600;
  }

  /* Special featured box */
  .featured-box {
    background: white;
    border: 1px solid var(--border);
    border-left: 4px solid var(--green);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 28px;
    animation: fadeUp 0.4s ease;
  }

  .featured-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--green);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
  }

  .featured-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
  }

  /* No results */
  .no-results {
    text-align: center;
    padding: 60px 20px;
  }

  .no-results .emoji { font-size: 64px; margin-bottom: 16px; }
  .no-results h3 { font-size: 22px; color: var(--text); margin-bottom: 8px; }
  .no-results p { color: var(--muted); font-size: 15px; }

  /* Loading animation */
  .loading-dots {
    display: none;
    justify-content: center;
    padding: 40px;
    gap: 8px;
  }

  .loading-dots.active { display: flex; }

  .dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    animation: bounce 0.8s ease infinite;
  }
  .dot:nth-child(1) { background: #1a73e8; animation-delay: 0s; }
  .dot:nth-child(2) { background: #ea4335; animation-delay: 0.15s; }
  .dot:nth-child(3) { background: #fbbc04; animation-delay: 0.3s; }
  .dot:nth-child(4) { background: var(--green); animation-delay: 0.45s; }

  @keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
  }

  @keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Footer */
  .site-footer {
    position: relative;
    margin-top: 30px;
    background: #f2f2f2;
    border-top: 1px solid var(--border);
    padding: 10px 20px;
    font-size: 12px;
    color: var(--muted);
    text-align: center;
  }

  /* Responsive */
  @media (max-width: 600px) {
    .logo-text { font-size: 36px; }
    .logo-leaf { font-size: 44px; }
  }

  /* ===== CUSTOM POPUP / TOAST ===== */

  /* Overlay modal */
  .pata-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    z-index: 9000;
    align-items: center;
    justify-content: center;
  }
  .pata-overlay.show { display: flex; }

  .pata-modal {
    background: #fff;
    border-radius: 20px;
    padding: 36px 32px 28px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0,0,0,0.22);
    animation: modalBounce 0.35s cubic-bezier(.34,1.56,.64,1) both;
    position: relative;
  }

  @keyframes modalBounce {
    from { transform: scale(0.7); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
  }

  .pata-modal .modal-emoji {
    font-size: 52px;
    margin-bottom: 12px;
    display: block;
    animation: shake 0.6s ease 0.2s both;
  }

  @keyframes shake {
    0%,100%{ transform:rotate(0deg); }
    25%    { transform:rotate(-12deg); }
    75%    { transform:rotate(12deg); }
  }

  .pata-modal h3 {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 10px;
    font-family: 'Hind Siliguri', sans-serif;
  }

  .pata-modal p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 22px;
  }

  .pata-modal .modal-close {
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 11px 32px;
    font-size: 15px;
    font-family: 'Hind Siliguri', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
  }
  .pata-modal .modal-close:hover { background: var(--green-light); transform: scale(1.04); }

  /* Toast notification */
  .pata-toast {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    background: linear-gradient(135deg, #0a7c41, #12a356);
    color: #fff;
    padding: 14px 22px;
    border-radius: 50px;
    font-size: 14px;
    font-family: 'Hind Siliguri', sans-serif;
    box-shadow: 0 8px 28px rgba(10,124,65,0.35);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    white-space: nowrap;
    max-width: 90vw;
    text-align: center;
  }
  .pata-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
