html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: teal;
  font: 300 18px/18px Roboto;
  /* Prevent scrollbars from appearing when content overflows outside the mobile-wrap */
  overflow: hidden; 
}

*,
:after,
:before {
  box-sizing: border-box;
}

.clearfix:after,
.clearfix:before {
  content: '';
  display: table;
}

.clearfix:after {
  clear: both;
  display: block;
}

.mobile-wrap {
  /* RESPONSIVENESS: Use full available height */
  width: 100vw; 
  height: 100%;
  overflow: hidden;
  position: relative;
  /* Background image/color retained for mobile-like appearance */
  background: url(https://raw.githubusercontent.com/khadkamhn/secret-project/master/img/background.jpg) center no-repeat;
  background-size: cover; /* Ensure background covers the full screen */
  box-shadow: 0 0 15px rgba(0, 0, 0, .5);
}

.mobile-wrap:before {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  content: '';
  position: absolute;
  /* Retaining the gradient overlay */
  background: linear-gradient(to bottom, rgba(90, 93, 165, 1), rgba(0, 0, 0, .7));
}

.mobile {
  z-index: 99;
  color: #fff;
  /* RESPONSIVENESS: Full height and width of the wrapper */
  height: 100%;
  width: 100%;
  padding: 15px;
  position: relative;
  /* Remove the fixed shadow from the original .mobile for a cleaner full-screen look */
}

/* --- Header Styles (Hamburger Menu Icon) --- */
.mobile .header {
  clear: both;
  overflow: hidden;
  padding-top: 15px; /* Keep original top spacing */
	position:relative;
  /* Removed unnecessary height rules from last attempt */
}

.mobile .header>span {
  font-size: 24px;
  min-width: 24px;
  /* ADDED: Ensure vertical alignment for icons and title */
  line-height: 24px; 
}

.mobile .header>.title {
  /* CRITICAL: Explicitly float left to sit next to hamburger icon */
  float: left;
  font-size: 16px;
  line-height: 24px;
  margin-left: 15px;
  /* CRITICAL FIX: Limit the title width to prevent it from pushing the search icon down. 
     Calc(100% - 90px) ensures enough space for hamburger, its margin, and the search icon. */
   max-width: calc(100% - 90px); /* CORRECTED: Increased margin to prevent title overlap with search icon */
  white-space: nowrap; /* Prevent title from wrapping */
  overflow: hidden; /* Hide overflow */
  text-overflow: ellipsis; /* Show ... if title is too long */
  cursor: default; /* Disable text selector cursor on hover */
}

.mobile .header .pull-left {
  float: left;
}

.mobile .header .pull-right {
  float: right;
}

.mobile .header .ion-ios-search{
	z-index:999;
	position:relative;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .mobile-wrap {
    padding: 5px;
  }
  .mobile .header {
    height: auto;
    padding-top: 5px;
    padding-bottom: 5px;
  }
  .html.welcome p {
    display: none;
  }
  .content {
    margin-top: 30px;
  }
}

.mobile .header .ion-ios-navicon>i {
  height: 1px;
  width: 20px;
  margin-top: 5px;
  background: #fff;
  position: relative;
  display: inline-block;
}

.mobile .header .ion-ios-navicon>i:after,
.mobile .header .ion-ios-navicon>i:before {
  content: '';
  width: inherit;
  height: inherit;
  position: absolute;
  background: inherit;
}

.mobile .header .ion-ios-navicon>i:before {
  bottom: 12px;
}

.mobile .header .ion-ios-navicon>i:after {
  bottom: 6px;
}

/* --- Search Bar Styles --- */
.mobile .header .search{
	float: right;
}
.mobile .header .search input{
	width:0;
	color:#fff;
	height:24px;
	border:none;
	font-size:16px;
	max-width:150px;
	font-weight:300;
	padding-right:30px;
	font-family:inherit;
	background:transparent;
	transition:all .3s ease-in-out 0s;
	border-bottom:1px solid transparent;
	-webkit-appearance:textfield;
}
.mobile .header .search input:focus{
	outline:none;
}
.mobile .header .search input::-webkit-search-decoration,
.mobile .header .search input::-webkit-search-cancel-button {
	-webkit-appearance:none;
}
.mobile .header .search .search-visible{
	width:100%;
	border-bottom-color:#aaa;
}

/* --- FAB Navigation Styles --- */
.nav {
  right: 15px;
  z-index: 20;
  width: 45px;
  bottom: 15px;
  height: 45px;
  display: block;
  position: absolute;
  line-height: 45px;
  border-radius: 50%;
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, .75);
}

