@import url('./css/cookie.css');
@import url('./css/background.css');
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap');

/* Body base */
body {
  font-family: "Outfit", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  line-height: 1.5;
  color: #eeeeee;
  min-height: 100vh;
  display: flex;
  overflow-y: auto;
  overflow-x: hidden;
  flex-direction: column;
  margin: 0;
}

a {
  color: #8bc1ff;
}

a:hover {
  color: #ebf9ff;
}

/* Navbar: sticky top, centered links side by side */
nav {
  position: sticky;
  top: 0;
  padding: 1rem 2rem;
  z-index: 1000;

  display: flex;
  align-items: center;
}

nav.scrolled {
  background-color: rgba(0, 0, 0, 0.5); /* more transparent on scroll */
  backdrop-filter: blur(5px); 
}

nav > div:first-child {
  flex: 1; /* left spacer takes up space */
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav > div:last-child {
  flex: 1;              /* right section takes same space as left */
  display: flex;
  justify-content: flex-start;
  padding-left: 2rem;
  align-items: center;
}
nav div img {
  border-radius: 30px;
  width: 4em;
}
nav ul li a {
  font-size: x-large;
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

nav ul li a:hover,
nav ul li a:focus {
  color: #f9ccff;
  outline: none;
}

nav > div:last-child button {
  background: #541e95;       /* primary blue */
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: .4em;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  display: inline-flex;      /* important */
  align-items: center;       /* vertical centering */
  gap: 8px;                  /* space between img and text */

}

nav > div:last-child button:hover {
  background: #8a2cc0;       /* lighter blue on hover */
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

nav > div:last-child button:active {
  background: #187bcd;       /* darker blue when pressed */
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.user-menu {
  position: relative;
}

.user-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: white;
  font-size: 1rem;
  cursor: pointer;
}

.user-trigger img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

/* dropdown hidden by default */
.dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(13, 13, 13, 0.95);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 0.5rem 0;
  list-style: none;
  display: none;
  min-width: 150px;
  z-index: 1000;
}

.dropdown li {
  margin: 0;
}

.dropdown li a {
  display: block;
  padding: 0.5rem 1rem;
  color: white;
  text-decoration: none;
}

.dropdown li a:hover {
  background: rgba(255,255,255,0.1);
}

/* show dropdown when parent has .open */
.user-menu.open .dropdown {
  display: block;
}

#loading {
border: 16px solid #f3f3f32b;
    border-top-width: 16px;
    border-top-style: solid;
    border-top-color: rgba(243, 243, 243, 0.17);
  border-radius: 50%;
  border-top: 16px solid #bd00b1;
  width: 120px;
  height: 120px;
  -webkit-animation: spin 2s linear infinite;
  animation: spin 3s linear infinite;
}

/* Safari */
@-webkit-keyframes spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

form {
  display: block;
}

form > div {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

form > div:last-child {
  border-bottom: none;
  justify-content: flex-start; /* align button to the left */
  padding-top: 1.5rem;
}

form img {
  border-radius: .4em;
}

/* flick switch */
form > div > label {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  flex-shrink: 0; /* prevent squish */
}

form > div > label > input {
  opacity: 0;
  width: 0;
  height: 0;
}

form > div > label > span {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 28px;
}

form > div > label > span::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* checked state */
form > div > label > input:checked + span {
  background-color: #b400ce;
}

form > div > label > input:checked + span::before {
  transform: translateX(22px);
}

/* dropdown styling */
form > div > select {
  appearance: none;
  background-color: rgba(0, 0, 0, 0.356);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: #eee;
  font-size: 1rem;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
  min-width: 120px;
}

form > div > select:hover {
  border-color: #541c81;
}

form > div > select:focus {
  outline: none;
  border-color: #5e0c94;
  background-color: rgba(0, 0, 0, 0.9);
}

/* text */
form > div > span {
  font-size: 1rem;
  font-weight: 500;
  color: #eee;
}

/* button styling */
main button {
  padding: 0.6rem 1.5rem;
  background: #7400b5;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

main button:hover {
  background: #b638ff;
  text-decoration:wavy;
}

main button:disabled {
  background:#525252;
}

/* WebKit browsers */
::-webkit-scrollbar-track {
  background: transparent;  /* track is invisible */
}

::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
  border-radius: 4px;
}

/* Optional: hover effect */
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.5);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.3) transparent;
}

