| <!doctype html> |
| <html lang="ar" dir="rtl"> |
| <head> |
| <meta charset="utf-8" /> |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| <title>بحث الخرائط</title> |
| <style> |
| :root{ |
| /* Palette */ |
| --primary:#4137A8; |
| --secondary:#1CADE4; |
| --success:#00B050; |
| --warn:#FFC000; |
| --muted:#5C6E88; |
|
|
| --bg:#F6F8FC; |
| --card:#FFFFFF; |
| --text:#0B1324; |
| --line:#E7ECF5; |
|
|
| --radius:22px; |
| --shadow: 0 18px 55px rgba(51,91,116,.12); |
| --shadow2: 0 10px 26px rgba(51,91,116,.10); |
| --focus: 0 0 0 6px rgba(28,173,228,.18); |
|
|
| --maxw: 980px; |
| } |
|
|
| *{box-sizing:border-box} |
| html,body{height:100%} |
| body{ |
| margin:0; |
| font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif; |
| color:var(--text); |
| background: |
| radial-gradient(900px 520px at 18% 10%, rgba(65,55,168,.12), rgba(65,55,168,0) 60%), |
| radial-gradient(900px 520px at 82% 12%, rgba(28,173,228,.14), rgba(28,173,228,0) 60%), |
| radial-gradient(900px 520px at 50% 110%, rgba(0,176,80,.10), rgba(0,176,80,0) 55%), |
| linear-gradient(180deg, #ffffff, var(--bg)); |
| display:flex; |
| flex-direction:column; |
| overflow-x:hidden; |
| } |
|
|
| .wrap{ |
| width:min(var(--maxw), 92vw); |
| margin: 0 auto; |
| padding: 26px 0 92px; |
| flex:1; |
| display:flex; |
| flex-direction:column; |
| gap: 14px; |
| } |
|
|
| /* Header */ |
| header{ |
| display:flex; |
| align-items:center; |
| justify-content:space-between; |
| gap:12px; |
| flex-wrap:wrap; |
| padding-top: 4px; |
| } |
| .title{ |
| display:flex; |
| align-items:center; |
| gap:12px; |
| } |
| .logo{ |
| width:44px;height:44px;border-radius:16px; |
| background: |
| radial-gradient(16px 16px at 28% 26%, rgba(255,255,255,.9), rgba(255,255,255,0) 60%), |
| linear-gradient(135deg, var(--primary), var(--secondary)); |
| box-shadow: var(--shadow2); |
| flex: 0 0 auto; |
| } |
| h1{ |
| margin:0; |
| font-size: 18px; |
| letter-spacing:.2px; |
| color: var(--primary); |
| font-weight: 850; |
| line-height:1; |
| } |
| .chip{ |
| display:inline-flex; |
| align-items:center; |
| gap:8px; |
| padding: 10px 12px; |
| border-radius:999px; |
| border:1px solid rgba(28,173,228,.22); |
| background: linear-gradient(180deg, #ffffff, rgba(28,173,228,.08)); |
| color: var(--muted); |
| font-size: 12.5px; |
| box-shadow: 0 10px 24px rgba(51,91,116,.10); |
| white-space:nowrap; |
| } |
| .chip b{ color: var(--primary); font-weight: 900; } |
|
|
| /* Main card */ |
| .card{ |
| border-radius: var(--radius); |
| background: rgba(255,255,255,.92); |
| border: 1px solid var(--line); |
| box-shadow: var(--shadow); |
| overflow:hidden; |
| position:relative; |
| } |
| .card::before{ |
| content:""; |
| position:absolute; inset:-2px; |
| background: |
| radial-gradient(420px 260px at 15% 0%, rgba(65,55,168,.10), rgba(65,55,168,0) 60%), |
| radial-gradient(460px 280px at 85% 8%, rgba(28,173,228,.10), rgba(28,173,228,0) 62%); |
| pointer-events:none; |
| } |
| .inner{ |
| position:relative; |
| padding: 18px; |
| } |
|
|
| /* Centered panel */ |
| .panel{ |
| width:min(860px, 100%); |
| margin: 0 auto; |
| display:grid; |
| gap: 12px; |
| padding: 6px 0 2px; |
| } |
|
|
| /* Field + button group */ |
| .row{ |
| display:grid; |
| grid-template-columns: 1fr auto; |
| gap: 12px; |
| align-items:stretch; |
| justify-items:center; |
| } |
| @media(max-width: 720px){ |
| .row{ grid-template-columns: 1fr; } |
| .chip{ display:none; } |
| } |
|
|
| .field{ |
| width:100%; |
| background:#fff; |
| border:1px solid var(--line); |
| border-radius: 18px; |
| box-shadow: 0 10px 26px rgba(51,91,116,.10); |
| padding: 14px; |
| display:flex; |
| align-items:center; |
| gap: 10px; |
| justify-content:center; |
| } |
| .fieldIcon{ |
| width:38px;height:38px;border-radius:14px; |
| display:grid;place-items:center; |
| background: linear-gradient(135deg, rgba(65,55,168,.10), rgba(28,173,228,.10)); |
| border: 1px solid rgba(65,55,168,.12); |
| color: var(--primary); |
| font-size: 18px; |
| flex:0 0 auto; |
| } |
| input{ |
| width:100%; |
| border:none; |
| outline:none; |
| font-size: 16px; |
| padding: 0; |
| background:transparent; |
| text-align:center; |
| color: var(--text); |
| } |
| input::placeholder{ color: rgba(92,110,136,.55); } |
|
|
| .btnGroup{ |
| display:grid; |
| grid-template-columns: 1fr 1fr; |
| gap: 10px; |
| width: 320px; |
| justify-self:stretch; |
| } |
| @media(max-width: 720px){ |
| .btnGroup{ width:100%; } |
| } |
|
|
| .btn{ |
| height: 66px; |
| border-radius: 18px; |
| border:1px solid transparent; |
| cursor:pointer; |
| font-size: 15px; |
| font-weight: 900; |
| display:flex; |
| align-items:center; |
| justify-content:center; |
| gap:10px; |
| box-shadow: 0 10px 26px rgba(51,91,116,.10); |
| transition: transform .06s ease, opacity .2s ease, box-shadow .2s ease; |
| user-select:none; |
| } |
| .btn:active{ transform: translateY(1px); } |
| .btn.primary{ |
| color:#fff; |
| background: linear-gradient(135deg, var(--primary), var(--secondary)); |
| } |
| .btn.secondary{ |
| background:#fff; |
| border-color: var(--line); |
| color: var(--muted); |
| } |
| .btn:hover{ opacity:.94; } |
|
|
| .meta{ |
| display:flex; |
| align-items:center; |
| justify-content:space-between; |
| gap: 10px; |
| flex-wrap:wrap; |
| color: var(--muted); |
| font-size: 13px; |
| padding: 0 4px; |
| } |
| .pill{ |
| display:inline-flex; |
| align-items:center; |
| gap:8px; |
| padding: 8px 10px; |
| border-radius: 999px; |
| border: 1px solid rgba(0,176,80,.18); |
| background: linear-gradient(180deg, #ffffff, rgba(0,176,80,.08)); |
| color: #0a5a32; |
| font-weight: 900; |
| } |
|
|
| /* Results */ |
| .results{ |
| margin-top: 8px; |
| display:grid; |
| gap: 10px; |
| } |
|
|
| .result{ |
| background:#fff; |
| border:1px solid var(--line); |
| border-radius: 18px; |
| padding: 14px; |
| box-shadow: 0 10px 26px rgba(51,91,116,.10); |
| display:flex; |
| align-items:center; |
| justify-content:space-between; |
| gap: 12px; |
| } |
| .name{ |
| font-weight: 950; |
| font-size: 15.5px; |
| line-height:1.7; |
| white-space:nowrap; |
| overflow:hidden; |
| text-overflow:ellipsis; |
| max-width: 64ch; |
| } |
| @media(max-width: 720px){ |
| .name{ max-width: 42ch; } |
| .result{ flex-direction: column; align-items: stretch; } |
| .actions{ justify-content: stretch; } |
| .openBtn,.copyBtn{ width: 100%; justify-content:center; } |
| } |
|
|
| .actions{ |
| display:flex; |
| gap: 8px; |
| flex-wrap:wrap; |
| justify-content:flex-end; |
| } |
|
|
| .openBtn, .copyBtn{ |
| border-radius: 14px; |
| padding: 10px 12px; |
| border: 1px solid transparent; |
| font-size: 13.5px; |
| font-weight: 950; |
| cursor:pointer; |
| display:inline-flex; |
| align-items:center; |
| gap: 8px; |
| white-space:nowrap; |
| transition: transform .06s ease, opacity .2s ease; |
| user-select:none; |
| text-decoration:none; |
| } |
| .openBtn{ |
| color:#fff; |
| background: linear-gradient(135deg, var(--primary), var(--secondary)); |
| box-shadow: 0 10px 22px rgba(65,55,168,.18); |
| } |
| .copyBtn{ |
| color:#0b1324; |
| background: linear-gradient(135deg, #ffffff, rgba(0,176,80,.12)); |
| border-color: rgba(0,176,80,.22); |
| } |
| .openBtn:active,.copyBtn:active{ transform: translateY(1px); } |
| .openBtn:hover,.copyBtn:hover{ opacity:.93; } |
|
|
| .empty{ |
| text-align:center; |
| color: var(--muted); |
| background:#fff; |
| border: 1px dashed rgba(92,110,136,.35); |
| border-radius: 18px; |
| padding: 18px 12px; |
| } |
|
|
| mark{ |
| background: rgba(28,173,228,.12); |
| border: 1px solid rgba(28,173,228,.16); |
| color: var(--primary); |
| padding: 1px 6px; |
| border-radius: 999px; |
| } |
|
|
| /* Focus ring on the field wrapper when input focused */ |
| .field:focus-within{ |
| border-color: rgba(28,173,228,.45); |
| box-shadow: var(--focus), 0 10px 26px rgba(51,91,116,.10); |
| } |
|
|
| /* Toast */ |
| .toast{ |
| position:fixed; |
| left:50%; |
| bottom: 78px; |
| transform: translateX(-50%) translateY(14px); |
| background: rgba(51,91,116,.92); |
| color:#fff; |
| padding: 10px 14px; |
| border-radius: 999px; |
| box-shadow: 0 18px 45px rgba(0,0,0,.14); |
| opacity:0; |
| pointer-events:none; |
| transition: opacity .22s ease, transform .22s ease; |
| font-size: 13px; |
| display:flex; |
| align-items:center; |
| gap:8px; |
| z-index: 50; |
| } |
| .toast.show{ |
| opacity:1; |
| transform: translateX(-50%) translateY(0); |
| } |
| .toast .dot{ |
| width:9px;height:9px;border-radius:50%; |
| background: var(--warn); |
| box-shadow: 0 0 0 3px rgba(255,192,0,.22); |
| } |
|
|
| footer{ |
| position:fixed; |
| left:0; right:0; bottom:0; |
| text-align:center; |
| padding: 10px 14px; |
| background: rgba(255,255,255,.82); |
| border-top: 1px solid rgba(231,236,245,.95); |
| backdrop-filter: blur(10px); |
| color: var(--muted); |
| font-size: 12.5px; |
| z-index: 40; |
| } |
| footer b{ color: var(--primary); font-weight: 900; } |
| </style> |
| </head> |
| <body> |
| <div class="wrap"> |
| <header> |
| <div class="title"> |
| <div class="logo" aria-hidden="true"></div> |
| <h1>بـحـث الخـرائـط</h1> |
| </div> |
| <div class="chip" id="totalChip">إجمالي: <b>—</b></div> |
| </header> |
|
|
| <section class="card" aria-label="search"> |
| <div class="inner"> |
| <div class="panel"> |
| <div class="row"> |
| <div class="field" aria-label="search field"> |
| <div class="fieldIcon" aria-hidden="true">🔎</div> |
| <input id="q" type="text" inputmode="search" autocomplete="off" placeholder="اكتب الاسم" /> |
| </div> |
|
|
| <div class="btnGroup" aria-label="button group"> |
| <button id="btnSearch" class="btn primary" type="button">بحث</button> |
| <button id="btnClear" class="btn secondary" type="button">مسح</button> |
| </div> |
| </div> |
|
|
| <div class="meta"> |
| <div class="pill" id="countPill">النتائج: 0</div> |
| <div></div> |
| </div> |
|
|
| <div class="results" id="results" aria-live="polite"></div> |
| </div> |
| </div> |
| </section> |
| </div> |
|
|
| <div class="toast" id="toast"><span class="dot" aria-hidden="true"></span><span id="toastText">تم نسخ الرابط</span></div> |
| <footer> تصميم وإعداد <b>نوف الناصر</b></footer> |
|
|
| <script src="./script.js"></script> |
| </body> |
| </html> |
|
|