.mask {
  z-index: 21;
  color: #fff;
  width: inherit;
  height: inherit;
  cursor: pointer;
  font-size: 28px;
  text-align: center;
  border-radius: 50%;
  position: absolute;
  background: #f23363;
  transition: all .1s ease-in-out 0s;
}

.nav.active .mask {
  background: #cf0e3f;
  transform: rotate(-135deg);
}

.nav:after {
  top: 0;
  left: 0;
  content: '';
  width: inherit;
  height: inherit;
  border-radius: 50%;
  position: absolute;
  background: #f23363;
  transition: all .1s ease-in-out 0s;
}

/* The expanding circle effect on FAB open */
.nav.active:after {
  top: -125px;
  left: -125px;
  width: 350px;
  height: 350px;
}

.nav-item {
  top: 0;
  left: 0;
  z-index: 19;
  width: 45px;
  height: 45px;
  color: #fff;
  font-size: 24px;
  transform: none;
  line-height: 45px;
  border-radius: 50%;
  position: absolute;
  text-align: center;
  transition: all .3s cubic-bezier(.68, 1.55, .265, 1);
}

/* Positioning of items when FAB is active */
.nav.active .nav-count-1 {
  transform: translate(10px, -100px);
}

.nav.active .nav-count-2 {
  transform: translate(-35px, -80px);
}

.nav.active .nav-count-3 {
  transform: translate(-80px, -45px);
}

.nav.active .nav-count-4 {
  transform: translate(-100px, 0);
}

.pull-left {
  float: left;
}

.pull-right {
  float: right;
}

.html,
.invisible {
  display: none;
}

.html.visible,
.visible {
  display: block;
}

/* --- Sidebar Styles --- */
.sidebar .sidebar-content,
.sidebar .sidebar-overlay {
  top: 0;
  left: 0;
  bottom: 0;
  position: fixed;
  transition: all .3s ease-in-out 0s;
}

.sidebar .sidebar-overlay {
  right: 0;
  opacity: 0;
  width: 100%;
  z-index: 999;
  transform: scale(0);
  background: rgba(0, 0, 0, .4);
}

.sidebar .sidebar-content {
  /* Use a percentage of the viewport width for responsiveness */
  width: 80%; 
  color: #333;
  padding: 15px;
  z-index: 9999;
  background: #fff;
  transform: translateX(-100%);
}

.sidebar.active .sidebar-content {
  transform: translateX(0);
}

.sidebar.active .sidebar-overlay {
  opacity: 1;
  transform: scale(1);
}

.sidebar .sidebar-content .top-head .name {
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 5px;
}

.sidebar .sidebar-content .top-head .email {
  font-size: 13px;
  margin-bottom: 50px;
}

