/* FlashCards AI Pro - Custom Styles */

/* CSS Variables for consistent theming */
:root {
    --primary-gradient: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
    --secondary-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --dark-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --card-shadow-hover: 0 35px 60px -12px rgba(0, 0, 0, 0.35);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0284c7, #7c3aed);
}

/* Custom Animations */
@keyframes modalShowAnimation {
    0% {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes cardFlip {
    0% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(-90deg);
    }
    100% {
        transform: rotateY(-180deg);
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(14, 165, 233, 0.6);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Utility Classes */
.animate-modalShow {
    animation: modalShowAnimation 0.3s ease-out forwards;
}

.animate-card-flip {
    animation: cardFlip 0.6s ease-in-out;
}

.animate-slide-in-right {
    animation: slideInFromRight 0.5s ease-out;
}

.animate-slide-in-left {
    animation: slideInFromLeft 0.5s ease-out;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* 3D Card Effects */
.perspective {
    perspective: 1000px;
}

.transform-style-preserve-3d {
    transform-style: preserve-3d;
}

.rotate-y-180 {
    transform: rotateY(180deg);
}

.backface-hidden {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Glass Morphism Effects */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
}

.glass-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Enhanced Button Styles */
.btn-primary {
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.3);
}

.btn-secondary {
    background: var(--secondary-gradient);
    border: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.3);
}

/* Enhanced Card Styles */
.flashcard-container {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.flashcard-container:hover {
    transform: scale(1.02);
}

.flashcard-face {
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.9) 100%);
    backdrop-filter: blur(10px);
}

.flashcard-front {
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.9) 0%, rgba(51, 65, 85, 0.9) 100%);
}

.flashcard-back {
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.9) 0%, rgba(8, 145, 178, 0.9) 100%);
}

/* Loading Animations */
.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots div {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0ea5e9;
    animation: loading-bounce 1.4s ease-in-out infinite both;
}

.loading-dots div:nth-child(1) { animation-delay: -0.32s; }
.loading-dots div:nth-child(2) { animation-delay: -0.16s; }

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .flashcard-container {
        margin: 0 1rem;
    }
    
    .glass-card {
        margin: 0 0.5rem;
        padding: 1rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .flashcard-face {
        padding: 1rem;
    }
    
    .glass-card {
        padding: 0.75rem;
    }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
    :root {
        --glass-bg: rgba(0, 0, 0, 0.1);
        --glass-border: rgba(255, 255, 255, 0.05);
    }
}

/* Focus States for Accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .glass-card {
        border: 2px solid #ffffff;
        background: rgba(0, 0, 0, 0.8);
    }
    
    .btn-primary, .btn-secondary {
        border: 2px solid #ffffff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .flashcard-container {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}

/* Custom Lucide Icon Styles */
.lucide {
    width: 1em;
    height: 1em;
    stroke-width: 2;
    vertical-align: middle;
    transition: all 0.2s ease;
}

.lucide:hover {
    transform: scale(1.1);
}

/* Enhanced Modal Styles */
.modal-backdrop {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient Text Effects */
.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom Selection */
::selection {
    background: rgba(14, 165, 233, 0.3);
    color: white;
}

::-moz-selection {
    background: rgba(14, 165, 233, 0.3);
    color: white;
} 