/* style.css */

/* Import modern font and icon library */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* -----------------------------------------------
   BASIC RESET & BODY STYLES
------------------------------------------------ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px; /* Consistent base font size across devices */
}

html, body {
  overflow-x: hidden;
}

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  color: #333;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #f0f4f8, #e0e6ef);
  transition: background 0.3s ease;
}

section {
  scroll-margin-top: 80px;
}

/* -----------------------------------------------
   HEADER & NAVIGATION
------------------------------------------------ */
header {
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

nav .logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #007BFF;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
}

.hamburger span {
  height: 3px;
  width: 100%;
  background: #007BFF;
  border-radius: 3px;
  transition: all 0.3s ease;
}

nav .menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  transition: transform 0.3s ease;
}

nav .menu li a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: all 0.3s ease;
}

nav .menu li a:hover {
  color: #ffffff;
  background: #007BFF;
}

/* -----------------------------------------------
   MAIN CONTENT
------------------------------------------------ */
main {
  max-width: 1100px;
  margin: 0.1rem auto;
  padding: 0 1rem;
}

section {
  margin-bottom: 4rem;
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

section:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

section h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  color: #007BFF;
  border-bottom: 3px solid #007BFF;
  display: inline-block;
  padding-bottom: 0.5rem;
}

/* -----------------------------------------------
   HOME SECTION
------------------------------------------------ */
#home {
  text-align: center;
}

.home-top-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.qr-cube {
  width: 320px;
  height: 320px;
  background: linear-gradient(45deg, #e9f2ff, #d0e0ff);
  border: 3px solid #007BFF;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.qr-cube::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: rgba(0, 123, 255, 0.5);
  animation: scan-line 2s infinite ease-in-out;
}

@keyframes scan-line {
  0% { top: 0; }
  50% { top: 100%; }
  100% { top: 0; }
}

#qrContainer {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto;
  width: 220px;
  height: 220px;
  border: 2px dotted #007BFF !important; /* Ensure dotted border */
  background: #fff;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  position: relative; /* Ensure positioning context */
}

/* Reset border styles for QRCode.js generated elements */
#qrContainer > * {
  border: none !important; /* Override any inline border styles */
  margin: 0; /* Prevent margin from affecting layout */
}

.usage-instructions {
  flex: 1 1 320px;
  background: #fafcff;
  border: 1px solid #e0e6ff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  text-align: left;
}

.usage-instructions h3 {
  margin-bottom: 1.2rem;
  color: #007BFF;
}

.usage-instructions p {
  margin: 0.8rem 0;
  position: relative;
  padding-left: 1.5rem;
}

.usage-instructions p::before {
  content: '\f058'; /* Font Awesome check-circle */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  color: #007BFF;
  position: absolute;
  left: 0;
}

.scanner-link-box {
  background: #e9f2ff;
  border: 1px solid #d0e0ff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2.5rem;
  transition: background 0.3s ease;
}

.scanner-link-box:hover {
  background: #d0e0ff;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background: #007BFF;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  margin-top: 12px;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.5);
  color: #fff;
}

.listbox-section {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  margin-top: 2.5rem;
  padding: 1.5rem;
  min-height: 420px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.listbox-section p {
  font-weight: 600;
  margin-bottom: 1.2rem;
  color: #007BFF;
}

.listbox-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.listbox-controls button {
  padding: 8px 16px;
  background: #007BFF;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.listbox-controls button:hover {
  background: #0056b3;
  transform: translateY(-2px);
}

.log-box {
  flex: 1;
  width: 95%;
  border: 1px solid #e0e6ff;
  padding: 12px;
  background: #fafcff;
  overflow-y: auto;
  border-radius: 8px;
  font-size: 1rem;
  margin: 0 auto;
}

.log-entry {
  padding: 8px 12px;
  border-bottom: 1px solid #e0e6ff;
  transition: background 0.2s ease;
}

.log-entry:hover {
  background: #e9f2ff;
}

.log-entry:last-child {
  border-bottom: none;
}

/* -----------------------------------------------
   FEATURES SECTION
------------------------------------------------ */
.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1.5rem;
}

.feature-item {
  flex: 1 1 220px;
  background: #e9f2ff;
  padding: 1.5rem;
  border-radius: 10px;
  border: 1px solid #d0e0ff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

.feature-item:hover {
  transform: translateY(-5px);
}

.feature-item h3::before {
  content: '\f00c'; /* Font Awesome check */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  color: #007BFF;
  margin-right: 0.5rem;
}

/* -----------------------------------------------
   ABOUT SECTION
------------------------------------------------ */
#about p {
  max-width: 700px;
  margin: 1.2rem auto;
  font-size: 1.1rem;
}

/* -----------------------------------------------
   HELP/FAQ SECTION
------------------------------------------------ */
.faq-item {
  background: #fafcff;
  padding: 1.5rem;
  border-radius: 10px;
  margin-bottom: 1.2rem;
  border: 1px solid #e0e6ff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.faq-item h3 {
  margin-bottom: 0.8rem;
  color: #007BFF;
}

