/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(to bottom, #6a0dad, #090a0f); /* Purple to Deep Blue Gradient */
  color: #f5f5f5;
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
}

/* Particles Background */
#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Keep particles in the background */
}

/* Sidebar Styling */
.tabbar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 250px; /* Fixed width for the navbar */
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 1rem 0;
}

img.trophy-icon {
  width: 30px;
  height: auto;
  display: inline-block;
  margin-bottom: 0;
}

img.nutrition-icon {
  width: 30px;
  height: auto;
  display: inline-block;
  margin-bottom: 0;
}

.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 1rem;
  color: #bbb;
  transition: color 0.3s, background 0.3s;
}

.tabbar a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #81c7f5;
}

.tabbar a.active {
  background: rgba(81, 199, 245, 0.2);
  color: #81c7f5;
}

.tabbar .icon {
  width: 1.5rem;
  height: 1.5rem;
  margin-bottom: 0.5rem;
  fill: currentColor;
}

.tabbar span {
  font-size: 0.75rem;
  text-transform: uppercase;
}

/* Main Content Styling */
.content {
  margin-left: 250px; /* Matches the navbar width */
  padding: 40px; /* Padding for internal spacing */
}

header h1 {
  font-size: 2.8rem;
  color: #81c7f5;
  margin-bottom: 20px;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6);
}

/* Progress Tracker Wizard */
.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 30px;
  padding: 20px;
}

.wizard-progress .step {
  text-align: center;
  position: relative;
}

.wizard-progress .step .node {
  height: 30px;
  width: 30px;
  border-radius: 50%;
  background: gray;
  border: 3px solid #ccc;
  position: relative;
  margin: 0 auto 10px;
}

.wizard-progress .step.complete .node {
  background: #07c;
  border-color: #07c;
}

.wizard-progress .step.in-progress .node {
  background: #fff;
  border-color: #07c;
}

.wizard-progress .line {
  flex-grow: 1;
  height: 3px;
  background: #ccc;
  position: relative;
  margin: 0 10px;
}

.wizard-progress .line.complete {
  background: #07c;
}

/* Input Fields and Form */
.inputs {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  height: fit-content;
}

.inputs>div {
  height: 100%;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
}

label {
  font-size: 0.9rem;
}

input,
label {
  display: block;
}

input {
  margin-top: 8px;
  margin-bottom: 5px;
  padding: 10px;
  font-size: large;
  background-color: #262626;
  color: white;
  border: none;
  border-radius: 5px;
  width: 100%;
}

input:focus-visible {
  outline: 2px solid #ec4899;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

button {
  display: block;
  cursor: pointer;
  border: none;
}

#submit {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  background-image: linear-gradient(to right, #ec4899, #8b5cf6);
  font-size: 1.3rem;
  border-radius: 5px;
  color: white;
  font-weight: bold;
  transition: scale 0.3s ease-in-out;
}

#editSection {
  width: 100%;
  display: flex;
  gap: 25px;
  justify-content: space-between;
}

#editSection > button {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  font-size: 1.3rem;
  border-radius: 5px;
  color: white;
  font-weight: bold;
  transition: scale 0.3s ease-in-out;
}

#updateEntry { background-image: 
      linear-gradient(to right, #ec4899, #8b5cf6); }

#cancelEdit{ background-color: #ef4444; }

#submit:hover, #updateEntry:hover, #cancelEdit:hover { scale: 1.02; }

.hidden{ display: none !important; }

.edit, .delete{
    margin: 0 auto;
    padding: 5px 10px;
    font-size: 1.1rem;
    border-radius: 5px;
    background-color: transparent;
    color: white;
    border: 1px solid white;
}

.edit:hover, .delete:hover{
    background-color: #0a0a0a;
}

/* Table for Fitness Logs */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

th,
td {
  text-align: center;
  padding: 10px;
}

tr:nth-child(even) {
  background-color: #57534e;
}

tr:nth-child(odd) {
  background-color: #262626;
}

th {
  font-size: 0.9rem;
  background-color: #0a0a0a;
}

tbody > tr:hover {
  background-color: #737373;
  color: black;
}

/* Delete Animation */
.delete-animation {
  background-color: #ef4444 !important;
  animation: deleteAnimate 0.4s linear forwards;
}

@keyframes deleteAnimate {
  to {
    transform: translateX(100%);
  }
}

/* Achievements Section */
.achievements {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px;
}

.achievement {
  text-align: center;
  position: relative;
  transition: transform 0.3s;
}

.achievement img {
  max-width: 100%;
  border-radius: 10px;
  transition: filter 0.3s, opacity 0.3s;
}

.achievement img.locked {
  filter: blur(5px);
  opacity: 0.5;
}

.achievement img.unlocked {
  display: none;
}

.achievement.unlocked img.locked {
  display: none;
}

.achievement.unlocked img.unlocked {
  display: block;
}

.achievement p {
  font-size: 14px;
  margin-top: 10px;
  color: #81c7f5;
}


/* Responsive Adjustments */
@media (max-width: 768px) {
  .tabbar {
    width: 200px;
  }

  .content {
    margin-left: 200px;
    padding: 20px;
  }

  header h1 {
    font-size: 2.2rem;
  }
}
