@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
  background-color: #000;
  color: #00ffcc;
  font-family: 'Press Start 2P', monospace;
  text-align: center;
  margin: 0;
  overflow-x: hidden;
  animation: flicker 2s infinite;
}

/* --- CRT Flicker and Scanlines --- */
@keyframes flicker {
  0%, 19%, 22%, 63%, 64%, 100% { opacity: 1; }
  20%, 21%, 62% { opacity: 0.9; }
}

.scanlines {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    rgba(255,255,255,0.03) 0px,
    rgba(255,255,255,0.03) 1px,
    rgba(0,0,0,0) 2px
  );
  z-index: 100;
}

/* --- 3D Wireframe Grid Background --- */
.grid-bg {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 200vw;
  height: 200vh;
  background: 
    linear-gradient(#00ffcc 1px, transparent 1px),
    linear-gradient(90deg, #00ffcc 1px, transparent 1px);
  background-size: 50px 50px;
  transform: perspective(500px) rotateX(75deg) translate(-50%, -50%);
  animation: drift 10s linear infinite;
  opacity: 0.2;
  z-index: 0;
}

@keyframes drift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 0 50px, 50px 0; }
}

/* --- Header --- */
.title {
  font-size: 2.2em;
  margin-top: 40px;
  text-shadow: 0 0 10px #00ffcc, 0 0 20px #00cc99;
  z-index: 10;
  position: relative;
}

.subtitle {
  font-size: 0.9em;
  color: #ff3399;
  text-shadow: 0 0 8px #ff3399;
}

nav {
  margin: 20px 0;
  z-index: 10;
  position: relative;
}

nav a {
  color: #00ffcc;
  margin: 0 15px;
  text-decoration: none;
  transition: color 0.3s;
}

nav a:hover {
  color: #ff3399;
  text-shadow: 0 0 8px #ff3399;
}

/* --- Gallery --- */
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  padding: 40px 20px;
  z-index: 10;
  position: relative;
}

.art-card {
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid #00ffcc;
  padding: 12px;
  width: 260px;
  box-shadow: 0 0 15px #00ffcc;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform: perspective(400px) rotateX(10deg);
}

.art-card:hover {
  transform: perspective(400px) rotateX(0deg) scale(1.05);
  box-shadow: 0 0 20px #ff3399, 0 0 40px #ff3399;
}

.art-card img {
  width: 100%;
  height: auto;
  filter: contrast(120%) brightness(110%) saturate(120%);
}

/* --- Footer --- */
footer {
  margin: 40px 0 20px;
  font-size: 0.6em;
  color: #777;
  z-index: 10;
  position: relative;
}

/* --- Subtle Glitch Animation for Title --- */
@keyframes glitch {
  0% { text-shadow: 2px 0 red, -2px 0 blue; }
  20% { text-shadow: -2px 0 red, 2px 0 blue; }
  40% { text-shadow: 2px 0 blue, -2px 0 red; }
  60% { text-shadow: -1px 0 blue, 1px 0 red; }
  100% { text-shadow: 1px 0 red, -1px 0 blue; }
}

.title {
  animation: glitch 1.5s infinite alternate;
}
