/* Neural Nostalgia Player - Main Styles */
:root {
  --primary-color: #ff00ff;
  --secondary-color: #00ffff;
  --bg-color: #121212;
  --text-color: #f0f0f0;
  --overlay-color: rgba(53, 8, 69, 0.5);
  --vhs-red: #ff3864;
  --vhs-blue: #5271ff;
  --glow-color: #ff00ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'VT323', monospace;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  cursor: none; /* Hide default cursor */
}

/* Custom Cursor */
.custom-cursor {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: all 0.2s ease;
  transition-property: width, height, border;
}

.custom-cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background-color: var(--secondary-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
}

.custom-cursor.active {
  width: 20px;
  height: 20px;
  border-width: 3px;
  border-color: var(--secondary-color);
}

/* Link and Button Hover States for Custom Cursor */
a, button, .memories-container {
  cursor: none !important;
}

a:hover ~ .custom-cursor,
button:hover ~ .custom-cursor {
  width: 50px;
  height: 50px;
  border-width: 4px;
  border-color: var(--secondary-color);
  mix-blend-mode: normal;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 2;
}

/* Fullscreen Button */
.fullscreen-btn {
  position: fixed;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background-color: rgba(20, 20, 20, 0.7);
  border: 1px solid var(--primary-color);
  border-radius: 5px;
  color: var(--text-color);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.fullscreen-btn:hover {
  background-color: rgba(255, 0, 255, 0.2);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

.exit-fullscreen-icon {
  display: none;
}

.fullscreen-btn.active .fullscreen-icon {
  display: none;
}

.fullscreen-btn.active .exit-fullscreen-icon {
  display: block;
}

/* VHS Overlay */
.vhs-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 10;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.02) 50%,
    transparent 100%
  );
  background-size: 100% 3px;
}

.vhs-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
}

.vhs-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 0%,
    rgba(0, 0, 0, 0.3) 100%
  );
  pointer-events: none;
}

/* Header and Logo Animation */
header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.logo-container {
  position: relative;
  display: inline-block;
  margin-bottom: 0.5rem;
}

/* Animated Tape Logo */
.tape-animation {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 65px;
  opacity: 0.7;
}

.tape-case {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #333;
  border-radius: 8px;
  border: 2px solid #555;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.tape-reels {
  display: flex;
  justify-content: space-between;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 75%;
}

.tape-reel {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 4px solid #222;
  background-color: #111;
  position: relative;
}

.tape-reel::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 5px;
  height: 5px;
  background-color: #444;
  border-radius: 50%;
}

.tape-reel.left {
  animation: spin 4s linear infinite reverse;
}

.tape-reel.right {
  animation: spin 4s linear infinite;
}

.tape-label {
  position: absolute;
  bottom: 5px;
  left: 5px;
  right: 5px;
  height: 15px;
  background-color: #111;
  border-radius: 2px;
}

