@import url('https://fonts.googleapis.com/css2?family=Inter&display=swap');

body {
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
}

body {
  margin: 0;
  background-color: #313338; /* main Discord bg */
  color: #dbdee1;
  font-family: "gg sans", "Segoe UI", sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background-color: #1e1f22;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #111;
  color: white;
}

nav a {
  margin-left: 1.2rem;
  color: #b9bbbe;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

nav a:hover,
nav a[aria-current="page"] {
  color: white;
}

/* Main Discord layout */
.discord-main {
  display: flex;
  flex: 1;
  height: calc(100vh - 60px); /* account for header height */
  overflow: hidden;
}

/* Sidebar (servers) */
.server-sidebar {
  width: 72px;
  background-color: #1e1f22;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
  overflow-y: auto;
  gap: 0.75rem;
}

.server-bubble {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #5865f2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.server-bubble:hover {
  background-color: #4752c4;
  transform: scale(1.1);
}

.server-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Server content area */
.server-details {
  flex: 1;
  background-color: #2b2d31;
  padding: 1.5rem;
  overflow-y: auto;
}

.server-details h1 {
  font-size: 18px;
  margin-bottom: 0.5rem;
  color: white;
}

.server-details p {
  color: #b9bbbe;
  font-size: 14px;
  line-height: 1.6;
}

/* Footer */
footer {
  background-color: #1e1f22;
  text-align: center;
  font-size: 13px;
  color: #888;
  padding: 0.5rem 0;
}

/* Tooltip-style hover labels */
.server-bubble[title]::after {
  content: attr(title);
  position: absolute;
  left: 60px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #111;
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.server-bubble:hover::after {
  opacity: 1;
}

/* Base body style */
body {
  margin: 0;
  font-family: "gg sans", "Segoe UI", sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Light theme (default) */
body:not(.dark) {
  background-color: #f3f3f3;
  color: #1e1f22;
}

body:not(.dark) .server-sidebar {
  background-color: #e3e3e3;
}

body:not(.dark) .server-details {
  background-color: #fff;
}

body:not(.dark) header,
body:not(.dark) footer {
  background-color: #ddd;
  color: #111;
}

/* Dark theme */
body.dark {
  background-color: #313338;
  color: #dbdee1;
}

body.dark .server-sidebar {
  background-color: #1e1f22;
}

body.dark .server-details {
  background-color: #2b2d31;
}

body.dark header,
body.dark footer {
  background-color: #1e1f22;
  color: #fff;
}

body, header, footer, .server-sidebar, .server-details {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Light theme (default) */
body:not(.dark) {
  background-color: #f3f3f3;
  color: #1e1f22;
}

body:not(.dark) .server-details h1,
body:not(.dark) .server-details p,
body:not(.dark) header,
body:not(.dark) footer,
body:not(.dark) nav a {
  color: #1e1f22;
}

/* Hover labels - compatible with both themes */
.server-bubble[title]::after {
  content: attr(title);
  position: absolute;
  left: 60px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #111;
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.server-bubble:hover::after {
  opacity: 1;
}

body:not(.dark) .server-bubble[title]::after {
  background-color: #fff;
  color: #000;
  border: 1px solid #ccc;
}


.server-details .info-text {
  font-size: 1.25rem; /* Or larger like 1.5rem */
  line-height: 1.6;
}

.server-details h1 {
  font-size: 2rem; /* adjust as needed */
  margin-bottom: 0.5rem;
}

.server-details .info-text {
  font-size: 1.25rem;
  line-height: 1.6;
}

/* Flex container for logo and text */
.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Image settings */
.logo-img {
  width: 40px;
  height: 40px;
}

/* Text settings */
.logo-text {
  font-size: 1.5rem;
  font-weight: bold;
  font-family: 'Noto Sans', sans-serif; /* Optional: match Discord aesthetic */
}

@media (max-width: 768px) {
  header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 10px;
  }

  .logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  #theme-toggle {
    order: 2; /* place toggle below or next to nav */
    align-self: center;
  }

  header nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
  }

  header nav a {
    flex: 1 1 120px;
    max-width: 150px;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    background: #eee;
    color: inherit;
    text-decoration: none;
    box-sizing: border-box;
  }

  header nav a[aria-current="page"],
  header nav a:hover {
    background-color: #5865F2;
    color: white;
  }
}

@media (max-width: 768px) {
  /* Stack main content vertically */
  .discord-main {
    flex-direction: column;
    height: auto; /* let it expand */
  }

  /* Sidebar becomes horizontal, smaller height */
  .server-sidebar {
    width: 100%;
    height: 72px;
    flex-direction: row;
    overflow-x: auto;
    padding: 0.5rem;
    gap: 0.5rem;
    border-bottom: 1px solid #444;
  }

  /* Server bubbles smaller */
  .server-bubble {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
  }

  /* Server details take full width and height auto */
  .server-details {
    flex: 1;
    padding: 1rem;
    height: auto;
  }
}

@media (max-width: 768px) {
  body.dark header nav a {
    background: #2b2d31; /* dark background for nav links */
    color: #dbdee1; /* light text */
  }

  body.dark header nav a[aria-current="page"],
  body.dark header nav a:hover {
    background-color: #5865F2; /* keep your purple hover/active */
    color: white;
  }
}
