body {
    margin: 50px;
    background: url("../images/bg.jpg") no-repeat center center fixed;
    background-size: cover;
    text-align: center;
    color: white;
    border: 10px solid #f0c84a;
    border-radius: 30px;
    padding: 20px;
    box-sizing: border-box;
    min-height: 150vh; /* Ensures the page is at least the height of the viewport */
    display: flex;
    flex-direction: column;
}

.main-container {
    flex-grow: 1; /* Ensures it expands if content grows */
    padding-bottom: 50px; /* Adds space at the bottom to prevent cut-off */
}

.content {
    min-height: 100vh; /* Ensures content section is at least full viewport height */
    overflow: auto; /* Allows scrolling if content exceeds viewport */
}

.card-reading-container {
    min-height: 80vh; /* Ensures the section is tall enough */
    padding-bottom: 50px; /* Prevents overlap or cut-off */
}

footer {
    margin-top: auto;
}

html,
body {
    height: 100%;
}

.container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    box-sizing: border-box;
}

.title {
    font-size: 5rem;
    margin-top: 50px;
    font-family: "Playball", cursive;
    text-shadow:
        0 0 15px rgba(128, 0, 128, 1),
        0 0 25px rgba(128, 0, 128, 0.8),
        0 0 35px rgba(128, 0, 128, 0.6);
}

.subtitle {
    font-size: 2.5rem;
    font-family: "Playball", cursive;
    text-shadow:
        0 0 15px rgba(128, 0, 128, 1),
        0 0 25px rgba(128, 0, 128, 0.8),
        0 0 35px rgba(128, 0, 128, 0.6);
}

.description {
    font-size: 1.8rem;
    max-width: 80%;
    margin-top: 20px;
    font-family: "Playball", cursive;
    line-height: 1.8;
    color: #fff;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
}

.crystal-ball-container {
    position: relative;
    width: 600px;
    height: 600px;
    margin: 50px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.crystal-ball img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    box-shadow:
        0 0 35px rgba(128, 0, 128, 1),
        0 0 45px rgba(128, 0, 128, 0.8),
        0 0 55px rgba(128, 0, 128, 0.6);
}

.crystal-ball-buttons {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.crystal-ball-button {
    padding: 15px 30px;
    background-color: purple;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-family: "Playball", cursive;
    font-size: 1.5rem;
    white-space: nowrap;
    cursor: pointer;
    transition:
        background-color 0.3s,
        transform 0.2s;
}

.crystal-ball-button:hover {
    background-color: darkviolet;
    transform: scale(1.05);
}

.home-button {
    position: absolute;
    top: 80px;
    left: 80px;
    padding: 15px 30px;
    background-color: purple;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-family: "Playball", cursive;
    font-size: 1.5rem;
    transition:
        background-color 0.3s,
        transform 0.2s;
    z-index: 999;
}

.home-button:hover {
    background-color: darkviolet;
    transform: scale(1.05);
}

button {
    padding: 15px 30px;
    background-color: purple;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-family: "Playball", cursive;
    font-size: 1.5rem;
    position: relative;
    margin: 0 auto;
    display: block;
    transition:
        background-color 0.3s,
        transform 0.2s;
    z-index: 999;
}

button:hover {
    background-color: darkviolet;
    transform: scale(1.05);
}

.button-container {
    position: fixed;
    bottom: 50px; /* Increased to move button further down */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.card-details-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.card-details {
    width: 30%;
    text-align: center;
    font-family: "Playball", cursive;
    font-size: 1.8rem;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 10px;
    padding: 10px;
    text-shadow:
        0 0 15px rgba(128, 0, 128, 1),
        0 0 25px rgba(128, 0, 128, 0.8),
        0 0 35px rgba(128, 0, 128, 0.6);
}

@media (max-width: 1024px) {
    .card-details-container {
        flex-direction: column;
        align-items: center;
    }

    .card-details {
        width: 80%;
    }
}

@media (max-width: 768px) {
    .card-details {
        width: 90%;
    }
}

.three-card-container {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 20px;
    text-align: center;
}

.card {
    width: 300px;
    height: 500px;
    perspective: 1000px;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    border-radius: 25px;
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 25px;
}

.card-back {
    transform: rotateY(0deg);
}

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

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

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 25px;
}

.card-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 2px;
    text-align: center;
}

.card-description {
    font-size: 1.6rem;
    line-height: 1.8;
    text-align: center;
}

@keyframes shuffleCards {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(30px, -30px) rotate(10deg);
    }
    50% {
        transform: translate(-30px, 30px) rotate(-10deg);
    }
    75% {
        transform: translate(20px, -20px) rotate(5deg);
    }
    100% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }
}

button {
    background-color: purple;
    color: white;
    font-family: "Playball", cursive;
    font-size: 1.8rem;
    padding: 15px 30px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition:
        transform 0.3s ease-in-out,
        background-color 0.3s ease-in-out;
}

button:hover {
    transform: scale(1.1);
    background-color: #a020f0;
}

.home-button {
    position: absolute;
    top: 80px;
    left: 80px;
    background-color: purple;
    color: white;
    font-family: "Playball", cursive;
    font-size: 1.8rem;
    padding: 15px 30px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition:
        transform 0.3s ease-in-out,
        background-color 0.3s ease-in-out;
}

.home-button:hover {
    transform: scale(1.1);
    background-color: #a020f0;
}

.back-to-home {
    position: absolute;
    top: 80px;
    right: 80px;
    background-color: purple;
    color: white;
    font-family: "Playball", cursive;
    font-size: 1.8rem;
    padding: 15px 30px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition:
        transform 0.3s ease-in-out,
        background-color 0.3s ease-in-out;
}

.back-to-home:hover {
    transform: scale(1.1);
    background-color: #a020f0;
}

.button.reveal-button {
    position: fixed;
    bottom: 100px; /* Increased to move button further down */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}