.tape-window {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 20px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

h1 {
  font-family: 'Press Start 2P', cursive;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  display: inline-block;
}

.glitch-text {
  color: var(--text-color);
  position: relative;
  text-shadow: 
    0 0 5px var(--primary-color),
    0 0 10px var(--primary-color),
    0 0 15px var(--primary-color);
}

.glitch-text::before,
.glitch-text::after {
  content: 'Neural Nostalgia Player';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.glitch-text::before {
  color: var(--primary-color);
  z-index: -1;
  animation: glitch 2.5s infinite alternate-reverse;
}

.glitch-text::after {
  color: var(--secondary-color);
  z-index: -2;
  animation: glitch 3s infinite alternate-reverse;
}

@keyframes glitch {
  0%, 100% {
    transform: translate(0);
  }
  20% {
    transform: translate(-3px, 3px);
  }
  40% {
    transform: translate(-3px, -3px);
  }
  60% {
    transform: translate(3px, 3px);
  }
  80% {
    transform: translate(3px, -3px);
  }
}

.subtitle {
  font-size: 1.2rem;
  color: var(--secondary-color);
  opacity: 0.8;
  cursor: pointer;
  transition: all 0.3s ease;
}

.subtitle:hover {
  opacity: 1;
  text-shadow: 0 0 10px var(--secondary-color);
}

/* Main Sections */
.section {
  display: none;
  width: 100%;
  min-height: 50vh;
  position: relative;
}

.section.active {
  display: block;
}

/* Memory Input */
#memoryInput {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 0;
}

textarea {
  width: 100%;
  min-height: 200px;
  background-color: rgba(30, 30, 30, 0.7);
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  padding: 1rem;
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  color: var(--text-color);
  resize: vertical;
  outline: none;
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
  transition: all 0.3s ease;
}

textarea:focus {
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
  border-color: var(--secondary-color);
}

.glow-btn {
  background-color: transparent;
  color: var(--text-color);
  border: 2px solid var(--primary-color);
  border-radius: 4px;
  padding: 0.8rem 2rem;
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px var(--glow-color);
}

.glow-btn:hover, .glow-btn:focus {
  background-color: rgba(255, 0, 255, 0.2);
  box-shadow: 0 0 20px var(--glow-color);
  transform: translateY(-2px);
}

.glow-btn::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  z-index: -1;
  filter: blur(20px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glow-btn:hover::before {
  opacity: 0.5;
}

/* Example Memories Buttons */
.example-memories {
  margin-top: 2rem;
  text-align: center;
  width: 100%;
}

.example-memories p {
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.example-btn {
  background-color: rgba(30, 30, 30, 0.7);
  color: var(--text-color);
  border: 1px solid var(--secondary-color);
  border-radius: 4px;
  padding: 0.5rem 1rem;
  margin: 0.25rem;
  font-family: 'VT323', monospace;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.example-btn:hover {
  background-color: rgba(0, 255, 255, 0.2);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Button glitch effect */
.glitch-effect {
  animation: buttonGlitch 0.5s ease forwards;
  position: relative;
}

.glitch-effect::before,
.glitch-effect::after {
  content: attr(data-content);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glitch-effect::before {
  left: 2px;
  text-shadow: -1px 0 var(--vhs-red);
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim-1 5s linear infinite alternate-reverse;
}

.glitch-effect::after {
  left: -2px;
  text-shadow: 1px 0 var(--vhs-blue);
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim-2 5s linear infinite alternate-reverse;
}

@keyframes buttonGlitch {
  0%, 100% {
    transform: translateX(0);
  }
  20%, 60% {
    transform: translateX(-2px);
  }
  40%, 80% {
    transform: translateX(2px);
  }
}

@keyframes glitch-anim-1 {
  0% {
    clip: rect(61px, 9999px, 94px, 0);
  }
  5% {
    clip: rect(5px, 9999px, 96px, 0);
  }
  10% {
    clip: rect(89px, 9999px, 67px, 0);
  }
  15% {
    clip: rect(58px, 9999px, 79px, 0);
  }
  20% {
    clip: rect(39px, 9999px, 33px, 0);
  }
  25% {
    clip: rect(7px, 9999px, 46px, 0);
  }
  30% {
    clip: rect(13px, 9999px, 63px, 0);
  }
  35% {
    clip: rect(56px, 9999px, 22px, 0);
  }
  40% {
    clip: rect(94px, 9999px, 21px, 0);
  }
  45% {
    clip: rect(75px, 9999px, 35px, 0);
  }
  50% {
    clip: rect(5px, 9999px, 94px, 0);
  }
  55% {
    clip: rect(30px, 9999px, 70px, 0);
  }
  60% {
    clip: rect(25px, 9999px, 75px, 0);
  }
  65% {
    clip: rect(57px, 9999px, 23px, 0);
  }
  70% {
    clip: rect(14px, 9999px, 66px, 0);
  }
  75% {
    clip: rect(89px, 9999px, 33px, 0);
  }
  80% {
    clip: rect(42px, 9999px, 1px, 0);
  }
  85% {
    clip: rect(86px, 9999px, 93px, 0);
  }
  90% {
    clip: rect(34px, 9999px, 23px, 0);
  }
  95% {
    clip: rect(69px, 9999px, 20px, 0);
  }
  100% {
    clip: rect(79px, 9999px, 93px, 0);
  }
}

@keyframes glitch-anim-2 {
  0% {
    clip: rect(17px, 9999px, 23px, 0);
  }
  5% {
    clip: rect(65px, 9999px, 59px, 0);
  }
  10% {
    clip: rect(56px, 9999px, 99px, 0);
  }
  15% {
    clip: rect(83px, 9999px, 9px, 0);
  }
  20% {
    clip: rect(19px, 9999px, 98px, 0);
  }
  25% {
    clip: rect(28px, 9999px, 26px, 0);
  }
  30% {
    clip: rect(67px, 9999px, 34px, 0);
  }
  35% {
    clip: rect(57px, 9999px, 41px, 0);
  }
  40% {
    clip: rect(26px, 9999px, 35px, 0);
  }
  45% {
    clip: rect(20px, 9999px, 78px, 0);
  }
  50% {
    clip: rect(32px, 9999px, 39px, 0);
  }
  55% {
    clip: rect(35px, 9999px, 64px, 0);
  }
  60% {
    clip: rect(52px, 9999px, 17px, 0);
  }
  65% {
    clip: rect(42px, 9999px, 86px, 0);
  }
  70% {
    clip: rect(69px, 9999px, 72px, 0);
  }
  75% {
    clip: rect(19px, 9999px, 89px, 0);
  }
  80% {
    clip: rect(10px, 9999px, 75px, 0);
  }
  85% {
    clip: rect(48px, 9999px, 27px, 0);
  }
  90% {
    clip: rect(83px, 9999px, 13px, 0);
  }
  95% {
    clip: rect(37px, 9999px, 62px, 0);
  }
  100% {
    clip: rect(59px, 9999px, 45px, 0);
  }
}

/* Loading Screen */
#loadingScreen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.vhs-loading {
  position: relative;
}

.vhs-tape {
  width: 150px;
  height: 100px;
  background-color: #222;
  border-radius: 10px;
  margin: 0 auto 2rem;
  position: relative;
  overflow: hidden;
  border: 3px solid #444;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.reels {
  display: flex;
  justify-content: space-between;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
}

.reel {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 8px solid #333;
  background-color: #111;
  position: relative;
}

.reel::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background-color: #444;
  border-radius: 50%;
}

.reel.spinning {
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Generated Result */
#generatedResult {
  position: relative;
  height: 70vh;
  overflow: hidden;
}

.background-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.background-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7) contrast(1.1) saturate(1.2);
  animation: slowZoom 30s infinite alternate;
}

/* Audio Visualizer */
.audio-visualizer {
  position: absolute;
  bottom: 70px;
  left: 0;
  width: 100%;
  height: 70px;
  z-index: 3;
  opacity: 0.7;
  pointer-events: none;
}

canvas#visualizerCanvas {
  width: 100%;
  height: 100%;
}

/* VHS Filter for background images */
.vhs-filter {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  mix-blend-mode: screen;
  pointer-events: none;
  background: linear-gradient(
    rgba(255, 56, 100, 0.1),
    rgba(0, 128, 255, 0.1)
  );
  opacity: 0.6;
}

.vhs-filter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  animation: scanlines 0.5s linear infinite;
}

