/* Global Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
  text-decoration: none;
  scroll-behavior: smooth;
}

:root {
  /* ─── Background Gradients ───────────────────── */
  --primary: linear-gradient(to right, #84ff5f, #feb47b);
  --primary_color: #20af13c9;
  --secondary: linear-gradient(to right, #6a11cb, #2575fc);
  --secondary_color: #6a11cb;
  --tertiary: linear-gradient(to right, #00c6ff, #0072ff);
  --tertiary_color: #f1fac7;
  --quaternary: linear-gradient(to right, #ff6a00, #ee0979);
  --quaternary_color: #ff6a00;
  --quinary: linear-gradient(to right, #ffecd2, #fcb69f);
  --quinary_color: #ffecd2;
  --senary: linear-gradient(to right, #f0f2f0, #000c40);
  --senary_color: #f0f2f0;
  --septenary: linear-gradient(to right, #f8cdda, #1d2b64);
  --septenary_color: #f8cdda;
  --octonary: linear-gradient(to right, #f0f0f0, #d9d9d9);
  --octonary_color: #f0f0f0;
  --nonary: linear-gradient(to right, #fceabb, #f8b500);
  --nonary_color: #fceabb;
  --denary: linear-gradient(to right, #dfe9f3, #ffffff);
  --denary_color: #dfe9f3;
  --undenary: linear-gradient(to right, #f0f2f0, #000c40);
  --undenary_color: #f0f2f0;
  --bg_color_main: linear-gradient(to right, #ffe4f8 0%, #fff6c1 100%);
  --bg_color_sec: linear-gradient(to right, #d0c0d4 0%, #bbc4e4 100%);
  --footer: linear-gradient(to right, #000, #000, #000);
  --update_section: #bbffd3;

  /* ─── Social Branding ────────────────────────── */
  --instagram: linear-gradient(to right, #ffc677, #fd1d1d, #833ab4);

  /* ─── Basic Colors ───────────────────────────── */
  --white: #ffffff;
  --black: #000;
  --text-primary: #222;
  --text-light: #f4f4f4;

  /* ─── Button Colors ──────────────────────────── */
  --btn_primary: #aeff95;
  --btn_secondary: #95ffe4;
  --btn-disabled: #696969;

  /* ─── Status Colors ──────────────────────────── */
  --success: #3fc700;
  --failure: #c70000;

  /* ─── Shadows ────────────────────────────────── */
  --shadow:
    rgba(0, 0, 0, 0.17) 0px -23px 25px 0px,
    rgba(0, 0, 0, 0.15) 0px -36px 30px 0px inset,
    rgba(0, 0, 0, 0.1) 0px -79px 40px 0px inset,
    rgba(0, 0, 0, 0.06) 0px 2px 1px,
    rgba(0, 0, 0, 0.09) 0px 4px 2px,
    rgba(0, 0, 0, 0.09) 0px 8px 4px,
    rgba(0, 0, 0, 0.09) 0px 16px 8px,
    rgba(0, 0, 0, 0.09) 0px 32px 16px;

  /* ─── Spacing Scale ──────────────────────────── */
  --space-xs: 0.4rem;
  --space-sm: 0.8rem;
  --space-md: 1.6rem;
  --space-lg: 2.4rem;
  --space-xl: 4rem;

  /* ─── Borders and Transitions ────────────────── */
  --radius: 1rem;
  --transition: 0.3s ease-in-out;
}


/* Root Font and Theme */
html {
  font-size: 62.5%;
  /* 1rem = 10px for easy scaling */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100%;
}

/* Body Styling */
body {
  width: 100%;
  min-height: 100vh;
  background-image: url(/config/image/icon/body.jpg);
  background-color: rgba(255, 255, 255, 0.3);
  background-blend-mode: lighten;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
   /* background-repeat: repeat-y; */
  color: #222;
  line-height: 1.6;
}


/* Loader Animation */
.loader {
  max-width: 70%;
  aspect-ratio: 1 / 1;
  margin: auto;
  /* margin-top: 10rem;
  transform: translateY(50%); */
  position: relative;

  .image {
    width: 80%;
    aspect-ratio: 1 / 1;
    opacity: 1;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: fadeInScale 2s ease-in-out forwards, pulse 1.5s infinite;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
}

@keyframes fadeInScale {
  0% {
    width: 0%;
    opacity: 0;
  }

  100% {
    width: 80%;
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.7;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.05);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.7;
  }
}

/* Reset link styles */
a {
  text-decoration: none;
  color: inherit;
  /* Inherits text color from parent */
  font-weight: inherit;
  /* Optional: resets bold link text */
}


.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  max-height: 100%;
  padding: var(--space-md);
  box-shadow: rgba(0, 0, 0, 0.45) 0 25px 20px -20px;
  animation: fade 0.8s ease-in;

  /* background: var(--white);       */
  border-radius: var(--radius);
}



@keyframes fade {
  from {
    opacity: 0.1;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* sidebar transition */
.translate {
  transform: translateX(-100%);
  transition: transform 0.6s ease-in-out;
}

.rotate {
  transform: rotate(90deg);
  transition: all 0.6s ease-in-out;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 1.4rem;
  background-color: var(--btn_primary);
  color: var(--black);
  border: none;
  border-radius: 0.6rem;
  transition: all 0.3s ease-in-out;
  text-align: center;
  text-decoration: none;

  &:hover {
    background-color: var(--btn_secondary);
    cursor: pointer;
    box-shadow: var(--shadow);
    transform: scale(0.95);
  }

  &:disabled {
    background-color: var(--btn-disabled);
    color: #ccc;
    pointer-events: none;

    &:hover {
      box-shadow: none;
      transform: scale(1);
      cursor: not-allowed;
    }
  }
}

input,
textarea {
  width: 100%;
  padding: 1.4rem 2.4rem;
  font-size: 1.7rem;
  letter-spacing: 0.05rem;
  border: 1px solid #ccc;
  border-radius: 0.6rem;
  background-color: var(--white);
  color: var(--black);
  transition: all 0.3s ease-in-out;

  &:focus-visible {
    outline: none;
    border-color: var(--btn_primary);
    box-shadow: 0 0 0 2px rgba(174, 255, 149, 0.5);
  }

  &:read-write:hover {
    transform: scale(1.01);
  }

  &::placeholder {
    color: var(--btn-disabled);
    font-style: italic;
  }

  &::file-selector-button {
    background-color: var(--btn_primary);
    color: var(--black);
    padding: 0.8rem 1.6rem;
    border: none;
    border-radius: 0.6rem;
    font-size: 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease-in-out;

    &:hover {
      background-color: var(--btn_secondary);
      box-shadow: var(--shadow);
    }
  }
}

.not_visited,
.not_answered,
.answered,
.not_answered_marked,
.answered_marked {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 2.8rem;
  height: 2.8rem;
  aspect-ratio: 1;
  font-size: 1.4rem;
  font-weight: bold;
  border-radius: 0.4rem;
  padding: 0.4rem;
  margin: 0.3rem;
  text-align: center;
  transition: all 0.3s ease-in-out;
  box-shadow: rgba(6, 24, 44, 0.4) 0 0 0 2px,
    rgba(6, 24, 44, 0.65) 0 4px 6px -1px,
    rgba(255, 255, 255, 0.08) 0 1px 0 inset;
  color: #000;
}

.not_visited {
  background-color: #ffffff;
}

.not_answered {
  background-color: #ff0000;
  color: #fff;
}

.answered {
  background-color: #3fc700;
  color: #fff;
}

.not_answered_marked {
  background-color: #d200fc;
  color: #fff;
}

.answered_marked {
  background-color: #cd04ff;
  color: #fff;
  box-shadow: rgba(255, 166, 0, 0.4) 0 0 0 2px,
    rgba(255, 230, 3, 0.65) 0 4px 6px -1px,
    rgba(255, 145, 0, 0.08) 0 1px 0 inset;
}




nav {
  color: var(--black);
  background: var(--primary);
  height: 4rem;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  align-items: center;
  justify-items: center;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 20;
  padding: 0.5rem;

  transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease;

  & .sidebar {
    cursor: pointer;
    transition: transform 0.2s ease-in-out;

    &:hover {
      transform: scale(1.05);
    }
  }

  & .search,
  & .logo {
    height: 2.4rem;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;

    &:hover,
    &:focus-visible {
      transform: scale(1.1);
    }
  }
}

/* Responsive Adjustments */

/* Tablets and below */
@media screen and (max-width: 768px) {
  html {
    font-size: 56.25%;
  }

  body {
    font-size: 1.5rem;
    background-position: top center;
  }
}

/* Mobile Devices */
@media screen and (max-width: 480px) {
  html {
    font-size: 50%;
  }

  body {
    font-size: 1.4rem;
  }
}