/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0c2b60; /* Deep Blue */
  --secondary: #100c51; /* Sky Blue */
  --accent: #ff8f00; /* Amber */
  --success: #2e7d32;
  --warning: #fbc02d;
  --danger: #c62828;
  --dark: #0d1b2a;
  --light: #f5faff;
  --gray: #90caf9;
  --gradient: linear-gradient(135deg, #7015c0, #64c8f6);
  --shadow: 0 15px 40px rgba(21, 101, 192, 0.25);
  --transition: all 0.3s ease;
}

body {
  font-family: "Poppins", sans-serif;
  background: #f5f7fa;
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

.logo {
  font-family: "Montserrat", sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo i {
  color: var(--primary);
  font-size: 50px;
}

.logo span {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-menu {
  display: flex;
  gap: 30px;
}

.nav-link {
  color: var(--gray);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding: 5px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.btn-premium {
  background: var(--gradient);
  color: white !important;
  padding: 8px 20px !important;
  border-radius: 25px;
}

.btn-premium::after {
  display: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--dark);
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding: 180px 0 100px;

  color: rgb(233, 224, 224);
  position: relative;
  overflow: hidden;

  height: 70vh;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-content h1 span {
  background: linear-gradient(45deg, #ebebebbb, #ffffffde);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.hero-btns {
  display: flex;
  gap: 20px;
}

.btn-primary,
.btn-secondary {
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: white;
  color: var(--primary);
}

.btn-primary:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: white;
  color: var(--primary);
}

.hero-image {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-elements {
  position: relative;
  width: 100%;
  height: 100%;
}

.floating-item {
  position: absolute;
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  animation: float 6s ease-in-out infinite;
  backdrop-filter: blur(5px);
}

.floating-item.item1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
  background: linear-gradient(45deg, #ff9a9e, #fad0c4);
}

.floating-item.item2 {
  top: 60%;
  left: 70%;
  animation-delay: 2s;
  background: linear-gradient(45deg, #a1c4fd, #c2e9fb);
}

.floating-item.item3 {
  top: 40%;
  left: 50%;
  animation-delay: 4s;
  background: linear-gradient(45deg, #ffecd2, #fcb69f);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(10deg);
  }
}

/* Analysis Section */
.analysis-section {
  padding: 100px 0;
  background: var(--light);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  background: rgb(10, 7, 119);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.analysis-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow);
}

.upload-area {
  border: 3px dashed var(--primary);
  border-radius: 15px;
  padding: 40px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.upload-area:hover {
  border-color: var(--secondary);
  transform: translateY(-5px);
}

.upload-area i {
  font-size: 60px;
  color: var(--primary);
  margin-bottom: 20px;
}

.upload-area h3 {
  margin-bottom: 10px;
  color: var(--dark);
}

.upload-area p {
  color: var(--gray);
  margin-bottom: 30px;
}

.btn-upload {
  background: var(--gradient);
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-upload:hover {
  transform: scale(1.05);
}

.preview-container {
  margin-top: 30px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.preview-container img {
  max-width: 100%;
  max-height: 250px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.upload-status {
  color: var(--success);
  font-weight: 500;
}

/* Results Section */
.analysis-results {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 15px;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.results-header {
  background: rgba(0, 0, 0, 0.2);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accuracy-badge {
  background: var(--success);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.results-content {
  padding: 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.result-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.result-item.primary {
  background: rgba(255, 255, 255, 0.15);
}

.result-label {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 5px;
}

.result-value {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.confidence-meter {
  height: 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 10px;
}

.confidence-fill {
  height: 100%;
  background: var(--success);
  width: 0%;
  transition: width 1s ease;
}

.confidence-text {
  font-size: 0.9rem;
  opacity: 0.9;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.recommendations {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
}

.recommendations h4 {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.recommendations ul {
  list-style: none;
}

.recommendations li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.recommendations li:last-child {
  border-bottom: none;
}

.recommendations li i {
  color: var(--success);
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  height: 200px;
}

.loading i {
  font-size: 40px;
  color: white;
}

/* Diseases Section */
.diseases-section {
  padding: 100px 0;
  background: white;
}

.search-box {
  position: relative;
  max-width: 600px;
  margin: 0 auto 40px;
}

.search-box input {
  width: 100%;
  padding: 15px 50px 15px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 1rem;
  transition: var(--transition);
  font-family: "Poppins", sans-serif;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 5px 15px rgba(106, 17, 203, 0.1);
}

.search-box i {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
}

.disease-categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 40px;
}

.category-btn {
  padding: 10px 25px;
  background: var(--light);
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  font-family: "Poppins", sans-serif;
}

.category-btn:hover,
.category-btn.active {
  background: var(--gradient);
  color: white;
  transform: translateY(-3px);
}

.diseases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.disease-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
}

.disease-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.disease-image {
  height: 200px;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 60px;
}

.disease-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 5px 15px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dark);
}

.disease-content {
  padding: 20px;
}

.disease-content h3 {
  margin-bottom: 10px;
  color: var(--dark);
}

.disease-content p {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 15px;
  line-height: 1.5;
}

.disease-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.disease-tag {
  padding: 5px 10px;
  background: var(--light);
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--gray);
}

.load-more {
  text-align: center;
  margin-top: 50px;
}

/* About Section */
.about-section {
  padding: 100px 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.about-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.about-item {
  text-align: center;
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.about-item:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.15);
}

.about-icon {
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 30px;
  color: var(--primary);
}

.about-item h3 {
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.about-item p {
  opacity: 0.9;
  line-height: 1.6;
}

/* Contact Section */
.contact-section {
  padding: 100px 0;
  background: white;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow);
}

.contact-form h3,
.contact-info h3 {
  margin-bottom: 30px;
  color: var(--dark);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px;
  margin-bottom: 20px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-family: "Poppins", sans-serif;
  transition: var(--transition);
  font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 150px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: var(--light);
  border-radius: 10px;
}

.info-item i {
  color: var(--primary);
  font-size: 20px;
}

.info-item span {
  font-weight: 500;
}

/* Footer */
.footer {
  background: var(--dark);
  color: white;
  padding: 50px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.footer-section h3 span {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-section h4 {
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.footer-section p {
  color: #b2bec3;
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-section a {
  display: block;
  color: #b2bec3;
  text-decoration: none;
  margin-bottom: 10px;
  transition: var(--transition);
}

.footer-section a:hover {
  color: white;
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #b2bec3;
  font-size: 0.9rem;
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
  .hero .container,
  .analysis-container,
  .contact-container {
    grid-template-columns: 1fr;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .result-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero-content h1 {
    font-size: 2.8rem;
  }
}

@media (max-width: 1168px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow);
    z-index: 1000;
  }

  .nav-menu.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    padding: 150px 0 80px;
    margin-top: -10px;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-btns {
    flex-direction: column;
    gap: 15px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .diseases-grid {
    grid-template-columns: 1fr;
  }

  .upload-area {
    min-height: 300px;
    padding: 30px 20px;
  }

  .analysis-container {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .contact-container {
    padding: 20px;
  }

  .disease-categories {
    flex-direction: column;
    align-items: stretch;
  }

  .category-btn {
    width: 100%;
  }
}

/* ===== AI MEDICAL REPORT ===== */
.ai-report {
  background: #0f172a;
  color: #e5e7eb;
  padding: 20px;
  border-radius: 14px;
  font-family: "Courier New", monospace;
  animation: reportIn 0.7s ease;
}

@keyframes reportIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.report-line {
  margin-bottom: 8px;
  opacity: 0;
  animation: lineIn 0.4s forwards;
}

@keyframes lineIn {
  to {
    opacity: 1;
  }
}

.report-title {
  color: #38bdf8;
  font-weight: bold;
  margin-bottom: 12px;
}

.status {
  font-weight: bold;
}

.status.High {
  color: #ef4444;
}
.status.Medium {
  color: #f59e0b;
}
.status.Low {
  color: #22c55e;
}

.report-box {
  background: #020617;
  border-left: 4px solid #38bdf8;
  padding: 10px;
  margin-top: 10px;
  border-radius: 6px;
}

.cursor {
  display: inline-block;
  width: 8px;
  background: #38bdf8;
  animation: blink 1s infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}
.report-box ul li {
  margin-left: 15px;
}

.disease-image {
  height: 200px;
  position: relative;
  transition: all 0.4s ease;
}

.disease-card:hover .disease-image {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.disease-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 40%,
    rgba(154, 154, 154, 0.379)
  );
}
.upload-card.dragover {
  border-color: #6a4df4;
  background: rgba(106, 77, 244, 0.08);
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: linear-gradient(135deg, #eef2f7, #f8fafc);
}

/* Container */
.chat-container {
  max-width: 660px;
  margin: 35px auto;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Header */
.chat-header {
  padding: 15px;
  font-weight: 600;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 14px 14px 0 0;
}

/* Chat box */
#chat-box {
  height: 0; /* 🔥 initially hidden */
  max-height: 380px; /* existing height */
  padding: 0 18px; /* vertical padding removed initially */
  overflow-y: auto;
  scroll-behavior: smooth;
  line-height: 1.6;

  transition: height 0.3s ease, padding 0.3s ease;
}

/* When active (messages present) */
#chat-box.active {
  height: 380px;
  padding: 18px;
}

/* User message */
.user {
  max-width: 70%;
  width: fit-content;
  display: inline-block;

  margin-left: auto;
  margin-bottom: 12px;
  background: #2563eb;
  color: white;
  padding: 10px 14px;
  border-radius: 16px 16px 6px 16px;
  font-size: 14px;

  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;

  animation: msgIn 0.25s ease-out;
}

/* Bot message */
.bot {
  max-width: 100%;
  width: fit-content;
  display: inline-block;

  margin-right: auto;
  margin-bottom: 12px;
  background: #f3f4f6;
  color: #1f2937;
  padding: 10px 14px;
  border-radius: 16px 16px 16px 6px;

  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;

  font-family: Consolas, monospace;
  font-size: 13.5px;

  animation: msgIn 0.25s ease-out;
}

/* Bot sub-headings */
.bot .sub-heading {
  color: #111827;
  font-weight: 700;
  display: block;
  margin-top: 10px;
  margin-bottom: 4px;
}

/* Input area */
.input-area {
  display: flex;
  background: #fafafa;
  margin: 6px;
  border: 1px solid #2563eb;
  border-radius: 14px;
}

/* Textarea */
.input-area textarea {
  flex: 1;
  padding: 14px;
  border: none;
  outline: none;
  resize: none;

  font-size: 14px;
  line-height: 1.4;

  min-height: 45px;
  max-height: 0px;
  overflow-y: auto;

  background: transparent;
  border-radius: 14px 0 0 14px;
}

/* Hide textarea scrollbar */
.input-area textarea::-webkit-scrollbar {
  display: none;
}
.input-area textarea {
  scrollbar-width: none;
}

/* Button */
.input-area button {
  padding: 0 22px;
  border: none;
  border-radius: 0 14px 14px 0;
  background: #2563eb;
  color: white;
  cursor: pointer;
  font-size: 14px;
}
.input-area button:active {
  transform: scale(0.95);
}

/* Center arrow */
#centerDownArrow {
  position: absolute;
  bottom: 95px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  display: none;

  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgb(255, 255, 255);
  border: 1px solid #d1d5db;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);

  transition: opacity 0.2s ease, transform 0.2s ease;
}

#centerDownArrow.show {
  display: block;
  opacity: 2;
}

/* Animations */
@keyframes msgIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Chat input glow when auto-filled */
.auto-fill-glow {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
  transition: box-shadow 0.3s ease;
}

/* 🔥 Chat should span full analyzer width */
.analyzer-box .chat-container {
  grid-column: 1 / -1; /* span both columns */
  width: 100%;
  max-width: 100%;
}
#chat-box {
  display: flex;
  flex-direction: column; /* 🔥 MUST be column */
}
/* ===== PAGE LOADER ===== */
#page-loader {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #eef2ff, #dbeafe);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

/* glowing ring */
.loader-ring {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 5px solid rgba(59, 130, 246, 0.2);
  border-top-color: #7c3aed;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.8);

  animation: spin 1.2s linear infinite, glow 1.8s ease-in-out infinite;
}

/* loading text */
.loader-text {
  margin-top: 18px;
  font-size: 15px;
  font-weight: 500;
  color: #1e3a8a;
  letter-spacing: 0.5px;
  animation: pulseText 1.6s ease-in-out infinite;
}

/* spinner animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* glow animation */
@keyframes glow {
  0% {
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
  }
  50% {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.9);
  }
  100% {
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
  }
}

/* text pulse */
@keyframes pulseText {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* smooth hide animation */
#page-loader.hide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

/* ===== NEAT & CLEAN AUDIO ===== */
#ttsPlayer {
  width: 220px;
  height: 40px;
  border-radius: 10px;
  background-color: #ffffff;
  border: 1px solid #ffffff;
  outline: none;
}

/* Chrome / Edge / Brave */
#ttsPlayer::-webkit-media-controls-panel {
  background-color: #ffffff;
  border-radius: 10px;
}

/* Hide extra controls */
#ttsPlayer::-webkit-media-controls-timeline,
#ttsPlayer::-webkit-media-controls-current-time-display,
#ttsPlayer::-webkit-media-controls-time-remaining-display,
#ttsPlayer::-webkit-media-controls-volume-slider,
#ttsPlayer::-webkit-media-controls-mute-button,
#ttsPlayer::-webkit-media-controls-overflow-button {
  display: none !important;
}

/* Play / Pause button */
#ttsPlayer::-webkit-media-controls-play-button {
  background-color: #2563eb;
  border-radius: 50%;
  width: 30px;
  height: 30px;
}

/* Firefox fallback */
#ttsPlayer {
  accent-color: #2563eb;
}
