body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f9;
  box-sizing: border-box;
}

#box1 {
  text-align: center;
  padding: 15px;
  /* background-color: #004793; */
  background-color: #586F8C;
  margin-bottom: 20px;
  box-shadow: 0 10px 10px rgb(156, 156, 156);
  overflow-x: hidden;
}

#box1 h1 {
  display: inline-block;
  border: 5px solid rgb(0, 147, 152);
  padding: 20px;
  background-color: #D9D9D9;
  background-color: #f4f4f9;
  letter-spacing: 2px;
  border-radius: 30px;
  animation: bnrotate 0.8s ease-in-out both 2;

}

@keyframes bnrotate {
  0% {
    transform: rotate(0deg) translate3d(0, 0, 0);
  }

  25% {
    transform: rotate(3deg) translate3d(0, 0, 0);
  }

  50% {
    transform: rotate(-3deg) translate3d(0, 0, 0);
  }

  75% {
    transform: rotate(1deg) translate3d(0, 0, 0);
  }

  100% {
    transform: rotate(0deg) translate3d(0, 0, 0);
  }
}

.intro {
  margin: 20px;
  overflow-x: hidden;
}

.intro h1 {
  color: rgb(0, 147, 152);
  font-size: 40px;
  margin-bottom: 5px;
}

.intro h1,
.intro h2 {
  margin-bottom: 10px;
}

.editor {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  overflow-x: hidden;
}

textarea:focus {
  background-color: rgb(241, 240, 240);
  box-shadow: 8px 8px 8px 8px #d4d4d4;
  outline: none;
}

textarea {
  max-width: 600px;
  /* Prevents it from being too wide */
  min-width: 280px;
  /* Ensures it doesn't get too small */
  height: 200px;
  padding: 10px;
  font-family: monospace;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 15px;
  resize: none;
  margin: 10px;
}

#run-code {
  padding: 10px 20px;
  letter-spacing: 2px;
  background-color: #004793;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  display: block;
  margin: 20px auto;
  /* Auto centers the button horizontally */
  overflow-x: hidden;
}

#run-code:hover {
  background-color: #1f0101;
  animation: pop 0.5s;
  /*  Apply the pop animation */
}

@keyframes pop {
  40% {
    transform: scale(1.4);
  }

  60% {
    transform: scale(0.8);
  }

  80% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

#iframe_container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  /* Ensures it takes full width */
}

iframe {
  width: 95%;
  margin: 10px;
  height: 300px;
  border: 1px solid #ccc;
  border-radius: 5px;/
}



@media (max-width: 700px) {

  .intro h1 {
    font-size: 30px;
  }

  textarea {
    max-width: 400px;
    min-width: 250px;
    height: 150px;
    /* Slightly reduce height for small screens */
  }
}

@media (max-width: 455px) {

  .intro h1,
  .intro h2 {
    font-size: 25px;
  }

  #box1 h1 {
    font-size: 20px;
  }
}

@media (max-width: 390px) {

  .intro h1,
  .intro h2 {
    font-size: 18px;
  }

  #box1 h1 {
    font-size: 15px;
  }
}




/* iske andr 2 add left right me or bich me mainbox aayega */

.compiler-ad-container {
    display: flex;
    justify-content: space-between;
    /* Ads ko corners pe bhej dega */
    align-items: flex-start;
    width: 100%;
    /* Full page width */
    max-width: 100%;
    /* Ensure it takes full space */
    gap: 20px;
}

/* ads ka width height di h */
.compilerAd {
    width: 200px;
    /* Ad ka width */
    height: 500px;
    margin: 10px 2px;
    flex-shrink: 0;    
    overflow: hidden;
}


/* Side columns → ads stack upar–neeche */
.compiler-ad-column {
    display: flex;
    flex-direction: column;
    gap: 90px; /* dono ads ke beech ka gap */
}

/* Default: only first ads visible */
.second-left-compiler-ad,
.second-right-compiler-ad {
    display: none;
}

/*  1095px–951px → dono ads dikhao (total 4 visible) */
@media (max-width: 1095px) and (min-width: 951px) {
    .second-left-compiler-ad,
    .second-right-compiler-ad {
        display: block;
        height: 400px;
    }
}

@media (max-width: 950px) {

    .left-compiler-ad {
        display: none;
    }

    .compilerAd {
        flex-shrink: 0;
    }
}


.pageCourseBottomAd{
	display: none;
}

@media (max-width: 800px) {
    .compiler-ad-column{
    	display: none;
    }
    .pageCourseBottomAd {
        display:flex;
        height: 120px;       /* Banner height */
        max-height: 180px;
        margin: 2px auto 20px auto;
		width: 100%;        /* पूरी width ले */
        max-width: 728px;   /* Adsense का सबसे common horizontal banner size */
    }

}

