/* ===================================
   NEON LISTS - Professional Style Sheet
   Version 2.0 - Optimized for Performance
   =================================== */

/* ===================================
   CSS VARIABLES (Easy theming)
   =================================== */
:root {
  --primary: #0cc;
  --primary-dark: #099;
  --primary-glow: rgba(0, 204, 204, 0.4);
  --bg-dark: #0a0a0a;
  --bg-card: #111;
  --bg-card-hover: #1a1a1a;
  --text-primary: #fff;
  --text-secondary: #aaa;
  --text-muted: #666;
  --danger: #f44;
  --danger-dark: #c00;
  --success: #0f0;
  --warning: #f90;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --transition-fast: 0.1s ease;
  --transition-normal: 0.2s ease;
  --shadow-glow: 0 0 10px var(--primary-glow);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* ===================================
   RESET & BASE
   =================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Prevent pull-to-refresh on mobile */
body.no-pull-refresh {
  overscroll-behavior-y: contain;
}

/* ===================================
   SCROLLBAR (All browsers)
   =================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0ff;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg-dark);
}

/* ===================================
   HEADER
   =================================== */
header {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  padding: 12px 16px;
  box-shadow: var(--shadow-glow);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--primary);
}

header h1 {
  flex: 1;
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary-glow);
  font-size: clamp(1.2rem, 5vw, 1.8rem);
  text-align: center;
  margin: 0;
  font-weight: 600;
}

#menuBtn {
  background: var(--bg-card);
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 8px 12px;
  cursor: pointer;
  border-radius: var(--border-radius);
  box-shadow: 0 0 4px var(--primary-glow);
  transition: box-shadow var(--transition-fast);
  touch-action: manipulation;
}

#menuBtn:hover {
  box-shadow: var(--shadow-glow);
}

#menuBtn:active {
  transform: scale(0.95);
}

/* ===================================
   LOGIN SCREEN
   =================================== */
#loginScreen {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loginContainer {
  text-align: center;
  padding: clamp(24px, 6vw, 40px);
  background: var(--bg-card);
  border: 2px solid var(--primary);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 0 30px var(--primary-glow);
  max-width: 400px;
  width: 90%;
}

.loginIcon {
  width: clamp(80px, 20vw, 120px);
  height: clamp(80px, 20vw, 120px);
  margin-bottom: 20px;
  filter: drop-shadow(0 0 10px var(--primary-glow));
}

.loginContainer h1 {
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary-glow);
  margin-bottom: 8px;
  font-size: clamp(1.3rem, 5vw, 1.6rem);
}

.loginContainer p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.googleBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: #333;
  border: none;
  padding: 12px 24px;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  touch-action: manipulation;
  width: 100%;
  max-width: 280px;
}

.googleBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.googleBtn:active {
  transform: scale(0.98);
}

.googleBtn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.loginNote {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Legal Links */
.legalLinks {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legalLinks a {
  color: var(--primary);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.legalLinks a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* ===================================
   HAMBURGER MENU - NEW DESIGN
   =================================== */
#leftMenu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 320px;
  height: 100%;
  background: var(--bg-card);
  z-index: 1000;
  flex-direction: column;
  padding: 16px;
  overflow-y: auto;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
  border-right: 1px solid var(--primary);
  overscroll-behavior: contain;
}

#leftMenu.open {
  display: flex;
}

#backBtn {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 10px 20px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  margin-bottom: 16px;
  box-shadow: 0 0 4px var(--primary-glow);
}

#backBtn:hover {
  box-shadow: var(--shadow-glow);
}

#backBtn:active {
  transform: scale(0.95);
}

/* Main Menu Buttons */
#menuItems {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0 16px 0;
}

.menuBtn {
  background: var(--bg-card);
  border: 1px solid rgba(0, 204, 204, 0.5);
  color: var(--primary);
  padding: 14px 16px;
  text-align: left;
  font-size: 0.95rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: none;
}

.menuBtn:hover {
  background: rgba(0, 204, 204, 0.1);
  border-color: var(--primary);
}

.menuBtn:active {
  transform: scale(0.98);
}

