/* Base styles */
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #fff;
  color: #111;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background: #f5f5f5;
  border-right: 1px solid #ccc;
  position: fixed;
  height: 100%;
  padding-top: 20px;
}

.sidebar-header {
  padding: 0 16px;
}


.hamburger {
  display: inline-block;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1100;
  background-color: #fff;
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}


.category-menu ul {
  list-style: none;
  padding: 0;
}

.category-menu li {
  padding: 12px 20px;
  cursor: pointer;
}

.category-menu li:hover {
  background: #e0e0e0;
}

.category-menu li.selected {
  background-color: #d0e8ff;
  font-weight: bold;
}

body.dark-mode .category-menu li.selected {
  background-color: #005c99;
  color: #fff;
}

/* Main content */
.main-content {
  margin-left: 240px;
  padding: 0;
  flex: 1;
  overflow-y: auto;
}

/* Top banner */
.top-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f0f0f0;
  border-bottom: 1px solid #ddd;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: center;
  max-width: 100%; /* allow it to grow */
}

.logo {
  height: 32px;
}

.banner-text {
  font-size: 20px;
  font-weight: 500;
  white-space: nowrap;
}

.banner-right {
  display: flex;
  justify-content: flex-end;
  min-width: 300px; /* minimum size */
  overflow: visible;
  white-space: nowrap;
  padding-right: 32px;
}

.dark-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #444;
}

section.app-list {
  padding-top: 16px
}

/* App cards */
.app-card {
  display: flex;
  gap: 20px;
  border: 1px solid #ccc;
  padding: 15px;
  margin: 20px;
  background: white;
  align-items: flex-start;
  border-radius: 6px;
}

.app-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.app-card-center {
  flex: 1;
}

.app-card-right {
  text-align: right;
  min-width: 140px;
}

.download-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.store-button {
  height: 32px;
  max-width: 160px;
  object-fit: contain;
}

/* Footer */
.footer {
  margin-left: 240px;
  background: #f9f9f9;
  border-top: 1px solid #ddd;
  padding: 10px 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
  font-size: 14px;
  color: #666;
}

/* Footer links */
.footer a {
  color: #333;
  text-decoration: none;
  transition: color 0.2s;
}

.footer a:hover {
  text-decoration: underline;
}

body.dark-mode .footer a {
  color: #fff;
}

body.dark-mode .footer a:visited {
  color: #ccc;
}

/* Dropdown menu */
.hamburger-dropdown {
  display: none;
  position: absolute;
  background: #ffffff;
  border: 1px solid #ccc;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 999;
  width: 180px;
  border-radius: 6px;
}

.hamburger-dropdown ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hamburger-dropdown li {
  padding: 10px 15px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}

.hamburger-dropdown li:hover {
  background-color: #f0f0f0;
}

/* Toggle switch styling */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

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

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

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

input:checked + .slider {
  background-color: #4caf50;
}

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

.slider.round {
  border-radius: 24px;
}

/* Dark mode overrides */
body.dark-mode {
  background-color: #121212;
  color: #f1f1f1;
}

body.dark-mode .sidebar {
  background-color: #1e1e1e;
  border-color: #333;
}

body.dark-mode .main-content {
  background-color: #181818;
}

body.dark-mode .footer {
  background-color: #1e1e1e;
  color: #ccc;
  border-top-color: #333;
}

body.dark-mode .app-card {
  background: #1f1f1f;
  border-color: #444;
}

body.dark-mode .hamburger-dropdown {
  background: #2b2b2b;
  border-color: #444;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .hamburger-dropdown li {
  color: #eee;
}

body.dark-mode .hamburger-dropdown li:hover {
  background-color: #3a3a3a;
}

body.dark-mode .top-banner {
  background-color: #1e1e1e;
  border-bottom-color: #444;
}

body.dark-mode .banner-text,
body.dark-mode .dark-toggle-wrapper,
body.dark-mode #user-location {
  color: #eee;
}

#user-location {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip; /* no ugly ellipsis unless you want it */
}


/* Responsive tweaks */
@media (max-width: 768px) {
  .sidebar {
    display: none;
    position: absolute;
    z-index: 1000;
    background: #f5f5f5;
    height: 100vh;
    width: 200px;
  }

  .sidebar.show {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }

  .footer {
    margin-left: 0;
  }

  
.hamburger {
  display: inline-block;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1100;
  background-color: #fff;
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

}


.top-banner {
  width: 100%;
}

@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
  }

  .footer {
    margin-left: 0;
  }

  .sidebar {
    display: none;
  }

  .sidebar.show {
    display: block;
    position: fixed;
    top: 56px;
    left: 0;
    width: 200px;
    height: calc(100% - 56px);
    background-color: #f5f5f5;
    z-index: 1000;
  }
}


/* Make top-banner span entire width and sit above sidebar */
.top-banner {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  height: 56px; /* keep same height as before */
  z-index: 1001;
}

/* Push content below top banner */
.main-content {
  margin-top: 56px;
}

/* Adjust sidebar to start below the top bar */
.sidebar {
  padding-top: 76px;
}

/* On mobile, position sidebar under top banner */
@media (max-width: 768px) {
  .sidebar.show {
    top: 56px;
  }
}


/* Dark mode hamburger styling */
body.dark-mode .hamburger {
  background-color: #333;
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}


/* Slide-in animation for sidebar */
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Enhanced sidebar mobile behavior */
.sidebar.show {
  animation: slideInLeft 0.3s ease-out forwards;
}

/* Menu item style for dropdown */
.hamburger-dropdown li {
  color: #333;
  border-radius: 4px;
}

body.dark-mode .hamburger-dropdown li {
  color: #fff;
}

.hamburger-dropdown li:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

body.dark-mode .hamburger-dropdown li:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.app-card-bottom {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

@media (min-width: 768px) {
  .app-card-bottom {
    display: none;
  }
}


@media (max-width: 767px) {
  .app-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-card-left,
  .app-card-center,
  .app-card-right,
  .app-card-bottom {
    width: 100%;
  }

  .app-card-right {
    text-align: left;
  }

  .download-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
  }

  .store-button {
    max-width: 100%;
    height: auto;
    flex: 1 1 100%; /* Stack vertically */
  }
}

.store-button {
  height: 32px;
  max-width: 160px;
  object-fit: contain;
  display: block;
}
