.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 9999;
}

body {
  padding-top: 70px;
  overflow-x: hidden;
}

.navbar {
  height: 70px;
  background: #f6b6c1;
  display: flex;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

.nav-inner {
  width: 100%;
  max-width: 1200px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  flex-shrink: 0;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
}

.logo img {
  height: 52px;
  width: auto;
  bottom: 50px;
  object-fit: contain;
}

.nav-search {
  flex: 1;
  display: flex;
  justify-content: center;
  max-width: 380px;
}

.nav-search input,
.search-form input {
  width: 100%;
  height: 40px;
  border-radius: 22px;
  border: none;
  padding: 0 18px;
  outline: none;
  font-size: 14px;
  background: #fff;
  color: #333;
}

.search-form {
  width: 100%;
  max-width: 360px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-shrink: 0;
}

.nav-links li {
  list-style: none;
}

.nav-links a {
  color: #fff;
  font-size: 15px;
  text-decoration: none;
  transition: 0.25s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  opacity: 0.8;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 10px;
}

.user-name {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.btn-user {
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.login-btn {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.login-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.register-btn {
  background: #fff;
  color: #d96b87;
  border: 1px solid #fff;
}

.register-btn:hover {
  background: #ffe7ed;
}

.logout-btn {
  background: #fff;
  color: #c4475f;
  border: 1px solid #fff;
}

.logout-btn:hover {
  background: #ffe5ea;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
}

.hamburger span {
  width: 26px;
  height: 3px;
  background: #fff;
  border-radius: 10px;
}

.mobile-search {
  display: none;
}

@media (max-width: 1100px) {
  .nav-search {
    max-width: 250px;
  }

  .nav-links {
    gap: 12px;
  }

  .nav-links a {
    font-size: 14px;
  }

  .btn-user {
    padding: 8px 12px;
    font-size: 13px;
  }

  .user-name {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-inner {
    gap: 12px;
  }

  .nav-search {
    display: none;
  }

  .user-menu {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    padding-top: 30px;
    gap: 18px;

    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);

    transform: translateX(100%);
    transition: transform 0.3s ease;

    z-index: 9998;
    overflow-y: auto;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .mobile-search-li {
    width: 85%;
    list-style: none;
    background: none;
    border: none;
  }

  .mobile-search {
    width: 100%;
    display: block;
  }

  .mobile-search input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 2px solid #f6b6c1;
    background: #fff;
    font-size: 16px;
    outline: none;
  }

  #mobileAramaSonuc {
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    margin-top: 8px;
    display: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  }

  #mobileAramaSonuc a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    text-decoration: none;
    color: #000;
    font-size: 14px;
  }

  #mobileAramaSonuc img {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
  }

  #mobileAramaSonuc a:hover {
    background: #f5f5f5;
  }

  .nav-links li:not(.mobile-search-li) {
    width: 85%;
    background: rgba(246, 182, 193, 0.75);
    border: 1px solid #f6b6c1;
    border-radius: 16px;
    text-align: center;
    transition: all 0.25s ease;
  }

  .nav-links li:not(.mobile-search-li) a {
    display: block;
    padding: 18px 0;
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
  }

  .nav-links li:not(.mobile-search-li):hover {
    background: #1a1a1a;
    border-color: #fff;
    box-shadow: 0 0 0 1px #fff;
  }

  .mobile-user-links {
    width: 85%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
  }

  .mobile-user-links a {
    display: block;
    text-align: center;
    padding: 16px;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
  }

  .mobile-user-links .login-btn {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
  }

  .mobile-user-links .register-btn,
  .mobile-user-links .logout-btn {
    background: #fff;
    color: #d96b87;
  }
}

.reader-mode-btn,
.reader-mode-panel {
  display: none !important;
}

@media (max-width: 768px) {
  body.reader-page-active .reader-mode-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .45);
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
  }

  body.reader-page-active .reader-mode-panel {
    position: fixed;
    top: 76px;
    right: 14px;
    z-index: 99999;
    width: 180px;
    padding: 12px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
  }

  body.reader-page-active .reader-mode-panel.active {
    display: block !important;
  }

  .reader-mode-title {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 800;
    color: #111;
  }

  .reader-mode-panel button {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 6px;
    border: 0;
    border-radius: 12px;
    background: #fff7f9;
    color: #c85f7e;
    font-weight: 700;
    text-align: left;
  }

  .reader-mode-panel button.active {
    background: #f6b6c1;
    color: #fff;
  }
}

@media (max-width: 768px) {

  /* ⚙️ + 🌙 SAĞDA (hamburgerın solu) */
  .header-actions,
  #readerModeBtn {
    position: absolute;
    right: 108px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
    align-items: center;
  }

}