/* Import font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;800&display=swap');

/* Reset and base */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background-color: #121212;
  color: #f5f5f5;
  font-family: 'Poppins', sans-serif;
  overflow: hidden; /* hide body scroll */
}

/* Custom Modern Scrollbar */
::-webkit-scrollbar {
  width: 12px;
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #23272f 60%, #181a20 100%);
  border-radius: 8px;
  border: 2px solid #181a20;
  box-shadow: 0 2px 8px #181a2044, 0 0 0 1px #232323;
  transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #2e313a 60%, #232323 100%);
}

::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 8px;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #23272f #181a20;
}

/* Sidebar styles */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: linear-gradient(135deg, #23272f 0%, #181a20 100%);
  background-size: cover;
  animation: none;
  box-shadow:
    0 0 18px #181a2088,
    0 0 32px #23272f55;
  backdrop-filter: blur(6px) brightness(0.98);
  border-radius: 0 12px 12px 0;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  z-index: 10000;
  transition: width 0.3s ease;
  overflow: hidden;
}

/* Collapsed sidebar */
.sidebar.collapsed {
  width: 60px;
}

/* Sidebar header */
.sidebar-header {
  font-weight: 800;
  font-size: 1.8rem;
  color: #b38f47;
  margin-bottom: 30px;
  text-align: center;
  user-select: none;
}

/* Collapse button */
.collapse-btn {
  background: none;
  border: none;
  color: #b38f47;
  font-size: 1.6rem;
  cursor: pointer;
  margin-bottom: 20px;
  align-self: center;
  user-select: none;
  transition: transform 0.3s ease;
}

.sidebar.collapsed .collapse-btn {
  transform: rotate(180deg);
}

/* Navigation links */
.nav-links {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nav-links a {
  color: #e3dcb7cc;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links a:hover {
  background-color: rgba(179, 143, 71, 0.3);
  color: #b38f47;
}

/* Icons in nav */
.nav-links .icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* Hide text in collapsed */
.sidebar.collapsed .nav-links a {
  justify-content: center;
  font-size: 0; /* hides text */
}

.sidebar.collapsed .nav-links a .icon {
  font-size: 1.6rem;
}

/* Particle canvas fixed at top */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 120px; /* same as header */
  pointer-events: none;
  z-index: 9999;
}

/* Main container fills remaining viewport */
.container {
  position: fixed;
  top: 0;
  left: 240px; /* sidebar width */
  width: calc(100vw - 240px);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 140px 40px 40px; /* padding top accounts for particle canvas + some space */
  box-sizing: border-box;
  background: transparent;
  transition: left 0.3s ease, width 0.3s ease;
}

/* Adjust container when sidebar collapsed */
.sidebar.collapsed ~ .container {
  left: 60px;
  width: calc(100vw - 60px);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 240px;
  right: 0;
  height: 120px;
  background: linear-gradient(135deg, #23272f 0%, #181a20 100%);
  background-size: cover;
  animation: none;
  box-shadow:
    0 2px 16px 0 rgba(20, 20, 20, 0.7),
    0 1.5px 8px 0 rgba(40, 40, 40, 0.5);
  backdrop-filter: blur(8px) brightness(0.98);
  border-radius: 0 0 18px 18px;
  padding: 24px 48px;
  box-sizing: border-box;
  text-align: center;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: left 0.3s ease, width 0.3s ease, background 0.5s;
  border-bottom: 1.5px solid #232323;
}

.sidebar.collapsed ~ .container .header,
.sidebar.collapsed ~ .container {
  left: 60px;
  width: calc(100vw - 60px);
}

/* Header text */
.header h1 {
  margin: 0 0 8px 0;
  font-weight: 800;
  font-size: 2.7rem;
  color: #f5f5f5;
  text-shadow:
    0 2px 12px #000a,
    0 0 2px #b38f47cc;
  letter-spacing: 1.5px;
  animation: none;
  cursor: pointer;
  transition: color 0.3s;
}

.header h1:hover {
  color: #ffe082;
  text-shadow:
    0 2px 18px #b38f47cc,
    0 0 8px #ffe08299;
}

.header p {
  margin: 0;
  font-weight: 400;
  font-size: 1.15rem;
  color: #b0b0b0;
  text-shadow: 0 1px 4px #0008;
  letter-spacing: 0.2px;
}

/* Sections */
.section {
  max-width: 900px;
  margin-bottom: 40px;
}

.section h2 {
  color: #aa931f;
  margin-bottom: 15px;
  text-shadow: 0 0 4px #bba83baa;
  font-weight: 600;
  font-size: 2rem;
}

/* Cards */
.card {
  background: linear-gradient(135deg, #23272f 60%, #181a20 100%);
  box-shadow:
    0 6px 32px 0 rgba(20, 20, 20, 0.55),
    0 1.5px 8px 0 rgba(40, 40, 40, 0.25),
    0 0 0 1.5px #232323 inset;
  border-radius: 18px;
  padding: 32px 28px 28px 28px;
  margin-bottom: 32px;
  transition:
    box-shadow 0.3s cubic-bezier(.4,2,.6,1),
    transform 0.18s cubic-bezier(.4,2,.6,1),
    background 0.4s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: radial-gradient(circle at 80% 10%, #b38f4722 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.card:hover {
  box-shadow:
    0 12px 48px 0 rgba(205, 166, 48, 0.18),
    0 0 0 2.5px #aa931f88 inset,
    0 2px 24px 0 #b38f4744;
  transform: translateY(-4px) scale(1.025);
  background: linear-gradient(135deg, #23272f 40%, #232323 100%);
}

.card h2 {
  color: #ffe082;
  margin-top: 0;
  margin-bottom: 14px;
  text-shadow: 0 0 8px #bba83baa, 0 2px 12px #000a;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.5px;
  z-index: 1;
  position: relative;
}

.card p {
  margin: 0 0 18px 0;
  font-weight: 400;
  font-size: 1.08rem;
  color: #e3dcb7;
  z-index: 1;
  position: relative;
}

.card .button {
  margin-top: 10px;
  z-index: 1;
  position: relative;
}

/* Buttons */
.button {
  display: inline-block;
  background-color: #aa8b2f;
  color: #1a1200;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  filter: drop-shadow(0 0 4px #aa8b2f88);
  transition: background-color 0.3s ease, filter 0.3s ease;
  position: relative;
  overflow: hidden;
}

.button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, #d3c067 35%, transparent 70%);
  filter: blur(5px);
  transform: translate(-50%, -50%);
  z-index: -1;
}

.button:hover {
  background-color: #c3aa3a;
  filter: drop-shadow(0 0 8px #c3aa3aaa);
}

/* Animations */
@keyframes neonPulse {
  0%, 100% {
    text-shadow:
      0 0 6px #b38f47cc,
      0 0 12px #a0803a99,
      0 0 18px #7f603333;
  }
  50% {
    text-shadow:
      0 0 12px #ffda6aee,
      0 0 18px #f0c72ccc,
      0 0 24px #b38f4788;
  }
}

/* Keyframes for background gradient shift */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
