<!DOCTYPE html>
<html lang="ko">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>주민등록증 모바일 확인서비스</title>
  <style>
    /* 리셋 기본 스타일 */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    
    body {
      font-family: 'Arial', sans-serif;
      background-color: #e6f0fa; /* 전체 배경색 */
      color: #333;
      line-height: 1.4;
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 100vh; /* 화면 가득 채우기 */
    }
    
    .container {
      width: 100%;
      max-width: 400px; /* 카드의 최대 너비를 제한 */
      margin: 0 auto;
      background-color: #f0f8ff; /* 배경 */
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      min-height: 100vh;
    }
    
    /* 헤더 스타일 */
    .header {
      background-color: #fff;
      border-bottom: 1px solid #ddd;
      text-align: center;
    }
    
    .status-bar {
      background-color: #dfe7f3;
      padding: 7px 15px;
      font-size: 12px;
      text-align: left;
    }
    
    .header-content {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 15px;
    }
    
    .gov-logo {
      width: 6rem;
    }
    
    .menu-button {
      background: none;
      border: none;
      font-size: 20px;
      cursor: pointer;
    }
    
    h1 {
      font-size: 14px;
      font-weight: bold;
    }
    
    /* 카드 스타일 */
    .card {
      background-color: #ffffff;
      margin: 20px;
      padding: 20px;
      border-radius: 15px;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
      overflow: hidden;
      text-align: center;
    }
    
    .profile-section .profile-photo {
      width: 100px;
      height: 100px;
      border-radius: 10px;
      margin: 0 auto 20px;
      object-fit: cover;
    }
    
    .info-section .name {
      font-size: 18px;
      font-weight: bold;
      margin: 10px 0;
    }
    
    .info-section .data {
      font-size: 14px;
      color: #666;
    }
    
    .qr-section .qr-code {
      width: 90px;
      height: 90px;
      margin: 10px auto;
    }
    
    .remaining-time {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin-top: 15px;
    }
    
    .remaining-time span {
      font-size: 12px;
      color: #333;
    }
    
    .timer-bar-container {
      width: 90%; /* 화면 여백에 맞게 조정 */
      height: 10px; /* 막대 높이 */
      background-color: #ddd;
      margin: 5px auto;
      border-radius: 5px;
      overflow: hidden;
      position: relative;
    }
    
    .timer-bar {
      width: 100%;
      height: 100%;
      background-color: #0768dc; /* 파란색 */
      position: absolute;
      bottom: 0; /* 아래에서 시작 */
    }
    
    .description {
      font-size: 12px;
      color: #555;
      margin: 5px 0;
    }
    
    .details-button {
      display: block;
      width: 100%;
      padding: 15px 0;
      margin: 15px auto 0;
      background-color: #0768dc;
      color: #fff;
      border: none;
      border-radius: 5px;
      font-size: 16px;
      cursor: pointer;
    }
    
    .details-button:hover {
      background-color: #064a9e;
    }
    
    /* 푸터 */
    .footer {
      background-color: #d5e3f4;
      text-align: center;
      padding: 7px 10px;
      font-size: 12px;
      color: #666;
    }
  </style>
</head>
<body>
  
  <!-- 라이선스 체크 스크립트: 2025/01/10 기준 한 달 후(2025/02/09 23:59:59)까지 유효 -->
  <script>
    // 만료일을 원하는 날짜로 수정하세요 (연, 월-1, 일, 시, 분, 초)
    const expiryDate = new Date(2025, 1, 9, 23, 59, 59); 
    const now = new Date();

    // 만료일이 지났는지 비교
    if (now > expiryDate) {
      // 라이선스 만료 시, 모든 콘텐츠 사용 불가
      document.body.innerHTML = "<h1 style='text-align:center;margin-top:50px;font-size:24px;'>라이센스가 만료되었습니다</h1>";
    }
  </script>

  <div class="container">
    <!-- Header -->
    <header class="header">
      <div class="status-bar">
        <span>정부24</span>
      </div>
      <div class="header-content">
        <img src="https://i.postimg.cc/J0NxLqqM/intro-logo-kr.gif" alt="정부 로고" class="gov-logo">
        <h1 style="justify-content: center;">주민등록증 모바일확인서비스</h1>
        <button class="menu-button">☰</button>
      </div>
    </header>

    <!-- Main Section -->
    <main>
      <div class="card">
        <div class="profile-section">
          <img src="https://i.ibb.co/PjpzRFz/IMG-1403.png" alt="사진" class="profile-photo">
        </div>
        <div class="info-section">
          <p class="name">문제연</p>
          <p class="data">부산광역시 남구</p>
          <p class="data">주민등록번호: 050711-321501</p>
        </div>
        <div class="qr-section">
          <img src="https://i.postimg.cc/gJ64MdLw/2.png" alt="QR 코드" class="qr-code">
        </div>
        <div class="remaining-time">
          <span>남은시간</span>
          <div class="timer-bar-container">
            <div id="timer-bar" class="timer-bar"></div>
          </div>
          <span id="time-remaining">25초</span>
        </div>
        <p class="description">QR코드를 리더기에 스캔하세요</p>
        <button id="details-button" class="details-button">상세정보 표시</button>
      </div>
    </main>

    <!-- Footer -->
    <footer class="footer">
      <p>캡처방지 시스템이 작동 중입니다. 캡처방지 시스템이 작동 중입니다.</p>
    </footer>
  </div>

  <script>
    // 타이머 로직
    let timeRemaining = 25;
    const timeDisplay = document.getElementById('time-remaining');
    const timerBar = document.getElementById('timer-bar');

    // 타이머 바에 애니메이션을 적용하기 위한 초기 스타일 설정
    timerBar.style.transition = 'width 1s ease-out'; // 부드럽게 너비가 변하도록 설정

    const countdown = setInterval(() => {
      timeRemaining -= 1;
      timeDisplay.textContent = `${timeRemaining}초`;

      // 타이머 바의 너비를 조절
      const timerWidth = (timeRemaining / 25) * 100;
      timerBar.style.width = `${timerWidth}%`; // 수평으로 줄어들도록 설정

      // 타이머 종료 이벤트
      if (timeRemaining <= 0) {
        clearInterval(countdown);
        timeDisplay.textContent = "시간 종료";
        alert("시간이 만료되었습니다. 다시 시도해주세요.");
      }
    }, 1000);
  </script>
</body>
</html>