body {
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  padding: 20px;
}

/* ---------- Search Bar ---------- */
.search-box {
  max-width: 1200px;
  margin: 15px auto 20px;
  padding: 0 10px;
}

.search-box input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  border: none;
  outline: none;
  font-size: 16px;
  box-shadow: rgba(0, 0, 0, 0.15) 0px 5px 15px;
}

@media (max-width: 600px) {
  .search-box input {
    font-size: 14px;
    padding: 10px 14px;
  }
}

h1, h2 {
  background-image: radial-gradient(circle,
    #d16ba5, #c777b9, #ba83ca, #aa8fd8,
    #9a9ae1, #8aa7ec, #79b3f4, #69bff8,
    #52cffe, #41dfff, #46eefa, #5ffbf1);
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  box-shadow: rgba(0,0,0,0.25) 0 10px 25px;
}

/* ---------- BLOG GRID ---------- */
#blogs {
  max-width: 1200px;
  margin: 20px auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Tablet */
@media (max-width: 992px) {
  #blogs {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 600px) {
  #blogs {
    grid-template-columns: 1fr;
  }
}

/* ---------- BLOG CARD ---------- */
.blog {
  background: white;
  padding: 12px;
  border-radius: 12px;
  box-shadow: rgba(0,0,0,0.2) 0 6px 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.blog h3 {
  margin-bottom: 8px;
  margin-top: 8px;
  font-size: 25px;
}

.blog pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: inherit;
  font-size: 14px;
}

.blog-actions {
  display: flex;
  gap: 10px;
  padding: 0 16px 16px;
}

.btn-download {
  flex: 1;
  padding: 10px 16px;
  background-image: linear-gradient(to right top, #051937, #004d7a, #008793, #00bf72, #a8eb12);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
}

.btn-download:hover {
  opacity: 0.9;
}

/* ---------- IMAGE ---------- */
.img-wrap {
  position: relative;
  margin-bottom: 8px;
}

.img-wrap img {
  width: 100%;
  display: block;
  border-radius: 10px;
  cursor: pointer;
}

/* ---------- IMAGE CAPTION (FIXED) ---------- */
.img-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0));
  color: #fff;
  border-radius: 0 0 10px 10px;
}

.subtitle {
  font-size: 14px;
  font-weight: 600;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time {
  font-size: 12px;
  opacity: 0.85;
  white-space: nowrap;
}

/* ---------- IMAGE MODAL ---------- */
.img-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.img-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  font-weight: bold;
}

/* ---------- macOS DOCK ---------- */
.dock {
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 14px;
  padding: 12px 18px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(15px);
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  z-index: 9999;
}

.dock-item {
  width: 48px;
  height: 48px;
  box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
  background: rgba(255,255,255,0.25);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.dock-item:hover {
  transform: scale(1.4) translateY(-10px);
  background: rgba(255,255,255,0.5);
}



.h3 {
  font-size: 30px;
  margin-top: 20px;
  margin: 20px;
  font-family: sans-serif;
}
.overlays {
  color: #000000;
  transform: rotate3d();
  position: fixed;
  top: 0;
  animation-name: load;
  animation-duration: 10s;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  z-index: 9999;
}
.alert-box {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16rem;
  height: auto;
  padding: 20px;
  transform: translate(-50%, -50%);
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  text-align: center;
}
.alert-box p{
  margin: 10px;
}
@keyframes load {
  0% {
    background: rgb(250, 71, 71);
  }
  10% {
    background: rgb(106, 106, 237);
  }
  20% {
    background: pink;
  }
  30% {
    background: yellow;
  }
  40% {
    background: cyan;
  }
  50% {
    background: aqua;
  }
  60% {
    background: rgb(130, 238, 130);
  }
  70% {
    background: gray;
  }
  80% {
    background: peru;
  }
  90% {
    background: blanchedalmond;
  }
  100% {
    background: rgb(231, 113, 113);
  }
}

/* @keyframes load {
    from {background-color: cyan;}
    to {background-color: pink;}
  } */
.btnok {
  background-color: #000000;
  color: #fff;
  border: none;
  float: left;
  margin-left: 20px;
  padding: 6px 20px 6px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
}
.btnupdate {
  float: right;
  background-color: #00ffaa;
  color: #fff;
  border: none;
  letter-spacing: 0.02cm;
  margin-right: 20px;
  padding: 6px 20px 6px;
  border-radius: 5px;
  margin-top: 10px;
  cursor: pointer;
}
.btnupdate:hover {
  float: right;
  background-color: #5eefbf;
  color: #fff;
  border: none;
  margin-right: 20px;
  padding: 6px 20px 6px;
  border-radius: 5px;
  transform: scale(1.1);
  cursor: pointer;
}
@media (width > 600px) {

  .alert-box {
    position: absolute;
    top: 50%;
    left: 50%;
    width: auto;
    height: auto;
    padding: 30px;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    text-align: center;
  }
}