.vhs-filter::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    rgba(255, 0, 0, 0.1),
    rgba(0, 255, 255, 0.1),
    rgba(255, 0, 255, 0.1)
  );
  animation: colorShift 5s ease infinite;
  opacity: 0.4;
  mix-blend-mode: color;
}

.vhs-filter.tracking-issue {
  transform: translateY(10px);
  opacity: 0.8;
  background: linear-gradient(
    rgba(255, 56, 100, 0.2),
    rgba(0, 128, 255, 0.2)
  );
}

/* Rewind Overlay Effect */
.rewind-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.rewind-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.rewind-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 5px,
    rgba(255, 255, 255, 0.2) 5px,
    rgba(255, 255, 255, 0.2) 10px
  );
  animation: rewindLines 0.2s linear infinite;
}

.rewind-text {
  font-family: 'Press Start 2P', cursive;
  font-size: 2rem;
  color: var(--primary-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
  animation: blinkRewind 0.5s ease infinite alternate;
  z-index: 1001;
}

@keyframes rewindLines {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 10px;
  }
}

@keyframes blinkRewind {
  0% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
  }
}

@keyframes scanlines {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 2px;
  }
}

@keyframes colorShift {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes slowZoom {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1);
  }
}

.memory-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  background: linear-gradient(to bottom, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(0, 0, 0, 0.3) 30%, 
    rgba(0, 0, 0, 0.3) 70%, 
    rgba(0, 0, 0, 0.7) 100%
  );
  display: flex;
  flex-direction: column;
  padding: 2rem;
}