/* Toggle Arrow */
.toggleArrow {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.menuToggle.open .toggleArrow {
  transform: rotate(180deg);
}

/* Submenu Styles */
.submenu {
  margin: 4px 0 8px 0;
  padding: 12px;
  background: rgba(0, 204, 204, 0.05);
  border-radius: var(--border-radius);
  border: 1px solid rgba(0, 204, 204, 0.3);
}

.submenuItem {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.submenuItem:last-child {
  margin-bottom: 0;
}

.submenuItem label {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Account Actions inside Settings */
.accountActionsItem {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 204, 204, 0.2);
}

.accountActionsItem label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.submenuBtn {
  background: var(--bg-card);
  border: 1px solid rgba(0, 204, 204, 0.5);
  color: var(--primary);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.95rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  box-shadow: none;
}

.submenuBtn:hover {
  background: rgba(0, 204, 204, 0.1);
}

/* Danger Button (Delete Account) */
.submenuBtn.dangerBtn {
  border-color: #633;
  color: #f66;
  background: transparent;
}

.submenuBtn.dangerBtn:hover {
  background: rgba(255, 68, 68, 0.1);
  border-color: #f44;
}

/* Settings Section */
#settingsSection {
  margin: 4px 0;
  width: 100%;
}

#settingsSection .menuBtn {
  width: 100%;
}

/* Install Section in Menu */
#installSection {
  margin-bottom: 8px;
}

#installSection .installBtn {
  width: 100%;
  background: var(--primary);
  color: #000;
  border: none;
  padding: 12px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 0 8px var(--primary-glow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

#installSection .installBtn:hover {
  box-shadow: var(--shadow-glow);
}

/* Legal Links in Menu */
#leftMenu .legalLinks {
  padding: 16px 0;
  text-align: center;
  font-size: 0.85rem;
}

#leftMenu .legalLinks a {
  color: var(--primary);
  text-decoration: none;
}

#leftMenu .legalLinks a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* User Profile (Compact, at bottom) */
#userProfile {
  margin-top: auto;
  padding: 16px;
  background: rgba(0, 204, 204, 0.05);
  border-radius: var(--border-radius);
  border: 1px solid rgba(0, 204, 204, 0.3);
}

#userProfile .profileHeader {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

#userProfile .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
  object-fit: cover;
}

#userProfile .userInfo {
  flex: 1;
  min-width: 0;
}

#userProfile .userName {
  font-size: 0.95rem;
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#userProfile .userEmail {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#userProfile .logoutBtn {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid #444;
  color: #999;
  font-size: 0.9rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: none;
}

#userProfile .logoutBtn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: #666;
  color: #ccc;
}

/* Theme Selector */
.themeSelect {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--border-radius);
  border: 1px solid var(--primary);
  background: var(--bg-dark);
  color: var(--primary);
  font-size: 0.95rem;
  cursor: pointer;
  transition: box-shadow var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230cc' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.themeSelect:hover {
  box-shadow: 0 0 8px var(--primary-glow);
}

.themeSelect:focus {
  outline: none;
  border-width: 2px;
  box-shadow: 0 0 8px var(--primary-glow);
}

/* ===================================
   INPUTS
   =================================== */
input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: var(--border-radius);
  border: 1px solid rgba(0, 204, 204, 0.5);
  background: var(--bg-dark);
  color: var(--primary);
  font-size: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
  background: var(--bg-card);
}

input:disabled {
  color: var(--text-muted);
  border-color: #333;
  background: #080808;
  cursor: not-allowed;
}

input::placeholder {
  color: var(--text-muted);
}

/* ===================================
   BUTTONS - Core styles (preserved)
   =================================== */
button {
  cursor: pointer;
  border: none;
  border-radius: var(--border-radius);
  box-shadow: 0 0 4px var(--primary-glow);
  background: var(--primary);
  color: #000;
  padding: 8px 14px;
  margin: 2px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

button:hover {
  box-shadow: var(--shadow-glow);
}

button:active {
  transform: scale(0.96);
}

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

/* ===================================
   MAIN CONTENT
   =================================== */
#main, #listView {
  padding: 12px;
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: calc(80px + var(--safe-area-bottom));
}

#addListBtn {
  width: 100%;
  font-size: 1.1rem;
  padding: 14px;
  margin-top: 12px;
  font-weight: 600;
}

/* ===================================
   LIST ITEMS (Main View)
   =================================== */
.listItem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 12px;
  border: 2px solid rgba(0, 204, 204, 0.5);
  border-radius: var(--border-radius-lg);
  margin-bottom: 10px;
  background: rgba(0, 204, 204, 0.03);
  position: relative;
  transition: border-color var(--transition-fast);
}

.listItem:hover {
  border-color: var(--primary);
}

.listItem span:not(.basketCount) {
  flex: 1;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-primary);
  word-break: break-word;
  line-height: 1.4;
  padding: 4px 0;
}