/* Kept the second, more specific block and removed the redundant first one. */
.sidebar .sidebar-content .nav-left h4 {
  color: #666;
  font-size: 12px;
  font-weight: bold;
  margin: 10px 0 2px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar .sidebar-content .nav-left>a {
  color: #333;
  display: block;
  font-size: 14px;
  padding: 5px 0;
  line-height: 20px;
  vertical-align: top;
  text-decoration: none;
  transition: background-color 0.2s;
}

.sidebar .sidebar-content .nav-left>a:hover,
.sidebar .sidebar-content .nav-left>a.selected {
   background-color: rgba(0, 0, 0, 0.25);
 }

 .sidebar .sidebar-content .nav-left>a:hover {
   background-color: rgba(0, 0, 0, 0.25);
 }

.sidebar .sidebar-content .nav-left>a>span {
   color: #aaa;
   font-size: 24px;
   min-width: 40px;
   display: inline-block;
}

.sidebar-menu .menu-section h4 {
   color: #666;
   font-size: 12px;
   font-weight: bold;
   margin: 8px 0 3px 0;
   text-transform: uppercase;
   letter-spacing: 0.5px;
}

.sidebar-menu .menu-list {
   list-style: none;
   padding: 0;
   margin: 0;
}

.sidebar-menu .menu-category {
   cursor: pointer;
   padding: 3px 0;
   position: relative;
}

.sidebar-menu .menu-category:hover .menu-label {
   background-color: rgba(0, 0, 0, 0.1);
}

.sidebar-menu .menu-category .menu-label {
   display: block;
   padding: 3px 0;
}

.sidebar-menu .submenu {
   display: none;
   list-style: none;
   padding-left: 20px;
   margin: 0;
}

.sidebar-menu .submenu .menu-item {
   padding: 2px 0;
}

.sidebar-menu .menu-item a {
   color: #333;
   text-decoration: none;
   display: block;
   padding: 3px 0;
   font-size: 13px;
}

.sidebar-menu .menu-item a:hover,
.sidebar-menu .menu-item.selected a {
   background-color: rgba(0, 0, 0, 0.25);
}

.sidebar-menu .menu-category.selected .menu-label {
   background-color: rgba(0, 0, 0, 0.25);
}

.sidebar-menu .menu-item a span {
   color: #aaa;
   font-size: 20px;
   min-width: 30px;
   display: inline-block;
}

/* Adjusting the content margin for header height */
.content {
  margin-top: 50px; /* Reset to 50px margin-top for content to clear header */
  height: calc(100% - 65px); /* Full height minus approx header height and bottom padding */
  overflow-y: auto; /* Allow content to scroll if it's too long */
  padding-bottom: 70px; /* Space for the FAB at the bottom */
}

.html.welcome {
  padding: 0 15px;
}

.html.config {
  padding: 0 15px;
}

.config-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
}

.config-item label {
  font-size: 16px;
}

/* iOS Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Transparency Selector */
.transparency-selector {
  display: flex;
  border-radius: 20px;
  background: #ddd;
  overflow: hidden;
  width: 200px;
}

.transparency-selector .option {
  flex: 1;
  text-align: center;
  padding: 10px;
  cursor: pointer;
  transition: background 0.3s;
}

.transparency-selector .option.selected {
  background: #2196F3;
  color: white;
}

/* Accordion Styles */
.accordion {
  margin: 20px 0;
}

.accordion-item {
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.accordion-header {
  background: rgba(245, 245, 245, 0.9);
  padding: 15px 25px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
  user-select: none;
}

.accordion-header:hover {
  background: rgba(232, 232, 232, 0.9);
}

.accordion-header.active {
  background: #2196F3;
  color: white;
}

.accordion-title {
  font-weight: 500;
  font-size: 16px;
  text-align: center;
  flex: 1;
  color: #333;
}

.accordion-icon {
  transition: transform 0.3s ease;
  font-size: 12px;
  color: #666;
}

.accordion-header.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: lightgray; /* Using a CSS keyword color for testing */
}

/* Light mode accordion header */
.accordion-header {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  padding: 15px 25px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.accordion-header:hover {
  background: rgba(245, 245, 245, 0.9);
}

.accordion-content.active {
  max-height: 500px;
  transition: max-height 0.3s ease;
}

.accordion-content .config-item {
  padding: 15px;
  margin: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.accordion-content .config-item label {
  color: #333;
}

.accordion-content .config-item:last-child {
  border-bottom: none;
}

/* Dark mode support for accordion */
body.dark .accordion-header {
  background: rgba(50, 50, 50, 0.9);
  color: white;
  padding: 15px 25px;
}

body.dark .accordion-title {
  color: white; /* Ensure header label is white in dark mode */
}

body.dark .accordion-content {
  background: inherit; /* Make accordion body background transparent in dark mode */
}

body.dark .accordion-content .config-item label {
  color: white;
}

body.dark .accordion-header:hover {
  background: rgba(70, 70, 70, 0.9);
}

body.dark .accordion-header.active {
  background: #2196F3;
  color: white;
}

body.dark .accordion-content .config-item {
  border-bottom: 1px solid rgba(100, 100, 100, 0.3);
}

body.dark .accordion-content .config-item label {
  color: white;
}



/* Firebase config textarea styles */
#firebase-config {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 12px;
  color: inherit;
  resize: vertical;
  min-height: 120px;
}

body.dark #firebase-config {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
}

