/* Shared Sidebar & Bottom Nav CSS */

.sidebar {
  position: fixed;
  top: 76px;
  bottom: 0;
  left: 0;
  width: 280px;
  overflow-y: auto;
  background: var(--glass);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 32px var(--shadow);
  padding: 24px 16px 40px;
  z-index: 9990;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

.sidebar::-webkit-scrollbar {
  width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--selection);
  border-radius: 4px;
}

/* --- SIDE NAVIGATION --- */
.side-nav {
  display: grid;
  gap: 8px;
}

.nav-section {
  margin-bottom: 8px;
}

.sn-side-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 53px;
  border: 0;
  border-radius: 4px !important;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  gap: 15px;
  padding: 0 17px;
  padding-right: 32px !important;
  text-align: left;
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
  transition: all 0.25s ease;
  position: relative;
}

.sn-side-item span {
  display: grid;
  width: 21px;
  place-items: center;
  color: var(--muted);
  font-size: 21px;
  transition: transform 0.25s ease;
}

.sn-side-item div {
  min-width: 0;
}

.sn-side-item div strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.sn-side-item div small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* --- HOVER STATES --- */
.sn-side-item:not(.sn-active):hover {
  background: var(--selection);
  color: var(--primary);
  border-color: var(--border);
  transform: translateX(4px);
}

.sn-side-item:not(.sn-active):hover span {
  color: var(--primary);
  transform: scale(1.15) rotate(-5deg);
}

/* --- ACTIVE STATE --- */
.sn-side-item.sn-active {
  background: var(--btn-bg);
  color: var(--btn-text);
  box-shadow: 0 12px 22px var(--shadow);
}

.sn-side-item.sn-active span {
  color: var(--btn-text);
}

.sn-side-item.sn-active::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid var(--btn-text);
  /* Pointing right */
}

/* --- REWARDS CARD --- */
.reward-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 30px;
  width: 100%;
  max-width: 100%;
  padding: 20px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #fdf6e3, #fffaf0);
  border: 1px solid rgba(245, 158, 11, 0.2);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
  position: relative;
  overflow: hidden;
  text-align: center;
  place-items: center;
  box-sizing: border-box;
}

.reward-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 60%);
  transform: rotate(45deg);
  pointer-events: none;
}

.reward-box h3,
.reward-box p {
  margin: 0;
  position: relative;
}

.reward-box h3 {
  font-size: 15px;
  font-weight: 900;
  color: var(--muted);
}

.reward-box p {
  color: #d97706;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  margin-top: 4px;
}

.reward-box button {
  width: 100%;
  max-width: 180px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  font-size: 14px;
  margin-top: 8px;
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.3);
  transition: all 0.25s ease;
  position: relative;
  box-sizing: border-box;
}

.reward-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.4);
}

.trophy {
  font-size: 32px;
  text-align: center;
  position: relative;
  animation: sn-float 3s ease-in-out infinite;
}

@keyframes sn-float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* --- BOTTOM NAVIGATION --- */
.bottom-nav {
  position: fixed;
  right: max(32px, calc((100vw - 1500px) / 2));
  bottom: 14px;
  left: max(338px, calc((100vw - 1500px) / 2 + 338px));
  display: none;
  grid-template-columns: 1fr 1fr 92px 1fr 1fr;
  align-items: center;
  height: 64px;
  border-radius: 22px;
  background: var(--glass);
  box-shadow: 0 12px 32px var(--shadow);
  backdrop-filter: blur(12px);
  z-index: 4;
  font-family: 'Poppins', sans-serif;
}

.bottom-nav button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.bottom-nav a {
  text-decoration: none;
  color: var(--muted);
}

.bottom-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 43px;
  border-radius: 15px;
  font-weight: 900;
  font-size: 14px;
}

.bottom-item span {
  font-size: 24px;
}

.bottom-item.sn-active {
  background: var(--selection);
  color: var(--primary);
}

.cap-item {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  justify-self: center;
  align-self: end;
  border-radius: 50%;
  background: var(--btn-bg) !important;
  color: var(--btn-text) !important;
  font-size: 37px !important;
  box-shadow: 0 16px 31px var(--shadow);
  transform: translateY(-17px);
  text-decoration: none;
}



/* --- RESPONSIVE LAYOUT --- */
.page {
  min-height: 100vh;
  padding: 32px 32px 32px 309px;
}
.main-content{
  padding: 0px 48px;
}

@media (max-width:1439) {
  .page {
    padding: 16px 16px 16px 297px;
  }
  .main-content{
    padding: 0px 24px;
  }
}

@media (max-width: 1023px) {
  .page {
    padding: 8px 8px 108px 8px;
  }
  .main-content{
    padding: 0px 16px;
  }

  .sidebar {
    display: none !important;
  }

  .bottom-nav {
    right: 8px;
    left: 8px;
    display: grid !important;
    grid-template-columns: 1fr 1fr 76px 1fr 1fr;
  }

  .bottom-item {
    gap: 4px;
    font-size: 12px;
  }

  .bottom-item span {
    font-size: 20px;
  }
}



@media (max-width: 768px) {
  .page {
    padding: 8px 8px 77px 8px;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 8px 8px 70px 8px;
  }

  .bottom-nav {
    grid-template-columns: 1fr 1fr 70px 1fr 1fr;
    gap: 2px;
    padding: 0 4px;
  }

  .bottom-item {
    flex-direction: column;
    gap: 2px;
    font-size: 9px;
    height: 100%;
    padding: 6px 0;
  }

  .bottom-item span {
    font-size: 18px;
    line-height: 1;
  }

  .cap-item {
    width: 56px;
    height: 56px;
    font-size: 26px !important;
  }
}

/* Only for Mobile S (320px) and small devices, hide bottom nav text and show only icons */
@media (max-width: 380px) {
  .bottom-nav {
    grid-template-columns: 1fr 1fr 64px 1fr 1fr !important;
    gap: 4px !important;
    padding: 0 6px !important;
    height: 56px !important;
  }

  .bottom-nav .bottom-item {
    font-size: 0 !important;
    /* Hide text node inside links */
    flex-direction: column !important;
    justify-content: center !important;
    padding: 4px 0 !important;
    gap: 0 !important;
  }

  .bottom-nav .bottom-item span {
    font-size: 22px !important;
    /* Retain icon rendering size */
    line-height: 1 !important;
  }

  .bottom-nav .cap-item {
    width: 48px !important;
    height: 48px !important;
    font-size: 22px !important;
    margin-bottom: 2px !important;
  }
}