<!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>Student ID 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;
  --academic: #4F46E5; /* Indigo for Education */
  --academic-dark: #3730A3;
  --academic-light: #EEF2FF;
  --gold: #F59E0B;
  --success: #10B981;
  --success-light: #ECFDF5;
  --danger: #EF4444;
  --danger-light: #FEF2F2;
  --warning: #F59E0B;
  --warning-light: #FFFBEB;
  --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: 100px;
}

/* ─── HEADER & COVER (Academic Theme) ─── */
.header-cover {
  height: 160px;
  background: linear-gradient(135deg, var(--academic) 0%, var(--academic-dark) 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 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
}
.school-badge {
  position: absolute; top: 20px; left: 20px; right: 20px; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
}
.school-name {
  color: #fff; font-size: 0.95rem; font-weight: 700; font-family: 'Outfit';
  display: flex; align-items: center; gap: 8px; letter-spacing: 0.5px;
}
.school-logo {
  width: 28px; height: 28px; background: #fff; border-radius: 6px;
  display: grid; place-items: center; color: var(--academic);
}
.academic-year {
  background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(8px);
  color: #fff; font-size: 0.7rem; font-weight: 600;
  padding: 4px 10px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.2);
}

/* ─── PROFILE SECTION ─── */
.profile-section {
  padding: 0 24px; margin-top: -50px;
  position: relative; z-index: 10; text-align: center;
}
.avatar-wrap {
  width: 110px; height: 110px; margin: 0 auto 12px;
  border-radius: 24px; padding: 4px; background: var(--bg-app);
  position: relative; box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.avatar {
  width: 100%; height: 100%; border-radius: 20px;
  background: var(--surface-alt); object-fit: cover;
}
.id-badge {
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #000;
  padding: 4px 14px; border-radius: 100px; font-size: 0.75rem; font-weight: 800;
  border: 2px solid var(--bg-app); white-space: nowrap; letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.student-name { font-size: 1.8rem; font-weight: 800; color: var(--text-main); margin-top: 14px; letter-spacing: -0.5px; }
.student-class { font-size: 1rem; color: var(--academic); font-weight: 700; margin-top: 2px; }
.student-id { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; margin-top: 4px; margin-bottom: 24px;}

/* ─── QUICK ACTIONS (2x2 Grid) ─── */
.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(--academic-light);
  padding: 16px 8px; border-radius: 16px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.05); transition: transform 0.2s, background 0.2s;
  text-decoration: none;
}
.action-btn:active { transform: scale(0.97); }
.action-icon { 
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
}
.icon-blue { background: var(--academic-light); color: var(--academic); }
.icon-red { background: var(--danger-light); color: var(--danger); }
.icon-orange { background: var(--warning-light); color: var(--warning); }
.icon-green { background: var(--success-light); color: var(--success); }

.action-btn span { font-size: 0.85rem; font-weight: 700; color: var(--text-main); text-align: center; }
.action-btn p { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; text-align: center;}

/* ─── 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-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: 0.95rem; font-weight: 600; color: var(--text-main); }
.alert-tag { display: inline-block; padding: 4px 10px; background: var(--danger-light); color: var(--danger); font-size: 0.75rem; font-weight: 700; border-radius: 6px; margin-top: 4px; }
.blood-tag { display: inline-block; padding: 4px 10px; background: #FEE2E2; color: #B91C1C; font-size: 0.85rem; font-weight: 800; border-radius: 6px; }

/* Contact List */
.contact-item {
  display: flex; gap: 14px; align-items: center;
  padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border);
}
.contact-item:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: none; }
.contact-avatar {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--academic-light); color: var(--academic); display: grid; place-items: center; font-weight: 700; font-family: 'Outfit'; 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.8rem; color: var(--text-muted); margin-top: 2px; }
.call-circle {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--success-light); color: var(--success);
  display: grid; place-items: center; text-decoration: none; flex-shrink: 0; transition: transform 0.2s;
}
.call-circle:active { transform: scale(0.9); }

