body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f8f9fa;
  color: #333;
}



/* Wrapper pinned to the right side of the header */
.profile-wrap {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

/* The circular badge/button */
.profile-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.12);
  color: #fff;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}

.profile-btn:hover {
  background: rgba(255,255,255,0.18);
}

/* Default “user” icon when logged out */
.profile-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #fff;
  position: relative;
}

.profile-icon::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid #fff;
  left: 50%;
  top: 60%;
  transform: translate(-50%, -50%);
}

/* Dropdown menu */
.profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 160px;

  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  padding: 6px;

  display: none;
  z-index: 1000;
  overflow: hidden;
}

.profile-menu.open {
  display: block;
}

.profile-item {
  box-sizing: border-box;
  display: block;
  width: 100%;
  text-align: left;
  margin: 0;

  padding: 10px 10px;
  border-radius: 8px;

  background: transparent;
  border: 0;
  cursor: pointer;

  font-size: 14px;
  color: #222;
  text-decoration: none;
}

.profile-item:hover {
  background: #f3f6fb;
}

.profile-item.danger {
  color: #b00020;
}

.profile-item:hover,
.profile-item:focus,
.profile-item:active,
.profile-item:link,
.profile-item:visited {
  text-decoration: none;
}

nav {
  background: #34495e;
  padding: 15px;
  display: flex;
  justify-content: center;
  gap: 30px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav a {
  color: white;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

nav a:hover {
  background-color: #4a6278;
}

/* Main layout */
.container {
  max-width: 1000px;
  background: white;
  margin: 30px auto;
  padding: 40px;
  min-height: 70vh;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 2px solid #e9ecef;
}

.section:last-child {
  border-bottom: none;
}

h2 {
  color: #2c3e50;
  border-left: 5px solid #3498db;
  padding-left: 15px;
  margin-top: 0;
}

h3 {
  color: #34495e;
  margin-top: 25px;
}

.book-list,
.character-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.book-item,
.character-item {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #3498db;
  transition: transform 0.2s, box-shadow 0.2s;
}

.character-item {
  border-left-color: #e74c3c;
}

.book-item:hover,
.character-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

a {
  color: #2980b9;
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  text-decoration: underline;
}

.description {
  color: #666;
  font-size: 14px;
  margin-top: 5px;
  line-height: 1.4;
}

