   
    body {
  margin: 0;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
}

#background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -3;
  opacity: 0;
  filter: blur(12px);
  transition: opacity 1.5s ease-in-out, transform 3s ease;
  transform: scale(1.1);
}

#background.show {
  opacity: 1;
  transform: scale(1);
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

header {
  position: absolute;
  top: 36px;
  text-align: center;
  z-index: 2;
}

header img {
  height: 85px;
  max-width: 100%;
}

#headline {
  text-align: center;
  max-width: 90%;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 2s ease, transform 2s ease;
  z-index: 2;
}

#headline.show {
  opacity: 1;
  transform: translateY(0);
}

#headline.fade-out {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.category {
  display: inline-block;
  font-size: 1rem;
  padding: 0.3rem 1.2rem;
  border-radius: 999px;
  color: #000;
  background-color: #fff;
  margin-bottom: 0.8rem;
  font-weight: 400;
}

.cat-السعودية { background-color: #cae3ca; }
.cat-الإمارات { background-color: #eceff7; }
.cat-شركات-وأعمال { background-color: #e8e0a7; }
.cat-أسلوب-حياة { background-color: #f5e3ff; }
.cat-رياضة { background-color: #bfe8f2; }
.cat-إقتصاد { background-color: #ffcfcf; }
.cat-منوعات { background-color: #e0d4ff; }
.cat-ثقافة-وفن { background-color: #ffdabf; }
.cat-تكنولوجيا { background-color: #dbe0ff; }
.cat-default { background-color: #000; color: #fff; }

#headline a {
  font-size: 1.8rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
}

.date {
  font-size: 1rem;
  color: #bbb;
}

/* Main page loading spinner */
#spinner {
  position: fixed;
  z-index: 5;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 6px solid rgba(255, 255, 255, 0.1);
  border-top: 6px solid #fff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  display: none;
}

/* Spinner inside button */
.ai-summary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 999px;
  font-size: 0.95rem;
  font-family: inherit;
  background: linear-gradient(to left, #357c95, #455181, #603869, #903843);
  background-size: 300% 300%;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  margin-top: 50px;
  animation: animatedGradient 6s ease-in-out infinite;
  box-shadow: 0 0 9px rgba(0, 0, 0, 0.15);
}



.ai-summary-btn:hover {
  opacity: 0.9;
}

.btn-content {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ai-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  visibility: hidden;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-spinner::before {
  content: "";
  width: 100%;
  height: 100%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-sizing: border-box;
}

/* Spinner animation shared */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}



@keyframes animatedGradient {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}




.loading-ring {
  width: 100%;
  height: 100%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-sizing: border-box;
}

.pause-icon {
  font-size: 14px;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.btn-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}


.icon-loading {
  width: 24px;
  height: 24px;
  display: block;
}

.icon-loading .ring {
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-dasharray: 90;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  transform-origin: center;
  transform-box: fill-box;
  will-change: transform;
  animation: spin 1s linear infinite;
}

.icon-pause, .icon-play {
  width: 24px;
  height: 24px;
  fill: white;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.3s ease;
}

.icon-pause,
.icon-play {
  display: none;
}



.icon-loading.animate .ring {
  animation: spin 1s linear infinite;
  transform-origin: center;
  transform-box: fill-box;
}


@keyframes animatedGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}



#headline.loading::after {
  display: inline-block;
  animation: ellipsis 1s infinite steps(1, end);
  content: "";
  margin-left: 0.2em;
}

#summaryPlayer {
  position: absolute;
  width: 1px;
  height: 1px;
  left: -9999px;
}



