/* Base Styles */
:root {
    --primary: #9d00ff;
    --secondary: #00e5ff;
    --accent: #fff6a1;
    --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);
    overflow: hidden;
     Prevent page scrolling 
    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); */
    animation: pulse 3s infinite alternate;
}

/* Cosmic Background */
.cosmos-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(ellipse at bottom,
            #1b2735 0%,
            #090a0f 100%);
    overflow: hidden;
}

.stars-container {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(1px 1px at 25% 25%,
            white,
            rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 50% 50%, white, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 75% 75%, white, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 100% 100%, white, rgba(0, 0, 0, 0));
    background-size: 200px 200px, 300px 300px, 400px 400px, 600px 600px;
    background-repeat: repeat;
    animation: twinkle 10s linear infinite;
}

@keyframes twinkle {
    0% {
        background-position: 0 0, 0 0, 0 0, 0 0;
    }

    100% {
        background-position: 200px 200px, 300px 300px, 400px 400px,
            600px 600px;
    }
}

/* Carousel Container */
.carousel-container {
    position: relative;
    width: 100%;
    height: 850px;
    perspective: 1000px;
    transform-style: preserve-3d;
    display: flex;
    justify-content: center;
    align-items: center;

    transform: scale(0.8); /* 80% size */
    transform-origin: center center; /* scale from center */
    /* touch-action: none; */
    /* Prevent default touch actions */
}

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

/* Memory Cards */
.memory-card {
    /* touch-action: pan-y; */

    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(10px);
}

.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(54, 27, 16, 0.692),
            rgba(20, 20, 40, 0.9));
    border: 1px solid rgba(61, 43, 20, 0.521);
    transform-style: preserve-3d;
}

.card-front img {
    position: absolute;

}

.card-front > img:nth-child(1) {
    left: -135px;
    bottom: -135px;
    width: 550px;
    object-fit: cover;
}

.card-front > img:nth-child(2) {
    right: -30px;
    top: -5px;
    width: 200px;
    object-fit: cover;
}


.card-back {
    background: linear-gradient(135deg,
            rgba(40, 20, 20, 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;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
}

.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;
}

.glitch-effect img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

/* @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: absolute;
    top: 48%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1100px;
    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;
    }
} */

@media (max-width: 768px) {
    .carousel-container {
        transform: scale(1.5);
    }

    /* :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;
    }
} */