.memory-header {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

#memoryTitle {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-family: 'VT323', monospace;
}

.timestamp {
  font-size: 1rem;
  opacity: 0.8;
  font-family: 'VT323', monospace;
  color: var(--secondary-color);
}

.audio-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  width: 80%;
  max-width: 500px;
}

.control-btn {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
  margin-right: 1rem;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-btn:hover {
  color: var(--primary-color);
}

.progress-container {
  flex: 1;
  height: 5px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
}

.progress-bar {
  height: 100%;
  width: 0;
  background-color: var(--primary-color);
  box-shadow: 0 0 5px var(--primary-color);
}

.rewind-btn {
  margin-left: 1rem;
  margin-right: 0;
  transition: transform 0.3s ease;
}

.rewind-btn:hover {
  color: var(--vhs-blue);
  transform: scale(1.2);
}

.memory-actions {
  position: absolute;
  bottom: 80px;
  right: 20px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.action-btn {
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--text-color);
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  padding: 0.5rem 1rem;
  font-family: 'VT323', monospace;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-btn:hover {
  background-color: rgba(255, 0, 255, 0.2);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

/* VHS Notification */
.vhs-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: rgba(0, 0, 0, 0.8);
  color: var(--text-color);
  border: 1px solid var(--primary-color);
  padding: 1rem 2rem;
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  border-radius: 4px;
  z-index: 100;
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.vhs-notification::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    rgba(255, 0, 0, 0.1),
    rgba(0, 255, 255, 0.1),
    rgba(255, 0, 255, 0.1)
  );
  animation: colorShift 2s ease infinite;
  opacity: 0.3;
  mix-blend-mode: color;
  pointer-events: none;
}

.vhs-notification.show {
  transform: translateX(-50%) translateY(0);
}

/* Notification Styles */
.notification {
    position: fixed;
    bottom: 30px;
    right: -300px;
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--text-color);
    padding: 15px 20px;
    border-radius: 5px;
    border-left: 3px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transition: right 0.3s ease;
    max-width: 300px;
    font-family: 'VT323', monospace;
    display: flex;
    align-items: center;
}

.notification::before {
    content: '▶';
    color: var(--primary-color);
    margin-right: 10px;
}

.notification.show {
    right: 30px;
}

/* Screen Transition Effect */
.screen-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  z-index: 1000;
  pointer-events: none;
  transition: all 0.3s ease;
  mix-blend-mode: normal;
}

.screen-transition.active {
  background-color: rgba(0, 0, 0, 1);
}

.screen-transition::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%) scaleX(0);
  transition: transform 0.6s ease;
}

.screen-transition.active::before {
  transform: translateY(-50%) scaleX(1);
}

/* Memories Gallery */
#memoriesGallery {
  padding: 2rem 0;
}

#memoriesGallery h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  text-shadow: 0 0 5px var(--secondary-color);
}

.memories-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.memory-card {
  position: relative;
  height: 200px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.memory-card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 5px 15px rgba(255, 0, 255, 0.3);
  border-color: var(--primary-color);
}

.memory-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7);
  transition: all 0.5s ease;
}

.memory-card:hover img {
  filter: brightness(0.8);
}

.memory-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: linear-gradient(to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0) 50%,
    rgba(0, 0, 0, 0.8) 100%
  );
  pointer-events: none;
}

.memory-card-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: var(--text-color);
  font-size: 1.2rem;
  z-index: 2;
}

.memory-card-date {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--secondary-color);
  z-index: 2;
}

.memory-card-tape {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--vhs-red);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--vhs-red);
  z-index: 2;
}

.no-memories {
  text-align: center;
  color: var(--text-color);
  opacity: 0.7;
  font-size: 1.2rem;
  padding: 2rem;
}