#firebase-config:focus {
  outline: none;
  border-color: #007AFF;
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

body.dark #firebase-config:focus {
  border-color: #0A84FF;
  box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.2);
}

.config-help-text {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
  line-height: 1.4;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
}

body.dark .config-help-text {
  color: #aaa;
  background: rgba(255, 255, 255, 0.05);
}

/* Config action buttons */
.config-actions {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  padding: 0 15px;
}

.config-action-button {
  flex: 1;
  background: #007AFF;
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.config-action-button:hover {
  background: #0056CC;
  transform: translateY(-1px);
}

.config-action-button:active {
  transform: translateY(0);
}

body.dark .config-action-button {
  background: #0A84FF;
}

body.dark .config-action-button:hover {
  background: #409CFF;
}

/* Code/Scan buttons use same colors as Export/Import */
#show-qr-code, #export-config {
  background: #34C759;
}

#show-qr-code:hover, #export-config:hover {
  background: #28A745;
}

#show-qr-scanner, #import-config {
  background: #FF9500;
}

#show-qr-scanner:hover, #import-config:hover {
  background: #FF8000;
}

/* Dark mode variants */
body.dark #show-qr-code, body.dark #export-config {
  background: #30D158;
}

body.dark #show-qr-code:hover, body.dark #export-config:hover {
  background: #4FD860;
}

body.dark #show-qr-scanner, body.dark #import-config {
  background: #FF9F0A;
}

body.dark #show-qr-scanner:hover, body.dark #import-config:hover {
  background: #FFB143;
}

body.dark #export-config {
  background: #30D158;
}

body.dark #export-config:hover {
  background: #32D74B;
}

#import-config {
  background: #FF9500;
}

#import-config:hover {
  background: #FF8000;
}

body.dark #import-config {
  background: #FF9F0A;
}

body.dark #import-config:hover {
  background: #FF8C00;
}

.debug-button {
  background: #FF9500;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  width: auto;
  margin-top: 5px;
}

.debug-button:hover {
  background: #FF8000;
  transform: translateY(-1px);
}

body.dark .debug-button {
  background: #FF9F0A;
}

body.dark .debug-button:hover {
  background: #FF8C00;
}

.keyboard-info {
  padding: 10px 15px;
  font-size: 14px;
  color: #666;
  font-style: italic;
  border-bottom: 1px solid rgba(238, 238, 238, 0.3);
}

body.dark .keyboard-info {
  color: #ccc;
  border-bottom: 1px solid rgba(100, 100, 100, 0.3);
}

/* Mobile-specific API key styling */
.api-key-item {
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 8px;
}

.api-key-item label {
  margin-bottom: 5px;
}

.api-key-item input {
  width: 100% !important;
  max-width: 100% !important;
}

/* Shortcut item styling */
.shortcut-item {
  position: relative;
}

.shortcut-item label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shortcut-display {
  padding: 4px 8px;
  background: rgba(33, 150, 243, 0.1);
  border: 1px solid #2196F3;
  border-radius: 4px;
  font-family: monospace;
  font-size: 14px;
  color: #2196F3;
  font-weight: bold;
  min-width: 50px;
  text-align: center;
}

body.dark .shortcut-display {
  background: rgba(33, 150, 243, 0.2);
  border-color: #64B5F6;
  color: #64B5F6;
}

/* Mobile-specific shortcut styling */
.shortcut-item {
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 8px;
}



.shortcut-item label {
  margin-bottom: 5px;
  width: 100%;
}

.shortcut-item input {
  width: 100% !important;
  max-width: 100% !important;
}

/* Desktop override */
@media (min-width: 768px) {
  .api-key-item {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0;
  }
  
  .api-key-item label {
    margin-bottom: 0;
    flex: 1;
  }
  
  .api-key-item input {
    width: auto !important;
    max-width: 60% !important;
    flex: 1;
  }
  
  .shortcut-item {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0;
  }
  
  .shortcut-item label {
    margin-bottom: 0;
    flex: 1;
    align-items: center;
  }
  
  .shortcut-item input {
    width: auto !important;
    max-width: 80px !important;
    flex: 0 0 auto;
  }
}

