* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}



body {
  background: linear-gradient(-45deg, #1e88e5, #43cea2, #f7971e, #fd1d1d);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: #333;
  line-height: 1.6;
}

@keyframes gradientBG {
    0% {background-position:0% 50%;}
    50% {background-position:100% 50%;}
    100% {background-position:0% 50%;}
}

.controller {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#mainheader {
  background: linear-gradient(140deg, #1e3c72, #2a5298);
  color: #fff;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
#result {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background: #fff;
  color: #000;
  border-radius: 10px;
  font-size: 1rem;
  line-height: 1.5;
  word-wrap: break-word;
}

#result.show {
  opacity: 1;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#mainheader h1 {
  font-size: 1.8rem;
  font-weight: 600;
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s;
}

.hamburger:hover,
.hamburger:focus {
  transform: scale(1.1);
  outline: none;
}

#topmenue {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: linear-gradient(140deg, #1e3c72, #2a5298);
  margin: 1rem auto;
  max-width: 1200px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#topmenue button {
  display: flex;
  align-items: center;
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

#topmenue button:hover,
#topmenue button:focus {
  background: #c0392b;
  transform: scale(1.05);
  outline: none;
}

.resized-image {
  width: 30px;
  height: 20px;
  border-radius: 4px;
  margin-right: 0.5rem;
  object-fit: cover;
  max-width: 100%;
}

.hero {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  color: #fff;
  margin-bottom: 1rem;
  transition: opacity 0.5s;
}

.hero.visible {
  opacity: 1;
}

.secondheading {
  font-size: 1.5rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  background: #e74c3c;
  color: #fff;
  border-radius: 10px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto 1rem;
}

.cta {
  background: #fff;
  color: #1e3c72;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.cta:hover,
.cta:focus {
  background: #f0f0f0;
  transform: scale(1.05);
  outline: none;
}

.searchoption {
  text-align: center;
  margin: 1rem 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.search {
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 100%;
  max-width: 300px;
  transition: border-color 0.3s;
}

.search:focus {
  border-color: #e74c3c;
  outline: none;
}

.searchoption button {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

.searchoption button:hover,
.searchoption button:focus {
  background: #c0392b;
  outline: none;
}

#belowsearch {
  text-align: center;
  background: #fff;
  padding: 1rem;
  margin: 1rem auto;
  max-width: 800px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

#belowsearch:hover {
  transform: translateY(-2px);
}

.NPMbriefbuttons {
  font-size: 1.2rem;
  background: #1e3c72;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

.NPMbriefbuttons:hover,
.NPMbriefbuttons:focus {
  background: #2a5298;
  outline: none;
}

.NPMbriefbutton {
  font-size: 1rem;
  background: #fff;
  color: #e74c3c;
  border: 1px solid #e74c3c;
  padding: 0.5rem;
  border-radius: 6px;
  width: 100%;
  max-width: 400px;
  margin: 0.5rem auto;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.NPMbriefbutton:hover,
.NPMbriefbutton:focus {
  background: #ffecec;
  transform: scale(1.02);
  outline: none;
}

.section-content {
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 6px;
  margin: 0.5rem 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.section-content[style*="block"] {
  max-height: 500px;
  padding: 1rem;
}

.chatbox {
  width: 100%;
  max-width: 700px;
  margin: 2rem auto;
  background: white;
  padding: 1rem;
  border-radius: 2px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#chatlog {
  height: 200px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #ccc;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  background: black;
  font-size: 0.9rem;
  color: white;
}

.chat-input {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

#userInput {
  flex: 1;
  min-width: 200px;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

#userInput:focus {
  border-color: #e74c3c;
  outline: none;
  color: red;
}

.chatbox button {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

.chatbox button:hover,
.chatbox button:focus {
  background: #c0392b;
  outline: black;
}

@media (max-width: 768px) {
  #mainheader h1 {
    font-size: 1.5rem;
  }

  .hamburger {
    display: block;
  }

  #topmenue {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
  }

  #topmenue.active {
    display: flex;
  }

  #topmenue button {
    width: 100%;
    justify-content: flex-start;
  }

  .secondheading {
    font-size: 1.2rem;
  }

  .NPMbriefbutton {
    font-size: 0.9rem;
    max-width: 100%;
  }

  .chatbox {
    width: 90%;
    background-color: black;
    color: blue;

  }

  .search {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  #mainheader h1 {
    font-size: 1.2rem;
  }

  .hero {
    padding: 1rem;
  }

  .secondheading {
    font-size: 1rem;
  }

  .NPMbriefbuttons {
    font-size: 1rem;
  }
}

#result {
  background: #fff;
  /* or #f9f9f9 for a very light gray */
  color: #222;
  /* dark text for readability */
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-top: 1rem;
  word-break: break-word;
  min-height: 40px;
  width: 100%;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(.4,2,.3,1), transform 0.7s cubic-bezier(.4,2,.3,1);
}

#result.show {
  opacity: 1;
  transform: translateY(0);
}

