body {
        font-family: 'Arial', sans-serif;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
        flex-direction: column;
        background-color: #f0f0f0;
        margin: 0;
        text-align: center;
}

#flashcard-container {
    perspective: 1000px;
}

#flashcard {
    width: 300px; /* Adjust based on your image size */
    height: 400px; /* Adjust based on your image size */
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    background-size: cover; /* Ensure images cover the card */
    background-position: center; /* Center images */
}

.front {
    background-color: #FFF;
}

.back {
    background-color: #F9F9F9;
    transform: rotateY(180deg);
}

button {
    margin-top: 20px;
    padding: 10px 20px;
    border: none;
    background-color: #333;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #555;
}
h1 {
    margin-bottom: 20px;
}
a {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
a:hover {
    background-color: #0056b3;
}
.home {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    position: absolute;
  top: 8px;
  left: 16px;
  font-size: 18px;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 24px;
        padding: 0 20px; /* Ensures text doesn't touch the edges */
    }
    a {
        font-size: 18px;
        padding: 8px 16px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 20px;
    }
    a {
        font-size: 16px;
    }
}
@media (max-width: 768px) {
    #flashcard {
        width: 80%; /* Makes the card width responsive */
        height: auto; /* Keeps the aspect ratio intact */
        max-width: 300px; /* Maximum width for larger screens */
        max-height: 200px; /* Maximum height for larger screens */
    }
    .face {
        font-size: 14px; /* Adjusts text size for smaller screens, if you have text */
    }
}

@media (max-width: 480px) {
    #flashcard {
        max-width: 250px;
        max-height: 166px;
    }
    .face {
        font-size: 12px; /* Further reduces text size for very small screens */
    }
}
