* {
    /* Mobile မှာ နှိပ်ရင် ပေါ်တဲ့ အပြာ/မီးခိုးရောင် လေးထောင့်ကွက်ကို ဖျောက်မယ် */
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none;
}

/* ... (Root & General Styling - Previous Code) ... */
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --bg-app: #f3f4f6;
  --bg-card: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Dark Theme Data Attribute */
[data-theme="dark"] {
  --primary: #6366f1;
  --bg-app: #111827;
  --bg-card: #1f2937;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --border: #374151;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- GLOBAL FIX (Main Page ဘယ်ညာ မရွေ့အောင် ပိတ်ခြင်း) --- */
body,
html {
  overflow-x: hidden; /* ဘယ်ညာ Scroll ကို လုံးဝပိတ်မယ် */
  width: 100%;
  position: relative;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
}

/* Layout */
.app-layout {
  display: flex;
  height: 100%;
}

/* Sidebar */
.sidebar {
  width: 260px;
  height: 100vh; /* Screen အပြည့်အမြင့် ယူပါမယ် */
  position: sticky;
  top: 0;
  left: 0;

  /* Flexbox သုံးပြီး အပေါ်အောက် စီမယ် */
  display: flex;
  flex-direction: column;

  padding: 25px;
  z-index: 100;

  /* Design */
  background: linear-gradient(160deg, #1e1b4b 0%, #312e81 40%, #4338ca 100%);
  color: white;
  box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
}
.brand {
  /* Brand Logo (အပေါ်ဆုံးမှာ ရှိနေမယ်) */
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 30px;
  flex-shrink: 0; /* မကျုံ့စေရ */
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand i {
  background: rgba(255, 255, 255, 0.2);
  padding: 8px;
  border-radius: 10px;
  backdrop-filter: blur(5px);
}
.nav-links {
  /* Menu Links (အလယ်က နေရာလွတ် အကုန်ယူမယ်) */
  display: flex;
  flex-direction: column;
  gap: 10px;

  flex-grow: 1; /* ★ ဒီအချက်က အရေးကြီးဆုံးပါ (နေရာလွတ်အကုန်ယူပြီး Profile ကို အောက်တွန်းချမယ်) ★ */
  overflow-y: auto; /* Menu များရင် Scroll ဆွဲလို့ရအောင် */
}

/* Scrollbar ဖျောက်ခြင်း (သန့်ရှင်းအောင်) */
.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-btn {
  background: transparent;
  border: none;
  padding: 14px 15px;
  text-align: left;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7); /* စာလုံးအဖြူ ဖျော့ဖျော့ */
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  transform: translateZ(0); 
}
.nav-btn i {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateX(5px); /* ညာဘက်နည်းနည်းရွေ့မယ် */
}
.nav-btn.active {
  background: rgba(255, 255, 255, 0.2); /* ဖန်သားပြင်ပုံစံ */
  color: #fff;
  font-weight: 700;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  border-left: 4px solid #a5b4fc; /* ဘယ်ဘက်မှာ လိုင်းလေးပေါ်မယ် */
}

/* Main Content */
.content-area {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  position: relative;
}
.view-section {
  display: none;
  animation: fadeIn 0.3s ease;
}
.view-section.active {
  display: block;
}
.header-text h2 {
  font-size: 28px;
  margin-bottom: 5px;
}
.header-text p {
  color: var(--text-muted);
  margin-bottom: 25px;
}

/* Cards & Forms */
.card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 25px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.gen-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 25px;
}
.chip-group {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 20px;
}
.chip {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.form-group {
  margin-bottom: 15px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-muted);
}
input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  outline: none;
}
input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px #eef2ff;
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
}
.btn-primary:hover {
  background: var(--primary-dark);
}
.btn-outline {
  width: 100%;
  padding: 10px;
  background: white;
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: 8px;
  margin-top: 15px;
  cursor: pointer;
}

/* Preview Area */
.preview-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(to bottom, #ffffff, #f9fafb);
  border: 2px dashed var(--border);
}
#qr-display-area {
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
}
#qrcode img {
  margin: 0 auto;
  max-width: 100%;
}
#qr-label-display {
  margin-top: 10px;
  font-weight: 600;
  color: var(--text-main);
}

.header-text {
    display: flex;
    justify-content: space-between; /* ဘယ်ညာ ခွဲမယ် */
    align-items: center; /* အလယ်မျဉ်းတည့်မယ် */
    margin-bottom: 25px;
    gap: 20px;
    flex-wrap: wrap; /* နေရာမဆံ့ရင် အောက်ဆင်းမယ် */
}