#searchBox {
  width: 520px;
  height: 50px;
  padding: 0 20px;
  color: #1a1a1a;
  font-size: 18px;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(to right, #e3f2fd, #ffffff);
  border: 2px solid rgba(30, 144, 255, 0.5);
  border-radius: 30px;
  outline: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease-in-out;
  backdrop-filter: blur(8px);
  animation: breathing 3s ease-in-out infinite;
  letter-spacing: 0.5px;
  text-align: left;
  position: relative;
  z-index: 1;
}

#searchBox::placeholder {
  color: #888;
  transition: color 0.3s ease;
}

#searchBox:hover::placeholder {
  color: #333;
}

#searchBox:hover {
  background: linear-gradient(to right, #d0ebff, #f0faff);
  border-color: #1e90ff;
  box-shadow: 0 6px 20px rgba(30, 144, 255, 0.3);
  transform: scale(1.02);
}

#searchBox:focus {
  background: #ffffff;
  border-color: #0077ff;
  box-shadow: 0 0 15px rgba(0, 119, 255, 0.5),
    inset 0 0 5px rgba(0, 119, 255, 0.1);
  animation: neonPulse 1.2s infinite alternate;
}

@keyframes breathing {
  0% {
    box-shadow: 0 0 8px rgba(30, 144, 255, 0.1);
  }

  50% {
    box-shadow: 0 0 14px rgba(30, 144, 255, 0.2);
  }

  100% {
    box-shadow: 0 0 8px rgba(30, 144, 255, 0.1);
  }
}

@keyframes neonPulse {
  0% {
    border-color: rgba(0, 119, 255, 0.7);
    box-shadow: 0 0 10px rgba(0, 119, 255, 0.3),
      0 0 20px rgba(0, 119, 255, 0.2);
  }

  100% {
    border-color: rgba(0, 119, 255, 1);
    box-shadow: 0 0 20px rgba(0, 119, 255, 0.5),
      0 0 40px rgba(0, 119, 255, 0.3);
  }
}

/* Responsive width on small devices */
@media screen and (max-width: 600px) {
  #searchBox {
    width: 90%;
    font-size: 16px;
    padding-left: 30px;
    letter-spacing: 1px;
    font-weight: 500;
  }
}

/* Animated border effect */
#searchBox::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #00c6ff, #0072ff, #00c6ff);
  z-index: -1;
  filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 32px;
}

#searchBox:focus::before {
  opacity: 1;
}

/* Typing effect animation hint */
@keyframes typingHint {
  0% {
    letter-spacing: 0.5px;
  }

  50% {
    letter-spacing: 1.5px;
  }

  100% {
    letter-spacing: 0.5px;
  }
}

#searchBox:focus {
  animation: typingHint 1s infinite alternate;
}

/* Subtle shake on invalid input (optional usage) */
@keyframes shake {
  0% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-2px);
  }

  50% {
    transform: translateX(2px);
  }

  75% {
    transform: translateX(-2px);
  }

  100% {
    transform: translateX(0);
  }
}

/* Glow border when valid (optional future use) */
#searchBox.valid {
  border-color: #00ff88;
  box-shadow: 0 0 10px #00ff88;
}

