@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
    --bg: #0b0f1a;
    --card-bg: rgba(255, 255, 255, 0.08);
    --border-glow: linear-gradient(135deg, #7f5af0, #2cb67d, #ff8906);
    --text-main: #ffffff;
    --text-muted: #b8c1ec;
    --accent: #7f5af0;
    --radius: 18px;
    --transition: 0.35s ease;
}

* {
    box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
    background: radial-gradient(circle at top, #151a2e, var(--bg));
    color: var(--text-main);
    overflow-x: hidden;
    padding: 0;
    margin: 0;
}

a.bk {
    color: white;
    text-decoration: none;
    font-size: 2rem;
    position: fixed;
    left: 30px;
    top: 30px;
    z-index: 99;
}

section.categories-container {
    width: 99%;
    margin: 0 auto;
    padding: 3rem 1.25rem;
    position:relative;
     display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
}

@media only screen and (max-width:1024px){
  section.categories-container div{
 width: 99% !important;
    }
}


section.categories-container div{

 position: absolute;
 opacity: 0;
 transition: .8s ease-in-out;
 inset: 50% 0 0 0;
 width: 80%;
 pointer-events: none;
}



section.categories-container div.category-select{
   margin: 0 auto;
}
section.categories-container div.difficulty{
   display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
   margin: 0 auto;
  margin-top: 5em;
  perspective: 1400px;
  transform-style: preserve-3d;
}

section.categories-container div.difficulty button{
 width: 120px;
  background: linear-gradient(135deg, #ffd84d, #ffb703);
  color: #1b0645;
  padding: 9px 9px;
  margin-top: 2em;
  font-weight: bold;
  border: none;
  outline: none;
  cursor: pointer;
    transition: all 0.2s ease;

}

section.categories-container div.difficulty button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 16px #4b6bffaa;
}


section.categories-container div[data-active]{
 opacity: 1;
 pointer-events: all;
 transition-delay: 200ms;
}

section.categories-container div select{
  width: 330px;
  border-radius: 5px;
  padding: 9px;
  background-color: #1f2937;
  color: white;
}

section.categories-container h1 {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 2.5rem;
    font-weight: 700;
}

ul.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    padding: 0;
    list-style: none;
}

ul.categories li {
    --pill-bg: #1f2937;
    --pill-accent: #6366f1;
    background: var(--pill-bg);
    border-radius: 999px;
    padding: 0.4rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

ul.categories li a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    text-decoration: none;
    color: #f9fafb;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
}


ul.categories li:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}


ul.categories li a:active {
    transform: scale(0.95);
}

ul.categories li a {
    gap: 0.45rem;
}

ul.categories .icon {
    font-size: 1rem;
    line-height: 1;
}

ul.categories .label {
    font-size: 0.9rem;
}



ul.categories li[data-group="entertainment"] {
    --pill-bg: #312e81;
    --pill-accent: #a5b4fc;
}

ul.categories li[data-group="science"] {
    --pill-bg: #064e3b;
    --pill-accent: #34d399;
}

ul.categories li[data-group="general"] {
    --pill-bg: #ca991d ;
    --pill-accent: #1f2937;
}

ul.categories li[data-group="history"] {
    --pill-bg: #3f1d0b;
    --pill-accent: #fb923c;
}

ul.categories li[data-group="art"] {
    --pill-bg: #4c1d95;
    --pill-accent: #c4b5fd;
}

ul.categories li[data-group="sports"] {
    --pill-bg: #1b753c ;
    --pill-accent: #022c22;
}

ul.categories li[data-group="world"] {
    --pill-bg: teal;
    --pill-accent: #38bdf8;
}


.loading-container {
  display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   height: 99vh;
   transition: all .3s ease-in;
  position:absolute;
  text-align: center;
  padding: 1em 1.5em;
  width: 99%;
  margin: 0 auto;
}

.loading-container p {
  text-align: center;
  color: #ff5c5c;
  margin-top: 5em;
}

.loading-container span {
  animation: rotate 2s infinite;
  height: 50px;
  width: 50px;
}

.loading-container span:before,
.loading-container span:after {
  border-radius: 50%;
  content: "";
  display: block;
  height: 20px;
  width: 20px;
}
.loading-container span:before {
  animation: ball1 2s infinite;
  background-color: #ffd84d;
  box-shadow: 30px 0 0 #00A9FE;
  margin-bottom: 10px;
}
.loading-container span:after {
  animation: ball2 2s infinite;
  background-color: #3ddc84;
  box-shadow: 30px 0 0 #ff5c5c;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg) scale(0.8);
  }
  50% {
    transform: rotate(360deg) scale(1.2);
  }
  100% {
    transform: rotate(720deg) scale(0.8);
  }
}

@keyframes ball1 {
  0% {
    box-shadow: 30px 0 0 #00A9FE;
  }
  50% {
    box-shadow: 0 0 0 #00A9FE;
    margin-bottom: 0;
    transform: translate(15px, 15px);
  }
  100% {
    box-shadow: 30px 0 0 #00A9FE;
    margin-bottom: 10px;
  }
}

@keyframes ball2 {
  0% {
    box-shadow: 30px 0 0 #ff5c5c;
  }
  50% {
    box-shadow: 0 0 0 #ff5c5c;
    margin-top: -20px;
    transform: translate(15px, 15px);
  }
  100% {
    box-shadow: 30px 0 0 #ff5c5c;
    margin-top: 0;
  }
}

.loading-container.hide {
   opacity: 0;
   pointer-events:none;
   
}