.header-text h2 {
    font-size: 28px;
    margin: 0;
    white-space: nowrap;
}

/* Search Wrapper */
.search-bar-wrapper {
    position: relative;
    width: 100%;
    max-width: 350px; /* Desktop မှာ အကျယ်ဆုံးဆိုဒ် */
    flex-grow: 1; /* နေရာလွတ်ရင် ပြည့်အောင်ယူမယ် */
}

.search-bar-wrapper input {
    width: 100%;
    padding: 12px 20px;
    padding-right: 45px; /* Icon အတွက် နေရာချန်မယ် */
    
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px; /* တခြား Card တွေနဲ့ ညီအောင် */
    
    font-size: 14px;
    color: var(--text-main);
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02); /* အရိပ်ပါးပါးလေး */
}

.search-bar-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1); /* အရိပ်အဝိုင်းလေး ပေါ်မယ် */
    outline: none;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none; /* နှိပ်ရင် Input ကိုပဲ ထိအောင် */
}

/* History Grid (Updated - Better Spacing) */
.history-grid {
  display: grid;
  /* Responsive columns, min width 130px */
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 15px;
}
.history-item {
  background: white;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  border: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.history-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.history-item img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}
.history-item p {
  font-size: 12px;
  font-weight: 600;
  margin-top: 10px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}
.btn-delete-hist {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  color: #ef4444;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 14px;
  opacity: 0; /* Hidden by default */
  transition: opacity 0.2s;
}
.history-item:hover .btn-delete-hist {
  opacity: 1;
}

/* Tools & Scanner */
.scanner-layout {
  display: grid;
  gap: 20px;
}
.drop-zone {
  border: 2px dashed var(--border);
  text-align: center;
  padding: 40px;
  cursor: pointer;
  transition: 0.2s;
}
.drop-zone:hover {
  border-color: var(--primary);
  background: #eef2ff;
}
.drop-zone i {
  font-size: 40px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.gen-layout,
.tools-grid {
  display: flex;
  flex-direction: column; /* အပေါ်အောက် တန်းစီမယ် */
  gap: 25px;
  max-width: 600px; /* အကျယ်ဆုံးဆိုဒ် ကန့်သတ်မယ် (မပြဲထွက်အောင်) */
  width: 100%;
  margin: 0 auto; /* မျက်နှာပြင် အလယ်တည့်တည့်ပို့မယ် */
}

.input-card,
.preview-card,
.tool-card {
  width: 100% !important; /* အပြည့်ယူမယ် */
  border-radius: 20px; /* ထောင့်ပိုဝိုင်းမယ် */
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08); /* အရိပ်လှလှလေး */
  background: #ffffff;
}
.tools-grid {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 20px;
  height: 100%;
}
.tool-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.tool-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
#task-list {
  list-style: none;
  flex: 1;
  overflow-y: auto;
}
.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.task-item.done span {
  text-decoration: line-through;
  color: var(--text-muted);
}
.input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.btn-icon {
  background: var(--primary);
  color: white;
  border: none;
  width: 40px;
  border-radius: 8px;
  cursor: pointer;
}
#quick-note {
  flex: 1;
  resize: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
}