.h3title {
  text-align: center;
  font-size: 50px;
  font-weight: bold;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.searchengine {
  color: #1a1a1a;
  font-size: 50px;
  text-align: center;
  background: linear-gradient(90deg, #ffecec, #fff8f8);
  padding: 20px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(255, 0, 0, 0.1);
  animation: fadeInSlide 1.5s ease-out, glowPulse 2s ease-in-out infinite;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* Fade and slide from bottom on load */
@keyframes fadeInSlide {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glow pulse animation */
@keyframes glowPulse {
  0% {
    text-shadow: 0 0 5px #ff7b7b, 0 0 10px #ff7b7b, 0 0 15px #ffa6a6;
  }

  50% {
    text-shadow: 0 0 10px #ff4d4d, 0 0 20px #ff4d4d, 0 0 30px #ffa6a6;
  }

  100% {
    text-shadow: 0 0 5px #ff7b7b, 0 0 10px #ff7b7b, 0 0 15px #ffa6a6;
  }
}

/* Optional: border-light animation on hover */
.searchengine:hover {
  animation: glowPulseHover 1.2s ease-in-out infinite;
  background: linear-gradient(90deg, #fff0f0, #ffecec);
}

@keyframes glowPulseHover {
  0% {
    text-shadow: 0 0 8px #ff9999, 0 0 15px #ff6666;
  }

  50% {
    text-shadow: 0 0 12px #ff3333, 0 0 25px #ff9999;
  }

  100% {
    text-shadow: 0 0 8px #ff9999, 0 0 15px #ff6666;
  }
}

h1,
h2,
h3,
.h3title,
.secondheading {
  position: relative;
  display: inline-block;
}

h1::after,
h2::after,
.secondheading::after,
.h3title::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0%;
  height: 3px;
  background-color: #e74c3c;
  transition: width 0.4s ease, left 0.4s ease;
}

h1:hover::after,
h2:hover::after,
.secondheading:hover::after,
.h3title:hover::after {
  width: 100%;
  left: 0%;
}

button,
.cta,
.NPMbriefbuttons,
.NPMbriefbutton {
  transition: all 0.3s ease-in-out;
}

button:hover,
.cta:hover,
.NPMbriefbuttons:hover,
.NPMbriefbutton:hover {
  transform: scale(1.05);
}

.chatbox {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#userInput:focus {
  border-image: linear-gradient(to right, #e74c3c, #1e90ff) 1;
}

@media (max-width: 480px) {
  .searchengine {
    font-size: 36px;
    padding: 15px;
  }

  #searchBox {
    height: 45px;
  }

  .NPMbriefbutton,
  .NPMbriefbuttons {
    font-size: 1rem;
    width: 90%;
  }

  header,
  .secondheading {
    font-size: 1.2rem;
  }
}

.card-hover {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.card-hover:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.visible {
  opacity: 1;
  transform: none;
}

.ripple-button {
  position: relative;
  overflow: hidden;
}

.ripple-button::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.ripple-button:active::after {
  top: var(--y);
  left: var(--x);
  width: 20px;
  height: 20px;
}

.glow-border {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.glow-border::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  background: linear-gradient(45deg, #00c6ff, #0072ff, #00c6ff);
  animation: glowLoop 4s linear infinite;
  z-index: -1;
  filter: blur(8px);
  opacity: 0.6;
}

@keyframes glowLoop {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.typing-effect {
  overflow: hidden;
  border-right: 3px solid #e74c3c;
  white-space: nowrap;
  width: 0;
  animation: typing 4s steps(40, end) forwards;
}

@keyframes typing {
  from {
    width: 0
  }

  to {
    width: 100%
  }
}

.NPMbriefbutton {
  animation: popIn 0.6s ease-in-out;
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.flip-card {
  perspective: 1000px;
}

.flip-inner {
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-inner {
  transform: rotateY(180deg);
}

/* ========== Base Styling ========== */
body.controller {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  color: #fff;
  margin: 0;
  padding: 0;
  animation: fadeIn 1s ease-in-out;
}

/* ========== Header ========== */
#mainheader {
  background-color: rgba(0, 0, 0, 0.7);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  animation: slideDown 0.8s ease-in-out;
}

.header-container h1 {
  font-size: 2rem;
  animation: popIn 0.5s ease-in-out;
}

.hamburger {
  font-size: 2rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.hamburger:hover {
  transform: rotate(90deg);
}

/* ========== Navigation Buttons ========== */
#topmenue button {
  background-color: #0d6efd;
  color: white;
  border: none;
  margin: 6px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

#topmenue button:hover {
  background-color: #00397a;
  transform: scale(1.05);
}

/* ========== Hero Section ========== */
.hero {
  text-align: center;
  padding: 3rem 1rem;
  animation: fadeUp 1s ease-in-out;
}

.typing-effect {
  display: inline-block;
  border-right: 2px solid white;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  animation: typing 4s steps(30, end) forwards, blink 0.7s infinite;
}

@keyframes typing {
  from {
    width: 0
  }

  to {
    width: 100%
  }
}

@keyframes blink {
  50% {
    border-color: transparent
  }
}

/* ========== CTA Button ========== */
.cta {
  background: #ff8c00;
  color: white;
  border: none;
  padding: 14px 24px;
  font-size: 1.1rem;
  margin-top: 20px;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  animation: pulse 2s infinite;
}

.cta:hover {
  background-color: #ffa500;
  transform: scale(1.05);
}

/* ========== Chatbox ========== */
.chatbox {
  text-align: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin: 2rem auto;
  max-width: 900px;
  animation: fadeIn 1s ease;
}

.chatbox input,
.chatbox button {
  padding: 10px;
  margin-top: 10px;
  border-radius: 8px;
  border: none;
}

/* ========== NPMbriefbuttons ========== */
.NPMbriefbuttons {
  display: block;
  margin: 20px auto;
  padding: 12px 20px;
  background-color: #20c997;
  color: white;
  font-size: 1.2rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.NPMbriefbuttons:hover {
  background-color: #198754;
  transform: scale(1.05);
}

/* ========== Individual Section Buttons ========== */
.NPMbriefbutton {
  background: #6610f2;
  color: #fff;
  border: none;
  padding: 10px 18px;
  margin: 5px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

.NPMbriefbutton:hover {
  background: #8540f5;
  transform: translateY(-2px);
}

/* ========== Section Content Reveal ========== */
.section-content {
  background: rgba(0, 0, 0, 0.5);
  padding: 1rem;
  margin: 1rem;
  border-radius: 8px;
  animation: fadeIn 0.6s ease-in-out;
}

/* ========== Animations ========== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes popIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes floatUp {
  0% {
    transform: translateY(10px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes scaleFadeIn {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.scale-fade-in {
  animation: scaleFadeIn 0.7s ease-out;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.zoom-in {
  animation: zoomIn 0.6s ease-out forwards;
}

@keyframes bounceIn {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }

  60% {
    transform: scale(1.05);
    opacity: 1;
  }

  100% {
    transform: scale(1);
  }
}

.bounce-in {
  animation: bounceIn 1s ease;
}

@media(max-width: 600px) {
  #result {
    padding: 0.5rem;
    font-size: 1rem;
    border-radius: 6px;
    min-height: 30px;
    width: 95%;
    /* ✅ Fix: use 95% or 100% */
    margin: 0 auto;
    box-sizing: border-box;
  }
}

/* Make search result area look good on all screens */
#result {
  background: #fff;
  color: #222;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-top: 1rem;
  min-height: 40px;
  width: 100%;
  max-width: 1000px;
  word-break: break-word;
  font-size: 1.1rem;
  box-sizing: border-box;
}

/* Mobile view ke liye */
@media (max-width: 600px) {
  #result {
    width: 95%;
    font-size: 1rem;
    padding: 0.7rem;
    margin-left: auto;
    margin-right: auto;
    min-height: 40px;
  }
}

.about {
  background: linear-gradient(140deg, #1e3c72, #2a5298);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  color: #fff;
  width: 50px;

}

#aboutModal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  background: linear-gradient(135deg, #1e3c72 80%, #2a5298 100%);
  border: 2px solid #333;
  border-radius: 16px;
  padding: 1.5rem 1.2rem;
  z-index: 2000;
  min-width: 250px;
  max-width: 96vw;
  max-height: 85vh;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  animation: modalPopIn 0.5s cubic-bezier(.39,.575,.565,1) both;
  overflow-y: auto;
  color: #fff;
}

@keyframes modalPopIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.85);
    box-shadow: 0 0 0 rgba(0,0,0,0);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  }
}

#aboutModal h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #ffe082;
  text-align: center;
  letter-spacing: 1px;
  animation: fadeIn 0.7s;
}

#aboutModal ol {
  color: #fff;
  font-size: 1.08rem;
  margin-bottom: 1.2rem;
  padding-left: 1.2rem;
}

#aboutModal li strong {
  color: #ffd54f;
}