.back-bubble {
  margin-top: 20px;
  width: 30%;
  margin-left: auto;
  margin-right: auto;
  background: #2196F3;
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  text-align: center;
}

/* Search Modal */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: none;
}

.search-modal.active {
  display: block;
}

.search-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
}

.search-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 600px;
}

.search-modal-content form {
  text-align: center;
}

.search-modal-content input {
  width: 100%;
  padding: 20px;
  font-size: 24px;
  border: none;
  border-radius: 10px;
  outline: none;
  background: white;
  color: black;
  font-family: inherit;
}

.search-suggestions {
  margin-top: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.search-suggestions .suggestion {
  padding: 10px;
  background: white;
  border-radius: 5px;
  margin-bottom: 5px;
  cursor: pointer;
  color: black;
}

.search-suggestions .suggestion:hover,
.search-suggestions .suggestion.selected {
  background: #f0f0f0;
}

/* Dark Mode */
.dark body {
  background: #121212;
  color: #ffffff;
}

.dark .mobile {
  background: rgba(0, 0, 0, 0.9);
}

.dark .sidebar .sidebar-content {
  background: #333;
  color: #fff;
}

.dark .sidebar .sidebar-content .nav-left>a,
.dark .sidebar .sidebar-content .nav-left>a.selected {
   color: #fff;
}

.dark .sidebar .sidebar-content .nav-left>a>span {
   color: #ccc;
}

.dark .sidebar-menu .menu-item a {
   color: #fff;
}

.dark .sidebar-menu .menu-item.selected a {
   background-color: rgba(255, 255, 255, 0.1);
}

.dark .sidebar-menu .menu-category.selected .menu-label {
   background-color: rgba(255, 255, 255, 0.1);
}

.dark .sidebar-menu .menu-category:hover .menu-label {
   background-color: rgba(255, 255, 255, 0.1);
}

.dark .search-modal-content input {
  background: #333;
  color: #fff;
  border-color: #555;
}

.dark .search-suggestions .suggestion {
  background: #333;
  color: #fff;
}

.dark .search-suggestions .suggestion.selected {
  background: #555;
}

/* AskAI Modal */
.askai-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: none;
}

.askai-modal.active {
  display: block;
}

.askai-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
}

.askai-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 600px;
  background: white;
  padding: 20px;
  border-radius: 10px;
  color: black;
  font-size: 18px;
  line-height: 1.5;
}

.dark .askai-modal-content {
  background: #333;
  color: #fff;
}

/* AskAI Modal */
.askai-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: none;
}

.askai-modal.active {
  display: block;
}

.askai-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
}

.askai-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 600px;
  background: white;
  padding: 20px;
  border-radius: 10px;
  color: black;
  font-size: 18px;
  line-height: 1.5;
}

.dark .askai-modal-content {
  background: #333;
  color: #fff;
}



.back-bubble {
  margin-top: 20px;
  width: 30%;
  margin-left: auto;
  margin-right: auto;
  background: #2196F3;
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  text-align: center;
}

.config-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
}

.config-item label {
  font-size: 16px;
}

/* iOS Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Transparency Selector */
.transparency-selector {
  display: flex;
  border-radius: 20px;
  background: #ddd;
  overflow: hidden;
  width: 200px;
}

.transparency-selector .option {
  flex: 1;
  text-align: center;
  padding: 10px;
  cursor: pointer;
  transition: background 0.3s;
}

.transparency-selector .option.selected {
  background: #2196F3;
  color: white;
}



/* Additional utility classes from original that are useful for content */
.btn {
  color: #eee;
  width: 100%;
  border: none;
  font-size: 16px;
  padding: 12px 24px;
  background: #cf0e3f;
  border-radius: 30px;
}

/* Search Modal Styles */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: none;
}

.search-modal.active {
  display: block;
}

.search-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
}

.search-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 600px;
}

.search-modal-content form {
  text-align: center;
}

.search-modal-content input {
  width: 100%;
  padding: 20px;
  font-size: 24px;
  border: none;
  border-radius: 10px;
  outline: none;
  background: white;
  color: black;
  font-family: inherit;
}

.search-suggestions {
  margin-top: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.search-suggestions .suggestion {
  padding: 10px;
  background: white;
  border-radius: 5px;
  margin-bottom: 5px;
  cursor: pointer;
  color: black;
}

.search-suggestions .suggestion:hover,
.search-suggestions .suggestion.selected {
  background: #f0f0f0;
}



/* QR Code Modal */
.qr-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: none;
}

