/* style.css */

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

/* -----------------------------------------------
   COLOR PALETTE - Calm, professional tool aesthetic
------------------------------------------------ */
:root {
  /* Base */
  --bg-page: #F8FAFC;
  --bg-surface: #FFFFFF;
  --text-primary: #1F2933;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  
  /* Primary brand - calm blue */
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #DBEAFE;
  --primary-lighter: #EFF6FF;
  
  /* Warm accent - sparingly (icons, highlights) */
  --accent: #F59E0B;
  --accent-light: #FDE68A;
  
  /* Compatibility / semantic */
  --primary-darker: #1E40AF;
  --success: #059669;
  --warning: #D97706;
  --error: #DC2626;
  
  /* Neutrals */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  
  /* Shadows - soft, not heavy */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.08);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* -----------------------------------------------
   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.65;
  color: var(--text-primary);
  margin-bottom: 2rem;
  background: var(--bg-page);
  position: relative;
}

/* Optional: very subtle depth */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

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

/* -----------------------------------------------
   HEADER & NAVIGATION
------------------------------------------------ */
header {
  background: var(--bg-surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all var(--transition-base);
}

header:hover {
  box-shadow: var(--shadow-md);
}

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: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform var(--transition-base);
}

nav .logo:hover {
  transform: scale(1.02);
}

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

.hamburger span {
  height: 3px;
  width: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: all var(--transition-base);
}

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

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

nav .menu li a:hover {
  color: #fff;
  background: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Apps dropdown in nav */
nav .menu .menu-item-apps {
  position: relative;
}
nav .menu .menu-apps-trigger {
  cursor: pointer;
}
nav .menu .menu-apps-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.35rem;
  min-width: 260px;
  padding: 0.75rem;
  background: var(--bg-surface);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  z-index: 100;
  display: none;
}
nav .menu .menu-item-apps:hover .menu-apps-dropdown,
nav .menu .menu-item-apps.open .menu-apps-dropdown {
  display: block;
}

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

section {
  margin-bottom: 3rem;
  padding: 2.5rem 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

/* Alternating section background for hierarchy */
section:nth-of-type(odd) {
  background: var(--bg-surface);
}

section:nth-of-type(even) {
  background: var(--bg-page);
}

section h2, .section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--primary);
  display: inline-block;
  padding-bottom: 0.35rem;
}

/* -----------------------------------------------
   HERO SECTION - Primary focus, clear CTA
------------------------------------------------ */
.hero-section {
  text-align: center;
  padding: 3.5rem 2rem 4rem;
  margin-bottom: 3rem;
  background: var(--bg-surface);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-outcome {
  font-size: 1.1rem;
  color: var(--text-primary);
  max-width: 480px;
  margin: 0 auto 0.5rem;
  line-height: 1.4;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 1.5rem;
  line-height: 1.4;
}

.hero-cta-wrap {
  margin: 0 0 0.5rem;
}

.hero-cta-hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 1rem;
  line-height: 1.4;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 14px 24px;
  min-height: 44px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 10px;
  border: none;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition-base), box-shadow var(--transition-base);
  cursor: pointer;
}

.btn-hero-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
  color: #fff;
}

.btn-hero-primary:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.hero-divider {
  height: 1px;
  max-width: 120px;
  margin: 0 auto 1.5rem;
  background: var(--border);
}

.hero-features {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: var(--primary-lighter);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.85rem;
}

.hero-badge i {
  color: var(--accent);
}

/* Workflow Diagram */
.workflow-diagram {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--border-light);
}

.workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 120px;
}

.workflow-arrow {
  color: var(--primary);
  font-size: 1.25rem;
  opacity: 0.5;
}

.workflow-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base);
}

.workflow-step:hover .workflow-icon {
  transform: scale(1.05);
}

.workflow-step p {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
  text-align: center;
}

.workflow-arrow {
  color: var(--primary);
  font-size: 1.5rem;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .workflow-diagram {
    gap: 0.5rem;
  }
  
  .workflow-arrow {
    transform: rotate(90deg);
    margin: 0.5rem 0;
  }
  
  .workflow-step {
    min-width: 100px;
  }
  
  .workflow-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
}

@media (max-width: 600px) {
  .hero-section {
    padding: 2rem 1rem;
  }
  
  .hero-title {
    font-size: 1.6rem;
  }
  
  .workflow-diagram {
    flex-direction: column;
  }
  
  .workflow-arrow {
    transform: rotate(90deg);
  }
}

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

.get-started-reassurance {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0 auto 1.25rem;
  max-width: 520px;
  line-height: 1.4;
}

.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(135deg, var(--primary-lighter), rgba(108, 92, 231, 0.1));
  border: 3px solid;
  border-image: linear-gradient(135deg, var(--primary), var(--accent)) 1;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.qr-cube:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-xl);
}

.qr-cube::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
  animation: scan-line 2s infinite ease-in-out;
  box-shadow: 0 0 10px var(--primary);
}

@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: 3px dashed;
  border-image: linear-gradient(90deg, var(--primary), var(--accent)) 1;
  background: #fff;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
  border-radius: 12px;
  position: relative;
  transition: all var(--transition-base);
  /* Animation will be applied via JavaScript after QR code is generated */
}