#aboutModal .closebtn {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  margin: 0 auto;
  display: block;
  transition: background 0.3s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#aboutModal .closebtn:hover {
  background: #c0392b;
  transform: scale(1.07);
}

@media (max-width: 600px) {
  #aboutModal {
    width: 98vw;
    max-width: 98vw;
    max-height: 80vh;
    padding: 1rem 0.5rem;
    font-size: 1rem;
  }
  #aboutModal h2 {
    font-size: 1.1rem;
  }
  #aboutModal ol {
    font-size: 0.98rem;
    padding-left: 0.8rem;
  }
}

button, .cta, .NPMbriefbutton, .NPMbriefbuttons {
    transition: box-shadow 0.2s, transform 0.2s, background 0.2s;
    box-shadow: 0 2px 8px #0002;
}
button:hover, .cta:hover, .NPMbriefbutton:hover, .NPMbriefbuttons:hover {
    background: #43cea2;
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 6px 24px #43cea299;
}
button:active, .cta:active, .NPMbriefbutton:active, .NPMbriefbuttons:active {
    background: #fd1d1d;
    transform: scale(0.98);
}

#gameOverlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.7);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    animation: fadeIn 0.7s;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
#cartoonRunner {
    background: linear-gradient(to top, #e0f7fa 80%, #fff 100%);
    border-radius: 18px;
    box-shadow: 0 4px 24px #0002;
    overflow: hidden;
    height: 500px;
    width: 200px;
}
#runnerImg {
    transition: bottom 0.2s;
    border-radius: 50%;
    height: 100px;
}