/* Basket Icon with Count */
.basketIcon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.basketIcon img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 4px var(--primary-glow));
}

.basketCount {
  position: absolute;
  top: 47%;
  left: 43%;
  transform: translate(-50%, -50%);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  text-shadow: 0 0 4px #000;
  pointer-events: none;
  z-index: 1;
}

.basketCount.updating {
  animation: countPulse 0.3s ease;
}

.listItem button {
  margin-left: 4px;
  font-size: 0.85rem;
  padding: 6px 10px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid rgba(0, 204, 204, 0.3);
  border-radius: 6px;
}

.listItem button:hover {
  color: var(--primary);
  background: rgba(0, 204, 204, 0.1);
  border-color: var(--primary);
}

//* ===================================
   LIST VIEW HEADER
   =================================== */
.listHeader {
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--primary);
}

.topButtons {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 2px;
}

.backBtnList {
  background: var(--bg-card);
  color: var(--primary);
  padding: 10px 16px;
  border-radius: var(--border-radius);
  box-shadow: 0 0 4px var(--primary-glow);
  font-size: 0.95rem;
  border: 1px solid var(--primary);
  align-self: flex-start;
  flex-shrink: 0;
  height: auto;
  min-height: unset;
}

.backBtnList:hover {
  box-shadow: var(--shadow-glow);
}

.shareBtnList {
  background: var(--primary);
  color: #000;
  padding: 10px 16px;
  border-radius: var(--border-radius);
  box-shadow: 0 0 4px var(--primary-glow);
  font-weight: 600;
  font-size: 0.95rem;
}

.shareBtnList:hover {
  box-shadow: var(--shadow-glow);
}

.listMeta {
  margin-top: 2px;
}

.sharedInfo {
  color: var(--primary);
  font-size: 0.95rem;
  margin-bottom: 2px;
  font-weight: 500;
}

.itemsCount {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 600;
}

/* ===================================
   ITEMS (Inside a List)
   =================================== */
#itemsContainer {
  padding-bottom: calc(100px + var(--safe-area-bottom));
}

.item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 12px;
  border: 2px solid rgba(0, 204, 204, 0.5);
  border-radius: var(--border-radius-lg);
  margin-bottom: 10px;
  background: rgba(0, 204, 204, 0.03);
  position: relative;
  transition: transform 0.3s ease, opacity 0.3s ease, border-color 0.15s ease;
  will-change: transform;
}

.item:hover {
  border-color: var(--primary);
}

.item span {
  flex: 1;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-word;
  transition: color 0.2s ease, opacity 0.2s ease, text-decoration 0.2s ease;
}

.item span.crossed {
  text-decoration: line-through;
  color: var(--text-muted);
  opacity: 0.6;
}

.rightButtons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.rightButtons button.delete,
.rightButtons button.edit {
  font-size: 0.85rem;
  padding: 6px 10px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid rgba(0, 204, 204, 0.3);
  border-radius: 6px;
}

.rightButtons button.delete:hover,
.rightButtons button.edit:hover {
  color: var(--primary);
  background: rgba(0, 204, 204, 0.1);
  border-color: var(--primary);
}

.rightButtons button.cross {
  font-size: 1.2rem;
  line-height: 1;
  padding: 8px 12px;
  color: #000;
  background: var(--primary-dark);
  border: 2px solid var(--primary-dark);
  border-radius: var(--border-radius);
  font-family: inherit;
  min-width: 44px;
  min-height: 44px;
  text-align: center;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
}

.rightButtons button.cross:hover {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}

.rightButtons button.cross:active {
  transform: scale(0.9);
}

/* ===================================
   ITEM SMOOTH TRANSITIONS
   =================================== */
@media (prefers-reduced-motion: no-preference) {
  #itemsContainer {
    position: relative;
  }
  
  .item {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease,
                border-color 0.15s ease;
  }
}

.item.reordering {
  z-index: 10;
}

/* ===================================
   FLOATING ACTION BUTTON
   =================================== */
.fab {
  position: fixed;
  bottom: calc(20px + var(--safe-area-bottom));
  right: 20px;
  font-size: 1.1rem;
  padding: 14px 20px;
  border-radius: var(--border-radius);
  background: var(--primary);
  color: #000;
  border: none;
  box-shadow: 0 4px 16px var(--primary-glow);
  cursor: pointer;
  font-weight: 600;
  z-index: 999;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  touch-action: manipulation;
}

.fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px var(--primary-glow);
}

.fab:active {
  transform: scale(0.95);
}