/* ─── 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: 14px;
  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; box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.btn-primary:active { transform: scale(0.97); }
.btn-primary svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.bottom-branding { text-align: center; font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }
.bottom-branding a { color: var(--academic); 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="school-badge">
      <div class="school-name">
        <div class="school-logo">
          <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20"/></svg>
        </div>
        Global Public School
      </div>
      <div class="academic-year">2026-27</div>
    </div>
  </div>

  <div class="profile-section fade-up">
    <div class="avatar-wrap">
      <img src="../student.png" alt="Student Photo" class="avatar">
      <div class="id-badge">VALID ID</div>
    </div>
    <h1 class="student-name">Krishika Kowtham</h1>
    <p class="student-class">Grade 3 • Section A</p>
    <p class="student-id">Roll No: 14 &nbsp;|&nbsp; ID: GPS-26-042</p>
  </div>

  <div class="quick-actions fade-up delay-1">
    <a href="tel:+919942199485" class="action-btn">
      <div class="action-icon icon-blue">
        <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><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 Father</span>
      <p>Primary</p>
    </a>

    <a href="tel:+919942199485" class="action-btn">
      <div class="action-icon icon-red">
        <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><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 Mother</span>
      <p>Secondary</p>
    </a>

    <a href="tel:+919876543210" class="action-btn">
      <div class="action-icon icon-orange">
        <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>
      </div>
      <span>Call Relative</span>
      <p>Emergency</p>
    </a>

    <button onclick="notifyParents()" class="action-btn" style="border: none;">
      <div class="action-icon icon-green">
        <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polygon points="3 11 22 2 13 21 11 13 3 11"/></svg>
      </div>
      <span>Send Location</span>
      <p>Live GPS</p>
    </button>
  </div>

  <div class="section-wrap fade-up delay-2">
    <div class="section-head">
      <div class="icon-circle" style="background: var(--danger-light); color: var(--danger); border-color: rgba(239, 68, 68, 0.2);">
        <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">Medical & Safety Alert</h2>
    </div>

    <div class="info-card" style="border-color: rgba(239, 68, 68, 0.2);">
      <div class="data-grid full" style="margin-bottom: 16px;">
        <div class="data-item">
          <p>Important Allergies</p>
          <div class="alert-tag">Severe Peanut Allergy</div>
          <div class="alert-tag">Dust/Pollen Asthma</div>
        </div>
      </div>
      <div class="data-grid">
        <div class="data-item">
          <p>Blood Group</p>
          <div class="blood-tag">B +ve</div>
        </div>
        <div class="data-item">
          <p>Emergency Meds</p>
          <h4>Carries Inhaler in Bag</h4>
        </div>
      </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"><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>
      <h2 class="section-title">School Information</h2>
    </div>

    <div class="info-card">
      <div class="data-grid full" style="margin-bottom: 16px;">
        <div class="data-item">
          <p>School Address</p>
          <h4 style="line-height: 1.4;">Global Public School, No. 12 Education Avenue, City Center, Chennai - 600001</h4>
        </div>
      </div>
      <div class="data-grid">
        <div class="data-item">
          <p>School Contact</p>
          <h4><a href="tel:+914423456789" style="color: var(--academic); text-decoration: none;">+91 44 2345 6789</a></h4>
        </div>
        <div class="data-item">
          <p>Class Teacher</p>
          <h4>Mrs. Revathi K.</h4>
        </div>
      </div>
    </div>
  </div>

  <div class="section-wrap fade-up delay-3">
    <div class="section-head">
      <div class="icon-circle">
        <svg viewBox="0 0 24 24"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>
      </div>
      <h2 class="section-title">Parent & Relative Contacts</h2>
    </div>

    <div class="info-card">
      <div class="contact-item">
        <div class="contact-avatar">F</div>
        <div class="contact-info">
          <h4>Kowtham</h4>
          <p>Father (Primary Contact)</p>
        </div>
        <a href="tel:+919942199485" class="call-circle" aria-label="Call Father">
          <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><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 class="contact-item">
        <div class="contact-avatar" style="background: #FEF2F2; color: #EF4444;">M</div>
        <div class="contact-info">
          <h4>Priya</h4>
          <p>Mother (Secondary Contact)</p>
        </div>
        <a href="tel:+919942199485" class="call-circle" aria-label="Call Mother">
          <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><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 class="contact-item">
        <div class="contact-avatar" style="background: #FFFBEB; color: #F59E0B;">R</div>
        <div class="contact-info">
          <h4>Ramesh</h4>
          <p>Uncle (Emergency Relative)</p>
        </div>
        <a href="tel:+919876543210" class="call-circle" aria-label="Call Relative">
          <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><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="notifyParents()">
      <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>
      Notify Parents (I am with the child)
    </button>
    <div class="bottom-branding">
      Smart Student ID 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);
}

// Function to simulate notifying parents and sending live location
function notifyParents() {
  if (navigator.geolocation) {
    showToast("📍 Fetching current location...");
    
    // Simulate API call and GPS fix
    navigator.geolocation.getCurrentPosition(function(position) {
      setTimeout(function() {
        showToast("✅ Live Location sent to Father, Mother, and Uncle.");
      }, 1000);
    }, function(error) {
      showToast("❌ Please enable Location services to notify parents.");
    });
  } else {
    showToast("Geolocation is not supported by your browser.");
  }
}
</script>

</body>
</html>