/* Custom font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6; /* Lighter gray background */
}
/* Loading Overlay */
#loading-overlay {
    position: fixed;
    inset: 0;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.5s ease-out;
    opacity: 1;
}
/* Custom styles for the flashcard */
.flashcard {
    perspective: 1000px;
    width: 100%;
    height: 300px; /* Fixed height for consistent layout */
}
.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}
.flashcard.is-flipped .flashcard-inner {
    transform: rotateX(180deg);
}
.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column; /* Allow content to stack */
    justify-content: center;
    align-items: center;
    padding: 24px;
    border-radius: 0.75rem; /* 12px */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb; /* Light border */
    background-color: #ffffff;
    overflow-y: auto; /* Allow scrolling if content overflows */
}
.flashcard-back {
    transform: rotateX(180deg);
}
.flashcard-label {
    font-size: 0.75rem; /* 12px */
    font-weight: 600;
    color: #6b7280; /* Gray-500 */
    position: absolute;
    top: 16px;
    left: 20px;
}
.flashcard-content {
    font-size: 1.125rem; /* 18px */
    color: #1f2937; /* Gray-800 */
    text-align: center;
    white-space: pre-wrap; /* Preserve line breaks and wrap text */
}

/* Modal transitions */
#modal-backdrop {
    transition: opacity 0.3s ease-out;
}
#modal-panel {
    transition: all 0.3s ease-out;
}

/* NEW: Study Options Modal transitions */
#study-options-backdrop {
    transition: opacity 0.3s ease-out;
}
#study-options-panel {
    transition: all 0.3s ease-out;
}


/* Loading spinner for buttons */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
/* Dark mode spinner for AI button */
button:disabled .spinner-dark {
     border: 2px solid rgba(55, 65, 81, 0.3); /* gray-700 */
     border-top-color: #374151;
}
/* Folder styling */
.folder-container {
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background-color: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}
.folder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: #f9fafb; /* gray-50 */
    border-bottom: 1px solid #e5e7eb;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}
.folder-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937; /* gray-800 */
}
.deck-grid {
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
    /* Responsive grid columns */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* --- NEW BRANDING STYLES --- */

.logo-icon-float {
    animation: logo-float 4s ease-in-out infinite;
}

@keyframes logo-float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

.logo-text-gradient {
    /* A nice sky-to-blue gradient */
    background-image: linear-gradient(to right, #0ea5e9, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* --- NEW LANDING PAGE STYLES --- */
body {
    background-color: #ffffff; /* Default to white for landing page */
}

/* Make app background gray */
#app {
    background-color: #f3f4f6;
}

.landing-header {
    background-color: #ffffff;
}

.hero-section {
    background-color: #ffffff;
}

.cta-pulse {
    animation: cta-pulse 2s infinite;
}

@keyframes cta-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(30, 144, 255, 0.7); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(30, 144, 255, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(30, 144, 255, 0); }
}

.feature-card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}