.qr-modal.active {
  display: block;
}

.qr-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
}

.qr-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 400px;
  background: white;
  border-radius: 10px;
  color: black;
}

.qr-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.qr-header h3 {
  margin: 0;
  font-size: 18px;
}

.qr-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-body {
  padding: 20px;
  text-align: center;
}

#qr-code-container {
  text-align: center;
  padding: 20px;
  background: white;
  border-radius: 8px;
  margin: 10px 0;
  position: relative;
  z-index: 1000;
  border: 2px solid #007AFF;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#qr-code-container:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#qr-code-container:active {
  transform: scale(0.98);
}

#qr-code-container img {
  display: block !important;
  margin: 0 auto;
  border: 2px solid #333;
}

body.dark #qr-code-container {
  background: #2c2c2e;
  border-color: #0A84FF;
}

body.dark #qr-code-container img {
  border-color: #fff;
}

#qr-code-container canvas {
  border: 1px solid #ddd;
  border-radius: 8px;
}

.qr-actions {
  margin-top: 20px;
}

/* QR Scanner Modal */
.qr-scanner-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10001;
  display: none;
}

.qr-scanner-modal.active {
  display: block;
}

.qr-scanner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
}

.qr-scanner-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 400px;
  background: white;
  border-radius: 10px;
  color: black;
}

.qr-scanner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
}

.qr-scanner-header h3 {
  margin: 0;
  font-size: 18px;
}

.qr-scanner-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-scanner-body {
  padding: 20px;
  text-align: center;
}

#qr-reader-container {
  position: relative;
  width: 100%;
  height: 300px;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.qr-reader-grid {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  border: 2px solid #2196F3;
  border-radius: 8px;
}

.qr-reader-grid::before,
.qr-reader-grid::after {
  content: '';
  position: absolute;
  background: #2196F3;
}

.qr-reader-grid::before {
  top: 20px;
  left: 20px;
  right: 20px;
  height: 2px;
}

.qr-reader-grid::after {
  top: 20px;
  bottom: 20px;
  left: 20px;
  width: 2px;
}

.qr-scanner-instructions {
  margin-top: 15px;
  font-size: 14px;
  color: #666;
}

.dark .qr-modal-content,
.dark .qr-scanner-content {
  background: #333;
  color: #fff;
}

.dark .qr-header,
.dark .qr-scanner-header {
  border-bottom-color: #555;
}

.dark .qr-close,
.dark .qr-scanner-close {
  color: #ccc;
}

.dark .qr-scanner-instructions {
  color: #ccc;
}

/* Nested Accordion Styles */
#profiles-accordion .accordion-item {
  margin-bottom: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

#profiles-accordion .accordion-header {
  background: rgba(248, 248, 248, 0.9);
  padding: 12px 20px;
  font-size: 14px;
}

#profiles-accordion .accordion-header:hover {
  background: rgba(240, 240, 240, 0.9);
}

#profiles-accordion .accordion-header.active {
  background: #2196F3;
  color: white;
}

#profiles-accordion .accordion-content {
  background: rgba(255, 255, 255, 0.5);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

#profiles-accordion .accordion-content.active {
  max-height: 300px;
  transition: max-height 0.3s ease;
}

#profiles-accordion .config-item {
  padding: 12px 20px;
  margin: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#profiles-accordion .config-item:last-child {
  border-bottom: none;
}

#profiles-accordion .config-help-text {
  padding: 8px 20px 12px 20px;
  font-size: 12px;
  color: #666;
  background: rgba(0, 0, 0, 0.02);
}

/* Dark mode for nested accordions */
body.dark #profiles-accordion .accordion-header {
  background: rgba(60, 60, 60, 0.9);
  color: white;
}

body.dark #profiles-accordion .accordion-header:hover {
  background: rgba(80, 80, 80, 0.9);
}

body.dark #profiles-accordion .accordion-content {
  background: rgba(40, 40, 40, 0.5);
}

body.dark #profiles-accordion .config-help-text {
  color: #aaa;
  background: rgba(255, 255, 255, 0.02);
}