/* User Guide */
.guide-container {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.guide-card h3 {
  color: var(--primary);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.guide-card ul {
  padding-left: 20px;
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.6;
}
.guide-card li {
  margin-bottom: 8px;
}

/* --- MOBILE RESPONSIVE FIX --- */
@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
  }

  /* 1. Sidebar -> Top Nav Bar */
  .sidebar {
    width: 100%;
    height: 65px; /* အမြင့်သတ်မှတ် */
    position: fixed;
    top: 0;
    left: 0;
    bottom: auto; /* Desktop က bottom ကပ်တာကို ဖျက်မယ် */

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start; /* ဘယ်ဘက်က စမယ် */
    padding: 0 10px;

    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    z-index: 1000;

    /* Horizontal Scroll */
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Scrollbar ဖျောက် */
  }
  .sidebar::-webkit-scrollbar {
    display: none;
  }

  /* Desktop မှာရှိတဲ့ Brand နဲ့ Profile ကို Top Nav မှာ ဖျောက်မယ် */
  .sidebar .brand,
  .sidebar .user-profile {
    display: none !important;
  }

  /* 2. Nav Links Container (ပြန်ပေါ်အောင် ပြင်ဆင်ခြင်း) */
  .nav-links {
    display: flex !important; /* Force Show */
    flex-direction: row !important; /* ဘေးတိုက်စီမယ် */
    width: auto !important;
    height: 100%;
    gap: 10px;
    margin: 0;
    padding: 0;
    flex-grow: 0 !important; /* Desktop က grow ကို ဖျက်မယ် */
    align-items: center;
  }

  /* 3. Nav Buttons (Chips Design) */
  .nav-btn {
    flex: 0 0 auto; /* ကျုံ့မသွားအောင် */
    flex-direction: row !important; /* Icon ဘေး Text */

    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 0 !important; /* Desktop margin ဖျက် */

    background: #f3f4f6 !important;
    color: #4b5563 !important;
    border-radius: 20px;
    border: 1px solid transparent;

    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: none;

    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    transform: translateZ(0); 
  }

  .nav-btn i {
    font-size: 14px;
    width: auto;
    text-align: center;
    margin: 0;
  }

  /* Active State Mobile */
  .nav-btn.active {
    background: var(--primary) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
    border-left: none !important; /* Desktop border ဖျက် */
    transform: none;
  }

  /* 4. Footer User Profile (Bottom Left Fixed) */
  /* ဒီ Class ကို သီးသန့် အသစ်ဖန်တီးလိုက်ပါ (Sidebar အပြင်ထုတ်ဖို့) */
  /* HTML မှာ user-profile div ကို sidebar အပြင်ဘက် (သို့) ပွားပြီး ထည့်ဖို့လိုနိုင်ပါတယ် */
  /* သို့သော် CSS နဲ့ပဲ နေရာရွှေ့မယ်ဆိုရင် position: fixed သုံးပါမယ် */

  .user-profile {
    display: flex !important; /* ပြန်ဖော်မယ် */
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    top: auto !important; /* Sidebar ထဲက top property ကို ဖျက် */
    margin: 0 !important;

    width: 100% !important;
    height: 70px;
    background: #ffffff !important;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 !important;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
    z-index: 2000;

    padding: 0 20px;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
  }

  /* Mobile Profile Text */
  #user-name {
    color: #1f2937 !important;
    font-size: 14px;
  }

  .btn-logout {
    background: rgba(255, 0, 0, 0.1) !important;
    color: #ef4444 !important;
    padding: 5px 12px;
    border-radius: 6px;
    margin-left: auto; /* ညာဘက်ကပ် */
  }

  /* 5. Layout Fixes */
  .gen-layout,
  .tools-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 100%;
  }

  .input-card,
  .preview-card,
  .tool-card {
    width: 100% !important;
    height: auto !important;
    flex: none;
  }

  /* Content Area Adjustment */
  .content-area {
    padding: 20px;
    padding-top: 80px; /* Top Bar Space */
    padding-bottom: 120px !important; 
    overflow-x: hidden;
  }

  .mobile-footer-profile {
    display: flex !important;
    position: fixed;
    bottom: 0;
    /* ... (Footer Styles as above) ... */
  }

  /* Sidebar ထဲက Profile ကိုတော့ လုံးဝဖျောက်မယ် */
  .sidebar .user-profile {
    display: none !important;
  }
}

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

/* Animation for Mobile Footer */
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.mobile-footer-profile {
  display: none;
}

/* Login Screen */
.login-layout {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #eef2ff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.login-card {
  background: white;
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  width: 90%;
}
.brand-large {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
}
.login-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 20px;
}

.btn-google {
  background: #4285f4;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  transition: 0.2s;
}
.btn-google:hover {
  background: #357ae8;
}

/* User Profile in Sidebar */
.user-profile {
  /* User Profile (အောက်ဆုံးရောက်သွားမယ်) */
  margin-top: auto; /* အပေါ်ကနေ တွန်းချမယ် */
  flex-shrink: 0; /* မကျုံ့စေရ */

  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;

  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  width: 100%;
}