/* ===================================
   MODALS
   =================================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: flex-start;
  padding: 10vh 16px 20px;
  z-index: 2000;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-content {
  background: var(--bg-card);
  border: 2px solid var(--primary);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 0 30px var(--primary-glow);
  animation: modalFadeIn 0.2s ease;
}

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

.modal-content h3 {
  color: var(--primary);
  margin-bottom: 16px;
  text-shadow: 0 0 8px var(--primary-glow);
  font-size: 1.2rem;
}

.modal-content h4 {
  color: var(--primary);
  margin-top: 16px;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.modal-content input {
  margin-bottom: 12px;
}

.modal-content p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.modal-content a {
  color: var(--primary);
  text-decoration: none;
}

.modal-content a:hover {
  text-decoration: underline;
}

/* Modal Buttons */
.modalButtons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.modalButtons button {
  font-size: 0.95rem;
  padding: 10px 18px;
  min-width: 80px;
}

/* Share Modal */
#shareStatusMessages {
  margin: 12px 0;
  min-height: 24px;
}

.statusMessage {
  padding: 10px 14px;
  border-radius: var(--border-radius);
  margin-bottom: 8px;
  font-size: 0.9rem;
  animation: fadeIn 0.3s ease;
}

.statusMessage.success {
  background: rgba(0, 255, 0, 0.1);
  border: 1px solid var(--success);
  color: var(--success);
}

.statusMessage.info {
  background: rgba(0, 204, 204, 0.1);
  border: 1px solid var(--primary);
  color: var(--primary);
}

.statusMessage.error {
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid var(--danger);
  color: var(--danger);
}

#sharedUsersContainer {
  max-height: 200px;
  overflow-y: auto;
  padding: 12px;
  background: rgba(0, 204, 204, 0.03);
  border: 1px solid rgba(0, 204, 204, 0.3);
  border-radius: var(--border-radius);
}

.sharedUserItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  background: rgba(0, 204, 204, 0.08);
  border-radius: 6px;
  border-left: 3px solid var(--warning);
}

.sharedUserItem:last-child {
  margin-bottom: 0;
}

.sharedUserItem span {
  color: var(--primary);
  font-size: 0.95rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sharedUserItem button {
  background: var(--danger-dark);
  color: #fff;
  border: none;
  padding: 8px 12px;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-left: 10px;
}

.sharedUserItem button:hover {
  background: var(--danger);
}

/* Share buttons */
.shareButtons {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.quickAddBtn,
.emailInviteBtn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.quickAddBtn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #000;
}

.quickAddBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.emailInviteBtn {
  background: linear-gradient(135deg, var(--warning), #e68a00);
  color: #000;
}

.emailInviteBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 153, 0, 0.4);
}

/* Custom Dialogs */
#confirmDialog .modal-content,
#promptDialog .modal-content {
  max-width: 380px;
}

#confirmDialog .modal-content p {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 20px;
}

#confirmCancel, #promptCancel {
  background: #444;
  color: #fff;
  border: 1px solid #666;
}

#confirmCancel:hover, #promptCancel:hover {
  background: #555;
}

#confirmOk, #promptOk {
  background: var(--primary);
  color: #000;
  font-weight: 600;
}

/* ===================================
   TOAST NOTIFICATIONS
   =================================== */
