/* Global reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family: Arial, sans-serif;
  overflow: hidden;
}

/* Container Layout */
.container {
  display: flex;
  height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Mobile Header (visible on mobile devices) */
.mobile-header {
  display: none;
  width: 100%;
  background-color: #333;
  color: #fff;
  padding: 10px 20px;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
}

/* Hamburger Menu Icon */
.hamburger-menu {
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

/* Sidebar Styling */
.sidebar {
  width: 250px;
  background: linear-gradient(90deg, rgb(6, 8, 13) 0%, rgb(13, 18, 28) 100%);
  color: #edebeb;
  padding: 20px;
  overflow-y: auto;
  border: 0.5px solid #5a5555;
  -webkit-overflow-scrolling: touch;
  transition: all 0.3s ease;
  scrollbar-width: none;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  padding: 11px;
  margin: 10px 0;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.3s;
}

.sidebar li:hover,
.sidebar li.active {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.05)
  );
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: linear-gradient(90deg, rgb(6, 8, 13) 0%, rgb(13, 18, 28) 100%);
  -webkit-overflow-scrolling: touch;
  transition: all 0.3s ease;
}

/* Search Container & Input */
.search-container {
  margin-bottom: 10px;
  text-align: right;
  display: none;
}

#search-input {
  width: 300px;
  max-width: 100%;
  padding: 8px 12px;
  font-size: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background-color: #ffffff29;
  display: none;
}

/* Bookmark Tab Button (inside the search container) */
.bookmark-tab {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  margin-left: 10px;
  vertical-align: middle;
}
.bookmark-tab:hover {
  color: #f39c12;
}

/* Iframe styling */
iframe {
  width: 100%;
  height: calc(100% - 4px); /* Adjust height for search container */
  border: none;
}

/* Mobile menu open state */
body.menu-open {
  overflow: hidden;
}

/* Overlay for mobile menu */
.sidebar::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: -1;
}

.sidebar.active::before {
  opacity: 1;
  visibility: visible;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .mobile-header {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    height: 60px;
    z-index: 1001;
  }

  .sidebar {
    position: fixed;
    top: 60px;
    left: -250px;
    height: calc(100% - 60px);
    transition: left 0.3s ease;
    z-index: 1000;
    background: linear-gradient(90deg, rgb(6, 8, 13) 0%, rgb(13, 18, 28) 100%);
  }

  .sidebar.active {
    left: 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
  }

  .main-content {
    margin-top: 60px;
    padding: 15px;
    width: 100%;
    height: calc(100vh - 60px);
  }

  .search-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    width: 100%;
  }

  #search-input {
    width: calc(100% - 50px);
    margin-right: 10px;
  }

  iframe {
    height: calc(100vh - 120px);
    width: 100%;
  }
}

@media (max-width: 480px) {
  .sidebar {
    width: 85%;
    max-width: 250px;
  }

  .main-content {
    padding: 10px;
  }

  #search-input {
    font-size: 14px;
    padding: 6px 10px;
  }

  .sidebar li {
    padding: 8px;
    margin: 8px 0;
    font-size: 14px;
  }
}
