/* -------------------------------
   Base Styles
--------------------------------*/
body {
  margin: 0;
  padding: 0;
  font-family: 'JetBrains Mono', monospace;
  background: linear-gradient(160deg, #000 0%, #111 100%);
  color: white;
  line-height: 1.6;
}

/* -------------------------------
   Header & Navigation
--------------------------------*/
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 40px;
  background-color: #111;
  border-bottom: 1px solid #222;
  flex-wrap: wrap;
  position: relative;
  z-index: 10;
}

.menu {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 25px;
}

.menu li {
  display: inline;
}

.menu a {
  color: #ccc;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.menu a:hover {
  color: #ff3b3b;
}

/* -------------------------------
   Auth / Action Buttons
--------------------------------*/
.auth-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  position: relative;
}

.auth-buttons a,
.friend-request-btn,
.inbox-btn {
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  border: 1px solid;
  text-decoration: none;
  height: 34px;
  line-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

/* Auth links */
.auth-buttons a {
  color: white;
  border-color: #ff3b3b;
}
.auth-buttons a:hover {
  background-color: #ff3b3b;
  color: white;
}

/* Friend Request */
.friend-request-btn {
  color: white;
  background-color: green;
  border-color: green;
}
.friend-request-btn:hover {
  background-color: #0f0;
  color: #000;
}

/* Inbox */
.inbox-btn {
  color: black;
  background-color: white;
  border-color: white;
}
.inbox-btn:hover {
  background-color: #eee;
}

/* Divider */
.divider {
  border-left: 1px solid #444;
  height: 24px;
  margin: 0 10px;
}

/* -------------------------------
   Friend Search Dropdown
--------------------------------*/
#friend-search-container {
  position: absolute;
  top: 100%;
  right: 0;
  width: 260px;
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background-color: #222;
  border-radius: 12px;
  border: 1px solid #444;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  z-index: 20;
}

#friend-search-container.show {
  display: flex;
}

#friend-search-wrapper {
  display: flex;
  gap: 6px;
}

#friend-search-wrapper input[type="text"],
#friend-search-wrapper button {
  height: 34px;
  font-size: 13px;
  border-radius: 8px;
}

/* Search input */
#friend-search-wrapper input[type="text"] {
  flex: 1;
  border: 1px solid #444;
  background-color: #111;
  color: white;
  padding: 0 10px;
}

/* Search button */
#friend-search-wrapper button {
  padding: 0 12px;
  border: 1px solid green;
  background-color: green;
  color: white;
  font-weight: bold;
  cursor: pointer;
}
#friend-search-wrapper button:hover {
  background-color: #0f0;
  color: #000;
}

/* Search results */
#search-results {
  margin-top: 4px;
  max-height: 180px;
  overflow-y: auto;
}

.search-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  background-color: #333;
  margin-bottom: 4px;
  border-radius: 8px;
  font-size: 13px;
}

.send-request-btn {
  padding: 3px 8px;
  border-radius: 6px;
  background-color: green;
  color: white;
  border: 1px solid green;
  cursor: pointer;
  font-size: 12px;
}
.send-request-btn:hover {
  background-color: #0f0;
  color: #000;
}

/* -------------------------------
   Main Content & Layout
--------------------------------*/
main {
  text-align: center;
  margin: 60px auto;
  padding: 0 20px;
  max-width: 900px;
}

h1 {
  font-size: 2.8em;
  margin-bottom: 2rem;
}

/* Rule box / Section styling */
.rule-box {
  background-color: rgba(255,255,255,0.05);
  padding: 1.5rem 2rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.1);
}

.rule-number {
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #ff3b3b;
}

.highlight {
  color: #ff3b3b;
  font-weight: bold;
}

/* Links */
a {
  color: #0af;
  text-decoration: underline;
}
a:hover {
  color: #08c;
}

/* -------------------------------
   Responsive
--------------------------------*/
@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .menu {
    flex-wrap: wrap;
    gap: 10px;
  }

  h1 {
    font-size: 2rem;
  }

  .rule-box {
    padding: 1rem;
  }
}
