:root {
  --bg-light: #ffffff;
  --bg-dark: #1e1e2f;
  --text-color: #333;
  --text-light: #ffffff;
  --primary-color: #00a3ff; /* updated */
  --secondary-color: #ff9800;
  --border-color: #e0e0e0;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --transition-speed: 0.3s;
}


body {
  margin: 0;
  font-family: sans-serif;
  background-color: var(--bg-light);
  color: var(--text-color);
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

.dark-mode {
  --bg-light: #1e1e2f;
  --text-color: #ffffff;
  --border-color: #333;
}

.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7.2px 0;
  background-color: var(--bg-light);
  /* border-bottom: 1px solid var(--border-color); */
  margin-right: 1rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.search-bar {
  background-color: #f3f4f6;
  border-radius: 7px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  transition: background-color var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed), width 0.3s cubic-bezier(0.4,0,0.2,1);
  margin-left: auto; /* Pushes the search bar to the right */
  box-sizing: border-box;
  cursor: pointer;
  width: 300px;
  max-width: 100%;
  height: 35px;
  border: 1px solid #b6e3fa; /* Added light blue border */
  margin-right: 1%;
}

.search-bar:focus-within,
.search-bar.expanded {
  width: 800px;
  box-shadow: 0 2px 8px var(--shadow-color);
}

.search-bar:active,
.search-bar:focus-within {
  background-color: #f3f4f6;
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  color: var(--text-color);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 349px;
  max-height: 300px;
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 4px 12px var(--shadow-color);
  z-index: 100;
  overflow-y: auto;
  display: none;
}

.search-results.show {
  display: block;
}

.search-result-item {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color var(--transition-speed);
}

.search-result-item:hover {
  background-color: var(--bg-color);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-title {
  font-weight: 500;
  margin-bottom: 4px;
}

.search-result-date {
  font-size: 12px;
  color: var(--text-light);
}


.icon-btn {
  position: relative;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-color);
  transition: color var(--transition-speed);
}

.icon-btn:hover {
  color: var(--primary-color);
}

.notification-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background-color: red;
  color: white;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 10px;
}

.dark-mode .search-bar {
  background-color: #2c2f3a;
  border: 1px solid #444;
}

.dark-mode .search-bar input {
  color: var(--text-light);
}

.dark-mode .icon-btn {
  color: var(--text-light);
}

.dark-mode .notification-badge {
  background-color: #ff5722;
}

/* Media Queries */
@media (max-width: 768px) {
  .search-bar {
    display: none;
  }
}

@media (max-width: 480px) {
  .brand {
    display: none;
  }

  .header {
    padding: 0 10px;
  }
}
