.card-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
}

body {
    background-image: url('cardbg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 90vh;
}

.card {
    width: 210px;
    height: 310px;
    perspective: 1000px;
    cursor: pointer;
    padding: 0px;
}

.card-front {
    background-image: url('cardback.jpg');
    background-size: cover; /* Ensures full coverage */
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-inner {
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    position: relative;
}

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

.card-front, .card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    border: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-align: center;
    background-color: #967d00;
}

.card-back {
    transform: rotateY(180deg);
    background-color: #0c011e;
    color: #ffffff;
    border-radius: 10px;
}

.card-back a {
    color: white;
    text-decoration: underline;
    margin-top: 10px;
}

.animated-text {
    font-size: 24px;
    text-align: center;
    margin-top: 100px;
    animation: fadeIn 6s infinite;
    color: white;
    opacity: 0; /* Starts hidden */
}

.animated-desc {
    font-size: 18px;
    text-align: center;
    margin-top: 20px;
    color: white;
    opacity: 0; /* Starts hidden */
    transition: opacity 1s ease-in-out; /* Smooth fade-in */
}

/* Animation for continuously fading in/out */
@keyframes fadeIn {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* Animation for fading in only once */
@keyframes fadeInOnce {
    from { opacity: 0; }
    to { opacity: 1; }
}

#text-container {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%);
    position: fixed;  /* Makes it stick to the bottom */
    bottom: 0;
    left: 0;
    width: 100%;
    height: 34vh; /* 34% of the viewport height */
    padding: 20px; /* Ensures spacing inside */
}

.home-button-container {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
}

.home-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 8px;
}

.spin-on-hover {
    transition: transform 0.5s ease-in-out;
    width: 100px;
    height: 100px;
    border-radius: 50px;
}

.hover-text {
    font-size: 16px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* Ensuring BOTH the text appears AND the image spins */
.home-link:hover .hover-text {
    opacity: 1;
}

.home-link:hover .spin-on-hover {
    transform: rotate(-360deg);
}

