/* Reset & basics */
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f7f9fc;
  color: #2e3440;
}

/* Header base */
header {
  background-color: rgba(0, 0, 0, 0.3); /* black with 30% opacity */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 0.6rem 1rem;
  position: absolute;
  top: 0;
  z-index: 10;
  width: 100%;
  border-bottom: none;
  box-sizing: border-box;
}

/* Container for max width */
.container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Navbar layout */
.navbar {
  display: flex;
  align-items: center;
  width: 100%;
}

/* Logo */
.logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: #f7f6f6;
  flex: 0 0 auto;
  cursor: default;
}

/* Center navigation links */
.nav-center {
  display: flex;
  justify-content: center;
  flex: 1;
  gap: 0.3rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

/* Right-side nav (search, settings) */
.nav-right {
  display: flex;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

/* Navigation links (center & right) */
.nav-center li,
.nav-right li {
  position: relative;
}

.nav-center a,
.nav-right a,
.dropbtn {
  color: rgb(236, 236, 236);
  text-decoration: none;
  font-weight: 550;
  font-size: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-center a:hover,
.nav-right a:hover,
.dropbtn:hover {
  background-color: none;
  color: #fdfcfc;
}

/* Dropdown menu */
.dropdown-content {
  margin: 0; 
  padding-left: 0;
  list-style: none;
  display: none;
  position: absolute;
  top: 34px;
  left: 0;
  background-color: #0b1622;
  min-width: 130px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.15);
  border-radius: 6px;
  z-index: 1200;
}

.dropdown-content li {
  padding: 0;
}

.dropdown-content a {
  display: block;
  padding: 10px 16px;
  color: #8596A5;
  font-weight: 500;
}

.dropdown-content a:hover {
  background-color: #151F2E;
  color: #ececec;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Search icon styles */
.search-container {
  display: flex;
  align-items: center;
}

.search-icon-button {
  background: none;
  border: none;
  padding: 0.3rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-icon-button svg {
  color: rgb(236, 236, 236);
  transition: color 0.3s ease;
  width: 20px;
  height: 20px;
  margin-top: 5px;
}

.search-icon-button:hover svg {
  color: #f5f5f5;
}


/* Lock header height to avoid layout shift */
header {
  min-height: 54px; /* consistent height */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.navbar {
  min-height: 40px;
}

/* Invisible placeholder when search button is hidden */
.nav-right .search-container {
  width: 36px; /* Reserve space even if hidden */
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Responsive --- */
@media (orientation: portrait) {
  .logo {
    display: none;
  }

  header {
    min-height: 80px;
    padding: 1.2rem 1rem;
  }

  .navbar {
    min-height: 60px;
    flex-wrap: wrap;
    justify-content: space-evenly;
    gap: 5rem 1rem;
  }

  /* Hide separate containers, let all items flow together */
  .nav-center,
  .nav-right {
    display: contents;
  }

  /* MUCH bigger buttons */
  .nav-center a,
  .nav-right a,
  .dropbtn,
  .search-icon-button {
    font-size: 3rem;
    padding: 16px 28px;
    border-radius: 10px;
    line-height: 1.4;
    white-space: nowrap;
  }

  /* Bigger search icon */
  .search-icon-button svg {
    width: 50px;
    height: 50px;
    margin-top: 0;
  }
  header{
    max-height: 15rem;
  }
}

/* Music Player Container - Global */
.music-player-container {
  position: sticky;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  overflow: hidden;
  margin-top: calc(100vh - 130px);
  float: left;
}