.toast {
  position: fixed;
  bottom: calc(90px + var(--safe-area-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 14px 24px;
  border-radius: var(--border-radius);
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.8);
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  max-width: calc(100% - 32px);
  text-align: center;
  border: 2px solid;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-error {
  border-color: var(--danger);
  background: rgba(255, 0, 0, 0.15);
  color: #ff6b6b;
}

.toast-success {
  border-color: var(--success);
  background: rgba(0, 255, 0, 0.1);
  color: #4ade80;
}

.toast-info {
  border-color: var(--primary);
  background: rgba(0, 204, 204, 0.1);
  color: var(--primary);
}

/* ===================================
   INSTALL BANNER
   =================================== */
.install-banner {
  position: fixed;
  bottom: calc(20px + var(--safe-area-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 480px;
  background: var(--bg-card);
  border: 2px solid var(--primary);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 32px var(--primary-glow);
  padding: 16px;
  z-index: 9998;
  animation: slideUpBanner 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.install-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.install-banner-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 2px solid var(--primary);
  flex-shrink: 0;
}

.install-banner-text {
  flex: 1;
  min-width: 0;
}

.install-banner-text h3 {
  color: var(--primary);
  font-size: 1rem;
  margin: 0 0 4px 0;
  font-weight: 600;
}

.install-banner-text p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.4;
}

.install-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.install-banner-install {
  background: var(--primary);
  color: #000;
  border: none;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.install-banner-install:hover {
  box-shadow: var(--shadow-glow);
}

.install-banner-close {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid #444;
  padding: 8px 12px;
  border-radius: var(--border-radius);
  font-size: 1rem;
  cursor: pointer;
}

.install-banner-close:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.install-banner.hiding {
  animation: slideDownBanner 0.3s forwards;
}

/* ===================================
   SKELETON SCREEN
   =================================== */
#skeletonScreen {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.skeletonCircle {
  width: 120px;
  height: 120px;
  border: 3px solid var(--primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeletonCircle img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes skeletonPulse {
  0%, 100% { box-shadow: 0 0 10px var(--primary-glow); transform: scale(1); }
  50% { box-shadow: 0 0 25px var(--primary-glow); transform: scale(1.05); }
}

@keyframes countPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.2); }
}

@keyframes slideUpBanner {
  from { opacity: 0; transform: translateX(-50%) translateY(100px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes slideDownBanner {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to { opacity: 0; transform: translateX(-50%) translateY(100px); }
}

@keyframes slideOut {
  from { opacity: 1; transform: translateX(0); max-height: 100px; }
  to { opacity: 0; transform: translateX(50px); max-height: 0; margin-bottom: 0; padding: 0; }
}

/* Item/List removal animation */
.item-removing, .listItem-removing {
  animation: slideOut 0.3s ease forwards;
  pointer-events: none;
}

.sharedUserItem-removing {
  animation: slideOut 0.3s ease forwards;
}

/* ===================================
   ACCESSIBILITY
   =================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 480px) {
  header {
    padding: 10px 12px;
  }
  
  header h1 {
    font-size: 1.2rem;
  }

  #main, #listView {
    padding: 12px;
  }

  .modal-content {
    padding: 20px;
  }

  .fab {
    bottom: calc(15px + var(--safe-area-bottom));
    right: 15px;
    padding: 12px 16px;
    font-size: 1rem;
  }
  
  .toast {
    bottom: calc(80px + var(--safe-area-bottom));
    font-size: 0.9rem;
    padding: 12px 18px;
  }
  
  .install-banner {
    padding: 12px;
  }
  
  .install-banner-icon {
    width: 40px;
    height: 40px;
  }
  
  .install-banner-text h3 {
    font-size: 0.95rem;
  }
  
  .install-banner-text p {
    font-size: 0.8rem;
  }
  
  .shareButtons {
    flex-direction: column;
  }
}

/* Larger screens */
@media (min-width: 768px) {
  #main, #listView {
    padding: 24px;
  }
  
  .modal-content {
    padding: 28px;
  }
}

/* ===================================
   CLASSIC DARK THEME
   =================================== */
body.theme-dark-original {
  --primary: #888;
  --primary-dark: #666;
  --primary-glow: rgba(136, 136, 136, 0.2);
  --bg-card: #1a1a1a;
  --bg-card-hover: #222;
}

.theme-dark-original header {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  border-bottom-color: #333;
}

.theme-dark-original header h1 {
  color: #e0e0e0;
  text-shadow: none;
}

.theme-dark-original .loginContainer,
.theme-dark-original #leftMenu,
.theme-dark-original .modal-content,
.theme-dark-original .install-banner {
  border-color: #333;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.theme-dark-original #userProfile {
  background: rgba(255, 255, 255, 0.03);
  border-color: #333;
}

.theme-dark-original .menuBtn {
  border-color: #444;
  color: #aaa;
}

.theme-dark-original .menuBtn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: #555;
  color: #ddd;
}

.theme-dark-original .submenu {
  background: rgba(255, 255, 255, 0.02);
  border-color: #333;
}

.theme-dark-original .submenuItem label {
  color: #aaa;
}

.theme-dark-original .themeSelect {
  border-color: #444;
  color: #aaa;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

.theme-dark-original .listItem,
.theme-dark-original .item {
  background: #1a1a1a;
  border-color: #333;
}

.theme-dark-original .listItem:hover,
.theme-dark-original .item:hover {
  border-color: #555;
  background: #222;
}

.theme-dark-original button {
  background: #333;
  color: #e0e0e0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  border: 1px solid #444;
}

.theme-dark-original button:hover {
  background: #444;
  border-color: #555;
}

.theme-dark-original .rightButtons button.cross {
  background: #444;
  color: #fff;
  border-color: #555;
}

.theme-dark-original .fab,
.theme-dark-original #addListBtn,
.theme-dark-original .shareBtnList {
  background: #333;
  color: #fff;
  border: 1px solid #444;
}

.theme-dark-original #installSection .installBtn {
  background: #333;
  color: #fff;
  border: 1px solid #444;
  box-shadow: none;
}

.theme-dark-original .basketIcon img {
  filter: grayscale(100%) brightness(0.8);
}

.theme-dark-original .basketCount {
  color: #e0e0e0;
}

.theme-dark-original .toast {
  background: #1a1a1a;
  border-color: #333;
}

.theme-dark-original .toast-success {
  border-color: #28a745;
  color: #51cf66;
}

.theme-dark-original .toast-error {
  border-color: #dc3545;
  color: #ff6b6b;
}

.theme-dark-original .toast-info {
  border-color: #666;
  color: #aaa;
}

.theme-dark-original ::-webkit-scrollbar-thumb {
  background: #444;
}

/* Connection Status */
.connection-status {
  position: fixed;
  top: 10px;
  right: 10px;
  padding: 8px 16px;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 0.85rem;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.connection-status.show {
  opacity: 1;
}

.connection-status.offline {
  background: var(--danger);
  color: #fff;
}

.connection-status.online {
  background: #388e3c;
  color: #fff;
}

/* Terms Checkbox */
.termsCheckbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
}

.termsCheckbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.termsCheckbox span {
  line-height: 1.4;
}

.termsCheckbox a {
  color: var(--primary);
  text-decoration: none;
}

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

.googleBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ===================================
   SEARCH FILTER
   =================================== */
.searchContainer {
  position: relative;
  margin-bottom: 16px;
}

.searchContainer input {
  width: 100%;
  padding: 12px 40px 12px 12px;
  border-radius: var(--border-radius);
  border: 1px solid rgba(0, 204, 204, 0.5);
  background: var(--bg-dark);
  color: var(--primary);
  font-size: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.searchContainer input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
  background: var(--bg-card);
}

.searchContainer input::placeholder {
  color: var(--text-muted);
}

.clearSearchBtn {
  position: absolute;
  right: 8px;
  top: 36%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 4px 8px;
  cursor: pointer;
  box-shadow: none;
  min-width: auto;
}

.clearSearchBtn:hover {
  color: var(--primary);
  box-shadow: none;
}

.clearSearchBtn:active {
  transform: translateY(-50%) scale(0.95);
}

/* Hidden items when filtering */
.item.search-hidden {
  display: none;
}

/* No results message */
.search-no-results {
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
  font-size: 0.95rem;
}

/* Classic theme support */
.theme-dark-original .searchContainer input {
  border-color: #333;
  color: #e0e0e0;
}

.theme-dark-original .searchContainer input:focus {
  border-color: #555;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.theme-dark-original .clearSearchBtn {
  color: #666;
}

.theme-dark-original .clearSearchBtn:hover {
  color: #aaa;
}

/* ===================================
   SHARE APP CARD
   =================================== */
.share-app-card {
  background: rgba(0, 204, 204, 0.08);
  border: 1px solid var(--primary);
  border-radius: var(--border-radius-lg);
  padding: 14px 16px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: fadeIn 0.3s ease;
  box-shadow: 0 0 12px var(--primary-glow);
}

.share-app-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.share-app-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.share-app-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.share-app-text strong {
  color: var(--primary);
  font-size: 0.95rem;
  text-shadow: 0 0 6px var(--primary-glow);
}

.share-app-text span {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.share-app-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.share-app-btn {
  background: var(--primary);
  color: #000;
  border: none;
  padding: 8px 16px;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0 8px var(--primary-glow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.share-app-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px var(--primary-glow);
}

.share-app-close {
  background: transparent;
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--border-radius);
  font-size: 1rem;
  cursor: pointer;
  box-shadow: none;
}

.share-app-close:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: none;
}

/* Hide card animation */
.share-app-card.hiding {
  animation: slideDownFade 0.3s ease forwards;
}

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

/* Responsive */
@media (max-width: 400px) {
  .share-app-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .share-app-actions {
    justify-content: flex-end;
  }
}

/* Classic theme support */
.theme-dark-original .share-app-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: #444;
  box-shadow: none;
}

.theme-dark-original .share-app-text strong {
  color: #e0e0e0;
  text-shadow: none;
}

.theme-dark-original .share-app-btn {
  background: #444;
  color: #fff;
  box-shadow: none;
}

/* ===================================
   DELETE ACCOUNT MODAL
   =================================== */
.deleteAccountContent {
  max-width: 400px;
}

.deleteAccountContent h3 {
  color: #f44;
}

.deleteAccountContent p {
  margin: 12px 0;
  line-height: 1.5;
}

.deleteAccountContent ul {
  text-align: left;
  margin: 12px 0;
  padding-left: 20px;
}

.deleteAccountContent li {
  margin: 6px 0;
  color: #ccc;
}

.deleteAccountContent .warning {
  color: #f90;
  font-weight: bold;
}

.deleteAccountContent .error {
  color: #f44;
  font-weight: bold;
}

#deleteAccountConfirm {
  background: #f44 !important;
  color: #fff !important;
  border: none !important;
}

#deleteAccountConfirm:hover {
  background: #d33 !important;
}