@keyframes qrEntrance {
  from {
    opacity: 0;
    transform: scale(0.8) rotate(-5deg);
  }
  50% {
    transform: scale(1.05) rotate(2deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

#qrContainer:hover {
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
}

/* 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: linear-gradient(135deg, rgba(255, 255, 255, 0.9), var(--primary-lighter));
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  text-align: left;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all var(--transition-base);
}

.usage-instructions:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.usage-instructions h3 {
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.usage-instructions p,
.instructions-list {
  margin: 0.8rem 0;
}

.instructions-list {
  list-style: none;
  padding-left: 0;
}

.instructions-list li {
  margin: 0.8rem 0;
  position: relative;
  padding-left: 2rem;
  text-align: left;
}

.instructions-list li strong {
  color: var(--primary-darker);
}

.watch-video-wrapper {
  margin-top: 1rem;
  display: block;
}

.usage-instructions p::before {
  content: '\f058'; /* Font Awesome check-circle */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--success));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: absolute;
  left: 0;
}

.scanner-link-box {
  background: linear-gradient(135deg, var(--primary-lighter), rgba(108, 92, 231, 0.1));
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 2.5rem;
  transition: all var(--transition-base);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.scanner-link-box:hover {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(108, 92, 231, 0.1));
  border-color: rgba(168, 152, 112, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  margin-top: 12px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  font-weight: 600;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::after {
  width: 300px;
  height: 300px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left var(--transition-base);
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  color: #fff;
}

.listbox-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  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-header {
  margin-bottom: 1.2rem;
}

.listbox-header h3 {
  font-weight: 600;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.listbox-header h3 i {
  color: var(--primary);
}

.listbox-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.listbox-section > p {
  font-weight: 600;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.listbox-controls button {
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition-base);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.listbox-controls button:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.log-box {
  flex: 1;
  width: 95%;
  border: 1px solid rgba(0, 212, 255, 0.2);
  padding: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), var(--primary-lighter));
  overflow-y: auto;
  border-radius: 12px;
  font-size: 1rem;
  margin: 0 auto;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 2px 8px rgba(0, 212, 255, 0.05);
}

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

.log-entry:hover {
  background: rgba(0, 212, 255, 0.1);
  transform: translateX(5px);
  transition: all var(--transition-fast);
}

.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: linear-gradient(135deg, rgba(255, 255, 255, 0.9), var(--primary-lighter));
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.feature-item h3::before {
  content: '\f00c'; /* Font Awesome check */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--success));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  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: linear-gradient(135deg, rgba(255, 255, 255, 0.9), var(--primary-lighter));
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.2rem;
  border: 1px solid rgba(0, 212, 255, 0.2);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.faq-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.faq-item h3 {
  margin-bottom: 0.8rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* -----------------------------------------------
   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: 2px solid rgba(0, 212, 255, 0.2);
  border-radius: 12px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.9);
  transition: all var(--transition-base);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

form input:focus,
form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
  background: var(--bg-surface);
  transform: translateY(-2px);
}

form button {
  width: 150px;
  padding: 1rem;
  font-size: 1rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 600;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

form button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left var(--transition-base);
}

form button:hover::before {
  left: 100%;
}

form button:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.required {
  color: var(--error);
  font-weight: bold;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.faq-item h3 i {
  color: var(--primary);
  margin-right: 0.5rem;
}

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

footer p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.footer-tutorial-link {
  color: var(--primary);
  text-decoration: none;
  margin-left: 0.5rem;
}
.footer-tutorial-link:hover {
  text-decoration: underline;
}

/* -----------------------------------------------
   RESPONSIVE TITLE
------------------------------------------------ */
.responsive-title {
  font-size: 1.8rem; /* Default for PC: 1.8 * 16px = 28.8px */
  font-weight: bold;
  color: var(--primary);
  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;
  }
}

/* Toast responsive styles */
@media (max-width: 600px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .toast {
    min-width: auto;
    width: 100%;
  }
}

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

  nav {
    flex-wrap: wrap;
  }

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

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

  nav .menu .menu-item-apps {
    width: 100%;
  }
  nav .menu .menu-apps-trigger {
    display: block;
    width: 100%;
  }
  nav .menu .menu-apps-dropdown {
    left: 0;
    min-width: 100%;
    position: relative;
    margin-top: 0.5rem;
    box-shadow: none;
    border: 1px solid var(--border);
  }
  nav .menu .menu-item-apps:hover .menu-apps-dropdown {
    display: none;
  }
  nav .menu .menu-item-apps.open .menu-apps-dropdown {
    display: block;
  }

  .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 var(--primary) !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;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
  padding: 0 8px;
  transition: all var(--transition-base);
}

.scroll-top-arrow:hover {
  transform: translateY(-50%) scale(1.2);
}

/* Watch the Video Link */
.watch-video-link {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-base);
  position: relative;
}

.watch-video-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width var(--transition-base);
}

.watch-video-link:hover::after {
  width: 100%;
}

