/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

body {
  min-height: max(884px, 100dvh);
  transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

/* Add smooth transitions for all elements when switching themes */
* {
  transition-property: background-color, border-color, color, fill, stroke;
  transition-duration: 0.3s;
  transition-timing-function: ease-in-out;
}

/* Prevent transition on transform and opacity to keep interactions snappy */
*:not(.no-theme-transition) {
  transition-property: background-color, border-color, color, fill, stroke;
}

.modal {
  display: none;
  position: fixed;
  z-index: 50;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

      .modal-content {
        position: relative;
        margin: 10% auto;
        padding: 30px 20px 20px 20px;
        border: 1px solid #888;
        width: 90%;
        max-width: 500px;
        border-radius: 12px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        background-color: #ffffff;
        max-height: 80vh;
        overflow-y: auto;
      }

      .dark .modal-content {
        background-color: #020617;
      }

      .close {
        color: #aaa;
        position: absolute;
        top: 10px;
        right: 15px;
        font-size: 28px;
        font-weight: bold;
        cursor: pointer;
        background: none;
        border: none;
      }

      .close:hover {
        color: #000;
      }

      .dark .close {
        color: #9ca3af;
      }

      .dark .close:hover {
        color: #fff;
      }

      .modal-content h2 {
        margin-bottom: 20px;
        font-size: 24px;
        font-weight: bold;
        text-align: center;
        color: #000;
      }

      .dark .modal-content h2 {
        color: #fff;
      }

      .add-feed {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
      }

      .add-feed input {
        padding: 12px;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        background-color: #fff;
        color: #000;
        font-size: 16px;
      }

      .dark .add-feed input {
        background-color: #282e39;
        color: #fff;
        border-color: #374151;
      }

      .add-feed button {
        background-color: #135bec;
        color: white;
        border: none;
        padding: 12px 24px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 16px;
        font-weight: bold;
        transition: background-color 0.3s;
        width: 100%;
      }

      .add-feed button:hover {
        background-color: #0f4ac7;
      }

      .add-shortcut {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
      }

      .add-shortcut input {
        padding: 12px;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        background-color: #fff;
        color: #000;
        font-size: 16px;
      }

      .add-shortcut input[type="file"] {
        padding: 8px;
      }

      .dark .add-shortcut input {
        background-color: #282e39;
        color: #fff;
        border-color: #374151;
      }

      .add-shortcut button {
        background-color: #135bec;
        color: white;
        border: none;
        padding: 12px 24px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 16px;
        font-weight: bold;
        transition: background-color 0.3s;
        width: 100%;
      }

      .add-shortcut button:hover {
        background-color: #0f4ac7;
      }

      .user-auth {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
      }

      .user-auth input {
        padding: 12px;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        background-color: #fff;
        color: #000;
        font-size: 16px;
      }

      .dark .user-auth input {
        background-color: #282e39;
        color: #fff;
        border-color: #374151;
      }

      .user-auth button {
        background-color: #135bec;
        color: white;
        border: none;
        padding: 12px 24px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 16px;
        font-weight: bold;
        transition: background-color 0.3s;
        width: 100%;
      }

      .user-auth button:hover {
        background-color: #0f4ac7;
      }

#feed-list {
  list-style: none;
  padding: 0;
}

#feed-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.dark #feed-list li {
  border-bottom: 1px solid #374151;
}

#feed-list button {
  background: red;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

/* User Avatar Styling */
#user-avatar {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#user-avatar-btn:active {
  transform: scale(0.95);
}

/* Theme Toggle Button Styling */
#theme-toggle-btn {
  cursor: pointer;
  transition: transform 0.15s ease-in-out;
}

#theme-toggle-btn:active {
  transform: scale(0.95);
}

#theme-toggle-btn:hover {
  transform: scale(1.05);
}

/* Improve search bar visibility in light mode */
.bg-white {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.dark .bg-white {
  box-shadow: none;
}

/* Better shadow for search bar in light mode */
body:not(.dark) input[name="q"] {
  color: #1e293b;
}

body:not(.dark) .border-gray-200 {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Improve shortcut visibility in light mode */
body:not(.dark) #shortcuts-container .size-14 {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

body:not(.dark) #shortcuts-container .size-14:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Add CSS transition for search bar background */
#search-bar-container {
  transition: background-color 0.3s ease-in-out !important;
}

/* Category management styles */
#category-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

#shortcuts-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(155, 155, 155, 0.5) transparent;
}

#shortcuts-list::-webkit-scrollbar {
  width: 6px;
}

#shortcuts-list::-webkit-scrollbar-track {
  background: transparent;
}

#shortcuts-list::-webkit-scrollbar-thumb {
  background-color: rgba(155, 155, 155, 0.5);
  border-radius: 3px;
}

.dark #shortcuts-list::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Select dropdown styling */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}
