/* Common Styles for Zomi Dictionary */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-in {
    animation: slideIn 0.5s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out;
}

.animate-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Button styles */
.btn-primary {
    @apply bg-blue-600 text-white px-6 py-3 rounded-lg font-semibold hover:bg-blue-700 transition shadow-lg hover:shadow-xl;
}

.btn-secondary {
    @apply bg-gray-200 text-gray-700 px-6 py-3 rounded-lg font-semibold hover:bg-gray-300 transition;
}

.btn-icon {
    @apply w-10 h-10 rounded-full flex items-center justify-center transition;
}

/* Input styles */
.input-field {
    @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition;
}

/* Badge styles */
.badge {
    @apply inline-block px-3 py-1 rounded-full text-sm font-medium;
}

.badge-primary {
    @apply bg-blue-100 text-blue-800;
}

.badge-secondary {
    @apply bg-purple-100 text-purple-800;
}

.badge-success {
    @apply bg-green-100 text-green-800;
}

.badge-warning {
    @apply bg-yellow-100 text-yellow-800;
}

.badge-danger {
    @apply bg-red-100 text-red-800;
}

/* Word card styles */
.word-card {
    @apply bg-white p-4 rounded-lg border border-gray-200 cursor-pointer transition;
}

.word-card:hover {
    @apply bg-gray-50 border-blue-300 shadow-md;
}

.word-card.active {
    @apply border-blue-500 bg-blue-50;
}

/* Loading spinner */
.spinner {
    @apply inline-block w-8 h-8 border-4 border-gray-200 border-t-blue-600 rounded-full animate-spin;
}

/* Mobile bottom navigation */
.bottom-nav {
    @apply fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 shadow-lg z-50;
}

.bottom-nav-item {
    @apply flex-1 flex flex-col items-center justify-center py-2 text-gray-600 hover:text-blue-600 transition;
}

.bottom-nav-item.active {
    @apply text-blue-600;
}

/* Flashcard flip animation */
.flashcard {
    perspective: 1000px;
    cursor: pointer;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flashcard.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-center;
    padding: 2rem;
}

.flashcard-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.flashcard-back {
    background: white;
    transform: rotateY(180deg);
    border: 2px solid #e5e7eb;
}

/* Progress bar */
.progress-bar {
    @apply w-full h-2 bg-gray-200 rounded-full overflow-hidden;
}

.progress-fill {
    @apply h-full bg-gradient-to-r from-blue-500 to-purple-500 transition-all duration-300;
}

/* Tooltip */
.tooltip {
    @apply absolute bg-gray-900 text-white text-sm px-3 py-2 rounded shadow-lg z-50 pointer-events-none;
}

/* Scrollbar styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
    
    .bottom-nav {
        display: none;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Enhanced About Page Styles */
.about-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.about-hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1.5rem;
    color: white;
    margin-bottom: 3rem;
    animation: fadeIn 0.8s ease-out;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: slideUp 1s ease-out;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
}

.about-section {
    margin-bottom: 4rem;
    animation: fadeIn 1s ease-out;
}

.section-icon {
    display: inline-block;
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.section-text {
    font-size: 1.125rem;
    line-height: 1.75;
    color: #4b5563;
    margin-bottom: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.feature-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #6b7280;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.05);
    border-color: #3b82f6;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 2.5rem;
    color: #3b82f6;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.usage-steps {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.usage-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.step-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #6b7280;
}

.language-facts {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.fact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    border-left: 4px solid #3b82f6;
}

.fact-item i {
    font-size: 1.5rem;
    color: #3b82f6;
}

.fact-item span {
    font-size: 1rem;
    color: #4b5563;
}

.tech-stack {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    border: 2px solid #e5e7eb;
}

.tech-item i {
    font-size: 1.5rem;
    color: #8b5cf6;
}

.tech-item span {
    font-size: 1rem;
    color: #4b5563;
}

.contribute-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.contribute-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.contribute-card:hover {
    transform: translateY(-4px);
    border-color: #10b981;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.contribute-card i {
    font-size: 2.5rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.contribute-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.contribute-card p {
    font-size: 0.875rem;
    color: #6b7280;
}

.contribute-cta {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 1rem;
    text-align: center;
}

.contribute-cta p {
    font-size: 1.125rem;
}

.contribute-cta strong {
    color: #fef3c7;
}

.contact-info {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
    max-width: 600px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    border: 2px solid #e5e7eb;
}

.contact-item i {
    font-size: 1.5rem;
    color: #3b82f6;
}

.contact-item a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.contact-item a:hover {
    text-decoration: underline;
}

.about-footer {
    text-align: center;
    padding-top: 3rem;
    border-top: 2px solid #e5e7eb;
    color: #6b7280;
}

.about-footer p {
    margin-bottom: 0.5rem;
}

.version-info {
    font-size: 0.875rem;
    color: #9ca3af;
}

/* Loading spinner */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    font-size: 1.5rem;
    color: #6b7280;
}

.loading-spinner i {
    margin-right: 1rem;
    animation: spin 1s linear infinite;
}

/* Error page */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-page h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.error-page p {
    font-size: 1.125rem;
    color: #6b7280;
}

/* Smooth transitions */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .features-grid,
    .stats-grid,
    .contribute-options {
        grid-template-columns: 1fr;
    }
    
    .usage-step {
        flex-direction: column;
    }
}
