* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border: 0;
  text-decoration: none;
}

body {
  width: 100vw;
  height: 100%;
  /* background-color: #33f !important; */
  background-image: url(../img/bg.jpeg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

.nav {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  z-index: 999;
}

.nav .navbar-title {
  padding: 1rem;
  position: relative;
  background-image: url(../img/city.jpg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.nav .navbar-title::after {
  content: "";
  position: absolute;
  background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
}

.nav .navbar-title h1 {
  position: relative;
  z-index: 2;
  margin-left: 100px;
}

.nav .navbar-title .logo {
  position: absolute;
  top: 1.5rem;
}

.nav .navbar-title .location {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: #fff;
  z-index: 2;
}

.nav h1 {
  color: #fff;
  padding: 1.2rem;
  text-align: center;
}

/* navbar menu */
.nav .navbar-menu {
  display: flex;
  justify-content: space-around;
  align-items: center;
  transition: opacity 0.5s ease;
}

.nav .navbar-menu .menu {
  flex: 1;
  text-align: center;
  align-content: center;
  height: 5rem;
  cursor: pointer;
}

.nav .navbar-menu .menu1 {
  background: linear-gradient(to bottom, #00f, rgba(0, 0, 255, 0));
}

.nav .navbar-menu .menu2 {
  background: linear-gradient(to bottom, #f00, rgba(255, 0, 0, 0));
}

.nav .navbar-menu .menu3 {
  background: linear-gradient(to bottom, #0f0, rgba(0, 255, 0, 0));
}

.nav .navbar-menu .menu4 {
  background: linear-gradient(to bottom, #ff0, rgba(255, 255, 0, 0));
}

.nav .navbar-menu .menu span {
  text-decoration: none;
  color: #000;
  font-size: 2rem;
}
/* navbar menu end */

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: 12rem;
  min-height: calc(100vh-12rem-60px);
}

.main .content {
  /* max-width: 100vw; */
  flex: 1;
  width: 80vw;
  margin: auto;
  scroll-margin-top: 12rem;
  margin-bottom: 1rem;
  /* min-height: 90vh; */
  /* flex: 1 1 85rem; */
  /* overflow-y: auto; */
}

.main .content h3 {
  padding: 1rem 2rem;
  display: flex;
  font-size: 2rem;
  justify-content: center;
  text-align: center;
}

.main .content .data {
  display: flex;
  justify-content: space-between;
  align-items: self-start;
}

.main .content .data .data-circle {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.main .content .data .pb {
  flex: 3;
  display: flex;
  justify-content: space-evenly;
}

.main .content .data .data-circle h1 {
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  background-color: #00f;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto;
}

.main .content .data .data-circle p {
  margin-top: 1rem;
  max-width: 10rem;
  font-size: 1.2rem;
  text-align: center;
}

.main .content .data .data-circle h1 {
  color: #fff;
  font-size: 3.5rem;
}

.main .content .data .pb .data-info {
  font-size: 1.8rem;
  text-align: center;
  color: #fff;
  width: 20rem;
}

.main .content .data .data-info .berbahaya {
  background-color: #000;
  padding: 1rem;
  height: 4rem;
}

.main .content .data .data-info .sangattidaksehat {
  background-color: #f00;
  align-content: center;
  height: 4rem;
}

.main .content .data .data-info .tidaksehat {
  background-color: #ff0;
  align-content: center;
  color: #000;
  height: 4rem;
}

.main .content .data .data-info .sedang {
  background-color: #00f;
  align-content: center;
  height: 4rem;
}

.main .content .data .data-info .baik {
  background-color: #090;
  align-content: center;
  height: 4rem;
}

.main .content .data .data-indexPM .box,
.main .content .data .data-indexCO .box {
  position: relative;
  width: 10rem;
  height: 20rem;
  /* background-color: #fff; */
  border: 1px solid #000;
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;

  background-color: rgba(0, 150, 255, 0.1); /* isi transparan */
  border-left: 4px solid #000;
  border-right: 4px solid #000;
  border-bottom: 6px solid #000;
  border-radius: 0 0 20px 20px; /* lengkung di bawah */
}

.main .content .data .data-indexPM p,
.main .content .data .data-indexCO p {
  text-align: center;
  font-size: 2rem;
}

.main .content .data .data-indexPM .box .val {
  bottom: 0;
  width: 10rem;
  height: 10rem;
  /* background-color: #00f; */
  position: relative;
  overflow: hidden;
}

.main .content .data .data-indexCO .box .val {
  bottom: 0;
  width: 10rem;
  height: 5rem;
  /* background-color: #00f; */
  position: relative;
  overflow: hidden;
}

.main .content .data .data-indexPM .box .txt,
.main .content .data .data-indexCO .box .txt {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  text-shadow: 1px 1px 3px #fff;
}

.bubble {
  position: absolute;
  bottom: -100px;
  width: 20px;
  height: 20px;
  /* background: rgba(255, 255, 255, 0.6); */
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0.3) 40%,
    rgba(255, 255, 255, 0.05) 70%,
    transparent 100%
  );
  box-shadow: inset -4px -6px 12px rgba(255, 255, 255, 0.4),
    inset 4px 6px 12px rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  animation: rise 8s infinite ease-in;
}

@keyframes rise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) scale(1.3);
    opacity: 0;
  }
}

.main .content .datetime,
.main .content .place {
  font-weight: 600;
  font-size: 1.5rem;
  padding: 0.5rem 2rem;
}

.main .content .data {
  height: 80%;
}

#myChart {
  width: 100% !important;
  height: 30rem !important;
  padding: 0 3rem 3rem 3rem;
  margin: auto;
}

/* History */
.main .content .selection {
  margin-top: 1rem;
  display: flex;
  justify-content: space-around;
}

.main .content .selection .date {
  display: flex;
  justify-content: space-around;
}

.main .content .selection .date label {
  font-size: 1.2rem;
  font-weight: 800;
  padding: 1rem;
}

.main .content .selection .date .choose input {
  display: flex;
  flex-direction: column;
  font-size: 1.2rem;
  border: 1px solid #000;
  padding: 0.5rem;
  width: 20rem;
  margin-bottom: 10px;
}

.main .content .submitbutton {
  text-align: right;
}

.main .content .submitbutton button {
  margin: 2rem;
  font-size: 1.2rem;
  padding: 0.5rem;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid #000;
  box-shadow: 1px 1px 3px #000;
}

.main .content hr {
  width: 100%;
  border-bottom: 3px solid #000;
}

/* Table */

.main .content .table table {
  margin: 2rem;
  border-collapse: collapse;
  width: 95%;
  /* margin: 0 7%; */
  /* font-size: 1.5rem; */
}

.main .content .table table tr:nth-child(even) {
  background-color: #ddf;
  padding: 0 !important;
}

.main .content .table table tr:nth-child(odd) {
  background-color: #eef;
}

.main .content .table table th {
  background-color: #66f;
  color: #fff;
}

.main .content .table table tr:hover {
  background-color: #33f;
  color: #fff;
}

.main .content .table table th,
.main .content .table table td {
  font-size: 1rem;
  text-align: center;
  padding: 0;
  height: 10px;
}

table {
  border-collapse: collapse;
  margin: 0;
  padding: 0;
  width: auto;
  font-size: 10px;
  table-layout: fixed;
}

th,
td {
  text-align: center;
  line-height: 1;
  height: 1rem;
  vertical-align: middle;
  font-size: 10px;
}

.content .pm25,
.content .co {
  margin-bottom: 2rem;
}

.content .pm25 .title,
.content .co .title {
  font-size: 2rem;
}

.content .pm25 p,
.content .co p {
  font-size: 1.5rem;
  line-height: 1.5;
  text-align: justify;
}

p .tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

p .tooltip .tooltiptext {
  visibility: hidden;
  width: 160px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
}

p .tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

.footer {
  width: 100vw;
  background-color: #000;
  color: #fff;
  text-align: center;
  padding: 1rem;
  font-size: 1rem;
  border-top: 3px solid #00f;
}

.menu.active span {
  color: #fff !important;
  text-shadow: 1px 1px 3px #000;
  font-weight: bold;
}

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.pagination button {
  margin: 0 5px;
  padding: 10px 16px;
  font-size: 16px;
  border: 1px solid #007bff;
  background-color: #f2f2f2;
  color: #007bff;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination button:hover {
  background-color: #007bff;
  color: #fff;
}
