/* Custom styles for Tabliczka Mnożenia app */

/* Animations */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

/* Correct answer animation */
.correct-answer {
    animation: bounce 0.6s ease-in-out;
}

/* Incorrect answer animation */
.incorrect-answer {
    animation: shake 0.6s ease-in-out;
}

/* Button hover effects */
.btn-hover {
    transition: all 0.3s ease;
}

.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Progress bar animation */
.progress-bar {
    transition: width 0.3s ease-in-out;
}

/* Quiz question animation */
.question-appear {
    animation: fadeInUp 0.5s ease-out;
}

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

/* Mobile optimizations */
@media (max-width: 768px) {
    .mobile-text-lg {
        font-size: 1.125rem;
    }

    .mobile-p-4 {
        padding: 1rem;
    }

    .mobile-text-2xl {
        font-size: 1.5rem;
    }

    /* iOS hamburger menu improvements */
    .mobile-menu {
        padding: 1.5rem 0.5rem !important;
    }

    .mobile-menu a {
        padding: 1rem 0.75rem !important;
        font-size: 1.125rem !important;
        line-height: 1.5 !important;
    }

    .mobile-menu .px-3 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .mobile-menu .py-2 {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .bg-primary {
        background-color: #000000 !important;
        color: #ffffff !important;
    }

    .bg-secondary {
        background-color: #006600 !important;
        color: #ffffff !important;
    }

    .text-gray-600 {
        color: #000000 !important;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Hide number input arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

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

    body {
        background: white !important;
        color: black !important;
    }
}