form input[type="text"] {
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: #eee;
  background-color: #1a1a1a; /* dark input bg */
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
  width: 100%;
  box-sizing: border-box;
}

form input[type="text"]:focus {
  border-color: #4cafef;
  box-shadow: 0 0 0 2px rgba(76,175,239,0.2);
}

form input[type="text"]::placeholder {
  color: rgba(255,255,255,0.4);
}
/* Main content: centered, flexible growth */
main {
  flex: 1;
  max-width: 960px;
  margin: 2rem auto;
  padding: 2rem;
  background: rgba(13, 13, 13, 0.3);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  overflow: auto;
  min-width: 40%;
}

.anim-3d {
  transform-style: preserve-3d;
  transition: transform 0.1s ease;
  perspective: 1000px;
}

table {
  width: 80%;
  margin: 0 auto;
}
tr:hover {
  background: #0004;
}
/* Footer with 3 columns */
footer {
  background-color: #0c002d;
  color: #838383;
  padding: 2rem 1rem;
}

footer div p a, footer div ul li a {
    text-decoration: none;
    color: #afafaf;
}

footer div p a:hover, footer div ul li a:hover {
    color: #fff;
}

footer .footer-columns {
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2rem;
  flex-wrap: wrap;
}

footer .footer-columns > div {
  flex: 1 1 30%;
  min-width: 200px;
}

footer h3 {
  margin-bottom: 1rem;
  font-weight: 600;
  color: #fff;
}

footer p,
footer ul {
  font-size: 0.9rem;
  line-height: 1.4;
}

footer ul {
  list-style: none;
  padding-left: 0;
}

footer ul li {
  margin-bottom: 0.5rem;
}

footer ul li a {
  color: #ddd;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer ul li a:hover,
footer ul li a:focus {
  color: #fff;
  outline: none;
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 40px;                 /* initially only icon */
  transition: width 250ms ease;
}

/* expanded */
.nav-search.active {
  width: 200px;
}

/* SEARCH ICON */
#search-toggle {
  width: 40px;
  height: 40px;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 150ms ease;
}

/* hide icon when expanded */
.nav-search.active #search-toggle {
  opacity: 0;
  pointer-events: none;
}

/* SEARCH FORM */
#search-form {
  position: absolute;
  left: 0;
  width: 100%;
  height: 40px;

  opacity: 0;
  pointer-events: none;

  display: flex;
  align-items: center;

  transition: opacity 150ms ease 100ms;
}

/* fade input in */
.nav-search.active #search-form {
  opacity: 1;
  pointer-events: auto;
}

/* INPUT (hidden until expanded) */
#search-input {
  width: 100%;
  height: 100%;
  border: none;
  padding: 0 12px;
  border-radius: 20px;

  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(8px);
  font-size: 0.9rem;
}
#search-results {
  position: absolute;
  top: 42px;         /* directly below your 40px search bar */
  left: 0;
  min-width: 350px;
  width: auto;       /* match expanded search width */
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 6px 0;
  display: none;
  flex-direction: column;
  z-index: 999999;   /* huge, ensures visibility */
}
#search-results.active {
  display: flex;
}

/* One row */
.search-row {
  display: flex;
  align-items: center;      /* vertically center contents */
  gap: 8px;
  padding: 4px 10px;        /* a bit tighter vertically */
  cursor: pointer;
  transition: background 0.2s;
}

.search-row:hover {
  background: rgba(255,255,255,0.25);
}

/* Avatar circle */
.search-row img {
  width: 24px;              /* smaller */
  height: 24px;             /* smaller */
  border-radius: 50%;
  object-fit: cover;        /* ensure image fits circle */
}

/* Username text */
.search-row a {
  text-decoration: none;
  color: #000;
  font-weight: 500;
  line-height: 24px;        /* match avatar height */
}

.search-container {
  width: 40px;
  transition: width .25s ease;
  overflow: hidden;
  display: inline-flex;      /* important */
  align-items: center;       /* vertical centering */
  gap: 8px;                  /* space between img and text */
}

.search-container.active {
  width: 200px;
}