/* Base Styles */
      :root {
        --primary: #9d00ff;
        --secondary: #00e5ff;
        --accent: #ff00e5;
        --background: #050510;
        --card-bg: rgba(20, 20, 40, 0.7);
        --text-primary: #ffffff;
        --text-secondary: #b8b8ff;
        --glow-primary: 0 0 10px rgba(157, 0, 255, 0.7),
          0 0 20px rgba(157, 0, 255, 0.5);
        --glow-secondary: 0 0 10px rgba(0, 229, 255, 0.7),
          0 0 20px rgba(0, 229, 255, 0.5);
        --glow-accent: 0 0 10px rgba(255, 0, 229, 0.7),
          0 0 20px rgba(255, 0, 229, 0.5);
        --card-width: 300px;
        --card-height: 420px;
        --carousel-radius: 400px;
        --transition-speed: 0.5s;
      }

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

      /*body,
      html {
        height: 100%;
        font-family: "Chakra Petch", sans-serif;
        background-color: var(--background);
        color: var(--text-primary);
        display: grid;
        align-items: center;
      }

      /* Typography *//*
      h1,
      h2,
      h3,
      h4,
      h5,
      h6 {
        font-family: "Orbitron", sans-serif;
        font-weight: 700;
        letter-spacing: 1px;
      }*/

      .title {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
        background: linear-gradient(90deg, var(--primary), var(--secondary));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        text-shadow: 0 0 15px rgba(157, 0, 255, 0.5);
        text-align: center;
        animation: pulse 3s infinite alternate;
      }

      /* Carousel Container */
      .carousel-container {
        position: relative;
        width: 100%;
        height: 500px;
        perspective: 1000px;
        transform-style: preserve-3d;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: left;
        touch-action: none; /* Prevent default touch actions */
        margin-top: 150px;
        margin-bottom: 150px;
      }

      .carousel {
        position: relative;
        width: var(--carousel-radius);
        height: var(--carousel-radius);
        transform-style: preserve-3d;
        transition: transform 0.5s ease;
      }

      /* Memory Cards */
      .memory-card {
        position: absolute;
        width: var(--card-width);
        height: var(--card-height);
        left: 50%;
        top: 50%;
        margin-left: calc(var(--card-width) / -2);
        margin-top: calc(var(--card-height) / -2);
        transform-style: preserve-3d;
        transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        cursor: pointer;
      }

      .card-inner {
        position: relative;
        width: 100%;
        height: 100%;
        transform-style: preserve-3d;
        transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      }

      .memory-card:hover .card-inner {
        transform: translateZ(20px);
      }

      .memory-card.flipped .card-inner {
        transform: rotateY(180deg);
      }

      .card-front,
      .card-back {
        position: absolute;
        width: 100%;
        height: 100%;
        backface-visibility: hidden;
        border-radius: 15px;
        overflow: hidden;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
      }

      .card-front {
        background: linear-gradient(
          135deg,
          rgba(30, 30, 60, 0.8),
          rgba(20, 20, 40, 0.9)
        );
        border: 1px solid rgba(157, 0, 255, 0.3);
        transform-style: preserve-3d;
      }

      .card-back {
        background: linear-gradient(
          135deg,
          rgba(20, 20, 40, 0.9),
          rgba(30, 30, 60, 0.8)
        );
        border: 1px solid rgba(0, 229, 255, 0.3);
        transform: rotateY(180deg);
      }

      .card-content {
        padding: 20px;
        height: 100%;
        display: flex;
        flex-direction: column;
        position: relative;
      }

      .memory-date {
        font-family: "Orbitron", sans-serif;
        font-size: 0.8rem;
        color: var(--accent);
        margin-bottom: 10px;
        text-shadow: 0 0 5px rgba(255, 0, 229, 0.7);
      }

      .memory-card h3 {
        font-size: 1.5rem;
        margin-bottom: 15px;
        color: var(--text-primary);
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
      }

      .memory-image {
        width: 100%;
        height: 150px;
        margin-bottom: 15px;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        overflow: hidden;
        border-radius: 8px;
        background: rgba(0, 0, 0, 0.3);
      }

      .memory-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.3s cubic-bezier(0.4, 0.2, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0.2, 0.2, 1);
      }

      .memory-image:hover {
        transform: scale(1.1);
        filter: brightness(50%); /* Darkens the image */
      }

      .memory-image .overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, 0.6); /* Dark background */
            color: white;
            font-size: 18px;
            font-weight: bold;
            opacity: 0;
            transition: opacity 0.3s ease-in-out;
            border-radius: 5px;
        }

        .memory-image:hover .overlay {
            opacity: 1;
        }

      .memory-image i {
        color: var(--primary);
        font-size: 4rem;
        text-shadow: var(--glow-primary);
        animation: pulse 3s infinite alternate;
        z-index: 2;
      }

      .glitch-effect {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(
          45deg,
          transparent 65%,
          rgba(157, 0, 255, 0.3) 70%,
          transparent 75%
        );
        background-size: 200% 200%;
        animation: glitch 3s linear infinite;
        z-index: 1;
      }

      @keyframes glitch {
        0% {
          background-position: 0 0;
        }
        25% {
          background-position: 100% 0;
        }
        50% {
          background-position: 100% 100%;
        }
        75% {
          background-position: 0 100%;
        }
        100% {
          background-position: 0 0;
        }
      }

      .memory-preview {
        font-size: 0.9rem;
        color: var(--text-secondary);
        margin-bottom: 15px;
        flex-grow: 1;
      }

      .card-back .card-content p {
        font-size: 0.9rem;
        color: var(--text-secondary);
        margin-bottom: 20px;
        line-height: 1.5;
        flex-grow: 1;
      }

      .memory-coordinates {
        font-family: "Orbitron", sans-serif;
        font-size: 0.8rem;
        color: var(--secondary);
        display: flex;
        flex-direction: column;
        gap: 5px;
      }

      .time-stamp {
        color: var(--accent);
      }

      .card-glow {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 15px;
        pointer-events: none;
        background: radial-gradient(
          circle at 50% 50%,
          rgba(157, 0, 255, 0.1),
          transparent 70%
        );
        opacity: 0;
        transition: opacity 0.3s ease;
      }

      .memory-card:hover .card-glow {
        opacity: 1;
      }

      /* Carousel Controls */
      .carousel-controls {
        position: relative;
        margin: auto;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 20px;
        justify-content: center;
        max-width: 200px;
        /*z-index: 10;*/
      }

      .control-btn {
        background: rgba(20, 20, 40, 0.7);
        border: 1px solid var(--primary);
        color: var(--text-primary);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: var(--glow-primary);
      }

      .control-btn:hover {
        background: rgba(30, 30, 60, 0.9);
        transform: scale(1.1);
      }

      /* Footer */
      footer {
        position: relative;
        z-index: 10;
      }

      .instructions {
        font-size: 0.8rem;
        color: var(--text-secondary);
        opacity: 0.7;
      }

      /* Animations */
      @keyframes pulse {
        0%,
        100% {
          opacity: 0.8;
        }
        50% {
          opacity: 1;
        }
      }

      /* Responsive Adjustments */
      @media (max-width: 768px) {
        :root {
          --card-width: 250px;
          --card-height: 350px;
          --carousel-radius: 300px;
        }

        .title {
          font-size: 1.8rem;
        }

        .carousel-container {
          height: 400px;
        }

        .memory-card h3 {
          font-size: 1.2rem;
        }

        .memory-image {
          height: 120px;
        }
      }

      @media (max-width: 576px) {
        :root {
          --card-width: 220px;
          --card-height: 320px;
          --carousel-radius: 250px;
        }

        .title {
          font-size: 1.5rem;
        }

        .carousel-container {
          height: 350px;
        }
      }