#deleteAccountConfirm:disabled {
  background: #666 !important;
  color: #999 !important;
  cursor: not-allowed;
}

/* ===================================
   BASKET ICON - 3 STATES
   =================================== */

/* State 1: Has items to buy (cyan) */
.basketIcon.basket-active img {
  filter: brightness(1) saturate(1);
  opacity: 1;
}

.basketIcon.basket-active .basketCount {
  color: #0cc;
}

/* State 2: Completed - all items crossed (cyan with checkmark) */
.basketIcon.basket-complete img {
  filter: brightness(1) saturate(1);
  opacity: 1;
}

.basketIcon.basket-complete .basketCount {
  color: #0cc;
  font-size: 14px;
}

/* State 3: Empty - no items yet (gray) */
.basketIcon.basket-empty img {
  filter: brightness(0.5) saturate(0);
  opacity: 0.5;
}

.basketIcon.basket-empty .basketCount {
  display: none;
}

/* ===================================
   DROPDOWN MENU FOR LISTS
   =================================== */
.list-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-btn {
  background: transparent !important;
  color: var(--primary) !important;
  border: 1px solid var(--primary) !important;
  padding: 12px 14px !important;
  border-radius: var(--border-radius) !important;
  cursor: pointer;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  box-shadow: 0 0 4px var(--primary-glow) !important;
  transition: all 0.2s ease;
  min-width: auto !important;
  margin: 0 !important;
}