/* 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;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px;
  border-radius: 8px;
}

.video-options-toggle {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-size: 0.875rem;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.video-options-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
}

.video-size-buttons {
  display: flex;
  gap: 6px;
}

.video-controls .size-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  padding: 6px 10px;
  min-width: 36px;
  transition: color 0.2s ease;
}

.video-controls .size-btn:hover {
  color: var(--primary);
}

/* -----------------------------------------------
   APP LINKS BOXES
------------------------------------------------ */
.app-links-container {
  padding: 2rem 1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), var(--primary-lighter));
  border-bottom: 1px solid rgba(0, 212, 255, 0.1);
  text-align: center;
}

.app-links-header {
  margin-bottom: 1.5rem;
}

.app-links-header h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-links-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.app-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}

.app-link-box {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-lighter), rgba(108, 92, 231, 0.1));
  color: var(--primary-darker);
  text-decoration: none;
  font-weight: 600;
  border-radius: 12px;
  border: 2px solid;
  border-image: linear-gradient(135deg, var(--primary), var(--accent)) 1;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.app-link-box i {
  font-size: 1.1rem;
  color: var(--primary);
}

.app-link-box:hover {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(108, 92, 231, 0.15));
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: var(--primary-darker);
}

/* Tutorial Highlight */
.tutorial-highlight {
  border: 2px solid var(--primary);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
  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: var(--bg-surface);
  padding: 12px 16px;
  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: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.4;
}

#tutorial-progress.tutorial-progress {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

#tutorial-text {
  margin: 0;
  padding: 0;
}

#tutorial-buttons {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

#tutorial-buttons button {
  min-height: 44px;
  min-width: 44px;
  padding: 12px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#tutorial-buttons button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
}

#tutorial-skip {
  background: linear-gradient(135deg, #ff6b6b, #ee5a6f) !important;
}

#tutorial-skip:hover {
  background: linear-gradient(135deg, #ee5a6f, #dc4a5f) !important;
}

#tutorial-exit {
  background: linear-gradient(135deg, #95a5a6, #7f8c8d) !important;
}

#tutorial-exit:hover {
  background: linear-gradient(135deg, #7f8c8d, #6c7a7b) !important;
}

/* -----------------------------------------------
   FORM MESSAGE STYLING
------------------------------------------------ */
.form-message {
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s ease-out;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-message::before {
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 1.2rem;
}

.form-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message.success::before {
  content: '\f00c'; /* check-circle */
  color: #28a745;
}

.form-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.form-message.error::before {
  content: '\f06a'; /* exclamation-circle */
  color: #dc3545;
}

.form-message.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.form-message.info::before {
  content: '\f05a'; /* info-circle */
  color: #17a2b8;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -----------------------------------------------
   TOAST NOTIFICATIONS
------------------------------------------------ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10002;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

.toast {
  background: var(--bg-surface);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: toastSlideIn 0.3s ease-out;
  min-width: 300px;
  border-left: 4px solid;
}

.toast.success {
  border-left-color: #28a745;
}

.toast.success .toast-icon::before {
  content: '\f00c'; /* check-circle */
  color: #28a745;
}

.toast.error {
  border-left-color: #dc3545;
}

.toast.error .toast-icon::before {
  content: '\f06a'; /* exclamation-circle */
  color: #dc3545;
}

.toast.info {
  border-left-color: #17a2b8;
}

.toast.info .toast-icon::before {
  content: '\f05a'; /* info-circle */
  color: #17a2b8;
}

.toast.warning {
  border-left-color: #ffc107;
}

.toast.warning .toast-icon::before {
  content: '\f071'; /* exclamation-triangle */
  color: #ffc107;
}

.toast-icon {
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.toast-close:hover {
  color: var(--text-primary);
}

.toast.hiding {
  animation: toastSlideOut 0.3s ease-out forwards;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(400px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(400px);
  }
}

/* -----------------------------------------------
   EMPTY STATE STYLING
------------------------------------------------ */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 4rem;
  color: #ccc;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state-icon::before {
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  content: '\f030'; /* qrcode icon */
}

.empty-state-message {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.empty-state-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

/* -----------------------------------------------
   LOADING INDICATORS
------------------------------------------------ */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  z-index: 10;
}

.qr-loading {
  position: relative;
}

.qr-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border: 5px solid rgba(0, 212, 255, 0.2);
  border-top-color: #00D4FF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 11;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* Scan history pulse animation for new items */
.log-entry.new-item {
  animation: pulseHighlight 1.5s ease-out;
}

@keyframes pulseHighlight {
  0% {
    background: #e9f2ff;
    transform: scale(1);
  }
  50% {
    background: #d0e0ff;
    transform: scale(1.02);
  }
  100% {
    background: transparent;
    transform: scale(1);
  }
}

/* -----------------------------------------------
   SCROLL PROGRESS INDICATOR
------------------------------------------------ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 10001;
  transition: width 0.1s ease-out;
  box-shadow: 0 2px 4px rgba(0, 212, 255, 0.4);
}

/* Scroll-triggered animations removed - they interfered with tutorial focus */