.user-profile img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  object-fit: cover;
}
.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#user-name {
  color: white;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-logout {
  background: transparent;
  border: none;
  color: #fca5a5; /* အနီဖျော့ */
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  text-align: left;
  padding: 0;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-logout:hover {
  text-decoration: underline;
  color: #fff;
}

/* Sync Status */
.sync-status {
  background: #fef3c7;
  color: #d97706;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Mini QR Container Fix */
.mini-qr {
  width: 80px;
  height: 80px;
  background: #f9fafb; /* ပုံမပေါ်ခင် မီးခိုးရောင်လေး ပြထားမယ် */
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mini-qr img {
  max-width: 100%;
}

/* --- MOBILE FOOTER STYLING --- */

/* 1. Desktop မှာ လုံးဝ မပေါ်စေရ */
.mobile-footer {
  display: none;
}

/* 2. Mobile View Settings */
@media (max-width: 768px) {
  /* Sidebar ထဲက Profile ကို ဖျောက်မယ် */
  .sidebar .user-profile {
    display: none !important;
  }

  /* Mobile Footer ကို ဖော်မယ် */
  .mobile-footer {
        display: flex; /* !important ကို ဖြုတ်လိုက်ပါ */
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 75px;
        
        background: #ffffff;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
        z-index: 2000;
        
        padding: 0 20px;
        align-items: center;
    }

  /* ဘယ်ဘက်မှာ အကုန်စုပုံနေအောင် Group လုပ်မယ် */
  .footer-left {
    display: flex;
    align-items: center;
    gap: 15px; /* ပုံနဲ့ စာ ကြားအကွာအဝေး */
    width: 100%;
  }

  /* User Image */
  #user-pic-mobile {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary); /* ဘောင်လေးခတ်မယ် */
  }

  /* Name & Logout Container */
  .user-info-mobile {
    display: flex;
    flex-direction: column; /* အပေါ်အောက် စီမယ် */
    justify-content: center;
  }

  /* User Name */
  #user-name-mobile {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2px;
  }

  /* Logout Button (စာသားအောက်မှာ ကပ်လျက်) */
  .btn-logout-mobile {
    background: none;
    border: none;
    color: #ef4444; /* အနီရောင် */
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    padding: 0;
  }

  /* Content ကို Footer နဲ့ မလွတ်အောင် တွန်းတင်မယ် */
  .content-area {
    padding-bottom: 100px !important;
  }
}

/* --- APP FOOTER Starts --- */
.app-footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12px;
    /* နောက်ခံအရောင်မရှိရင် စာမမြင်ရမှာစိုးလို့ */
    background: transparent; 
}
.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
  margin-top: 5px;
}

/* --- PRIVACY MODAL DESIGN --- */
.privacy-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 99999;
  display: none; /* JS နဲ့ ဖွင့်မယ် */
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.privacy-box {
  background: var(--bg-card);
  width: 100%;
  max-width: 600px;
  max-height: 85vh; /* Screen အပြည့်မဖြစ်အောင် */
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.3s ease;
  border: 1px solid var(--border);
}

.privacy-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.privacy-header h2 {
  margin: 0;
  font-size: 20px;
  color: var(--text-main);
}

.btn-close-privacy {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
}

.privacy-content {
  padding: 25px;
  overflow-y: auto; /* စာများရင် Scroll ဆွဲမယ် */
  line-height: 1.6;
  font-size: 14px;
  color: var(--text-main);
  text-align: left;
}

.privacy-content h3 {
  margin-top: 20px;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 16px;
}

.privacy-content ul {
  padding-left: 20px;
  margin-bottom: 15px;
}

.privacy-content li {
  margin-bottom: 5px;
}

.last-updated {
  font-style: italic;
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 20px;
}

.privacy-footer {
  padding: 15px;
  border-top: 1px solid var(--border);
  text-align: right;
  background: var(--bg-app);
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}
/* --- APP FOOTER Ends --- */

/* Button နှိပ်ပြီးရင် ကျန်ခဲ့တဲ့ ဘောင် (Focus Outline) ကို ဖျောက်မယ် */
button:focus, 
input:focus, 
.nav-btn:focus, 
.chip:focus {
    outline: none !important;
}

@media (max-width: 768px) {
    /* Mobile မှာ Header ကို အပေါ်အောက် စီမယ် */
    .header-text {
        flex-direction: column;
        align-items: flex-start; /* ဘယ်ဘက်ကပ် */
        gap: 15px;
    }
    
    .header-text h2 {
        font-size: 24px; /* ခေါင်းစဉ် နည်းနည်းချုံ့မယ် */
    }

    /* Search Bar ကို Mobile မှာ အပြည့်ယူခိုင်းမယ် */
    .search-bar-wrapper {
        max-width: 100%; /* Screen အပြည့် */
        width: 100%;
    }
    
    .search-bar-wrapper input {
        padding: 14px 20px; /* လက်နဲ့နှိပ်ရလွယ်အောင် ပိုကြီးမယ် */
        font-size: 15px; /* စာလုံးဆိုဒ် နည်းနည်းကြီးမယ် */
        background: #ffffff; /* အဖြူရောင် */
    }
}