<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Safe Ride Verification | OneQRScan</title>

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;700;800;900&display=swap" rel="stylesheet">

<style>
:root {
  --bg-app: #FFFFFF;
  --bg-page: #E2E8F0;
  --surface: #FFFFFF;
  --surface-alt: #F8FAFC;
  --primary: #1E3A8A; /* Deep Trust/Police Blue */
  --primary-light: #EFF6FF;
  --primary-accent: #3B82F6;
  --success: #059669;
  --success-light: #ECFDF5;
  --danger: #DC2626;
  --danger-light: #FEF2F2;
  --commercial-yellow: #FBBF24; /* Indian Commercial Plate Yellow */
  --text-main: #0F172A;
  --text-muted: #475569;
  --text-light: #94A3B8;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

h1, h2, h3, h4, .brand-text, .plate-text { font-family: 'Outfit', sans-serif; }

/* ─── APP CONTAINER ─── */
.app-container {
  width: 100%; max-width: 480px; background: var(--bg-app);
  min-height: 100vh; position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
  overflow-x: hidden; padding-bottom: 100px;
}

/* ─── HEADER & COVER (Authority Theme) ─── */
.header-cover {
  height: 170px;
  background: linear-gradient(135deg, var(--primary) 0%, #1E40AF 100%);
  position: relative;
  border-bottom-left-radius: 24px; border-bottom-right-radius: 24px;
}
.header-cover::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}
.co-brand {
  position: absolute; top: 20px; left: 20px; right: 20px; z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-start;
}
.police-shield {
  background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(8px);
  color: #fff; font-size: 0.75rem; font-weight: 600;
  padding: 6px 12px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; gap: 6px; letter-spacing: 0.5px;
}
.police-shield svg { width: 14px; height: 14px; fill: #FBBF24; }

/* ─── DRIVER PROFILE SECTION ─── */
.profile-section {
  padding: 0 24px; margin-top: -60px;
  position: relative; z-index: 10; text-align: center;
}
.avatar-wrap {
  width: 120px; height: 120px; margin: 0 auto 12px;
  border-radius: 20px; padding: 4px; background: var(--bg-app);
  position: relative; box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.avatar {
  width: 100%; height: 100%; border-radius: 16px;
  background: var(--surface-alt); object-fit: cover;
}
.verified-shield {
  position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
  background: var(--success); color: #fff;
  padding: 6px 16px; border-radius: 100px; font-size: 0.75rem; font-weight: 700;
  border: 3px solid var(--bg-app); white-space: nowrap; letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4); display: flex; align-items: center; gap: 4px;
}
.verified-shield svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 3; }

.driver-name { font-size: 1.8rem; font-weight: 800; color: var(--text-main); margin-top: 16px; letter-spacing: -0.5px; }
.driver-rating { display: flex; align-items: center; justify-content: center; gap: 4px; font-weight: 600; color: var(--text-muted); font-size: 0.95rem; margin-top: 4px; }
.driver-rating svg { width: 16px; height: 16px; fill: var(--commercial-yellow); }

/* ─── REALISTIC LICENSE PLATE ─── */
.vehicle-plate-wrap {
  margin: 24px 24px 32px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.plate-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.license-plate {
  background: var(--commercial-yellow); border: 3px solid #000;
  border-radius: 8px; padding: 12px 24px;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.4), 0 4px 12px rgba(0,0,0,0.08);
  display: flex; align-items: center; gap: 12px; position: relative;
  overflow: hidden;
}
.plate-ind { display: flex; flex-direction: column; align-items: center; font-family: sans-serif; }
.plate-ind span { font-size: 0.5rem; font-weight: 800; color: #000; letter-spacing: 1px; margin-top: 2px; }
.plate-ind-circle { width: 14px; height: 14px; border: 1px solid #000; border-radius: 50%; display: grid; place-items: center; }
.plate-ind-circle::after { content:''; width: 6px; height: 6px; background: #000; border-radius: 50%; }
.plate-text { font-size: 2.2rem; font-weight: 900; color: #000; letter-spacing: 2px; line-height: 1; }

/* ─── QUICK ACTIONS (SOS & Share) ─── */
.action-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin: 0 24px 32px;
}
.action-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 20px 12px; border-radius: 16px; cursor: pointer; border: 1px solid var(--border-strong);
  transition: transform 0.2s; box-shadow: 0 4px 12px rgba(0,0,0,0.02); text-decoration: none;
}
.action-card:active { transform: scale(0.96); }
.action-card span { font-size: 0.95rem; font-weight: 700; color: var(--text-main); }
.action-card p { font-size: 0.75rem; color: var(--text-muted); line-height: 1.3; }

.action-sos { background: var(--danger-light); border-color: rgba(220, 38, 38, 0.3); }
.action-sos .icon { width: 50px; height: 50px; border-radius: 50%; background: var(--danger); color: #fff; display: grid; place-items: center; animation: pulseAlert 2s infinite; }
.action-sos span { color: var(--danger); }

.action-track { background: var(--primary-light); border-color: rgba(59, 130, 246, 0.3); }
.action-track .icon { width: 50px; height: 50px; border-radius: 50%; background: var(--primary-accent); color: #fff; display: grid; place-items: center; }

@keyframes pulseAlert {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* ─── SECTION STYLES ─── */
.section-wrap { padding: 0 24px; margin-bottom: 24px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.icon-circle {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--surface-alt); color: var(--text-muted); display: grid; place-items: center; border: 1px solid var(--border);
}
.icon-circle svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.section-title { font-size: 1.1rem; font-weight: 700; color: var(--text-main); }

/* ─── INFO CARDS ─── */
.info-card {
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 16px; padding: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.data-item p { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.data-item h4 { font-family: 'Inter', sans-serif; font-size: 0.95rem; font-weight: 600; color: var(--text-main); }
.status-tag { display: inline-block; padding: 4px 10px; background: var(--success-light); color: var(--success); font-size: 0.75rem; font-weight: 700; border-radius: 6px; margin-top: 4px; }

/* ─── STICKY BOTTOM BAR (Share Ride) ─── */
.bottom-bar {
  position: fixed; bottom: 0; width: 100%; max-width: 480px;
  background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border); padding: 16px 24px 24px;
  display: flex; flex-direction: column; gap: 12px; z-index: 100;
}
.btn-whatsapp {
  width: 100%; background: #25D366; color: #fff; border: none; border-radius: 14px;
  padding: 16px; font-weight: 700; font-size: 1.05rem; font-family: 'Inter', sans-serif;
  display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
  transition: transform 0.2s, background 0.2s; box-shadow: 0 8px 20px rgba(37, 211, 102, 0.25);
}
.btn-whatsapp:active { transform: scale(0.97); background: #1EBE5D; }
.btn-whatsapp svg { width: 22px; height: 22px; fill: currentColor; }
.bottom-branding { text-align: center; font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }
.bottom-branding a { color: var(--primary); text-decoration: none; font-weight: 700; font-family: 'Outfit'; }

/* Animation Classes */
.fade-up { opacity: 0; transform: translateY(20px); animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* Toast */
#toast {
  visibility: hidden; min-width: 250px; background-color: var(--text-main); color: #fff;
  text-align: center; border-radius: 10px; padding: 14px; position: fixed; z-index: 1000; left: 50%; bottom: 120px;
  transform: translateX(-50%); font-size: 0.9rem; font-weight: 600; box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
#toast.show { visibility: visible; animation: fadein 0.3s, fadeout 0.3s 2.5s; }
@keyframes fadein { from { bottom: 100px; opacity: 0; } to { bottom: 120px; opacity: 1; } }
@keyframes fadeout { from { bottom: 120px; opacity: 1; } to { bottom: 100px; opacity: 0; } }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 9999;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-content {
  background: #fff; width: 90%; max-width: 360px; border-radius: 20px; padding: 24px;
  text-align: center; transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-content h3 { color: var(--danger); font-size: 1.4rem; margin-bottom: 12px; }
.modal-content p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 24px; line-height: 1.5; }
.btn-row { display: flex; gap: 12px; }
.btn-cancel { flex: 1; padding: 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-alt); font-weight: 600; cursor: pointer; }
.btn-confirm { flex: 1; padding: 14px; border-radius: 12px; border: none; background: var(--danger); color: #fff; font-weight: 600; cursor: pointer; }
</style>
</head>
<body>

<div class="app-container">
  
  <div class="header-cover">
    <div class="co-brand">
      <div class="police-shield">
        <svg viewBox="0 0 24 24"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>
        City Traffic Police
      </div>
      <div style="color: rgba(255,255,255,0.8); font-size: 0.75rem; text-align: right; font-weight: 500;">
        Women's Safety<br>Initiative
      </div>
    </div>
  </div>

  <div class="profile-section fade-up">
    <div class="avatar-wrap">
      <img src="https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80" alt="Driver Photo" class="avatar">
      <div class="verified-shield">
        <svg viewBox="0 0 24 24" fill="none"><polyline points="20 6 9 17 4 12"/></svg>
        POLICE VERIFIED
      </div>
    </div>
    <h1 class="driver-name">Muthu Kumar</h1>
    <div class="driver-rating">
      4.8 <svg viewBox="0 0 24 24"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>
      <span style="color: var(--text-light); font-weight: 400; font-size: 0.85rem;">(1,240 trips)</span>
    </div>
  </div>

  <div class="vehicle-plate-wrap fade-up delay-1">
    <span class="plate-label">Auto Rickshaw Details</span>
    <div class="license-plate">
      <div class="plate-ind">
        <div class="plate-ind-circle"></div>
        <span>IND</span>
      </div>
      <span class="plate-text">TN 09 CX 5678</span>
    </div>
  </div>

  <div class="action-grid fade-up delay-1">
    <div class="action-card action-sos" onclick="openSOS()">
      <div class="icon">
        <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 12 19.79 19.79 0 0 1 1.61 3.59a2 2 0 0 1 2-2.18h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 8.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z"/></svg>
      </div>
      <div>
        <span>Emergency SOS</span>
        <p>Alert Police instantly</p>
      </div>
    </div>
    
    <div class="action-card action-track" onclick="showToast('Tracking link generated. Ready to share.')">
      <div class="icon">
        <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>
      </div>
      <div>
        <span>Live Tracking</span>
        <p>GPS active & recording</p>
      </div>
    </div>
  </div>

  <div class="section-wrap fade-up delay-2">
    <div class="section-head">
      <div class="icon-circle">
        <svg viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="10" rx="2"/><circle cx="12" cy="16" r="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>
      </div>
      <h2 class="section-title">Background Check</h2>
    </div>

    <div class="info-card">
      <div class="data-grid">
        <div class="data-item">
          <p>Clearance Status</p>
          <div class="status-tag">No Criminal Record</div>
        </div>
        <div class="data-item">
          <p>Last Verified On</p>
          <h4>14 Jan 2026</h4>
        </div>
        <div class="data-item">
          <p>Driving License</p>
          <h4>TN09 **** 1234</h4>
        </div>
        <div class="data-item">
          <p>Union / Fleet</p>
          <h4>Pondy City Auto Union</h4>
        </div>
      </div>
    </div>
  </div>

  <div class="section-wrap fade-up delay-2">
    <div class="info-card" style="display: flex; gap: 16px; align-items: center; border-color: rgba(59, 130, 246, 0.2); background: var(--primary-light);">
      <div style="width: 48px; height: 48px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex-shrink: 0; box-shadow: 0 4px 8px rgba(0,0,0,0.05);">
        <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="var(--primary-accent)" stroke-width="2"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"/></svg>
      </div>
      <div>
        <h4 style="font-size: 0.95rem; font-weight: 700; color: var(--primary);">Safe Ride Guarantee</h4>
        <p style="font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; margin-top: 2px;">This driver and vehicle are officially registered. All ride data is logged for your safety.</p>
      </div>
    </div>
  </div>

  <div class="bottom-bar">
    <button class="btn-whatsapp" onclick="shareToWhatsApp()">
      <svg viewBox="0 0 24 24"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"/></svg>
      Share Ride Details to Family
    </button>
    <div class="bottom-branding">
      Infrastructure by <a href="https://oneqrscan.com">OneQRScan</a>
    </div>
  </div>

  <div class="modal-overlay" id="sosModal">
    <div class="modal-content">
      <div style="width: 60px; height: 60px; background: var(--danger-light); color: var(--danger); border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px;">
        <svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>
      </div>
      <h3>Trigger Emergency?</h3>
      <p>This will send your live location and vehicle details to the Police Control Room instantly.</p>
      <div class="btn-row">
        <button class="btn-cancel" onclick="closeSOS()">Cancel</button>
        <button class="btn-confirm" onclick="confirmSOS()">Yes, Send Alert</button>
      </div>
    </div>
  </div>

  <div id="toast"></div>

</div>

<script>
// Show Toast message
function showToast(message) {
  var toast = document.getElementById("toast");
  toast.innerText = message;
  toast.className = "show";
  setTimeout(function(){ toast.className = toast.className.replace("show", ""); }, 3500);
}

// WhatsApp Share Logic
function shareToWhatsApp() {
  const driverName = "Muthu Kumar";
  const vehicleNo = "TN 09 CX 5678";
  const trackLink = "https://oneqrscan.com/track/tn09cx5678";
  
  const msg = `🚕 *I'm taking an auto now.*\nDriver: ${driverName}\nVehicle: ${vehicleNo}\n\n📍 *Track my live location here:*\n${trackLink}\n\n_Verified by OneQRScan City Safety_`;
  
  const whatsappUrl = `https://wa.me/?text=${encodeURIComponent(msg)}`;
  window.open(whatsappUrl, '_blank');
}

// SOS Modal Logic
const modal = document.getElementById('sosModal');

function openSOS() {
  modal.classList.add('active');
}

function closeSOS() {
  modal.classList.remove('active');
}

function confirmSOS() {
  closeSOS();
  showToast("🚨 SOS Alert Sent! Police Control Room notified.");
  setTimeout(() => {
    window.location.href = "tel:100"; 
  }, 2000);
}
</script>

</body>
</html>