.dropdown-btn:hover {
  background: rgba(0, 204, 204, 0.15) !important;
  box-shadow: 0 0 8px var(--primary-glow) !important;
  transform: translateY(-1px);
}

.dropdown-btn:active {
  transform: scale(0.98);
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--bg-card);
  border: 2px solid var(--primary);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 0 20px var(--primary-glow);
  z-index: 1000;
  min-width: 180px;
  overflow: hidden;
  animation: dropdownFadeIn 0.2s ease;
}

.dropdown-content.show {
  display: block;
}

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

.dropdown-item {
  display: block !important;
  width: 100% !important;
  padding: 14px 16px !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(0, 204, 204, 0.2) !important;
  color: var(--primary) !important;
  text-align: left !important;
  font-size: 1rem !important;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

.dropdown-item:last-child {
  border-bottom: none !important;
}

.dropdown-item:hover {
  background: rgba(0, 204, 204, 0.15) !important;
  color: #fff !important;
}

.dropdown-item:active {
  background: rgba(0, 204, 204, 0.25) !important;
}

.dropdown-item.dropdown-delete {
  color: #f66 !important;
  border-top: 1px solid rgba(255, 68, 68, 0.3) !important;
}

.dropdown-item.dropdown-delete:hover {
  background: rgba(255, 68, 68, 0.15) !important;
  color: #f88 !important;
}

/* Barcode Modal */
.barcode-modal {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 20px;
}

.barcode-modal .modal-content {
  max-width: 500px;
  text-align: center;
}

.barcode-modal img {
  max-width: 100%;
  height: auto;
  border: 2px solid var(--primary);
  border-radius: var(--border-radius);
  margin: 20px 0;
  box-shadow: 0 0 20px var(--primary-glow);
}

/* Classic theme support for dropdown */
.theme-dark-original .dropdown-btn {
  background: transparent !important;
  color: #aaa !important;
  border: 1px solid #555 !important;
  box-shadow: none !important;
}

.theme-dark-original .dropdown-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
}

.theme-dark-original .dropdown-content {
  border-color: #555;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.theme-dark-original .dropdown-item {
  color: #ddd !important;
  border-bottom-color: #333 !important;
}

.theme-dark-original .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

