<!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>Pet Profile | 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&display=swap" rel="stylesheet">

<style>
:root {
  --bg-app: #FFFFFF;
  --bg-page: #F1F5F9;
  --surface: #FFFFFF;
  --surface-alt: #F8FAFC;
  --primary: #F59E0B; /* Amber/Orange for pets */
  --primary-dark: #D97706;
  --primary-light: #FEF3C7;
  --success: #059669;
  --success-light: #ECFDF5;
  --danger: #DC2626;
  --danger-light: #FEF2F2;
  --danger-border: #FCA5A5;
  --text-main: #0F172A;
  --text-muted: #475569;
  --text-light: #94A3B8;
  --border: rgba(0, 0, 0, 0.06);
  --border-strong: rgba(0, 0, 0, 0.1);
}

* { 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 { 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.05);
  overflow-x: hidden;
  padding-bottom: 90px;
}

/* ─── HEADER & COVER (Pet Theme) ─── */
.header-cover {
  height: 150px;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  position: relative;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  overflow: hidden;
}
/* Paw print background pattern */
.header-cover::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20px 20px, rgba(255,255,255,0.15) 20%, transparent 20%), 
                    radial-gradient(circle at 40px 10px, rgba(255,255,255,0.15) 15%, transparent 15%),
                    radial-gradient(circle at 10px 40px, rgba(255,255,255,0.15) 15%, transparent 15%),
                    radial-gradient(circle at 30px 45px, rgba(255,255,255,0.15) 25%, transparent 25%);
  background-size: 80px 80px;
  opacity: 0.4;
}
.header-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.2) 100%);
}
.pet-badge-top {
  position: absolute; top: 20px; right: 20px; z-index: 2;
  background: rgba(255, 255, 255, 0.25); backdrop-filter: blur(8px);
  color: #fff; font-size: 0.75rem; font-weight: 700;
  padding: 6px 12px; border-radius: 100px;
  display: flex; align-items: center; gap: 6px; letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ─── 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: 50%;
  padding: 5px; background: var(--bg-app);
  position: relative; box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.avatar {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--surface-alt); object-fit: cover;
}
.microchip-badge {
  position: absolute; bottom: 4px; right: 4px;
  width: 32px; height: 32px; background: var(--primary-dark);
  border: 3px solid var(--bg-app); border-radius: 50%;
  display: grid; place-items: center;
}
.microchip-badge svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2.5; }

.profile-name { font-size: 2rem; font-weight: 800; color: var(--text-main); margin-bottom: 2px; letter-spacing: -0.5px; }
.profile-title { font-size: 0.95rem; color: var(--text-muted); font-weight: 500; margin-bottom: 16px;}

/* ─── LOST ALERT BANNER ─── */
.alert-banner {
  background: var(--danger-light); border: 2px solid var(--danger-border);
  border-radius: 16px; padding: 18px; margin: 0 24px 24px;
  text-align: center; position: relative; overflow: hidden;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.15);
  animation: pulseAlert 2s infinite;
}
@keyframes pulseAlert {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.3); }
  70% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}