/* -----------------------------------------------
   CONTACT SECTION
------------------------------------------------ */
form {
  max-width: 600px;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-left: auto;
  margin-right: auto;
}

form input,
form textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #e0e6ff;
  border-radius: 8px;
  font-size: 1rem;
  background: #fafcff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

form input:focus,
form textarea:focus {
  border-color: #007BFF;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
  outline: none;
}

form button {
  width: 150px;
  padding: 1rem;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: #007BFF;
  color: #fff;
  transition: all 0.3s ease;
}

form button:hover {
  background: #0056b3;
  transform: translateY(-2px);
}

/* -----------------------------------------------
   FOOTER
------------------------------------------------ */
footer {
  text-align: center;
  padding: 1.5rem;
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

footer p {
  margin: 0;
  font-size: 0.95rem;
  color: #666;
}

/* -----------------------------------------------
   RESPONSIVE TITLE
------------------------------------------------ */
.responsive-title {
  font-size: 1.8rem; /* Default for PC: 1.8 * 16px = 28.8px */
  font-weight: bold;
  color: #007BFF;
  line-height: 1.2;
  margin: 0;
}

/* -----------------------------------------------
   RESPONSIVE MEDIA QUERIES
------------------------------------------------ */
@media (max-width: 768px) {
  nav {
    padding: 0.8rem;
  }

  nav .menu {
    gap: 1.5rem;
  }

  .home-top-row {
    flex-direction: column;
    align-items: center;
  }

  .qr-cube,
  .usage-instructions {
    width: 100%;
    max-width: 450px;
  }
}

@media (max-width: 600px) {
  .hamburger {
    display: flex;
  }

  nav {
    flex-wrap: wrap;
  }

  .menu {
    position: fixed;
    top: 60px;
    right: 0;
    width: 250px;
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 1rem;
    transform: translateX(100%);
    border-left: 1px solid #e0e0e0;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: transform 0.3s ease;
  }

  .menu.active {
    transform: translateX(0);
  }

  .menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9998;
  }

  .menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  #qrContainer {
    width: 180px;
    height: 180px;
    border: 3px dotted #007BFF !important; /* Increased for mobile visibility */
  }

  #qrContainer > * {
    border: none !important; /* Ensure no border on child elements */
  }

  .log-box {
    height: 160px;
  }

  .responsive-title {
    font-size: 1.3rem; /* For Android: 1.3 * 16px = 20.8px */
  }
}

/* -------------------------------------------------
   COLLAPSIBLE SECTIONS (FAQ & CONTACT)
------------------------------------------------ */
.collapsible-content {
  display: none;
}

.collapsible.open .collapsible-content {
  display: block;
}

.collapsible-header {
  position: relative;
  cursor: pointer;
  padding-right: 35px;
}

.scroll-top-arrow {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: #007BFF;
  cursor: pointer;
  padding: 0 8px;
  transition: color 0.3s ease;
}

.scroll-top-arrow:hover {
  color: #0056b3;
}

/* Watch the Video Link */
.watch-video-link {
  color: #007BFF;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.watch-video-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* Video Overlay */
.video-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.video-overlay.active {
  display: flex;
}

.video-container {
  position: relative;
  background: #000;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.video-container iframe {
  border-radius: 12px;
}

.video-container.small iframe {
  width: 320px;
  height: 180px;
}

.video-container.medium iframe {
  width: 640px;
  height: 360px;
}

.video-container.large iframe {
  width: 854px;
  height: 480px;
}

.video-container.fullscreen iframe {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}

.video-controls {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px;
  border-radius: 8px;
}

.video-controls .size-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px 10px;
  transition: color 0.3s ease;
}

.video-controls .size-btn:hover {
  color: #007BFF;
}

/* -----------------------------------------------
   APP LINKS BOXES
------------------------------------------------ */
.app-links-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: #f8faff;
  border-bottom: 1px solid #e0e0e0;
}

.app-link-box {
  display: inline-block;
  padding: 0.8rem 1.2rem;
  background: #e9f2ff;
  color: #007BFF;
  text-decoration: none;
  font-weight: 500;
  border-radius: 12px;
  border: 1px solid #d0e0ff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.app-link-box:hover {
  background: #d0e0ff;
  color: #0056b3;
  transform: translateY(-3px);
}

/* Tutorial Highlight */
.tutorial-highlight {
  border: 2px solid #007BFF;
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
  z-index: 1001;
  position: relative;
}

/* Tutorial Overlay and Tooltip Styles */
.tutorial-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
}

.tutorial-tooltip {
  display: none;
  position: absolute;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  z-index: 1001;
  max-width: 300px;
  width: auto;
  text-align: center;
  font-size: 1rem;
  color: #333;
}