/* Loading status */
.loading-status {
  margin-top: 1rem;
}

#loadingMessage {
  font-size: 1rem;
  opacity: 0.8;
  animation: pulse 1.5s infinite;
}

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

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  overflow: auto;
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: rgba(30, 30, 30, 0.9);
  border: 2px solid var(--primary-color);
  margin: 10% auto;
  padding: 2rem;
  width: 80%;
  max-width: 600px;
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
  border-radius: 8px;
  position: relative;
  animation: modalIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalIn {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-btn:hover {
  color: var(--primary-color);
  transform: scale(1.2);
}

.modal h2 {
  margin-bottom: 1.5rem;
  font-family: 'Press Start 2P', cursive;
  font-size: 1.5rem;
  color: var(--secondary-color);
}

.modal p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.easteregg-hint {
  margin-top: 2rem;
  opacity: 0.5;
  text-align: center;
  font-style: italic;
}

/* Settings Modal */
.settings-group {
  margin-bottom: 1.5rem;
}

.settings-group h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: var(--primary-color);
}

.setting-item {
  margin-bottom: 1rem;
}

.setting-item label {
  display: block;
  margin-bottom: 0.5rem;
}

.setting-item input[type="text"],
.setting-item input[type="password"] {
  width: 100%;
  padding: 0.8rem;
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--secondary-color);
  color: var(--text-color);
  font-family: 'VT323', monospace;
  font-size: 1rem;
  border-radius: 4px;
}

.setting-toggles {
  margin-bottom: 1.5rem;
}

.setting-toggle {
  display: flex;
  align-items: center;
  margin-bottom: 0.8rem;
}

.setting-toggle label {
  flex: 1;
  margin-right: 1rem;
}

.setting-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary-color);
}

/* Footer and footer buttons */
footer {
  text-align: center;
  padding: 2rem 0 1rem;
  opacity: 0.7;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-btn {
  background: none;
  border: none;
  color: var(--text-color);
  opacity: 0.7;
  font-family: 'VT323', monospace;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.footer-btn:hover {
  opacity: 1;
  color: var(--secondary-color);
}

/* Danger button */
.danger-btn {
  border-color: #ff3864;
}

.danger-btn:hover {
  background-color: rgba(255, 56, 100, 0.2);
  box-shadow: 0 0 10px rgba(255, 56, 100, 0.5);
}

/* Gallery actions */
.gallery-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

/* Share button */
#shareMemoryBtn {
  position: relative;
}

#shareMemoryBtn.copied::after {
  content: "Copied!";
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  pointer-events: none;
  opacity: 0;
  animation: fadeInOut 1.5s;
}

@keyframes fadeInOut {
  0%, 100% {
    opacity: 0;
  }
  10%, 90% {
    opacity: 1;
  }
}

/* Dev Mode Styles */
body.dev-mode {
  position: relative;
}

body.dev-mode::after {
  content: 'DEV MODE';
  position: fixed;
  top: 5px;
  right: 10px;
  font-size: 0.8rem;
  background-color: var(--primary-color);
  color: black;
  padding: 2px 5px;
  border-radius: 3px;
  z-index: 9999;
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 {
    font-size: 1.8rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .memory-actions {
    bottom: 100px;
    right: 10px;
  }
  
  .audio-controls {
    width: 90%;
  }
  
  .tape-animation {
    top: -40px;
    width: 80px;
    height: 52px;
  }
  
  .tape-reel {
    width: 20px;
    height: 20px;
  }
  
  .custom-cursor, .custom-cursor-dot {
    display: none;
  }
  
  body {
    cursor: auto;
  }
  
  a, button, .memories-container {
    cursor: pointer !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  #memoryTitle {
    font-size: 1.5rem;
  }
  
  .memory-actions {
    right: 50%;
    transform: translateX(50%);
    flex-direction: row;
    bottom: 70px;
  }
  
  .vhs-tape {
    width: 120px;
    height: 80px;
  }
  
  .memories-container {
    grid-template-columns: 1fr;
  }
  
  .example-memories {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .example-btn {
    width: 90%;
    margin-bottom: 0.5rem;
  }
}