/* Animated emoji character styles */
.emoji-character {
    position: absolute;
    left: 180px;
    bottom: 60px;
    z-index: 2;
    animation: bounce 1.2s infinite, wave 2.5s infinite;
    transform-origin: bottom center;
}
.emoji-face {
    font-size: 3rem;
    display: inline-block;
    animation: waveHand 2.5s infinite;
}

/* Bouncing animation */
@keyframes bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    20% { transform: translateY(-18px) scale(1.1); }
    40% { transform: translateY(-28px) scale(1.12); }
    60% { transform: translateY(-18px) scale(1.1); }
    80% { transform: translateY(0) scale(1); }
    100% { transform: translateY(0) scale(1); }
}

/* Waving animation (rotation) */
@keyframes waveHand {
    0%, 100% { transform: rotate(0deg);}
    10% { transform: rotate(-10deg);}
    20% { transform: rotate(15deg);}
    30% { transform: rotate(-10deg);}
    40% { transform: rotate(10deg);}
    50% { transform: rotate(0deg);}
}
/* ✨ Improvement Start: Sticky header with softer shadow on mobile */
@media (max-width: 600px) {
  #mainheader {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    padding: 0.7rem 1rem;
  }
}
/* ✨ Improvement End */
/* ✨ Improvement Start: Better text & spacing for mobile */
@media (max-width: 480px) {
  .hero {
    padding: 1.2rem 0.8rem;
  }

  .hero p,
  .secondheading,
  .chatbox,
  .searchoption,
  .searchengine,
  #result,
  #aboutModal {
    font-size: 0.95rem !important;
    line-height: 1.4;
  }

  #mainheader,
  .searchengine {
    padding: 10px;
    text-align: center;
  }

  .searchoption {
    flex-direction: column;
  }

  .cta,
  .NPMbriefbuttons,
  .NPMbriefbutton,
  #userInput,
  .chatbox button {
    width: 100%;
    font-size: 1rem;
  }

  .search {
    width: 100%;
  }

  .emoji-character {
    left: 50%;
    transform: translateX(-50%);
    bottom: 40px;
  }

  .emoji-face {
    font-size: 2.2rem;
  }
}
/* ✨ Improvement End */
/* ✨ Improvement Start: Smooth scroll for section linking */
html {
  scroll-behavior: smooth;
}
/* ✨ Improvement End */
/* ✨ Improvement Start: Larger touch target for buttons */
button,
.NPMbriefbuttons,
.NPMbriefbutton,
.cta {
  min-height: 44px;
}
/* ✨ Improvement End */
/* ✨ Improvement Start: Hero animation and size optimization */
@media screen and (max-width: 600px) {
  .typing-effect {
    font-size: 1.2rem;
    animation: typing 3s steps(20, end) forwards;
  }

  .hero h1,
  .h3title {
    font-size: 1.5rem !important;
    text-align: center;
  }
}
/* ✨ Improvement End */
/* ✨ Improvement Start: Responsive modal scaling */
@media (max-width: 480px) {
  #aboutModal {
    transform: translate(-50%, -50%) scale(0.96);
    padding: 1rem;
  }

  #aboutModal h2 {
    font-size: 1.2rem;
  }

  #aboutModal ol {
    font-size: 0.95rem;
  }
}
/* ✨ Improvement End */
/* ✨ Improvement Start: Prevent overflow flickers */
body.modal-open {
  overflow: hidden;
}
/* ✨ Improvement End */
.animated-section {
      transition: transform 0.4s ease-out, opacity 0.4s ease-out;
    }
    .fade-up {
      transform: translateY(30px);
      opacity: 0;
    }
    .fade-up.show {
      transform: translateY(0);
      opacity: 1;
    }
@media ( max-width:280px) {
  *{
    width:280px
  }

  #result{
    width: 250px;
  }
   #cartoonRunner {
    width: 100%;
    height: 300px;
    position: relative;
  }
}   
#refsonu{
  color: white;

}
#refsonu:hover{
  color: red;
  text-decoration: none;
}

