@keyframes fadeIn {
  0% { opacity: 0; }
  50% { opacity: 0.8; }
  100% { opacity: 1; }
}

@keyframes fadeOut {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes glitch {
  0% {
    clip-path: inset(0 0 0 0);
    transform: translate(0);
  }
  5% {
    clip-path: inset(5% 0 30% 0);
    transform: translate(-2px, -2px);
  }
  10% {
    clip-path: inset(20% 0 5% 0);
    transform: translate(2px, 2px);
  }
  15% {
    clip-path: inset(20% 0 20% 0);
    transform: translate(-1px, 1px);
  }
  20% {
    clip-path: inset(10% 0 20% 0);
    transform: translate(1px, -1px);
  }
  25% {
    clip-path: inset(20% 0 5% 0);
    transform: translate(0);
  }
  30% {
    clip-path: inset(0 0 0 0);
    transform: translate(0);
  }
}

body {
  margin: 0;
  font-family: Calluna, Arial, sans-serif;
  background: url("background.png") no-repeat center center fixed, #FEFCFF;
  background-size: cover;
  color: #e8ffff;
}

body.post-view {
  background: url("post-background.jpg") no-repeat center center fixed;
  background-size: cover;
}

.container {
  width: 100%;
  padding: 0 clamp(20px, 5vw, 60px);
  background: rgba(0, 1, 49, 0.45);
  backdrop-filter: blur(1px);
  border-radius: 5px;
  box-sizing: border-box;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 10px;
  padding: 10px 0;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.post-card {
  background: rgba(0, 21, 58, 0.3);
  border-radius: 5px;
  overflow: hidden;
  padding: 5px;
  transition: transform 0.5s ease;
}

.post-card:hover {
  transform: scale(1.05);
}

.post-card img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  display: block;
  border-radius: 5px;
}

.post-banner img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 5px;
}

.post-banner {
  max-height: 200px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

h3 {
  text-align: center;
  padding-top: 20px;
  font-size: 1em;
  font-weight: 100;
  animation: fadeOut 7s linear infinite;
  text-shadow: 1px 1px 2px #003, 0 0 5px #003;
}

.post-title {
  font-size: 1.2rem;
  margin: 10px 0 5px;
}

.post-excerpt {
  font-size: 0.9rem;
  color: #cceeff;
}

.glitchy-gradient-title {
  font-family: 'Rubik 80s Fade', serif;
  font-size: 4.5rem;
  background: linear-gradient(322deg, #0033ff, #33ffff, #cc99ff, #9900cc);
  background-size: 300% 300%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 5s ease infinite;
  position: relative;
  display: block;
  text-align: center;
  font-weight: 500;
  margin: 15px 0 20px;
}

.glitchy-gradient-title::before {
  content: attr(data-text);
  position: absolute;
  color: #009;
  animation: glitch 7s infinite;
  opacity: 0.8;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
}

.fade-in-text {
  animation: fadeIn 7s;
  background: rgba(0, 21, 58, 0.2);
  backdrop-filter: blur(1px);
  display: flex;
  flex-direction: column;
  width: 100%;
}

.navbar {
  background: rgba(0, 1, 49, 0.2);
  color: #003;
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  text-align: center;
}

.navbar a {
  text-decoration: none;
  margin: 0 15px;
  color: #003;
}

.navbar a:hover {
  color: #e8ffff;
  text-decoration: underline;
}

input[type="text"],
textarea {
  width: 100%;
  padding: 10px 30px;
  margin: 10px 0;
  box-sizing: border-box;
}

form label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
  color: #e8ffff;
}

form button {
  margin-top: 15px;
  padding: 10px 20px;
  background-color: #0077cc;
  color: #e8ffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

form button:hover {
  background-color: #005fa3;
}

.pagination {
  margin-top: 5%;
  padding-bottom: 10px;
}

.pagination a {
  color: #e8ffff;
  text-decoration: none;
}

.pagination a:hover {
  text-decoration: underline;
}

a {
  color: #e8ffff;
  text-decoration: none;
}

a:hover {
  text-shadow: 0.5px 0.5px 0 #006;
}

.footer {
  align-items: center;
}