/* Custom animations and styles */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

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

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

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

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

/* Question card styles */
.question-card {
    transition: all 0.3s ease;
}

.question-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Answer option styles */
.answer-option {
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.answer-option:hover {
    border-color: #4f46e5;
    background-color: #f0f9ff;
    transform: translateX(4px);
}

.answer-option.selected {
    border-color: #4f46e5;
    background-color: #e0e7ff;
}

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

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #4f46e5;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
    
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .text-4xl {
        font-size: 2rem;
    }
}

/* Pattern question styles */
.pattern-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.pattern-item {
    aspect-ratio: 1;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pattern-item:hover {
    border-color: #4f46e5;
    background-color: #f0f9ff;
}

.pattern-item.selected {
    border-color: #4f46e5;
    background-color: #e0e7ff;
}

/* Number series styles */
.number-series {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 0.5rem;
}

/* Word problem styles */
.word-problem {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #f9fafb;
    border-radius: 0.5rem;
}

/* Matrix question styles */
.matrix-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin: 2rem auto;
    max-width: 300px;
}

.matrix-cell {
    aspect-ratio: 1;
    border: 1px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background-color: white;
}

.matrix-cell.empty {
    background-color: #f3f4f6;
    border: 2px dashed #9ca3af;
}

/* Timer styles */
.timer {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-weight: bold;
    color: #4f46e5;
}

/* Payment form styles */
.payment-form {
    max-width: 400px;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.input-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
}

.input-group input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Success message styles */
.success-message {
    background-color: #10b981;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    margin: 1rem 0;
}

/* Error message styles */
.error-message {
    background-color: #ef4444;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    margin: 1rem 0;
}
