/* ========================= */
/* GLASS NAVBAR */
/* ========================= */

.glass-nav {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1000px;
  padding: 12px 25px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(20, 20, 20, 0.45);

  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);

  box-shadow:
    0 0 20px rgba(0, 245, 255, 0.3),
    0 0 40px rgba(123, 44, 255, 0.2);

  z-index: 999;
  transition: all 0.4s ease;
}

/* ========================= */
/* LOGO */
/* ========================= */

.nav-logo {
  font-family: "Inconsolata", monospace;
  font-size: 1.4rem;
  font-weight: 800;
  color: #00f5ff;
}

/* ========================= */
/* NAV LINKS */
/* ========================= */

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: #fff;
  font-family: "Source Code Pro", monospace;
  position: relative;
  padding: 5px 0;
  transition: 0.3s ease;
}

/* Underline animation */
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, #00f5ff, #7b2cff);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: #00f5ff;
}

/* ========================= */
/* NAV ACTIONS */
/* ========================= */

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* ========================= */
/* ROTATING GEAR BUTTON */
/* ========================= */

.settings-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: 0.3s ease;
}

.settings-btn svg {
  width: 24px;
  height: 24px;
  fill: white;
  animation: rotate 4s linear infinite;
  transition: 0.3s ease;
}

.settings-btn:hover svg {
  animation-duration: 0.7s;
  filter: drop-shadow(0 0 6px cyan);
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ========================= */
/* SETTINGS POPUP OVERLAY */
/* ========================= */

.settings-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.settings-popup.active {
  opacity: 1;
  pointer-events: all;
}


/* ========================= */
/* SETTINGS BOX */
/* ========================= */

.settings-box {
  width: 340px;
  padding: 30px 28px;
  border-radius: 22px;

  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);

  border: 1px solid rgba(255, 255, 255, 0.15);

  box-shadow:
    0 0 25px rgba(0, 245, 255, 0.25),
    0 0 50px rgba(123, 44, 255, 0.15);

  color: white;

  animation: popupFade 0.35s ease;
}


/* ========================= */
/* HEADER */
/* ========================= */

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.settings-header h2 {
  font-family: "Source Code Pro", monospace;
  font-size: 1.4rem;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #00f5ff, #7b2cff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* ========================= */
/* CLOSE BUTTON */
/* ========================= */

/* ========================= */
/* GLASS CLOSE BUTTON */
/* ========================= */

.close-button {
  position: relative;
  width: 45px;
  height: 45px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: 0.3s ease;
}

/* X lines */
.close-button .X,
.close-button .Y {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background-color: white;
  transform-origin: center;
  transition: 0.3s ease;
}

.close-button .X {
  transform: translate(-50%, -50%) rotate(45deg);
}

.close-button .Y {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.close-button:hover .X {
  transform: translate(-50%, -50%) rotate(135deg);
}

.close-button:hover .Y {
  transform: translate(-50%, -50%) rotate(45deg);
}

/* Hover effect */
.close-button:hover {
  background: rgb(255, 0, 0);
}

/* Tooltip */
.close-label {
  position: absolute;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
  background: #fff;
  color: #000;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
}

.close-button:hover .close-label {
  opacity: 1;
  bottom: 58px;
}


/* ========================= */
/* SETTING ROW */
/* ========================= */

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
  font-family: "Source Code Pro", monospace;
  font-size: 0.95rem;
  opacity: 0.9;
}


/* ========================= */
/* VIDEO TOGGLE BUTTON */
/* ========================= */

.video-btn {
  border-radius: 16px;
  padding: 5px 15px;
  width: 3.5rem;
  border: none;
  backdrop-filter: blur(12px);

  display: grid;
  place-items: center;
  /* Better centering than flex */

  cursor: pointer;
  position: relative;
  transition: 0.3s ease;
}

/* Icon inside */
#videoBtn svg{
    transition: transform 0.2s ease;
}


.video-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  opacity: 0;
  transition: 0.4s;
  z-index: -1;
  filter: blur(12px);
}

.video-btn:hover {
  transform: scale(1.1);
}

.video-btn:hover::before {
  opacity: 0.6;
}



/* ========================= */
/* POPUP ANIMATION */
/* ========================= */

@keyframes popupFade {
  from {
    transform: scale(0.85) translateY(25px);
    opacity: 0;
  }

  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}


/* ========================= */
/* LIGHT THEME SUPPORT */
/* ========================= */

body.light-theme .settings-popup {
  background: rgba(255, 255, 255, 0.5);
}

body.light-theme .settings-box {
  background: rgba(255, 255, 255, 0.8);
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow:
    0 0 25px rgba(0, 0, 0, 0.08);
}

body.light-theme .close-btn {
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

body.light-theme .video-btn {
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

/* ========================= */
/* DAY / NIGHT SWITCH */
/* ========================= */

.switch {
  font-size: 16px;
  position: relative;
  display: inline-block;
  width: 3.5em;
  height: 2em;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  --background: #28096b;
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--background);
  transition: 0.5s;
  border-radius: 30px;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.4);
}

.slider::before {
  position: absolute;
  content: "";
  height: 1.4em;
  width: 1.4em;
  border-radius: 50%;
  left: 10%;
  bottom: 15%;
  background: var(--background);
  box-shadow: inset 8px -4px 0px 0px #fff000;
  transition: 0.5s;
}

input:checked+.slider {
  background-color: #6dd5fa;
}

input:checked+.slider::before {
  transform: translateX(100%);
  box-shadow: inset 15px -4px 0px 15px #fff000;
}

/* ========================= */
/* LIGHT THEME */
/* ========================= */

body.light-theme {
  color: #111;
}

body.light-theme .overlay {
  background: rgba(255, 255, 255, 0.45);
}

body.light-theme .glass-card,
body.light-theme .glass-nav {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: #111;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
}

body.light-theme .nav-links a {
  color: #111;
}

body.light-theme .nav-links a:hover {
  color: #522ba7;
}

body.light-theme #video-toggle {
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.2);
}