.alert-banner h3 { color: var(--danger); font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px; }
.alert-banner p { color: #7F1D1D; font-size: 0.9rem; font-weight: 600; line-height: 1.4; }
.reward-tag {
  display: inline-block; margin-top: 10px; background: var(--danger); color: #fff;
  padding: 6px 16px; border-radius: 100px; font-weight: 700; font-size: 0.9rem;
  letter-spacing: 0.5px;
}

/* ─── QUICK ACTIONS (Big Buttons) ─── */
.quick-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin: 0 24px 32px;
}
.action-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border-strong);
  padding: 16px 8px; border-radius: 16px; cursor: pointer;
  text-decoration: none; box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  transition: transform 0.2s, border-color 0.2s;
}
.action-btn:active { transform: scale(0.97); }
.action-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.action-btn span { font-size: 0.9rem; font-weight: 700; color: var(--text-main); }
.action-btn p { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.call-owner { border-color: rgba(37, 99, 235, 0.3); background: #EFF6FF; }
.call-owner .action-icon { background: #2563EB; color: #fff; }
.whatsapp-owner { border-color: rgba(5, 150, 105, 0.3); background: var(--success-light); }
.whatsapp-owner .action-icon { background: var(--success); color: #fff; }

/* ─── 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(--primary-light); color: var(--primary-dark);
  display: grid; place-items: center;
}
.icon-circle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.section-title { font-size: 1.2rem; font-weight: 800; 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: 20px 16px; }
.data-grid.full { grid-template-columns: 1fr; }
.data-item p { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.data-item h4 { font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 600; color: var(--text-main); }
.data-item .tag { 
  display: inline-block; padding: 4px 10px; border-radius: 6px; 
  font-size: 0.8rem; font-weight: 600; margin-top: 4px; margin-right: 4px;
}
.tag-red { background: #FEE2E2; color: #B91C1C; }
.tag-blue { background: #DBEAFE; color: #1D4ED8; }

/* Vet & Address Info */
.contact-item {
  display: flex; gap: 14px; align-items: center;
  padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px dashed var(--border-strong);
}
.contact-item:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: none; }
.contact-icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--surface-alt); display: grid; place-items: center; color: var(--text-muted); flex-shrink: 0;
}
.contact-info { flex-grow: 1; }
.contact-info h4 { font-size: 0.95rem; font-weight: 700; color: var(--text-main); }
.contact-info p { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.call-circle {
  width: 40px; height: 40px; border-radius: 50%;
  background: #EFF6FF; color: #2563EB;
  display: grid; place-items: center; text-decoration: none; flex-shrink: 0;
}

/* ─── STICKY BOTTOM BAR ─── */
.bottom-bar {
  position: fixed; bottom: 0; width: 100%; max-width: 480px;
  background: rgba(255, 255, 255, 0.95); 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-primary {
  width: 100%; background: var(--text-main); color: #fff; border: none; border-radius: 12px;
  padding: 16px; font-weight: 700; font-size: 1rem; 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(0,0,0,0.15);
}
.btn-primary:active { transform: scale(0.98); background: #000; }
.bottom-branding { text-align: center; font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }
.bottom-branding a { color: var(--primary-dark); 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; }
.delay-3 { animation-delay: 0.3s; }
@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; } }
</style>
</head>
<body>

<div class="app-container">
  
  <div class="header-cover">
    <div class="pet-badge-top">
      <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3z"/><path d="M19 10v2a7 7 0 0 1-14 0v-2"/><line x1="12" y1="19" x2="12" y2="22"/></svg>
      Smart Pet ID
    </div>
  </div>

  <div class="profile-section fade-up">
    <div class="avatar-wrap">
      <img src="../petdog.png" alt="Pet Photo" class="avatar">
      <div class="microchip-badge" title="Microchipped">
        <svg viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="16" rx="2" ry="2"/><rect x="9" y="9" width="6" height="6"/><line x1="9" y1="1" x2="9" y2="4"/><line x1="15" y1="1" x2="15" y2="4"/><line x1="9" y1="20" x2="9" y2="23"/><line x1="15" y1="20" x2="15" y2="23"/><line x1="20" y1="9" x2="23" y2="9"/><line x1="20" y1="14" x2="23" y2="14"/><line x1="1" y1="9" x2="4" y2="9"/><line x1="1" y1="14" x2="4" y2="14"/></svg>
      </div>
    </div>
    <h1 class="profile-name">Arjun</h1>
    <p class="profile-title">Golden Retriever • Male • 3 Years Old</p>
  </div>

  <div class="alert-banner fade-up delay-1">
    <h3>🚨 I am Lost!</h3>
    <p>Please help me get back to my family. I am very friendly but might be scared.</p>
    <div class="reward-tag">💰 Cash Reward Offered</div>
  </div>

  <div class="quick-actions fade-up delay-1">
    <a href="tel:+919876543210" class="action-btn call-owner">
      <div class="action-icon">
        <svg width="22" height="22" 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>
      <span>Call Owner</span>
      <p>Karthik (Dad)</p>
    </a>
    <a href="https://wa.me/919876543210?text=Hi!%20I%20think%20I%20found%20Bruno." target="_blank" class="action-btn whatsapp-owner">
      <div class="action-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="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"/></svg>
      </div>
      <span>WhatsApp</span>
      <p>Send a photo</p>
    </a>
  </div>

  <div class="section-wrap fade-up delay-2">
    <div class="section-head">
      <div class="icon-circle">
        <svg viewBox="0 0 24 24"><circle cx="5.5" cy="11.5" r="2.5"/><circle cx="18.5" cy="11.5" r="2.5"/><circle cx="12" cy="7" r="2.5"/><path d="M12 14c-2.5 0-4.5 1.5-5 3.5h10c-.5-2-2.5-3.5-5-3.5z"/></svg>
      </div>
      <h2 class="section-title">About Bruno</h2>
    </div>

    <div class="info-card">
      <div class="data-grid">
        <div class="data-item">
          <p>Weight / Size</p>
          <h4>32 kg (Large)</h4>
        </div>
        <div class="data-item">
          <p>Microchip ID</p>
          <h4>#981020000123</h4>
        </div>
        <div class="data-item" style="grid-column: span 2;">
          <p>Behavior / Temperament</p>
          <h4>Very friendly, loves treats. Approaches if you call his name softly. Does not bite.</h4>
        </div>
      </div>
    </div>
  </div>

  <div class="section-wrap fade-up delay-2">
    <div class="section-head">
      <div class="icon-circle" style="background: #FEE2E2; color: #DC2626;">
        <svg viewBox="0 0 24 24"><path d="M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"/></svg>
      </div>
      <h2 class="section-title">Health & Diet</h2>
    </div>

    <div class="info-card" style="border-color: rgba(220, 38, 38, 0.2);">
      <div class="data-grid full">
        <div class="data-item">
          <p>Medical Alerts</p>
          <span class="tag tag-red">Allergic to Chicken</span>
          <span class="tag tag-blue">Fully Vaccinated</span>
        </div>
        <div class="data-item" style="margin-top: 8px;">
          <p>Dietary Needs</p>
          <h4>Eats dry kibble only. Please do not feed him milk or bones.</h4>
        </div>
      </div>
    </div>
  </div>

  <div class="section-wrap fade-up delay-3">
    <div class="section-head">
      <div class="icon-circle" style="background: #E0E7FF; color: #4F46E5;">
        <svg viewBox="0 0 24 24"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/><circle cx="12" cy="10" r="3"/></svg>
      </div>
      <h2 class="section-title">Home & Vet Info</h2>
    </div>

    <div class="info-card">
      <div class="contact-item">
        <div class="contact-icon">
          <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
        </div>
        <div class="contact-info">
          <h4>Owner's Address</h4>
          <p>Near MG Road,<br>Pondicherry - 605001</p>
        </div>
      </div>
      
      <div class="contact-item">
        <div class="contact-icon">
          <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 12h-4l-3 9L9 3l-3 9H2"/></svg>
        </div>
        <div class="contact-info">
          <h4>Dr. Anjali (Vet)</h4>
          <p>Paws & Claws Clinic</p>
        </div>
        <a href="tel:+914132223333" class="call-circle" aria-label="Call Vet">
          <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><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>
        </a>
      </div>
    </div>
  </div>

  <div class="bottom-bar">
    <button class="btn-primary" onclick="sendLocation()">
      <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/><circle cx="12" cy="10" r="3"/></svg>
      Send My Location to Owner
    </button>
    <div class="bottom-branding">
      Powered by <a href="https://oneqrscan.com">OneQRScan</a>
    </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);
}

// Location ping function
function sendLocation() {
  if (navigator.geolocation) {
    showToast("📍 Getting your location to send to the owner...");
    navigator.geolocation.getCurrentPosition(function(position) {
      // In production, this would trigger an API call to send an SMS/Push to the owner
      const lat = position.coords.latitude.toFixed(4);
      const long = position.coords.longitude.toFixed(4);
      setTimeout(function() {
        showToast("✅ Location sent! The owner has been notified.");
      }, 1000);
    }, function(error) {
      showToast("❌ Unable to get location. Please allow GPS permissions.");
    });
  } else {
    showToast("Geolocation is not supported by your browser.");
  }
}
</script>

</body>
</html>