.theme-dark-original .dropdown-item.dropdown-delete {
  color: #f66 !important;
  border-top-color: #422 !important;
}

.theme-dark-original .dropdown-item.dropdown-delete:hover {
  background: rgba(255, 68, 68, 0.15) !important;
}

/* Mobile responsive for dropdown */
@media (max-width: 480px) {
  .dropdown-content {
    min-width: 180px;
  }
  
  .dropdown-item {
    padding: 14px 16px !important;
    font-size: 1rem !important;
  }
}

/* ===================================
   BARCODE QUICK ACCESS BUTTON
   =================================== */
.barcode-quick-btn {
  background: transparent !important;
  border: 1px solid var(--primary) !important;
  color: var(--primary) !important;
  padding: 6px 10px !important;
  border-radius: var(--border-radius) !important;
  font-size: 1.1rem !important;
  cursor: pointer;
  box-shadow: 0 0 4px var(--primary-glow) !important;
  transition: all 0.2s ease;
  margin-right: 6px !important;
  margin-left: 0 !important;
}

.barcode-quick-btn:hover {
  background: rgba(0, 204, 204, 0.15) !important;
  box-shadow: 0 0 8px var(--primary-glow) !important;
  transform: scale(1.05);
}

.barcode-quick-btn:active {
  transform: scale(0.95);
}

/* Classic theme support for barcode quick button */
.theme-dark-original .barcode-quick-btn {
  border-color: #555 !important;
  color: #aaa !important;
  box-shadow: none !important;
}

.theme-dark-original .barcode-quick-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: #777 !important;
}

/* ===================================
   ITEM DROPDOWN MENU
   =================================== */
.item-dropdown {
  position: relative;
  display: inline-block;
  z-index: 100;
}

.item-dropdown-btn {
  background: transparent !important;
  color: var(--primary) !important;
  border: 1px solid var(--primary) !important;
  padding: 8px 12px !important;
  border-radius: var(--border-radius) !important;
  cursor: pointer;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  box-shadow: 0 0 4px var(--primary-glow) !important;
  transition: all 0.2s ease;
  min-width: 44px !important;
  min-height: 44px !important;
  margin: 0 !important;
}

.item-dropdown-btn:hover {
  background: rgba(0, 204, 204, 0.15) !important;
  box-shadow: 0 0 8px var(--primary-glow) !important;
}

.item-dropdown-btn:active {
  transform: scale(0.98);
}

.item-dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #111 !important;
  border: 2px solid var(--primary);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.9), 0 0 20px var(--primary-glow);
  z-index: 101;
  min-width: 140px;
  overflow: hidden;
  animation: dropdownFadeIn 0.2s ease;
  pointer-events: auto;
}

.item-dropdown-content.show {
  display: block;
}

.item-dropdown-item {
  display: block !important;
  width: 100% !important;
  padding: 14px 16px !important;
  background: #111 !important;
  border: none !important;
  border-bottom: 1px solid rgba(0, 204, 204, 0.2) !important;
  color: var(--primary) !important;
  text-align: left !important;
  font-size: 1rem !important;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  pointer-events: auto !important;
}

.item-dropdown-item:last-child {
  border-bottom: none !important;
}

.item-dropdown-item:hover {
  background: rgba(0, 204, 204, 0.15) !important;
  color: #fff !important;
}

.item-dropdown-item:active {
  background: rgba(0, 204, 204, 0.25) !important;
}

.item-dropdown-item.item-dropdown-delete {
  color: #f66 !important;
}

.item-dropdown-item.item-dropdown-delete:hover {
  background: rgba(255, 68, 68, 0.15) !important;
  color: #f88 !important;
}

/* Classic theme support for item dropdown */
.theme-dark-original .item-dropdown-btn {
  background: transparent !important;
  color: #aaa !important;
  border: 1px solid #555 !important;
  box-shadow: none !important;
}

.theme-dark-original .item-dropdown-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

.theme-dark-original .item-dropdown-content {
  border-color: #555;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.theme-dark-original .item-dropdown-item {
  color: #ddd !important;
  border-bottom-color: #333 !important;
}

.theme-dark-original .item-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

.theme-dark-original .item-dropdown-item.item-dropdown-delete {
  color: #f66 !important;
}

.theme-dark-original .item-dropdown-item.item-dropdown-delete:hover {
  background: rgba(255, 68, 68, 0.15) !important;
}

/* When dropdown is open, lift the item above others */
.item:has(.item-dropdown-content.show) {
  z-index: 1000;
  position: relative;
}