/* General Configuration and Variables */
:root {
    --color-primary: #1d4ed8;
    /* blue-700 */
}

/* Custom font and base styles */
body {
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s, color 0.3s;
    scroll-behavior: smooth;
}

/* Custom slide-down animation for the hero text */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-down {
    animation: slideDown 1s ease-out forwards;
}

/* Styling for the icon toggle */
#theme-toggle-icon {
    width: 1.5rem;
    height: 1.5rem;
    transition: transform 0.3s, opacity 0.3s;
}

/* Custom scrollbar for better aesthetics */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}

.dark ::-webkit-scrollbar-thumb {
    background: #60a5fa;
    /* blue-400 */
}

/* --- Flashcard Specific Styles --- */

/* 3D Card Flip Animation */
.flashcard-container {
    perspective: 1000px;
    height: 400px;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flashcard-container.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    border-radius: 1rem;
    transition: background-color 0.3s;
}

/* Card Front Styles */
.flashcard-front {
    background-color: #fff;
    color: #1f2937;
    border: 3px solid #60a5fa;
}

.dark .flashcard-front {
    background-color: #1f2937;
    color: #f3f4f6;
    border-color: #facc15;
}

/* Card Back Styles */
.flashcard-back {
    transform: rotateY(180deg);
    background-color: #dbeafe;
    color: #1e40af;
    border: 3px solid #1e40af;
}

.dark .flashcard-back {
    background-color: #4b5563;
    color: #facc15;
    border-color: #facc15;
}

/* Modal Backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
}